AI开发平台MODELARTS-创建训练作业版本:请求示例

时间:2024-09-07 09:09:46

请求示例

如下以创建“job_id”为10,“pre_version_id”为20的一个新版本作业为例。
POST    https://endpoint/v1/{project_id}/training-jobs/10/versions/
{
    "job_desc": "This is a ModelArts job",
    "config": {
        "worker_server_num": 1,
        "app_url": "/usr/app/",
        "boot_file_url": "/usr/app/boot.py",
        "parameter": [
            {
                "label": "learning_rate",
                "value": "0.01"
            },
            {
                "label": "batch_size",
                "value": "32"
            }
        ],
        "dataset_id": "38277e62-9e59-48f4-8d89-c8cf41622c24",
        "dataset_version_id": "2ff0d6ba-c480-45ae-be41-09a8369bfc90",
        "spec_id": 1,
        "engine_id": 1,
        "train_url": "/usr/train/",
        "log_url": "/usr/log/",
        "pre_version_id": 20,
        "model_id": 1,
        "pool_id": "test-pool"
    }
}
support.huaweicloud.com/api-modelarts/modelarts_03_0050.html