【发布时间】: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