云容器实例 CCI-创建PyTorchJob:响应消息

时间:2025-02-12 14:55:26

响应消息

响应参数

响应参数的详细描述请参见表165

响应示例:

{    "apiVersion": "kubeflow.org/v1",    "kind": "PyTorchJob",    "metadata": {        "creationTimestamp": "2019-07-24T10:29:45Z",        "generation": 1,        "name": "pytorch-test",        "namespace": "kube-test",        "resourceVersion": "72516798",        "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/pytorchjobs/pytorch-test",        "uid": "f4c79668-adfd-11e9-8041-340a9837e2a7"    },    "spec": {        "pytorchReplicaSpecs": {            "Master": {                "replicas": 1,                "restartPolicy": "Never",                "template": {                    "spec": {                        "containers": [                            {                                "args": [                                    "--backend",                                    "gloo"                                ],                                "command": [                                    "python",                                    "/var/mnist.py"                                ],                                "image": "*.*.*.215:20202/gcs/pytorch-cpu:v1",                                "name": "pytorch",                                "resources": {                                    "limits": {                                        "cpu": 2,                                        "memory": "4Gi"                                    },                                    "requests": {                                        "cpu": 2,                                        "memory": "4Gi"                                    }                                }                            }                        ],                        "imagePullSecrets": [                            {                                "name": "imagepull-secret"                            }                        ]                    }                }            },            "Worker": {                "replicas": 1,                "restartPolicy": "OnFailure",                "template": {                    "spec": {                        "containers": [                            {                                "args": [                                    "--backend",                                    "gloo"                                ],                                "command": [                                    "python",                                    "/var/mnist.py"                                ],                                "image": "*.*.*.215:20202/gcs/pytorch-cpu:v1",                                "name": "pytorch",                                "resources": {                                    "limits": {                                        "cpu": 2,                                        "memory": "4Gi"                                    },                                    "requests": {                                        "cpu": 2,                                        "memory": "4Gi"                                    }                                }                            }                        ],                        "imagePullSecrets": [                            {                                "name": "imagepull-secret"                            }                        ]                    }                }            }        }    },    "status": {    }}
support.huaweicloud.com/api-cci/cci_02_3161.html