From 7d60f4167d71efe5d738b2e3e4db3c1513083aa6 Mon Sep 17 00:00:00 2001 From: Songxin0502 Date: Sun, 14 Feb 2021 17:09:13 +0800 Subject: [PATCH 1/2] en_use_on_the_cloud --- ...0\212\344\275\277\347\224\250MindSpore.md" | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 "tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" diff --git "a/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" "b/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" new file mode 100644 index 0000000000..0f1f881f31 --- /dev/null +++ "b/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" @@ -0,0 +1,277 @@ +#Using mindspree in the cloud +`Linux` `Ascend` `The whole process` `primary` `intermediate` `senior` + + + +##summary +Modelarts is a one-stop AI development platform for developers provided by Huawei cloud, which integrates shengteng AI processor resource pool. Users can experience mindspree under this platform. + +Taking resnet-50 as an example, this tutorial briefly introduces how to use mindspree to complete training tasks in modelarts. + +##preparation +###Preparation for using modelarts +Refer to the "preparation" column of modelarts tutorial to complete the preparation of account registration, modelarts configuration and bucket creation. +
+

Link to modelarts tutorial:https://support.huaweicloud.com/wtsnew-modelarts/index.html.The page provides rich modelarts tutorials. Refer to the "preparation" section to complete the preparation of modelarts.

+
+ + +###Own AI processor resources on cloud +Make sure that your account has the public beta qualification of modelarts Huawei cloud shengteng cluster service, and you can submit the application in [modelarts Huawei cloud](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fmodelarts%2F%3Fregion%3Dcn-north-4%26cloud_route_state%3D%2Fdashboard%2FapplyModelArtsAscend910Beta#/login). + +###Data preparation +Modelarts uses object storage service (OBS) to store data. Therefore, before starting the training task, it is +necessary to upload the data to OBS. This example uses a cifar-10 binary format dataset. + +1.Download the cifar-10 dataset and unzip it. + +
+

CIFAR-10 dataset download page:http://www.cs.toronto.edu/~kriz/cifar.html.The page provides three data set download links,This example uses CIFAR-10 binary version.

+
+ +2.Create a new OBS bucket (for example: Ms dataset), create a data directory (for example: cifar-10) in the bucket, and upload cifar-10 data to the data directory according to the following structure. + +``` +└─对象存储/ms-dataset/cifar-10 + ├─train + │ data_batch_1.bin + │ data_batch_2.bin + │ data_batch_3.bin + │ data_batch_4.bin + │ data_batch_5.bin + │ + └─eval + test_batch.bin +``` + +###Execute script preparation +Create a new OBS bucket (for example: resnet50 train) and create a code directory in the bucket (for example: resnet50 train)_ cifar10_ And upload all the scripts in the following directory to the code directory: +
+

https://gitee.com/mindspore/docs/tree/master/tutorials/tutorial_code/sample_for_cloud/The script uses resnet-50 network to train on cifar-10 data set, and verifies the accuracy after the training. Scripts can be trained in modelarts with1*Ascendor8*Ascendspecifications.

+

Note that the version of the running script needs to be the same as the MindSpore version selected by the create training Task step. +For example, to use the scripts provided in the MindSpore version 1.1 tutorial, you need to select the version 1.1 MindSpore engine when creating a training task.

+
+ + +To facilitate the subsequent creation of training jobs, first create the training output directory and log output directory. The directory structure created in this example is as follows: +```aidl +└─对象存储/resnet50-train + ├─resnet50_cifar10_train + │ dataset.py + │ resnet50_train.py + │ + ├─output + └─log +``` + +###Running mindspree script in modelarts through simple adaptation +The script provided in the chapter "preparation for executing script" can be directly run in modelarts. If you want to experience resnet-50 training quickly, cifar-10 can skip this chapter. If you need to run a custom mindsprore script or more mindsprore sample code in modelarts, you need to refer to this chapter for simple adaptation of mindsprore code. + +####Script parameters +1.Scripts running in modelarts must be configured with data_ URL and train_ URL, corresponding to data storage path (OBS path) and training output path (OBS path). + +```aidl +import argparse + +parser = argparse.ArgumentParser(description='ResNet-50 train.') +parser.add_argument('--data_url', required=True, default=None, help='Location of data.') +parser.add_argument('--train_url', required=True, default=None, help='Location of training outputs.') + +``` +2.The modelarts interface supports transferring values to other parameters in the script, which will be described in detail in the next chapter "creating training assignments". +``` +parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') +``` +####Adapting OBS Data +Mindspore doesn't provide an interface to directly access OBS Data, so it needs to interact with OBS through the API provided by Moxing. Modelarts training scripts are executed in the container, and the / cache directory is usually selected as the storage path of the container data. +
+

