Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行train.py在Conll-2003数据集上时遇到value error #19

Open
619797944 opened this issue Mar 1, 2023 · 4 comments
Open

运行train.py在Conll-2003数据集上时遇到value error #19

619797944 opened this issue Mar 1, 2023 · 4 comments

Comments

@619797944
Copy link

我尝试运行train.py在CoNLL-2003数据集,但是遇到了如下问题:
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
我在conll-2003的文档中保存数据以如下形式:
EU B-ORG
rejects O
German B-MISC
call O
to O
boycott O
British B-MISC
lamb O
. O

Peter B-PER
Blackburn I-PER

BRUSSELS B-LOC
1996-08-22 O
...
请问有人遇到类似的情况吗

@619797944
Copy link
Author

我又尝试了从CoNLL-2003官方网站上下载的txt文件,仍旧会出现同样的问题

@619797944
Copy link
Author

此外,我尝试了降级numpy到1.21.6,以上问题解决了,但是会导致新的runtime error:
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

在终端中,进度条刚打开,下一轮epoch又立马开始
Epoch 1/30: 0%| | 0/32430 [00:00<?, ?it/s, loss:{0:<6.5f}]before train
training epochs started 2023-03-02-02-21-24-569438
Read cache from caches/data_facebook/bart-large_conll2003_word.pt.
max_len_a:0.6, max_len:10
...
不知道是否因为multiprocessing

@mufengbei
Copy link

一定要在linux系统下才能跑成功

@Chen-14
Copy link

Chen-14 commented May 7, 2023

我尝试运行train.py在CoNLL-2003数据集,但是遇到了如下问题: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. 我在conll-2003的文档中保存数据以如下形式: EU B-ORG rejects O German B-MISC call O to O boycott O British B-MISC lamb O . O

Peter B-PER Blackburn I-PER

BRUSSELS B-LOC 1996-08-22 O ... 请问有人遇到类似的情况吗

你好请问目前解决了吗,我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants