检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 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.
Authentication Using the Username and Password This authentication method is available for OBS Management, Training Management, Model Management, and Service Management. Sample Code For details about the concepts of the account and user, see Basic Concepts of IAM.
If they are not in the same region, create a bucket and a folder in OBS that is in the same region as ModelArts, and upload data to the bucket. Check whether the OBS path is obs://xxx.
Creating a Dataset Export Task Export the samples of a dataset to a specified OBS path.
Models trained using ModelArts built-in algorithms are stored in OBS buckets and can be downloaded to a local directory. In the training job list, click the name of the target training job to go to its details page, on which you can obtain the training output path.
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.
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 models 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.
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.
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.
The path can be either a local or OBS path.
Step 3 Configuring Agent-based ModelArts Access Authorization After assigning IAM permissions, configure ModelArts access authorization for IAM users on the ModelArts page so that ModelArts can access dependent services such as OBS, SWR, and IEF.
You are advised not to use the OBS APIs of TensorFlow, MXNet, and PyTorch to directly read data from OBS. If the file is small, you can save data on OBS as a .tar package.
If the data is larger than 500 MB, upload it to OBS, and then download it to the notebook instance. Figure 1 Uploading data to a notebook Instance through OBS Upload data to OBS. For details, see Uploading an Object.