【问题标题】:AutoML colab notebook ImportError: Missing optional dependency 'gcsfs'AutoML colab 笔记本 ImportError:缺少可选依赖项“gcsfs”
【发布时间】:2020-07-27 07:41:54
【问题描述】:

我正在从https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/tables/automl/notebooks/purchase_prediction/purchase_prediction.ipynb 运行 AutoML 笔记本

在 Colab 中,以下行:

table = pd.read_csv(nested_gcs_uri, low_memory=False)

因主题错误而失败。

我试过 pip install gcsfs 报告Requirement already satisfied

导入 gcsfs 返回

ModuleNotFoundError: No module named 'gcsfs'

【问题讨论】:

  • 嘿!我已经在 AI Platform->Jupyter Nootebok 中运行了 notebook,它运行良好。安装libs后你重启内核了吗?另外,您是否正确指定了 ENV 变量?
  • 您使用的是 Colab 环境托管的运行时吗?
  • 我使用过 AI Platform Notebooks。我把所有的命令都复制到了notebook,所以和Collab基本一样。请记住,在运行任何命令之前,您需要确保为您的项目启用计费功能并启用:AI Platform API、Compute Engine API、AutoML API。
  • 是的,谢谢 - 我已经设置了帐单和 API 等。这似乎是一个纯 Python 依赖错误
  • 我建议尝试使用 AI Platform Notebooks,这可能是 Colab 环境中的错误。

标签: python-3.x google-cloud-platform google-cloud-automl


【解决方案1】:

提供的 Purchase Prediction with AutoML Tables notebook 在 GCP 中的 AI Platform Notebooks 上完美运行。在运行任何命令之前,请务必确保 GCP 项目中启用了计费、AI Platform API、Compute Engine API、AutoML API。由于某些原因,它在 Colab 环境中运行时会引发错误。 @Matt Evans 已在 Github 上报告了该错误。

【讨论】:

  • Google 支持人员已做出回应:感谢您揭露这一点。看起来笔记本不是为 colab 编写的。我会调查我们是否可以让这个笔记本在 colab 中运行。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-02-08
  • 1970-01-01
  • 2020-02-17
  • 1970-01-01
  • 1970-01-01
  • 2019-07-29
  • 2017-12-25
相关资源
最近更新 更多