标签: deepnote

使用没有 IPyWidgets 的 Huggingface Transformer

我正在尝试在名为 Deepnote 的托管 Jupyter 笔记本平台中使用 Huggingface Transformers 库。我想通过管道类下载模型,但不幸的是,deepnote 不支持 IPyWidgets。有没有办法在使用转换器时禁用 IPywidgets?具体如下命令。


classifier = pipeline("zero-shot-classification")
Run Code Online (Sandbox Code Playgroud)

和我收到的错误。

ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
Run Code Online (Sandbox Code Playgroud)

注意:安装 IPyWidgets 不是一个选项

python jupyter-notebook ipywidgets huggingface-transformers deepnote

3
推荐指数
1
解决办法
355
查看次数

在 Deepnote 上安装 Conda

我是一个相当缺乏经验的程序员,正在努力将 Conda 安装到Deepnote中。Pip install 不适用于某些软件包。例如,我正在尝试安装 rdkit,这是一个化学信息学软件包,它具有相当复杂的安装说明或通过 Anaconda/mini-conda 发行版管理的简单的 1 行代码。我真的很喜欢 Deepnote 笔记本,非常感谢这里的任何帮助。

\n

到目前为止,我在 Google Colab 上找到了用于 Conda 安装的有用代码:https://github.com/dataprofessor/code/blob/master/python/google_colab_install_conda.ipynb

\n
! wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh\n! chmod +x Miniconda3-py37_4.8.2-Linux-x86_64.sh\n! bash ./Miniconda3-py37_4.8.2-Linux-x86_64.sh -b -f -p /usr/local\nimport sys\nsys.path.append(\'/usr/local/lib/python3.7/site-packages/\')\n
Run Code Online (Sandbox Code Playgroud)\n

虽然这在 Google Colab 上成功运行,但我不确定为什么它在 Deepnote 上失败,如下所示:

\n
--2020-12-04 22:58:34--  https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh\nResolving repo.anaconda.com (repo.anaconda.com)... 104.16.130.3, 104.16.131.3, 2606:4700::6810:8203, ...\nConnecting to repo.anaconda.com (repo.anaconda.com)|104.16.130.3|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 85055499 (81M) [application/x-sh]\nSaving to: \xe2\x80\x98Miniconda3-py37_4.8.2-Linux-x86_64.sh\xe2\x80\x99\n\nMiniconda3-py37_4.8 100%[===================>]  81.12M   133MB/s    in 0.6s    \n\n2020-12-04 22:58:35 (133 MB/s) - …
Run Code Online (Sandbox Code Playgroud)

python anaconda conda deepnote

2
推荐指数
1
解决办法
999
查看次数