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

PicklingError: Can't pickle <class 'kiwi.data.encoders.wmt_qe_data_encoder.InputFields[PositiveInt]'>: attribute lookup InputFields[PositiveInt] on kiwi.data.encoders.wmt_qe_data_encoder failed #110

Open
Blinkblade opened this issue Apr 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Blinkblade
Copy link

Blinkblade commented Apr 3, 2022

Describe the bug
In Windows10,when I try to train_from_file in my Jupyter,I will fail in "Validation sanity check" and the erro is PicklingError:"Can't pickle <class 'kiwi.data.encoders.wmt_qe_data_encoder.InputFields[PositiveInt]'>: attribute lookup InputFields[PositiveInt] on kiwi.data.encoders.wmt_qe_data_encoder failed".
But when I run it in Linux with the same files,it will be all right with no error.

To Reproduce
Steps to reproduce the behavior:
1.My code in Jupyter:
from kiwi.lib.train import train_from_file
import pathlib
congfig = pathlib.Path("config/bert.yaml")
run_info = train_from_file(congfig)

2.my bert.yaml:
bert.yaml.txt

3.Then it will load model and data,until it begin to "Validation sanity check",there will be this PicklingError.

Expected behavior
PicklingError: Can't pickle <class 'kiwi.data.encoders.wmt_qe_data_encoder.InputFields[PositiveInt]'>: attribute lookup InputFields[PositiveInt] on kiwi.data.encoders.wmt_qe_data_encoder failed

Screenshots
2
1

Environment (please complete the following information):

  • OS: Windows10
  • OpenKiwi version:2.0.0
  • Python version:3.8.8

I have no idea about this Error,Could someone help me?Thanks.

@Blinkblade Blinkblade added the bug Something isn't working label Apr 3, 2022
@jlx339
Copy link

jlx339 commented Apr 20, 2022

I encountered the same error, please help.

@dmar1n
Copy link

dmar1n commented Apr 22, 2022

Hi!

I also encountered a 'PicklingError' when trying to train in a multi-GPU machine. If this is your case, you can maybe set one single device with CUDA_VISIBLE_DEVICES. That worked for me at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants