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

TypeError: cannot pickle 'Environment' object #7

Open
edanuroksuz opened this issue Dec 30, 2024 · 0 comments
Open

TypeError: cannot pickle 'Environment' object #7

edanuroksuz opened this issue Dec 30, 2024 · 0 comments

Comments

@edanuroksuz
Copy link

Traceback (most recent call last):
File ".conda/envs/ContraNovo/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File ".conda/envs/ContraNovo/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/ContraNovo/ContraNovo/ContraNovo.py", line 211, in
main()
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File .conda/envs/ContraNovo/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "ContraNovo/ContraNovo/ContraNovo.py", line 205, in main
model_runner.evaluate(peak_path, model, config)
File "ContraNovo/ContraNovo/denovo/model_runner.py", line 58, in evaluate
_execute_existing(peak_path, model_filename, config, True)
File "ContraNovo/ContraNovo/denovo/model_runner.py", line 169, in _execute_existing
run_trainer(model,test_dataloader)
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 697, in validate
return call._call_and_handle_interrupt(
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 36, in _call_and_handle_interrupt
return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/pytorch_lightning/strategies/launchers/multiprocessing.py", line 113, in launch
mp.start_processes(
File ".conda/envs/ContraNovo/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 193, in start_processes
process.start()
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File ".conda/envs/ContraNovo/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle 'Environment' object

I am getting this error when I run the 'python -m ContraNovo.ContraNovo --mode=eval --peak_path=./ContraNovo/bacillus.10k.mgf --model=./ContraNovo/ContraNovo.ckpt'

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

1 participant