This commit is contained in:
bohanjason 2020-02-24 02:51:11 -05:00 committed by Dana Van Aken
parent 6c3b8643b4
commit a9f1556184
2 changed files with 16 additions and 2 deletions

View File

@ -781,6 +781,13 @@ def integration_tests():
response = get_result(upload_code='ottertuneTestTuningGPR') response = get_result(upload_code='ottertuneTestTuningGPR')
assert response['status'] == 'good' assert response['status'] == 'good'
# Test DDPG
LOG.info('Test DDPG (deep deterministic policy gradient)')
upload_result(result_dir='./integrationTests/data/', prefix='0__',
upload_code='ottertuneTestTuningDDPG')
response = get_result(upload_code='ottertuneTestTuningDDPG')
assert response['status'] == 'good'
# Test DNN: 2rd iteration # Test DNN: 2rd iteration
upload_result(result_dir='./integrationTests/data/', prefix='1__', upload_result(result_dir='./integrationTests/data/', prefix='1__',
upload_code='ottertuneTestTuningDNN') upload_code='ottertuneTestTuningDNN')
@ -793,4 +800,10 @@ def integration_tests():
response = get_result(upload_code='ottertuneTestTuningGPR') response = get_result(upload_code='ottertuneTestTuningGPR')
assert response['status'] == 'good' assert response['status'] == 'good'
# Test DDPG: 2rd iteration
upload_result(result_dir='./integrationTests/data/', prefix='1__',
upload_code='ottertuneTestTuningDDPG')
response = get_result(upload_code='ottertuneTestTuningDDPG')
assert response['status'] == 'good'
LOG.info("\n\nIntegration Tests: PASSED!!\n") LOG.info("\n\nIntegration Tests: PASSED!!\n")

View File

@ -160,10 +160,11 @@ def clean_metric_data(metric_matrix, metric_labels, session):
# If columns are missing from the matrix # If columns are missing from the matrix
if missing_columns: if missing_columns:
for metric in missing_columns: for metric in missing_columns:
index = metric_cat.index(metric) # append a missing column after the last column
index = matrix.shape[1] # pylint: disable=unsubscriptable-object
default_val = 0 default_val = 0
matrix = np.insert(matrix, index, default_val, axis=1) matrix = np.insert(matrix, index, default_val, axis=1)
metric_labels.insert(index, metric) metric_labels.append(metric)
LOG.debug(matrix.shape) LOG.debug(matrix.shape)
# If they are useless columns in the matrix # If they are useless columns in the matrix
if unused_columns: if unused_columns: