【发布时间】:2022-10-26 03:39:10
【问题描述】:
我编写了一个 MLflow 组件来上传和记录从 URL 到 WandB 的工件。我正在尝试在 conda 环境中运行脚本,但不幸的是我遇到了这个错误
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\__init__.py", line 38, in <module>
from wandb import sdk as wandb_sdk
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\sdk\__init__.py", line 12, in <module>
from .wandb_init import init # noqa: F401
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\sdk\wandb_init.py", line 29, in <module>
from .backend.backend import Backend
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\sdk\backend\backend.py", line 18, in <module>
from ..internal.internal import wandb_internal
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\sdk\internal\internal.py", line 34, in <module>
from . import sender
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\sdk\internal\sender.py", line 18, in <module>
from wandb.filesync.dir_watcher import DirWatcher
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\filesync\dir_watcher.py", line 10, in <module>
wd_polling = util.vendor_import("watchdog.observers.polling")
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\util.py", line 170, in vendor_import
module = import_module(name)
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\vendor\watchdog\observers\__init__.py", line 92, in <module>
from .polling import PollingObserver as Observer
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\vendor\watchdog\observers\polling.py", line 43, in <module>
from watchdog.observers.api import (
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\vendor\watchdog\observers\api.py", line 23, in <module>
from watchdog.utils.bricks import SkipRepeatsQueue
File "C:\anaconda\envs\mlflow-4b67c93d2a95df2e00cbf3c9f644d2e3dada00e0\lib\site-packages\wandb\vendor\watchdog\utils\bricks.py", line 175, in <module>
class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
2022/10/09 20:55:53 ERROR mlflow.cli: === Run (ID 'e5ad70e5104e4a50ad3f66a891bdbf81') failed ===
我已经在我的环境中安装了 WandB==0.13.2 & protobuf==3.20.3 & Mlflow 最新版本。 我认为这是因为依赖不匹配而发生的,但不确定。
此外,我还在我的 conda.yml 文件中为 mlflow 组件脚本添加了 WandB 和 Protobuf。
提前致谢。
【问题讨论】:
-
你的python是什么版本的?
-
Python 版本 =3.8.13 @TalhaTayyab
标签: python anaconda mlflow wandb