- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
到昨天为止,我们正常安装fairseq并执行。
今天突然出现一个名为“ModuleNotFoundError: No module named 'fairseq'”的错误。
有人知道怎么解决吗?
安装fairseq...
!git clone https://private_information.../fairseq.git
%cd /content/fairseq/fairseq-master/
!git reset --hard dafault
!pip install --editable ./
%cd /content
安装日志...
Cloning into 'fairseq'...
remote: Enumerating objects: 669, done.
remote: Counting objects: 100% (669/669), done.
remote: Compressing objects: 100% (520/520), done.
remote: Total 669 (delta 164), reused 635 (delta 130), pack-reused 0
Receiving objects: 100% (669/669), 2.95 MiB | 16.17 MiB/s, done.
Resolving deltas: 100% (164/164), done.
/content/fairseq/fairseq-master
HEAD is now at 16bea6e default
Obtaining file:///content/fairseq/fairseq-master
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting sacrebleu
Downloading https://files.pythonhosted.org/packages/23/d3/be980ad7cda7c4bbfa97ee3de062fb3014fc1a34d6dd5b82d7b92f8d6522/sacrebleu-1.4.13-py3-none-any.whl (43kB)
|████████████████████████████████| 51kB 2.0MB/s
Requirement already satisfied: cffi in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (1.14.2)
Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (4.41.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (1.18.5)
Requirement already satisfied: torch in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (1.6.0+cu101)
Requirement already satisfied: regex in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (2019.12.20)
Requirement already satisfied: cython in /usr/local/lib/python3.6/dist-packages (from fairseq==0.9.0) (0.29.21)
Collecting portalocker
Downloading https://files.pythonhosted.org/packages/89/a6/3814b7107e0788040870e8825eebf214d72166adf656ba7d4bf14759a06a/portalocker-2.0.0-py2.py3-none-any.whl
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi->fairseq==0.9.0) (2.20)
Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from torch->fairseq==0.9.0) (0.16.0)
Installing collected packages: portalocker, sacrebleu, fairseq
Running setup.py develop for fairseq
Successfully installed fairseq portalocker-2.0.0 sacrebleu-1.4.13
/content
运行...
!python /content/fairseq/fairseq-master/fairseq_cli/train.py \
/data_dir \
--arch transformer_align --share-all-embeddings \
--optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 --activation-fn relu\
--lr 0.0007 --lr-scheduler inverse_sqrt --warmup-updates 4000 --warmup-init-lr 1e-07 \
--dropout 0.3 --attention-dropout 0.1 --weight-decay 0.0\
--max-tokens 3500 --label-smoothing 0.1 \
--save-dir /save_dir/ --log-interval 200 --max-epoch 20 \
--keep-interval-updates -1 --save-interval-updates 0 --criterion label_smoothed_cross_entropy \
--update-freq 8 \
运行日志...
Traceback (most recent call last):
File "/content/fairseq/fairseq-master/fairseq_cli/train.py", line 20, in <module>
from fairseq import (
ModuleNotFoundError: No module named 'fairseq'
最佳答案
使用以下方式安装它:pip 安装 fairseq不要使用 github。
关于python - 在 google colab 中安装并运行 fairseq(ModuleNotFoundError : No module named 'fairseq' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63664092/
例如从 Keras 导入 CIFAR-10 时(使用 from keras.datasets import cifar10 (x_train, y_train), (x_test, y_test) =
我在 gmail 上有两个帐户,并且都同时打开:Account_1@gmail.com 和 Account_2@gmail.com 当我打开 https://colab.research.google
我们可以以任何方式在 google colab 中为 Markdown 单元格启用拼写检查器吗?请帮忙。 最佳答案 我不知道直接在 Google Colaboratory 中执行此操作的任何方法,但是
似乎有很多方法可以从 Colab 访问 Google Drive 上的文件,但没有简单的方法可以将文件从 Google Colab 保存回 Google Drive。 例如,要从 Colab 访问 G
在 Google CoLab 左侧是一个可以打开的 Pane ,显示 Table of Contents , Code snippets , 和 Files . 在 Files Pane 中有一个上传
[较新的编辑]:colab 团队报告说他们已于 2020 年 5 月 27 日更正了该问题。 我已经检查过了 - 现在对我来说可以了。 问题链接:https://github.com/googleco
我一直在尝试读取 google colab 中的文件,它应该将文件作为简单的 JSON 读取,但我什至不能在没有得到 100 个的情况下执行 json.dumps(file)错误 上传文件: impo
training_dataset_file = open('C:/Users/kbg04289/Desktop/mnist_train.csv', 'r') 我尝试了几种方法 比如'用\'制作地址并检
我在 colab 单元中有以下代码: import sklearn.datasets import pandas as pd import numpy as np from sklearn.model
最后我正在研究谷歌合作实验室 我收到了这个数据集celeba,它进入了google驱动器帐户,并且该帐户不是我的帐户,但是我可以访问它 现在,由于互联网问题和驱动器容量,我无法卸载数据集,然后将其上传
德国的大家下午好! Google Colab 和我似乎对什么是可能的、什么是不可能的看法存在分歧......我只是想要一种从单元格内访问所有其他单元格的内容的方法。 我的用例是,我想将当前 Colab
很高兴我可以在 CoLab 中运行 jupyter 笔记本,但我正在疯狂地保存和加载文件。例如,我正在为我的类(class)编写作业,并使用 HTML 标签在其中包含图形。 (我想使用 HTML 而不
我正在使用\begin{equation}.. \end{equation}在 Colab 笔记本中的 Markdown 模式下,我没有像我期望的那样从 Latex 获得方程式编号。 有没有办法解决这
有谁知道是否有办法制作图表,使轴值在 Colab 中悬停时显示? 我找到了几个类似的答案 import matplotlib.pylab as plt import numpy as np f,a =
我写了一个 Langton 的 Ant 代码,我想让动画在 Colab 中运行,直到它被用户停止或在一定数量的帧之后。就像现在一样,它先生成所有的帧,然后将它们编译成动画然后显示。如果有很多帧,则需要
在过去的几个月里,我一直在使用 Google Colab,在连接到驱动器和使用 ! 键入 shell 命令时没有出现任何问题。然而今天突然出现错误,我找不到任何解决方法。 Colab 似乎无法在目录中
我开始使用 google colab 我想从我的笔记本电脑加载一组图像进行处理。 我试过这个: 但是我得到了错误: TypeError: embedded NUL character 那么导入图像的正
即使我将我的 Google 云端硬盘(以及其中的数据集)定义为 google colab,但是当我运行我的代码时,我给出了这个错误:FileNotFoundError: [Errno 2] No su
前言。我正在尝试使用 Google Colab 来教学生 Python。问题是,没有很好的工具来可视化代码执行。我尝试通过将 Python Tutor 与 Google Colab 集成来使用它,即创
我已将多个文件夹从云端硬盘导入到 Google Colab。较小的文件夹在列出目录时工作正常,但当我尝试列出较大文件夹中的目录时,Colab 给我一个错误。 我知道还有其他列出目录的方法,但当我尝试访
我是一名优秀的程序员,十分优秀!