Replies: 1 comment
-
Dataloader |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
EDIT: I found the solution or maybe its a workaround. I needed to edit torch/utils/data/dataloader.py Line 249 and set self.num_workers to 0 according to this thread: https://forums.developer.nvidia.com/t/nvidia-nemo-training-throws-picklingerror/126060/3
Maybe this will help someone in the future. I don't know why this helps, but I'm happy that my problems are solved now.
EDIT 2: It is easier to set num_workers to 0 in config files. For example for intent and slot classification you can set set this value to 0 in config files for test_ds and it will work aswell.
Hello Guys,
i recently trained a TokenClassificationModel with NeMo on Linux Ubuntu 22.04 LTS, Cuda 11.7, GeForce GTX 1080, PyTorch 1.13. Training went fine and I got a .nemo file in my checkpoints folder, which works like a charm when running on Ubuntu. But when I try to load it on windows (Cuda 11.7, PyTorch 1.13), I get some ForkingPickler -> NotImplementedError:
ForkingPickler(file, protocol).dump(obj)
NotImplementedError: object proxy must define reduce_ex()
I tried to load a checkpoint and to load my .nemo file but nothing works. Do you have any ideas?
model = nemo_nlp.models.TokenClassificationModel.load_from_checkpoint(checkpoint_path=os.getcwd() + '/models/name.ckpt') model_two = nemo_nlp.models.TokenClassificationModel.restore_from(restore_path=os.getcwd() + '/models/name.nemo')
After that I try to do some inference with it, like its mentioned in docs:
results = model.add_predictions(queries) for query, result in zip(queries, results): print(f'Query : {query}') print(f'Result: {result.strip()}\n')
I don't really understand the problem. It seems that it can't load my model, but I don't know why.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions