Documentation examples

This commit is contained in:
allegroai
2020-12-24 00:30:32 +02:00
parent 7edc998824
commit a29a655a6e
50 changed files with 223 additions and 37 deletions

View File

@@ -20,7 +20,8 @@ from tensorflow.keras.optimizers import RMSprop
from clearml import Task, Logger
# Connecting ClearML
# Connecting ClearML with the current process,
# from here on everything is logged automatically
task = Task.init(project_name='examples', task_name='Keras HP optimization base')

View File

@@ -40,7 +40,8 @@ def job_complete_callback(
print('WOOT WOOT we broke the record! Objective reached {}'.format(objective_value))
# Connecting ClearML
# Connecting ClearML with the current process,
# from here on everything is logged automatically
task = Task.init(project_name='Hyper-Parameter Optimization',
task_name='Automatic Hyper-Parameter Optimization',
task_type=Task.TaskTypes.optimizer,
@@ -73,11 +74,10 @@ an_optimizer = HyperParameterOptimizer(
UniformIntegerParameterRange('General/layer_2', min_value=128, max_value=512, step_size=128),
DiscreteParameterRange('General/batch_size', values=[96, 128, 160]),
DiscreteParameterRange('General/epochs', values=[30]),
DiscreteParameterRange('General/optimizer', values=['adam', 'sgd']),
],
# this is the objective metric we want to maximize/minimize
objective_metric_title='accuracy',
objective_metric_series='accuracy',
objective_metric_title='epoch_accuracy',
objective_metric_series='epoch_accuracy',
# now we decide if we want to maximize it or minimize it (accuracy we maximize)
objective_metric_sign='max',
# let us limit the number of concurrent experiments,