Huawei cloud Moxing provides rich APIs for usershttps://github.com/huaweicloud/ModelArts-Lab/tree/master/docs/moxing_api_doc,In this example, you only need to use copy_parallelinterface.

+
+ +1.Download the data stored in OBS to the execution container. +``` +import moxing as mox +mox.file.copy_parallel(src_url='s3://dataset_url/', dst_url='/cache/data_path') +``` +2.Upload the training output from the container to OBS. +``` +import moxing as mox +mox.file.copy_parallel(src_url='/cache/output_path', dst_url='s3://output_url/') +``` +####Adaptive 8-card training task +If you need to run the script in the environment of `8*ascend` specification, you need to adapt the code that creates the dataset to the local data path, and configure the distributed policy. By getting `device_ID` and `rank_Size` two environment variables, users can build training scripts for `1*ascend` and `8*ascend`. + +1.Local path adaptation. +``` +import os + +device_num = int(os.getenv('RANK_SIZE')) +device_id = int(os.getenv('DEVICE_ID')) +# define local data path +local_data_path = '/cache/data' + +if device_num > 1: + # define distributed local data path + local_data_path = os.path.join(local_data_path, str(device_id)) +``` +2.Data set adaptation. +``` +import os +import mindspore.dataset.engine as de + +device_id = int(os.getenv('DEVICE_ID')) +device_num = int(os.getenv('RANK_SIZE')) +if device_num == 1: + # create train data for 1 Ascend situation + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True) +else: + # create train data for 1 Ascend situation, split train data for 8 Ascend situation + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True, + num_shards=device_num, shard_id=device_id) +``` +3.Configure distributed policies. +``` +import os +from mindspore import context +from mindspore.context import ParallelMode + +device_num = int(os.getenv('RANK_SIZE')) +if device_num > 1: + context.set_auto_parallel_context(device_num=device_num, + parallel_mode=ParallelMode.DATA_PARALLEL, + gradients_mean=True) +``` +####Sample code +Combined with the above three points, the mindsprore script is simply adapted. The following pseudo code is taken as an example: + +Original mindsprore script: +``` +import os +import argparse +from mindspore import context +from mindspore.context import ParallelMode +import mindspore.dataset.engine as de + +device_id = int(os.getenv('DEVICE_ID')) +device_num = int(os.getenv('RANK_SIZE')) + +def create_dataset(dataset_path): + if device_num == 1: + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True) + else: + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True, + num_shards=device_num, shard_id=device_id) + return ds + +def resnet50_train(args): + if device_num > 1: + context.set_auto_parallel_context(device_num=device_num, + parallel_mode=ParallelMode.DATA_PARALLEL, + gradients_mean=True) + train_dataset = create_dataset(local_data_path) + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ResNet-50 train.') + parser.add_argument('--local_data_path', required=True, default=None, help='Location of data.') + parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') + + args_opt, unknown = parser.parse_known_args() + + resnet50_train(args_opt) +``` +The adapted mindsprore script: +``` +import os +import argparse +from mindspore import context +from mindspore.context import ParallelMode +import mindspore.dataset.engine as de + +# adapt to cloud: used for downloading data +import moxing as mox + +device_id = int(os.getenv('DEVICE_ID')) +device_num = int(os.getenv('RANK_SIZE')) + +def create_dataset(dataset_path): + if device_num == 1: + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True) + else: + ds = de.Cifar10Dataset(dataset_path, num_parallel_workers=8, shuffle=True, + num_shards=device_num, shard_id=device_id) + return ds + +def resnet50_train(args): + # adapt to cloud: define local data path + local_data_path = '/cache/data' + + if device_num > 1: + context.set_auto_parallel_context(device_num=device_num, + parallel_mode=ParallelMode.DATA_PARALLEL, + gradients_mean=True) + # adapt to cloud: define distributed local data path + local_data_path = os.path.join(local_data_path, str(device_id)) + + # adapt to cloud: download data from obs to local location + print('Download data.') + mox.file.copy_parallel(src_url=args.data_url, dst_url=local_data_path) + + train_dataset = create_dataset(local_data_path) + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ResNet-50 train.') + # adapt to cloud: get obs data path + parser.add_argument('--data_url', required=True, default=None, help='Location of data.') + # adapt to cloud: get obs output path + parser.add_argument('--train_url', required=True, default=None, help='Location of training outputs.') + parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') + args_opt, unknown = parser.parse_known_args() + + resnet50_train(args_opt) +``` +Create training tasks + +After preparing the data and executing the script, you need to create a training task to really run the mindsprore script. Users who use modelarts for the first time can learn about the process of creating training assignments by modelarts according to this chapter. + +####Go to ModelArts console + +Open Huawei cloud modelarts Homepage https://www.huaweicloud.com/product/modelarts.html , click "enter console" on the page. + +####Creating training assignments using common frameworks +Modelarts tutorial https://support.huaweicloud.com/engineers-modelarts/modelarts_23_0238.html shows how to create training assignments using common frameworks. + +####Using mindspree as a common framework to create training assignments +Taking the training scripts and data used in this tutorial as an example, this paper lists in detail how to configure the training operation interface: + +1.`Algorithm source`: select the `common framework`, and then the `AI engine` selects `Ascend-Powered-Engine` and the required version of **MindSpore** (the picture of this example is `MindSpore-0.5-python3.7-aarch64`, please use the script corresponding to the selected version). + +2.`Code directory` selection creates code directory in **OBS** bucket in advance, and startup script under code directory is selected for `startup file`. + +3.`Data source` select the `data storage location`, and fill in the location of **CIFAR-10** dataset in **OBS**. + +4.`Operation parameters`: `data storage location` and `training output location` correspond to operation parameters `data_url` and `train_url`, select to `add running parameters` to pass values to other parameters in the script, such as `epoch_size`. + +5.`Resource pool` select `public resource pool > Ascend`. + +6.Select `ascend: 1 * Ascend 910 CPU: 24 core 96Gib` or `Ascend: 8 * Ascend 910 CPU: 192 core 768Gib` for `resource pool > specifications`, which respectively represent the single card and **8**-card specifications. + +Use mindspore as a common framework to create training assignments, as shown in the figure below. +![alt Training operation parameters](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job1.png) +![alt Training operation specification](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job2.png) + +###View running results +1.You can view the running log in the training operation interface + +The `8*Ascend` specification is used to perform **ResNet-50** training tasks. The total number of epoch is 92, the +accuracy is about 92%, and the number of training pictures per second is about 12000. The log is shown in the figure below. + +![alt 8*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend_clu.png) + +![alt 8*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend.png) + +`1*Ascend` specification was used to perform **ResNet-50** training task. The total number of epochs is 92, and the +accuracy is about 95%. The number of training pictures per second is about 1800. The log is shown in the figure below. + +![alt 1*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_1_Ascend.png) + +If the log path is specified when creating a training job, you can download the log file from OBS and view it. \ No newline at end of file -- Gitee From 768adbd8d1ae05914889bb2db2961a7fc7549e09 Mon Sep 17 00:00:00 2001 From: Songxin0502 Date: Fri, 19 Feb 2021 15:07:57 +0800 Subject: [PATCH 2/2] use_on_the_cloud_en --- ...0\212\344\275\277\347\224\250MindSpore.md" | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git "a/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" "b/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" index 0f1f881f31..1dc2681b43 100644 --- "a/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" +++ "b/tutorials/training/source_en/advanced_use/\345\234\250\344\272\221\344\270\212\344\275\277\347\224\250MindSpore.md" @@ -4,23 +4,23 @@ ##summary -Modelarts is a one-stop AI development platform for developers provided by Huawei cloud, which integrates shengteng AI processor resource pool. Users can experience mindspree under this platform. +ModelArts is a one-stop AI development platform for developers provided by Huawei Cloud, which integrates Ascend AI processor resource pool. Users can experience MindSpree under this platform. -Taking resnet-50 as an example, this tutorial briefly introduces how to use mindspree to complete training tasks in modelarts. +Taking Resnet-50 as an example, this tutorial briefly introduces how to use mindspree to complete training tasks in ModelArts. ##preparation -###Preparation for using modelarts -Refer to the "preparation" column of modelarts tutorial to complete the preparation of account registration, modelarts configuration and bucket creation. +###Preparation for using ModelArts +Refer to the "preparation" column of ModelArts tutorial to complete the preparation of account registration, ModelArts configuration and bucket creation.
-

