检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
# Save model to local path. model.save("/tmp/spark_model") After the model is saved, it must be uploaded to the OBS directory before being published. The config.json configuration and the customize_service.py inference code must be included during the publishing.
Creating a Dataset Export Task Export the samples of a dataset to a specified OBS path.
Figure 4 Exporting to OBS After the data is exported, you can view it in the specified path. Viewing the Task History When you export data to a new dataset or OBS, you can view the export task details in the View Task History dialog box.
Figure 1 Training output path Click the path to go to the OBS object path. Then, download the model from OBS. Deploy the downloaded model locally. For details, see Creating a Local Model and Debugging a Service. Parent topic: Functional Consulting
Possible Cause Data has been changed in the OBS directory of the published dataset, for example, images have been deleted. Therefore, the manifest file is inconsistent with data in the OBS directory.
Configure the OBS endpoint and AK/SK for obsutil to interconnect with OBS. You can use obsutil to perform operations on OBS buckets and objects only after obtaining the OBS authentication. For details, see Performing the Initial Configuration.
The execution code and model must be uploaded to OBS first. By default, the model generated by a training job is stored in OBS.
__AUTO_ANNOTATION__: to be confirmed source_type_header No String Prefix of the OBS path in the exported labeling file. The default value is obs://. You can set it to s3://. The image path starting with obs cannot be parsed during training.
Use obsutil to upload the dataset to an OBS bucket. ./obsutil cp ./dog_cat_1w obs://${your_obs_buck}/demo/ -f -r OBS supports multiple file upload modes. If the number of files is less than 100, you can upload them on the OBS console.
However, OBS bills you for the storage space used for storing the datasets. To avoid unnecessary billing, you are advised to access OBS Console and delete data and the OBS buckets in the OBS path for storing the datasets after data labeling. Parent topic: Billing
If the data is larger than 500 MB, upload the code to OBS and then to the notebook instance. Upload data to OBS. For details, see Uploading an Object.
Importing a model package from OBS to ModelArts applies to single-model scenarios. If multiple models are required, you are advised to import custom images from SWR to create AI applications and deploy services.
If the data is larger than 500 MB, upload it to OBS and then to the notebook instance. Figure 1 Uploading data to a notebook instance through OBS Procedure Upload data to OBS. For details, see Uploading an Object. Alternatively, use ModelArts SDK on a local VS Code terminal.
Upload the OBS file to the notebook instance. Use ModelArts SDK in the terminal of the remote VS Code environment to upload the file from OBS to a notebook instance.
Introduction to Exporting Data You can select data or filter data based on the filter criteria in a dataset and export to a new dataset or the specified OBS path. The historical export records can be viewed in task history.
Figure 1 OBS Obtaining Training Data Use either of the following methods to obtain ModelArts training data: Datasets stored in OBS buckets After labeling and preprocessing your dataset, upload it to an OBS bucket.
Then, click Export in the upper right corner of the page to export the dataset to a folder in the OBS parent directory. Parent topic: Data Management (Old Version)
Model Directory OBS path where a model is saved. Select an OBS path for storing the model based on the input requirements of the selected model template. The OBS path cannot contain spaces. Otherwise, the AI application fails to be created.
Error Occurred During Service Deployment After the Target Path to a File Downloaded Through a ModelArts SDK Is Set to a File Name Symptom A ModelArts SDK was used to download a file from OBS, and the target path was set to the file name.
The path can be either a local or OBS path.