зеркало из https://github.com/microsoft/nni.git
update experiment dir (#2753)
This commit is contained in:
Родитель
3fdbbdb3af
Коммит
6ec2adeed3
|
@ -81,6 +81,3 @@ venv.bak/
|
|||
# VSCode
|
||||
.vscode
|
||||
.vs
|
||||
|
||||
# In case you place source code in ~/nni/
|
||||
/experiments
|
||||
|
|
|
@ -54,7 +54,7 @@ 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`,
|
||||
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)
|
||||
|
|
|
@ -75,7 +75,7 @@ Then search with evolution tuner.
|
|||
nnictl create --config config_search.yml
|
||||
```
|
||||
|
||||
The final architecture exported from every epoch of evolution can be found in `checkpoints` under the working directory of your tuner, which, by default, is `$HOME/nni/experiments/your_experiment_id/log`.
|
||||
The final architecture exported from every epoch of evolution can be found in `checkpoints` under the working directory of your tuner, which, by default, is `$HOME/nni-experiments/your_experiment_id/log`.
|
||||
|
||||
### Step 3. Train from Scratch
|
||||
|
||||
|
|
|
@ -156,19 +156,19 @@ If NNI Annotation is used, the trial's converted code is in another temporary di
|
|||
#!/bin/bash
|
||||
cd /tmp/user_name/nni/annotation/tmpzj0h72x6 #This is the actual directory
|
||||
export NNI_PLATFORM=local
|
||||
export NNI_SYS_DIR=/home/user_name/nni/experiments/$experiment_id$/trials/$trial_id$
|
||||
export NNI_SYS_DIR=/home/user_name/nni-experiments/$experiment_id$/trials/$trial_id$
|
||||
export NNI_TRIAL_JOB_ID=nrbb2
|
||||
export NNI_OUTPUT_DIR=/home/user_name/nni/experiments/$eperiment_id$/trials/$trial_id$
|
||||
export NNI_OUTPUT_DIR=/home/user_name/nni-experiments/$eperiment_id$/trials/$trial_id$
|
||||
export NNI_TRIAL_SEQ_ID=1
|
||||
export MULTI_PHASE=false
|
||||
export CUDA_VISIBLE_DEVICES=
|
||||
eval python3 mnist.py 2>/home/user_name/nni/experiments/$experiment_id$/trials/$trial_id$/stderr
|
||||
echo $? `date +%s%3N` >/home/user_name/nni/experiments/$experiment_id$/trials/$trial_id$/.nni/state
|
||||
eval python3 mnist.py 2>/home/user_name/nni-experiments/$experiment_id$/trials/$trial_id$/stderr
|
||||
echo $? `date +%s%3N` >/home/user_name/nni-experiments/$experiment_id$/trials/$trial_id$/.nni/state
|
||||
```
|
||||
|
||||
### Other Modes
|
||||
|
||||
When running trials on other platforms like remote machine or PAI, the environment variable `NNI_OUTPUT_DIR` only refers to the output directory of the trial, while the trial code and `run.sh` might not be there. However, the `trial.log` will be transmitted back to the local machine in the trial's directory, which defaults to `~/nni/experiments/$experiment_id$/trials/$trial_id$/`
|
||||
When running trials on other platforms like remote machine or PAI, the environment variable `NNI_OUTPUT_DIR` only refers to the output directory of the trial, while the trial code and `run.sh` might not be there. However, the `trial.log` will be transmitted back to the local machine in the trial's directory, which defaults to `~/nni-experiments/$experiment_id$/trials/$trial_id$/`
|
||||
|
||||
For more information, please refer to [HowToDebug](../Tutorial/HowToDebug.md).
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ 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`.
|
||||
**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
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ parameters = {"dropout": 0.3, "learning_rate": 0.4}
|
|||
value = 0.93
|
||||
```
|
||||
|
||||
**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:
|
||||
**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__)
|
||||
|
|
|
@ -59,7 +59,7 @@ If you want to save and load the **best model**, the following methods are recom
|
|||
```python
|
||||
# 1. Use NNI API
|
||||
## You can get the best model ID from WebUI
|
||||
## or `nni/experiments/experiment_id/log/model_path/best_model.txt'
|
||||
## or `nni-experiments/experiment_id/log/model_path/best_model.txt'
|
||||
|
||||
## read the json string from model file and load it with NNI API
|
||||
with open("best-model.json") as json_file:
|
||||
|
|
|
@ -266,7 +266,7 @@ class DLTSTrainingService implements TrainingService {
|
|||
public async submitTrialJob(form: TrialJobApplicationForm): Promise<TrialJobDetail> {
|
||||
const trialJobId: string = uniqueString(5);
|
||||
const trialWorkingFolder: string = path.join(
|
||||
'/nni/experiments', getExperimentId(),
|
||||
'/nni-experiments', getExperimentId(),
|
||||
'/trials/', trialJobId);
|
||||
const trialJobDetail = new DLTSTrialJobDetail(
|
||||
trialJobId, // id
|
||||
|
|
|
@ -54,7 +54,7 @@ abstract class PAITrainingService implements TrainingService {
|
|||
this.metricsEmitter = new EventEmitter();
|
||||
this.trialJobsMap = new Map<string, PAITrialJobDetail>();
|
||||
this.jobQueue = [];
|
||||
this.expRootDir = path.join('/nni', 'experiments', getExperimentId());
|
||||
this.expRootDir = path.join('/nni-experiments', getExperimentId());
|
||||
this.experimentId = getExperimentId();
|
||||
this.paiJobCollector = new PAIJobInfoCollector(this.trialJobsMap);
|
||||
this.paiTokenUpdateInterval = 7200000; //2hours
|
||||
|
|
|
@ -175,7 +175,7 @@ class ShellExecutor {
|
|||
}
|
||||
|
||||
public getRemoteExperimentRootDir(experimentId: string): string {
|
||||
return this.joinPath(this.tempPath, 'nni', 'experiments', experimentId);
|
||||
return this.joinPath(this.tempPath, 'nni-experiments', experimentId);
|
||||
}
|
||||
|
||||
public joinPath(...paths: string[]): string {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"trainingServicePlatform": "local",
|
||||
"tuner": {
|
||||
"builtinTunerName": "Random",
|
||||
"checkpointDir": "/home/user/nni/experiments/TN5K0Qju/checkpoint"
|
||||
"checkpointDir": "/home/user/nni-experiments/TN5K0Qju/checkpoint"
|
||||
},
|
||||
"versionCheck": true,
|
||||
"clusterMetaData": [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"id": "AKVcExIf",
|
||||
"revision": 29,
|
||||
"execDuration": 172,
|
||||
"logDir": "/home/v-yugzh/nni/experiments/AKVcExIf",
|
||||
"logDir": "/home/v-yugzh/nni-experiments/AKVcExIf",
|
||||
"nextSequenceId": 10,
|
||||
"params": {
|
||||
"authorName": "default",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"id": "GD5MnU8G",
|
||||
"revision": 22,
|
||||
"execDuration": 172,
|
||||
"logDir": "/home/user/nni/experiments/GD5MnU8G",
|
||||
"logDir": "/home/user/nni-experiments/GD5MnU8G",
|
||||
"nextSequenceId": 3,
|
||||
"params": {
|
||||
"authorName": "default",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"id": "mw3lSbde",
|
||||
"revision": 3,
|
||||
"execDuration": 8,
|
||||
"logDir": "/***/nni/experiments/mw3lSbde",
|
||||
"logDir": "/***/nni-experiments/mw3lSbde",
|
||||
"nextSequenceId": 1,
|
||||
"params": {
|
||||
"authorName": "NNI Example",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"id": "mw3lSbde",
|
||||
"revision": 34,
|
||||
"execDuration": 233,
|
||||
"logDir": "/***/nni/experiments/mw3lSbde",
|
||||
"logDir": "/***/nni-experiments/mw3lSbde",
|
||||
"nextSequenceId": 9,
|
||||
"params": {
|
||||
"authorName": "NNI Example",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"id": "mw3lSbde",
|
||||
"revision": 39,
|
||||
"execDuration": 265,
|
||||
"logDir": "/***/nni/experiments/mw3lSbde",
|
||||
"logDir": "/***/nni-experiments/mw3lSbde",
|
||||
"nextSequenceId": 11,
|
||||
"params": {
|
||||
"authorName": "NNI Example",
|
||||
|
|
|
@ -75,7 +75,7 @@ _nnictl()
|
|||
|
||||
# add experiment IDs to candidates if desired
|
||||
if [[ $__nnictl_2nd_expid_cmds =~ " ${COMP_WORDS[1]} " ]]; then
|
||||
local experiments=$(ls ~/nni/experiments 2>/dev/null)
|
||||
local experiments=$(ls ~/nni-experiments 2>/dev/null)
|
||||
COMPREPLY+=($(compgen -W "$experiments" -- $cur))
|
||||
fi
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ def _expand_file_annotations(src_path, dst_path, nas_mode):
|
|||
def _generate_specific_file(src_path, dst_path, exp_id, trial_id, module):
|
||||
with open(src_path) as src, open(dst_path, 'w') as dst:
|
||||
try:
|
||||
with open(os.path.expanduser('~/nni/experiments/%s/trials/%s/parameter.cfg'%(exp_id, trial_id))) as fd:
|
||||
with open(os.path.expanduser('~/nni-experiments/%s/trials/%s/parameter.cfg'%(exp_id, trial_id))) as fd:
|
||||
para_cfg = json.load(fd)
|
||||
annotated_code = specific_code_generator.parse(src.read(), para_cfg["parameters"], module)
|
||||
if annotated_code is None:
|
||||
|
|
|
@ -445,9 +445,9 @@ def remote_clean(machine_list, experiment_id=None):
|
|||
sshKeyPath = machine.get('sshKeyPath')
|
||||
passphrase = machine.get('passphrase')
|
||||
if experiment_id:
|
||||
remote_dir = '/' + '/'.join(['tmp', 'nni', 'experiments', experiment_id])
|
||||
remote_dir = '/' + '/'.join(['tmp', 'nni-experiments', experiment_id])
|
||||
else:
|
||||
remote_dir = '/' + '/'.join(['tmp', 'nni', 'experiments'])
|
||||
remote_dir = '/' + '/'.join(['tmp', 'nni-experiments'])
|
||||
sftp = create_ssh_sftp_client(host, port, userName, passwd, sshKeyPath, passphrase)
|
||||
print_normal('removing folder {0}'.format(host + ':' + str(port) + remote_dir))
|
||||
remove_remote_directory(sftp, remote_dir)
|
||||
|
@ -520,7 +520,7 @@ def experiment_clean(args):
|
|||
home = str(Path.home())
|
||||
local_dir = nni_config.get_config('experimentConfig').get('logDir')
|
||||
if not local_dir:
|
||||
local_dir = os.path.join(home, 'nni', 'experiments', experiment_id)
|
||||
local_dir = os.path.join(home, 'nni-experiments', experiment_id)
|
||||
local_clean(local_dir)
|
||||
experiment_config = Experiments()
|
||||
print_normal('removing metadata of experiment {0}'.format(experiment_id))
|
||||
|
|
Загрузка…
Ссылка в новой задаче