Link to modelarts tutorial:https://support.huaweicloud.com/wtsnew-modelarts/index.html.The page provides rich modelarts tutorials. Refer to the "preparation" section to complete the preparation of modelarts.

+

Link to ModelArts tutorial:https://support.huaweicloud.com/wtsnew-ModelArts/index.html.The page provides rich ModelArts tutorials. Refer to the "preparation" section to complete the preparation of ModelArts.

-###Own AI processor resources on cloud -Make sure that your account has the public beta qualification of modelarts Huawei cloud shengteng cluster service, and you can submit the application in [modelarts Huawei cloud](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fmodelarts%2F%3Fregion%3Dcn-north-4%26cloud_route_state%3D%2Fdashboard%2FapplyModelArtsAscend910Beta#/login). +###Have Cloud Ascend AI processor resources +Make sure that your account has the public beta qualification of ModelArts Huawei Cloud Ascend cluster service, and you can submit the application in [ModelArts Huawei Cloud](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2FModelArts%2F%3Fregion%3Dcn-north-4%26cloud_route_state%3D%2Fdashboard%2FapplyModelArtsAscend910Beta#/login). ###Data preparation -Modelarts uses object storage service (OBS) to store data. Therefore, before starting the training task, it is +ModelArts uses object storage service (OBS) to store data. Therefore, before starting the training task, it is necessary to upload the data to OBS. This example uses a cifar-10 binary format dataset. 1.Download the cifar-10 dataset and unzip it. @@ -32,7 +32,7 @@ necessary to upload the data to OBS. This example uses a cifar-10 binary format 2.Create a new OBS bucket (for example: Ms dataset), create a data directory (for example: cifar-10) in the bucket, and upload cifar-10 data to the data directory according to the following structure. ``` -└─对象存储/ms-dataset/cifar-10 +└─Object storage/ms-dataset/cifar-10 ├─train │ data_batch_1.bin │ data_batch_2.bin @@ -45,9 +45,9 @@ necessary to upload the data to OBS. This example uses a cifar-10 binary format ``` ###Execute script preparation -Create a new OBS bucket (for example: resnet50 train) and create a code directory in the bucket (for example: resnet50 train)_ cifar10_ And upload all the scripts in the following directory to the code directory: +Create a new OBS bucket (for example: Resnet50 train) and create a code directory in the bucket (for example: Resnet50 train)_ cifar10_ And upload all the scripts in the following directory to the code directory:
-

