Experiment
Experiment
¶
Source code in python/opsml/experiment/_experiment.pyi
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
card
property
¶
ExperimentCard associated with the Experiment
log_artifact(path)
¶
Log an artifact
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path
|
Path to the artifact file. Path must be a file.
If logging multiple artifacts, use |
required |
log_artifacts(paths)
¶
Log multiple artifacts
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paths
|
Path
|
Paths to a directory containing artifacts. All files in the directory will be logged. |
required |
log_metric(name, value, step=None, timestamp=None, created_at=None)
¶
Log a metric
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the metric |
required |
value
|
float
|
Value of the metric |
required |
step
|
int | None
|
Step of the metric |
None
|
timestamp
|
int | None
|
Timestamp of the metric |
None
|
created_at
|
datetime | None
|
Created at of the metric |
None
|
Source code in python/opsml/experiment/_experiment.pyi
log_metrics(metrics)
¶
Log multiple metrics
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metrics
|
list[Metric]
|
List of metrics to log |
required |
log_parameter(name, value)
¶
Log a parameter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the parameter |
required |
value
|
int | float | str
|
Value of the parameter |
required |
log_parameters(parameters)
¶
Log multiple parameters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters
|
list[Parameter]
|
List of parameters to log |
required |
register_card(card, version_type=VersionType.Minor, pre_tag=None, build_tag=None, save_kwargs=None)
¶
Register a Card as part of an experiment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
card
|
DataCard | ModelCard
|
Card to register. Can be a DataCard or a ModelCard |
required |
version_type
|
VersionType
|
How to increment the version SemVer. Default is VersionType.Minor. |
Minor
|
pre_tag
|
str
|
Optional pre tag to associate with the version. |
None
|
build_tag
|
str
|
Optional build_tag to associate with the version. |
None
|
save_kwargs
|
SaveKwargs
|
Optional SaveKwargs to pass to the Card interface (If using DataCards and ModelCards). |
None
|
Source code in python/opsml/experiment/_experiment.pyi
start_experiment(space=None, name=None, code_dir=None, log_hardware=False, experiment_uid=None)
¶
Start an Experiment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
space
|
str | None
|
space to associate with |
None
|
name
|
str | None
|
Name to associate with |
None
|
code_dir
|
Path | None
|
Directory to log code from |
None
|
log_hardware
|
bool
|
Whether to log hardware information or not |
False
|
experiment_uid
|
str | None
|
Experiment UID. If provided, the experiment will be loaded from the server. |
None
|
Returns:
Type | Description |
---|---|
Experiment
|
Experiment |
Source code in python/opsml/experiment/_experiment.pyi
Metric
¶
Source code in python/opsml/experiment/_experiment.pyi
created_at
property
¶
Created at of the metric
name
property
¶
Name of the metric
step
property
¶
Step of the metric
timestamp
property
¶
Timestamp of the metric
value
property
¶
Value of the metric
__init__(name, value, step=None, timestamp=None, created_at=None)
¶
Initialize a Metric
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the metric |
required |
value
|
float
|
Value of the metric |
required |
step
|
int | None
|
Step of the metric |
None
|
timestamp
|
int | None
|
Timestamp of the metric |
None
|
created_at
|
datetime | None
|
Created at of the metric |
None
|
Source code in python/opsml/experiment/_experiment.pyi
Parameter
¶
Source code in python/opsml/experiment/_experiment.pyi
name
property
¶
Name of the parameter
value
property
¶
Value of the parameter
__init__(name, value)
¶
Initialize a Parameter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the parameter |
required |
value
|
int | float | str
|
Value of the parameter |
required |
Source code in python/opsml/experiment/_experiment.pyi
get_experiment_metrics(experiment_uid, names=None)
¶
Get metrics of an experiment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
experiment_uid
|
str
|
UID of the experiment |
required |
names
|
list[str] | None
|
Names of the metrics to get. If None, all metrics will be returned. |
None
|
Returns:
Type | Description |
---|---|
Metrics
|
Metrics |
Source code in python/opsml/experiment/_experiment.pyi
get_experiment_parameters(experiment_uid, names=None)
¶
Get parameters of an experiment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
experiment_uid
|
str
|
UID of the experiment |
required |
names
|
list[str] | None
|
Names of the parameters to get. If None, all parameters will be returned. |
None
|
Returns:
Type | Description |
---|---|
Parameters
|
Parameters |
Source code in python/opsml/experiment/_experiment.pyi
start_experiment(space=None, name=None, code_dir=None, log_hardware=False, experiment_uid=None)
¶
Start an Experiment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
space
|
str | None
|
space to associate with |
None
|
name
|
str | None
|
Name to associate with |
None
|
code_dir
|
Path | None
|
Directory to log code from |
None
|
log_hardware
|
bool
|
Whether to log hardware information or not |
False
|
experiment_uid
|
str | None
|
Experiment UID. If provided, the experiment will be loaded from the server. |
None
|
Returns:
Type | Description |
---|---|
Experiment
|
Experiment |