Added new migration file to change type of Result.taskids field and cleaned up views.py
This commit is contained in:
parent
4d228f5765
commit
9a5dea806f
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.27 on 2020-02-06 20:05
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('website', '0007_executiontime'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='result',
|
||||
name='task_ids',
|
||||
field=models.TextField(null=True),
|
||||
),
|
||||
]
|
|
@ -643,25 +643,17 @@ def handle_result_files(session, files, execution_times=None):
|
|||
('map_workload', ()),
|
||||
('configuration_recommendation', ()),
|
||||
]
|
||||
#response = chain(aggregate_target_results.s(result.pk, session.algorithm),
|
||||
# map_workload.s(),
|
||||
# configuration_recommendation.s()).apply_async()
|
||||
elif session.algorithm == AlgorithmType.DDPG:
|
||||
subtask_list = [
|
||||
('train_ddpg', (result_id,)),
|
||||
('configuration_recommendation_ddpg', ()),
|
||||
]
|
||||
#response = chain(train_ddpg.s(result.pk),
|
||||
# configuration_recommendation_ddpg.s()).apply_async()
|
||||
elif session.algorithm == AlgorithmType.DNN:
|
||||
subtask_list = [
|
||||
('aggregate_target_results', (result_id, session.algorithm)),
|
||||
('map_workload', ()),
|
||||
('configuration_recommendation', ()),
|
||||
]
|
||||
#response = chain(aggregate_target_results.s(result.pk, session.algorithm),
|
||||
# map_workload.s(),
|
||||
# configuration_recommendation.s()).apply_async()
|
||||
|
||||
subtasks = []
|
||||
for name, args in subtask_list:
|
||||
|
@ -673,15 +665,6 @@ def handle_result_files(session, files, execution_times=None):
|
|||
result.task_ids = JSONUtil.dumps(response.as_tuple())
|
||||
result.save()
|
||||
|
||||
#taskmeta_ids = []
|
||||
#current_task = response
|
||||
#while current_task:
|
||||
# taskmeta_ids.insert(0, current_task.id)
|
||||
# current_task = current_task.parent
|
||||
|
||||
#result.task_ids = ','.join(taskmeta_ids)
|
||||
#result.save()
|
||||
|
||||
if execution_times:
|
||||
try:
|
||||
batch = []
|
||||
|
|
Loading…
Reference in New Issue