Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Sdk update #272

Merged
merged 11 commits into from
Oct 26, 2018
Merged
2 changes: 1 addition & 1 deletion docs/howto_1_WriteTrial.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Refer to [SearchSpaceSpec.md](SearchSpaceSpec.md) to learn more about search spa
2.2 Get predefined parameters
Use the following code snippet:

RECEIVED_PARAMS = nni.get_parameters()
RECEIVED_PARAMS = nni.get_next_parameter()

to get hyper-parameters' values assigned by tuner. `RECEIVED_PARAMS` is an object, for example:

Expand Down
2 changes: 1 addition & 1 deletion docs/howto_2_CustomizedTuner.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ If the you implement the ```generate_parameters``` like this:
# your code implements here.
return {"dropout": 0.3, "learning_rate": 0.4}
```
It's means your Tuner will always generate parameters ```{"dropout": 0.3, "learning_rate": 0.4}```. Then Trial will receive ```{"dropout": 0.3, "learning_rate": 0.4}``` this object will using ```nni.get_parameters()``` API from NNI SDK. After training of Trial, it will send result to Tuner by calling ```nni.report_final_result(0.93)```. Then ```receive_trial_result``` will function will receied these parameters like:
It's means your Tuner will always generate parameters ```{"dropout": 0.3, "learning_rate": 0.4}```. Then Trial will receive ```{"dropout": 0.3, "learning_rate": 0.4}``` by calling API ```nni.get_next_parameter()```. Once the trial ends with a result (normally some kind of metrics), it can send the result to Tuner by calling API ```nni.report_final_result()```, such as ```nni.report_final_result(0.93)```. Then your Tuner's ```receive_trial_result``` function will receied the result like:
chicm-ms marked this conversation as resolved.
Show resolved Hide resolved
```
parameter_id = 82347
parameters = {"dropout": 0.3, "learning_rate": 0.4}
Expand Down
Loading