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

Remove outputDir and dataDir in config file #1361

Merged
merged 8 commits into from
Jul 30, 2019

Conversation

SparkSnail
Copy link
Contributor

@SparkSnail SparkSnail commented Jul 24, 2019

@@ -32,8 +32,6 @@ trial:
cpuNum: 1
memoryMB: 8196
image: msranni/nni:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I want to output my models, where is the output path?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAI does not have dataDir and outputDir in their doc anymore, so we remove these two path accordingly. In other training modes, users use OUTPUTDIR in trial code to output the data they want, @SparkSnail could you check the content of OUTPUTDIR in PAI mode?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any doc to tell?

Copy link
Contributor Author

@SparkSnail SparkSnail Jul 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users could use PAI_OUTPUT_DIR to get the output directory of PAI, the defaulet value is $PAI_DEFAULT_FS_URI/Output/$jobName, refer https://github.com/microsoft/pai/blob/b2324866d0280a2d22958717ea6025740f71b9f0/docs/job_tutorial.md.
In NNI, we use a variable NNI_OUTPUT_DIR to store the log data of trial_keeper, and the data will be uploaded to hdfs after trial is finished, so users may use os.environ['NNI_OUTPUT_DIR'] in their code to store model data, the data will be uploaded to hdfs finally. refer https://github.com/microsoft/nni/blob/master/docs/en_US/TrainingService/PaiMode.md#run-an-experiment

// dataDir
this.paiTrialConfig.dataDir,
// outputDir
this.paiTrialConfig.outputDir,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so in the previous version, outputDir in nni config is also outputDir in pai job config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@@ -253,6 +253,12 @@ def validate_pai_trial_conifg(experiment_config):
experiment_config['trial']['shmMB'] > experiment_config['trial']['memoryMB']:
print_error('shmMB should be no more than memoryMB!')
exit(1)
#backward compatibility
warning_information = '{0} is not supported in NNI anymore, please remove the field in config file!'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could add a little more information, for example, "please refer to the link for the practices of how to get data and output model in trial code".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@@ -80,9 +74,10 @@ And you will be redirected to HDFS web portal to browse the output files of that

You can see there're three fils in output folder: stderr, stdout, and trial.log

If you also want to save trial's other output into HDFS, like model files, you can use environment variable `NNI_OUTPUT_DIR` in your trial code to save your own output files, and NNI SDK will copy all the files in `NNI_OUTPUT_DIR` from trial's container to HDFS.
## data management
If your training data is not to large, the could be put into codeDir, and nni will upload the data to hdfs, or you could build your own docker image with the data. If you have large dataset, it's not appropriate to put the data in codeDir, and you could follow the [guidance](https://github.com/microsoft/pai/blob/master/docs/user/storage.md) to mount the data folder in container.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: 1. to, 2. the

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

![](../../img/version_check.png)

Any problems when using NNI in pai mode, please create issues on [NNI github repo](https://github.com/Microsoft/nni).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to remove this sentence, the process to create issue is identical for all nni component, no difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@SparkSnail SparkSnail merged commit 664a149 into microsoft:master Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants