allenai / allenai/allennlp-guide-examples

TypeError: object() takes no parameters using Google Colab

未關閉
#23 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
48
分支
15
PR 合併指標
30 天內沒有已合併 PR

描述

Hi.
I'm trying to run the train code on a Colab notebook, but I get this error

```
reading instances: 0it [00:00, ?it/s]Reading data
reading instances: 1600it [00:03, 516.73it/s]
reading instances: 200it [00:00, 1148.52it/s]
building vocab: 12%|#1 | 207/1800 [00:00<00:00, 2067.94it/s]Building the vocabulary
building vocab: 100%|##########| 1800/1800 [00:01<00:00, 1705.78it/s]
Building the model
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
170
171
--> 172 run_training_loop()

1 frames
in build_data_loaders(train_data, dev_data)
143 # We need to get the allennlp-specific collate function, which is
144 # what actually does indexing and batching.
--> 145 train_loader = DataLoader(train_data, batch_size=8, shuffle=True)
146 dev_loader = DataLoader(dev_data, batch_size=8, shuffle=False)
147 return train_loader, dev_loader

TypeError: object() takes no parameters
```
The code is a copy and paste of the `train.py` file, I only changed the paths of the .tsv files

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。