https://gitee.com/mindspore/docs/tree/master/tutorials/tutorial_code/sample_for_cloud/The script uses resnet-50 network to train on cifar-10 data set, and verifies the accuracy after the training. Scripts can be trained in modelarts with1*Ascendor8*Ascendspecifications.

+

https://gitee.com/MindSpore/docs/tree/master/tutorials/tutorial_code/sample_for_cloud/The script uses Resnet-50 network to train on cifar-10 data set, and verifies the accuracy after the training. Scripts can be trained in ModelArts with1*Ascendor8*Ascendspecifications.

Note that the version of the running script needs to be the same as the MindSpore version selected by the create training Task step. For example, to use the scripts provided in the MindSpore version 1.1 tutorial, you need to select the version 1.1 MindSpore engine when creating a training task.

@@ -55,37 +55,37 @@ For example, to use the scripts provided in the MindSpore version 1.1 tutorial, To facilitate the subsequent creation of training jobs, first create the training output directory and log output directory. The directory structure created in this example is as follows: ```aidl -└─对象存储/resnet50-train - ├─resnet50_cifar10_train +└─Object storage/Resnet50-train + ├─Resnet50_cifar10_train │ dataset.py - │ resnet50_train.py + │ Resnet50_train.py │ ├─output └─log ``` -###Running mindspree script in modelarts through simple adaptation -The script provided in the chapter "preparation for executing script" can be directly run in modelarts. If you want to experience resnet-50 training quickly, cifar-10 can skip this chapter. If you need to run a custom mindsprore script or more mindsprore sample code in modelarts, you need to refer to this chapter for simple adaptation of mindsprore code. +###Running mindspree script in ModelArts through simple adaptation +The script provided in the chapter "preparation for executing script" can be directly run in ModelArts. If you want to experience Resnet-50 training quickly, cifar-10 can skip this chapter. If you need to run a custom mindsprore script or more mindsprore sample code in ModelArts, you need to refer to this chapter for simple adaptation of mindsprore code. ####Script parameters -1.Scripts running in modelarts must be configured with data_ URL and train_ URL, corresponding to data storage path (OBS path) and training output path (OBS path). +1.Scripts running in ModelArts must be configured with data_ URL and train_ URL, corresponding to data storage path (OBS path) and training output path (OBS path). ```aidl import argparse -parser = argparse.ArgumentParser(description='ResNet-50 train.') +parser = argparse.ArgumentParser(description='Resnet-50 train.') parser.add_argument('--data_url', required=True, default=None, help='Location of data.') parser.add_argument('--train_url', required=True, default=None, help='Location of training outputs.') ``` -2.The modelarts interface supports transferring values to other parameters in the script, which will be described in detail in the next chapter "creating training assignments". +2.The ModelArts interface supports transferring values to other parameters in the script, which will be described in detail in the next chapter "creating training assignments". ``` parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') ``` ####Adapting OBS Data -Mindspore doesn't provide an interface to directly access OBS Data, so it needs to interact with OBS through the API provided by Moxing. Modelarts training scripts are executed in the container, and the / cache directory is usually selected as the storage path of the container data. +Currently, MindSpore does not provide an interface to access OBS data directly, so it needs to interact with OBS through the API provided by Moxing. ModelArts training scripts are executed in the container, and the / cache directory is usually selected as the storage path of the container data.
-

