【问题标题】:automl import data to dataset List of found errors: 1.Field: name; Message: Required field is invalidautoml 将数据导入数据集 发现错误列表: 1.Field: name;消息:必填字段无效
【发布时间】:2020-01-05 04:50:53
【问题描述】:

我正在使用 gapi 访问 google autoML api。我设法创建了一个新数据集,但很难将数据导入其中。

List of found errors:   1.Field: name; Message: Required field is invalid

我正在遵循 google automl 的指南,但他们没有提到字段名称。 https://cloud.google.com/video-intelligence/automl/docs/reference/rest/v1beta1/projects.locations.datasets/importData

有人成功使用过这个api并分享一下解决方案吗?

    importCSVtoDataset() {
    let projectId = 'projectID';
    let serverLocation = 'us-central1';
    let datasetName = 'dataset1';
    let url = `https://automl.googleapis.com/v1beta1/projects/${projectId}/locations/${serverLocation}/datasets/${datasetName}:importData`;
    let videoData = {
        name: `projects/${projectId}/locations/${serverLocation}/datasets/${datasetName}`,
        inputConfig: {
            gcsSource: {
              inputUris: [
                  'gs://reconnaitre-drone-os-vcm/uploads/csv/uploadthis_csv.csv'
              ]
            }
        }
    }
    this.afAuth.authenticateGoogleAPI().then(() => {
      return gapi.client.request({
              // Pick an endpoint based on the scope and api you defined.
              path: url,
              method: 'POST',
              body: videoData,
            })
            .then(result => {
                  console.log("result from GET",result.body)
                })
    });
  }

【问题讨论】:

    标签: angular rest google-cloud-vision google-cloud-automl


    【解决方案1】:

    感谢这篇文章。 datasetName 应该是数据集 ID,而不是显示名称。

    How to import data to Dataset and retrain custom model in Google Cloud AutoML

    【讨论】:

      猜你喜欢
      • 2020-01-28
      • 2019-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-08
      • 1970-01-01
      • 2015-07-01
      相关资源
      最近更新 更多