determined¶
-
determined.
create
(trial_def: Type[determined._trial.Trial], config: Optional[Dict[str, Any]] = None, mode: determined._native.Mode = <Mode.SUBMIT: 'submit'>, context_dir: str = '', command: Optional[List[str]] = None, master_url: Optional[str] = None) → None¶ Create an experiment.
- Parameters
trial_def – A class definition implementing the
det.Trial
interface.config – A dictionary representing the experiment configuration to be associated with the experiment.
mode –
The
determined.Mode
used when creating an experiment1.
Mode.SUBMIT
(default): Submit the experiment to a remote Determined cluster.2.
Mode.TEST
(default): Test the experiment in the calling Python process for development / debugging purposes. Run through a minimal loop of training, validation, and checkpointing steps.context_dir – A string filepath that defines the context directory. In submit mode, all files in this directory will be uploaded to the Determined cluster. The total size of this directory must be under 96 MB.
command –
A list of strings that is used as the entrypoint of the training script in the Determined task environment. When executing this function via a python script, this argument is inferred to be
sys.argv
by default. When executing this function via IPython or Jupyter notebook, this argument is required.Example: When creating an experiment by running “python train.py –flag value”, the default command is inferred as [“train.py”, “–flag”, “value”].
master_url – An optional string to use as the Determined master URL in submit mode. If not specified, will be inferred from the environment variable
DET_MASTER
.
-
determined.
create_trial_instance
(trial_def: Type[determined._trial.Trial], checkpoint_dir: str, config: Optional[Dict[str, Any]] = None) → determined._trial.Trial¶ Create a trial instance from a Trial class definition. This can be a useful utility for debugging your trial logic in any development environment.
- Parameters
trial_def – A class definition that inherits from the det.Trial interface.
checkpoint_dir – The checkpoint directory that the trial will use for loading and saving checkpoints.
config – An optional experiment configuration that is used to initialize the
determined.TrialContext
. If not specified, a minimal default is used.
-
class
determined.
Mode
¶ The mode used to create an experiment.
See
determined.create()
.
-
determined.
Categorical
(vals: List[Any]) → Dict¶ A hyperparameter configuration for a discrete uniform distribution over a list of values.
- Parameters
vals – A list of JSON-serializable values (int, float, str, or a some combination of those types in nested lists or dictionaries)
- Returns
A dictionary representing the configuration.
-
determined.
Constant
(value: Any) → Dict¶ A hyperparameter configuration for a constant value.
- Parameters
value – A JSON-serializable value (int, float, str, or a some combination of those types in a list or dictionary)
- Returns
A dictionary representing the configuration.
-
determined.
Double
(minval: float, maxval: float) → Dict¶ A hyperparameter configuration for a continuous uniform distribution over float values.
- Parameters
minval – Minimum float value, inclusive.
maxval – Maximum float value, inclusive.
- Returns
A dictionary representing the configuration.
-
determined.
Integer
(minval: int, maxval: int) → Dict¶ A hyperparameter configuration for a discrete uniform distribution over integers.
- Parameters
minval – Minimum integer value, inclusive.
maxval – Maximum integer value, inclusive.
- Returns
A dictionary representing the configuration.
-
determined.
Log
(minval: float, maxval: float, base: int = 10) → Any¶ A hyperparameter configuration for a log uniform distribution over float values.
- Parameters
minval – The minimum exponent to be used in the distribution. The minimum value of the hyperparameter will be base ^ minval.
maxval – The minimum exponent to be used in the distribution. The maximum value of the hyperparameter will be base ^ maxval.
base – The logarithm base to use for the distribution (default: 10)
- Returns
A dictionary representing the configuration.