File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,22 @@ class Experiment(_base_types.Record):
24
24
add a new trial to an Experiment by calling :meth:`~smexperiments.experiment.Experiment.create_trial`.
25
25
To remove a Trial from an experiment, delete the trial.
26
26
27
+ Examples:
28
+ .. code-block:: python
29
+
30
+ from smexperiments import experiment
31
+
32
+ my_experiment = experiment.Experiment.create(experiment_name='AutoML')
33
+ my_trial = my_experiment.create_trial(trial_name='random-forest')
34
+
35
+ for exp in experiment.Experiment.list():
36
+ print(exp)
37
+ for trial in my_experiment.list_trials():
38
+ print(trial)
39
+
40
+ my_trial.delete()
41
+ my_experiment.delete()
42
+
27
43
Attributes:
28
44
experiment_name (str): The name of the experiment. The name must be unique within an account.
29
45
description (str): A description of the experiment.
Original file line number Diff line number Diff line change @@ -21,6 +21,25 @@ class Trial(_base_types.Record):
21
21
22
22
Consists of a list of trial component objects, which document individual activities within the workflow.
23
23
24
+ Examples:
25
+ .. code-block:: python
26
+
27
+ from smexperiments import trial, experiment, tracker
28
+
29
+ my_experiment = experiment.Experiment.create(experiment_name='AutoML')
30
+ my_trial = trial.Trial.create('AutoML')
31
+
32
+ my_tracker = tracker.Tracker.create()
33
+ # log hyper parameter of learning rate
34
+ my_tracker.log_parameter('learning_rate', 0.01)
35
+ my_trial.add_trial_component(my_tracker)
36
+
37
+ for trial_component in my_trial.list_trial_components():
38
+ print(trial_component)
39
+
40
+ my_trial.remove_trial_component(my_tracker)
41
+ my_trial.delete()
42
+
24
43
Attributes:
25
44
trial_name (str): The name of the trial.
26
45
experiment_name (str): The name of the trial's experiment.
You can’t perform that action at this time.
0 commit comments