@@ -16,7 +16,7 @@ Step 3. Mount NFS storage to local machine.
...
@@ -16,7 +16,7 @@ Step 3. Mount NFS storage to local machine.


Find the data management region in job submission page.
Find the data management region in job submission page.


The `DEFAULT_STORAGE`field is the path to be mounted in PAI's container when a job is started. The `Preview container paths` is the NFS host and path that PAI provided, you need to mount the corresponding host and path to your local machine first, then NNI could use the PAI's NFS storage.
The `Preview container paths` is the NFS host and path that PAI provided, you need to mount the corresponding host and path to your local machine first, then NNI could use the PAI's NFS storage.
For example, use the following command:
For example, use the following command:
```
```
sudo mount -t nfs4 gcr-openpai-infra02:/pai/data /local/mnt
sudo mount -t nfs4 gcr-openpai-infra02:/pai/data /local/mnt
...
@@ -25,13 +25,14 @@ Then the `/data` folder in container will be mounted to `/local/mnt` folder in y
...
@@ -25,13 +25,14 @@ Then the `/data` folder in container will be mounted to `/local/mnt` folder in y
You could use the following configuration in your NNI's config file:
You could use the following configuration in your NNI's config file:
```
```
nniManagerNFSMountPath: /local/mnt
nniManagerNFSMountPath: /local/mnt
containerNFSMountPath: /data
```
```
Step 4. Get PAI's storage plugin name.
Step 4. Get PAI's storage config name and nniManagerMountPath
Contact PAI's admin, and get the PAI's storage plugin name for NFS storage. The default storage name is `teamwise_storage`, the configuration in NNI's config file is in following value:
The `Team share storage` field is storage configuration used to specify storage value in PAI. You can get `paiStorageConfigName` and `containerNFSMountPath` field in `Team share storage`, for example:
```
```
paiStoragePlugin: teamwise_storage
paiStorageConfigName: confignfs-data
containerNFSMountPath: /mnt/confignfs-data
```
```
## Run an experiment
## Run an experiment
...
@@ -66,7 +67,7 @@ trial:
...
@@ -66,7 +67,7 @@ trial:
virtualCluster:default
virtualCluster:default
nniManagerNFSMountPath:/home/user/mnt
nniManagerNFSMountPath:/home/user/mnt
containerNFSMountPath:/mnt/data/user
containerNFSMountPath:/mnt/data/user
paiStoragePlugin:teamwise_storage
paiStorageConfigName:confignfs-data
# Configuration to access OpenPAI Cluster
# Configuration to access OpenPAI Cluster
paiConfig:
paiConfig:
userName:your_pai_nni_user
userName:your_pai_nni_user
...
@@ -90,13 +91,13 @@ Compared with [LocalMode](LocalMode.md) and [RemoteMachineMode](RemoteMachineMod
...
@@ -90,13 +91,13 @@ Compared with [LocalMode](LocalMode.md) and [RemoteMachineMode](RemoteMachineMod
* Required key. Set the mount path in your nniManager machine.
* Required key. Set the mount path in your nniManager machine.
* containerNFSMountPath
* containerNFSMountPath
* Required key. Set the mount path in your container used in PAI.
* Required key. Set the mount path in your container used in PAI.
* paiStoragePlugin
* paiStorageConfigName:
* Optional key. Set the storage plugin name used in PAI. If it is not set in trial configuration, it should be set in the config file specified in `paiConfigPath` field.
* Optional key. Set the storage name used in PAI. If it is not set in trial configuration, it should be set in the config file specified in `paiConfigPath` field.
* command
* command
* Optional key. Set the commands used in PAI container.
* Optional key. Set the commands used in PAI container.
* paiConfigPath
* paiConfigPath
* Optional key. Set the file path of pai job configuration, the file is in yaml format.
* Optional key. Set the file path of pai job configuration, the file is in yaml format.
If users set `paiConfigPath` in NNI's configuration file, no need to specify the fields `command`, `paiStoragePlugin`, `virtualCluster`, `image`, `memoryMB`, `cpuNum`, `gpuNum` in `trial` configuration. These fields will use the values from the config file specified by `paiConfigPath`.
If users set `paiConfigPath` in NNI's configuration file, no need to specify the fields `command`, `paiStorageConfigName`, `virtualCluster`, `image`, `memoryMB`, `cpuNum`, `gpuNum` in `trial` configuration. These fields will use the values from the config file specified by `paiConfigPath`.
```
```
Note:
Note:
1. The job name in PAI's configuration file will be replaced by a new job name, the new job name is created by NNI, the name format is nni_exp_${this.experimentId}_trial_${trialJobId}.
1. The job name in PAI's configuration file will be replaced by a new job name, the new job name is created by NNI, the name format is nni_exp_${this.experimentId}_trial_${trialJobId}.
...
@@ -127,7 +128,7 @@ And you will be redirected to HDFS web portal to browse the output files of that
...
@@ -127,7 +128,7 @@ 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
You can see there're three fils in output folder: stderr, stdout, and trial.log
## data management
## data management
Befour using NNI to start your experiment, users should set the corresponding mount data path in your nniManager machine. PAI has their own storage(NFS, AzureBlob ...), and the storage will used in PAI will be mounted to the container when it start a job. Users should set the PAI storage type by `paiStoragePlugin` field to choose a storage in PAI. Then users should mount the storage to their nniManager machine, and set the `nniManagerNFSMountPath` field in configuration file, NNI will generate bash files and copy data in `codeDir` to the `nniManagerNFSMountPath` folder, then NNI will start a trial job. The data in `nniManagerNFSMountPath` will be sync to PAI storage, and will be mounted to PAI's container. The data path in container is set in `containerNFSMountPath`, NNI will enter this folder first, and then run scripts to start a trial job.
Before using NNI to start your experiment, users should set the corresponding mount data path in your nniManager machine. PAI has their own storage(NFS, AzureBlob ...), and the storage will used in PAI will be mounted to the container when it start a job. Users should set the PAI storage type by `paiStorageConfigName` field to choose a storage in PAI. Then users should mount the storage to their nniManager machine, and set the `nniManagerNFSMountPath` field in configuration file, NNI will generate bash files and copy data in `codeDir` to the `nniManagerNFSMountPath` folder, then NNI will start a trial job. The data in `nniManagerNFSMountPath` will be sync to PAI storage, and will be mounted to PAI's container. The data path in container is set in `containerNFSMountPath`, NNI will enter this folder first, and then run scripts to start a trial job.
## version check
## version check
NNI support version check feature in since version 0.6. It is a policy to insure the version of NNIManager is consistent with trialKeeper, and avoid errors caused by version incompatibility.
NNI support version check feature in since version 0.6. It is a policy to insure the version of NNIManager is consistent with trialKeeper, and avoid errors caused by version incompatibility.