Huawei cloud Moxing provides rich APIs for usershttps://github.com/huaweicloud/ModelArts-Lab/tree/master/docs/moxing_api_doc,In this example, you only need to use copy_parallelinterface.

+

Huawei Cloud Moxing provides rich APIs for usershttps://github.com/huaweicloud/ModelArts-Lab/tree/master/docs/moxing_api_doc,In this example, you only need to use copy_parallelinterface.

1.Download the data stored in OBS to the execution container. @@ -117,7 +117,7 @@ if device_num > 1: 2.Data set adaptation. ``` import os -import mindspore.dataset.engine as de +import MindSpore.dataset.engine as de device_id = int(os.getenv('DEVICE_ID')) device_num = int(os.getenv('RANK_SIZE')) @@ -132,8 +132,8 @@ else: 3.Configure distributed policies. ``` import os -from mindspore import context -from mindspore.context import ParallelMode +from MindSpore import context +from MindSpore.context import ParallelMode device_num = int(os.getenv('RANK_SIZE')) if device_num > 1: @@ -148,9 +148,9 @@ Original mindsprore script: ``` import os import argparse -from mindspore import context -from mindspore.context import ParallelMode -import mindspore.dataset.engine as de +from MindSpore import context +from MindSpore.context import ParallelMode +import MindSpore.dataset.engine as de device_id = int(os.getenv('DEVICE_ID')) device_num = int(os.getenv('RANK_SIZE')) @@ -163,7 +163,7 @@ def create_dataset(dataset_path): num_shards=device_num, shard_id=device_id) return ds -def resnet50_train(args): +def Resnet50_train(args): if device_num > 1: context.set_auto_parallel_context(device_num=device_num, parallel_mode=ParallelMode.DATA_PARALLEL, @@ -171,21 +171,21 @@ def resnet50_train(args): train_dataset = create_dataset(local_data_path) if __name__ == '__main__': - parser = argparse.ArgumentParser(description='ResNet-50 train.') + parser = argparse.ArgumentParser(description='Resnet-50 train.') parser.add_argument('--local_data_path', required=True, default=None, help='Location of data.') parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') args_opt, unknown = parser.parse_known_args() - resnet50_train(args_opt) + Resnet50_train(args_opt) ``` The adapted mindsprore script: ``` import os import argparse -from mindspore import context -from mindspore.context import ParallelMode -import mindspore.dataset.engine as de +from MindSpore import context +from MindSpore.context import ParallelMode +import MindSpore.dataset.engine as de # adapt to cloud: used for downloading data import moxing as mox @@ -201,7 +201,7 @@ def create_dataset(dataset_path): num_shards=device_num, shard_id=device_id) return ds -def resnet50_train(args): +def Resnet50_train(args): # adapt to cloud: define local data path local_data_path = '/cache/data' @@ -219,7 +219,7 @@ def resnet50_train(args): train_dataset = create_dataset(local_data_path) if __name__ == '__main__': - parser = argparse.ArgumentParser(description='ResNet-50 train.') + parser = argparse.ArgumentParser(description='Resnet-50 train.') # adapt to cloud: get obs data path parser.add_argument('--data_url', required=True, default=None, help='Location of data.') # adapt to cloud: get obs output path @@ -227,18 +227,18 @@ if __name__ == '__main__': parser.add_argument('--epoch_size', type=int, default=90, help='Train epoch size.') args_opt, unknown = parser.parse_known_args() - resnet50_train(args_opt) + Resnet50_train(args_opt) ``` Create training tasks -After preparing the data and executing the script, you need to create a training task to really run the mindsprore script. Users who use modelarts for the first time can learn about the process of creating training assignments by modelarts according to this chapter. +After preparing the data and executing the script, you need to create a training task to really run the mindsprore script. Users who use ModelArts for the first time can learn about the process of creating training assignments by ModelArts according to this chapter. ####Go to ModelArts console -Open Huawei cloud modelarts Homepage https://www.huaweicloud.com/product/modelarts.html , click "enter console" on the page. +Open Huawei Cloud ModelArts Homepage https://www.huaweicloud.com/product/ModelArts.html , click "enter console" on the page. ####Creating training assignments using common frameworks -Modelarts tutorial https://support.huaweicloud.com/engineers-modelarts/modelarts_23_0238.html shows how to create training assignments using common frameworks. +ModelArts tutorial https://support.huaweicloud.com/engineers-ModelArts/ModelArts_23_0238.html shows how to create training assignments using common frameworks. ####Using mindspree as a common framework to create training assignments Taking the training scripts and data used in this tutorial as an example, this paper lists in detail how to configure the training operation interface: @@ -255,23 +255,23 @@ Taking the training scripts and data used in this tutorial as an example, this p 6.Select `ascend: 1 * Ascend 910 CPU: 24 core 96Gib` or `Ascend: 8 * Ascend 910 CPU: 192 core 768Gib` for `resource pool > specifications`, which respectively represent the single card and **8**-card specifications. -Use mindspore as a common framework to create training assignments, as shown in the figure below. -![alt Training operation parameters](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job1.png) -![alt Training operation specification](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job2.png) +Use MindSpore as a common framework to create training assignments, as shown in the figure below. +![alt Training operation parameters](https://www.MindSpore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job1.png) +![alt Training operation specification](https://www.MindSpore.cn/tutorial/training/zh-CN/master/_images/cloud_train_job2.png) ###View running results 1.You can view the running log in the training operation interface -The `8*Ascend` specification is used to perform **ResNet-50** training tasks. The total number of epoch is 92, the +The `8*Ascend` specification is used to perform **Resnet-50** training tasks. The total number of epoch is 92, the accuracy is about 92%, and the number of training pictures per second is about 12000. The log is shown in the figure below. -![alt 8*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend_clu.png) +![alt 8*AscendTraining execution results](https://www.MindSpore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend_clu.png) -![alt 8*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend.png) +![alt 8*AscendTraining execution results](https://www.MindSpore.cn/tutorial/training/zh-CN/master/_images/train_log_8_Ascend.png) -`1*Ascend` specification was used to perform **ResNet-50** training task. The total number of epochs is 92, and the +`1*Ascend` specification was used to perform **Resnet-50** training task. The total number of epochs is 92, and the accuracy is about 95%. The number of training pictures per second is about 1800. The log is shown in the figure below. -![alt 1*AscendTraining execution results](https://www.mindspore.cn/tutorial/training/zh-CN/master/_images/train_log_1_Ascend.png) +![alt 1*AscendTraining execution results](https://www.MindSpore.cn/tutorial/training/zh-CN/master/_images/train_log_1_Ascend.png) If the log path is specified when creating a training job, you can download the log file from OBS and view it. \ No newline at end of file -- Gitee