Skip to content

Commit

Permalink
Merge pull request #60 from microsoft/master
Browse files Browse the repository at this point in the history
document the dispatcher working dir (microsoft#1866)
  • Loading branch information
chicm-ms authored Dec 23, 2019
2 parents 24fead6 + f058cf2 commit 0b7321e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/en_US/Assessor/CustomizeAssessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ assessor:
Please noted in **2**. The object `trial_history` are exact the object that Trial send to Assessor by using SDK `report_intermediate_result` function.

The working directory of your assessor is `<home>/nni/experiments/<experiment_id>/log`, which can be retrieved with environment variable `NNI_LOG_DIRECTORY`,

More detail example you could see:
> * [medianstop-assessor](https://github.com/Microsoft/nni/tree/master/src/sdk/pynni/nni/medianstop_assessor)
> * [curvefitting-assessor](https://github.com/Microsoft/nni/tree/master/src/sdk/pynni/nni/curvefitting_assessor)
2 changes: 2 additions & 0 deletions docs/en_US/Tuner/CustomizeAdvisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ advisor:
arg1: value1
```
**Note that** The working directory of your advisor is `<home>/nni/experiments/<experiment_id>/log`, which can be retrieved with environment variable `NNI_LOG_DIRECTORY`.

## Example

Here we provide an [example](https://github.com/microsoft/nni/tree/master/examples/tuners/mnist_keras_customized_advisor).
2 changes: 1 addition & 1 deletion docs/en_US/Tuner/CustomizeTuner.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parameters = {"dropout": 0.3, "learning_rate": 0.4}
value = 0.93
```

**Note that** if you want to access a file (e.g., `data.txt`) in the directory of your own tuner, you cannot use `open('data.txt', 'r')`. Instead, you should use the following:
**Note that** The working directory of your tuner is `<home>/nni/experiments/<experiment_id>/log`, which can be retrieved with environment variable `NNI_LOG_DIRECTORY`, therefore, if you want to access a file (e.g., `data.txt`) in the directory of your own tuner, you cannot use `open('data.txt', 'r')`. Instead, you should use the following:

```python
_pwd = os.path.dirname(__file__)
Expand Down

0 comments on commit 0b7321e

Please sign in to comment.