Model Definition Interfaces¶
To create a Trial API model definition, we should implement the Trial interface provided by Determined. This interface returns information about the machine learning task the user wants to perform, like the model architecture to use or the validation metrics that should be computed.
Determined provides versions of the Trial interface for each of the application frameworks it supports:
If you hit any issues creating your Trial API model definition, you can visit Model Debugging in Determined. It may also be useful for writing your first trial, as it has a framework for incrementally testing each of the features you will need in a successful Trial definition.
Create an Experiment via the CLI¶
A user can submit an experiment via the
det experiment create CLI
$ det experiment create <YAML config file> <context directory>
The context directory of Python files that contain the Trial API
implementation should include an accompanying
specifies from where to load a trial class. The entrypoint specification
is expected to take the form:
<module> specifies the module containing the trial class within the
model definition, relative to the root. It may be an empty string if the
model definition is a Python package and the
trial class is exposed in the top-level
<object reference> specifies the naming of the trial class within
the module. It may be a nested object delimited by dots.
MNistTrialclass that is exposed in a
__init__.pyfile at the top level of the context directory.
CIFAR10Trialclass that is defined in a file
model_def.pyat the top level of the context directory.
NestedTrialclass that is an attribute of
trial_classesis defined in a file
Note that this follows the Entry points specification defined in the
Python Packaging User Guide with a
single difference: the name of the context directory is prefixed to
<module>, or used as the module if
<module> is empty.
Since project directories might include large artifacts that should not
be packaged as part of the model definition (e.g., data sets or compiled
binaries), users can optionally include a
.detignore file at the top
level that specifies file paths to be omitted from the model definition.
.detignore file uses the same syntax as .gitignore. Note that byte-compiled Python
.pyc files or
__pycache__ directories) are always