fix tests
This commit is contained in:
parent
0bf2da738f
commit
2f7396d275
|
@ -224,7 +224,7 @@ class DataUtil(object):
|
||||||
session_knobs.append(knob)
|
session_knobs.append(knob)
|
||||||
knob_cat = [k['name'] for k in session_knobs]
|
knob_cat = [k['name'] for k in session_knobs]
|
||||||
|
|
||||||
if knob_cat == knob_labels:
|
if len(knob_cat) == 0 or knob_cat == knob_labels:
|
||||||
# Nothing to do!
|
# Nothing to do!
|
||||||
return knob_matrix, knob_labels
|
return knob_matrix, knob_labels
|
||||||
|
|
||||||
|
|
|
@ -1731,10 +1731,8 @@ def tuner_status_test(request, upload_code): # pylint: disable=unused-argument,
|
||||||
name, expected_name))
|
name, expected_name))
|
||||||
if session.tuning_session == "tuning_session":
|
if session.tuning_session == "tuning_session":
|
||||||
if session.algorithm == AlgorithmType.GPR or session.algorithm == AlgorithmType.DNN:
|
if session.algorithm == AlgorithmType.GPR or session.algorithm == AlgorithmType.DNN:
|
||||||
if isinstance(result, dict) is False:
|
if isinstance(result, dict) is True:
|
||||||
return HttpResponse("Failure: wrong result for task {}".format(name))
|
return HttpResponse("Failure: map workload when there is only 1 workload")
|
||||||
if 'mapped_workload_id' not in result:
|
|
||||||
return HttpResponse("Failure: wrong result for task {}".format(name))
|
|
||||||
elif i == 2:
|
elif i == 2:
|
||||||
expected_name = TaskType.TYPE_NAMES[TaskType.RECOMMENDATION]
|
expected_name = TaskType.TYPE_NAMES[TaskType.RECOMMENDATION]
|
||||||
if name != expected_name:
|
if name != expected_name:
|
||||||
|
|
Loading…
Reference in New Issue