forked from microsoft/nni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(cherry picked from commit f82ef62)
- Loading branch information
Showing
10 changed files
with
520 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# NNI Client | ||
|
||
NNI client is a python API of `nnictl`, which implements the most commonly used commands. Users can use this API to control their experiments, collect experiment results and conduct advanced analyses based on experiment results in python code directly instead of using command line. Here is an example: | ||
|
||
``` | ||
from nnicli import Experiment | ||
# create an experiment instance | ||
exp = Experiment() | ||
# start an experiment, then connect the instance to this experiment | ||
# you can also use `resume_experiment`, `view_experiment` or `connect_experiment` | ||
# only one of them should be called in one instance | ||
exp.start_experiment('nni/examples/trials/mnist-pytorch/config.yml', port=9090) | ||
# update the experiment's concurrency | ||
exp.update_concurrency(3) | ||
# get some information about the experiment | ||
print(exp.get_experiment_status()) | ||
print(exp.get_job_statistics()) | ||
print(exp.list_trial_jobs()) | ||
# stop the experiment, then disconnect the instance from the experiment. | ||
exp.stop_experiment() | ||
``` | ||
|
||
## References | ||
|
||
```eval_rst | ||
.. autoclass:: nnicli.Experiment | ||
:members: | ||
.. autoclass:: nnicli.TrialJob | ||
:members: | ||
.. autoclass:: nnicli.TrialHyperParameters | ||
:members: | ||
.. autoclass:: nnicli.TrialMetricData | ||
:members: | ||
.. autoclass:: nnicli.TrialResult | ||
:members: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.