【问题标题】:cloud ml engine read access on bucket存储桶上的云 ml 引擎读取访问权限
【发布时间】:2019-02-03 03:08:49
【问题描述】:

我正在尝试使用我的 nodejs 应用引擎项目启动 Cloud ML-Engine 作业。 由于没有库,我使用的是这样的“googleapis”:

const {google} = require('googleapis');
const params = {
    parent: 'projects/my-playground',
    requestBody: {
        jobId: 'test-job-' + Date.now(),
        trainingInput: {
            runtimeVersion: '1.6',
            jobDir: 'gs://my-ml-test-bucket',
            packageUris: ['gs://my-ml-test-bucket/MLEngine/trainer'],
            pythonModule: 'trainer.task',

            scaleTier: "CUSTOM",
            masterType: "complex_model_l",
            workerCount: "0",
            workerType: "standard",
            parameterServerCount: "0",
            parameterServerType: "standard",
            region: "europe-west1",

            args: [
                'file=gs://my-ml-test-bucket/testFile.csv',
                'threshold=0.5',
                'latent-factors=15',
                'iterations=50'
            ]
        }
    }
};
google.auth.getClient()
    .then(authClient => {
        const ML = google.ml({
            version: 'v1',
            auth: authClient
        });
        ML.projects.jobs.create(params)
    });

执行代码时出现以下错误:

Error creating the job. Field: package_uris Error: The provided GCS paths [gs://my-ml-test-bucket/MLEngine/trainer] cannot be read. Please make sure that the objects exist and you have read access to it.

所有文件都上传到此目录,Cloud ML Service Agent 获得了存储桶上的Storage Object Admin 权限,但我仍然收到此错误。 有什么想法吗?

【问题讨论】:

    标签: node.js google-app-engine google-cloud-platform google-cloud-ml google-api-nodejs-client


    【解决方案1】:

    您似乎在trainingInputpackageUris 参数中指定了目录名称。如果您已将培训师代码上传到 Cloud Storage,则应将完整路径传递给压缩存档文件。

    例如,如果您的训练包名为trainer.tar.gz,则可以传入以下值:packageUris: ['gs://my-ml-test-bucket/MLEngine/trainer.tar.gz']

    以下链接提供了有关在 Cloud ML Engine 上创建和使用包的更多信息:https://cloud.google.com/ml-engine/docs/tensorflow/packaging-trainer

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-09
      • 1970-01-01
      • 1970-01-01
      • 2017-10-08
      • 2019-06-13
      • 1970-01-01
      • 2022-12-09
      • 2022-08-12
      相关资源
      最近更新 更多