In the training output for a hyperparameter tuning job on Google Cloud ML Engine, I do not see the values of the objective calculated for each trial. The training output is the following:
{
"completedTrialCount": "4",
"trials": [
{
"trialId": "2",
"hyperparameters": {
"learning-rate": "0.0010000350944297609"
}
},
{
"trialId": "3",
"hyperparameters": {
"learning-rate": "0.0053937227881987841"
}
},
{
"trialId": "4",
"hyperparameters": {
"learning-rate": "0.099948384760813816"
}
},
{
"trialId": "1",
"hyperparameters": {
"learning-rate": "0.02917661111653325"
}
}
],
"consumedMLUnits": 0.38,
"isHyperparameterTuningJob": true
}
The hyperparameter tuning job appears to run correctly and displays a green check mark next to the job. However, I expected that I would see the value of the objective function for each trial in the training output. Without this, I don't know which trial is best. I have attempted to add the value of the objective into the summary graph as follows:
with tf.Session() as sess:
...
final_cost = sess.run(tf.reduce_sum(tf.square(Y-y_model)), feed_dict={X: trX, Y:trY})
summary = Summary(value=[Summary.Value(tag='hyperparameterMetricTag', simple_value=final_cost)])
summary_writer.add_summary(summary)
summary_writer.flush()
I believe I have followed all the steps discussed in the documentation to set up a hyperparameter tuning job. What else is required to ensure that I get an output that lets me compare different trials?
summary_writer? Is there any chance that the actually value is 0.0? - rhaertel80eval_path = os.path.join(args.jobDir, 'metric1') summary_writer = tf.summary.FileWriter(eval_path).args.jobDiris the GCS bucket where the job files get stored. When I run the code locally, thefinal_costvalue is non-zero. - DanhyperparameterMetricTagin your case) in your job request(HyperparameterSpec) and your code. - lwz1992