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: can't pickle function objects #208

Open
1 task done
OopsYouDiedE opened this issue Oct 10, 2022 · 0 comments
Open
1 task done

TypeError: can't pickle function objects #208

OopsYouDiedE opened this issue Oct 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@OopsYouDiedE
Copy link

Search before asking

  • I have searched the MuZero issues and found no similar bug report.

🐛 Describe the bug

I run the script in both 3.7 and 3.9 and there are same problem.

Add an example

(minerl) PS E:\Download\muzero-general-master> python muzero.py

Welcome to MuZero! Here's a list of games:
0. atari

  1. breakout
  2. cartpole
  3. connect4
  4. gomoku
  5. gridworld
  6. lunarlander
  7. simple_grid
  8. spiel
  9. tictactoe
  10. twentyone
    Enter a number to choose the game: 2
    2022-10-10 16:33:22,009 INFO worker.py:1518 -- Started a local Ray instance.
    Traceback (most recent call last):
    File "muzero.py", line 650, in
    muzero = MuZero(game_name)
    File "muzero.py", line 96, in init
    ray.init(num_gpus=total_gpus, ignore_reinit_error=True)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray_private\worker.py", line 1528, in init
    job_config=job_config,
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray_private\worker.py", line 2071, in connect
    lambda worker_info: sys.path.insert(1, script_directory)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray_private\worker.py", line 709, in run_function_on_all_workers
    pickled_function = pickle.dumps(function)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\cloudpickle\cloudpickle_fast.py", line 73, in dumps
    cp.dump(obj)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\cloudpickle\cloudpickle_fast.py", line 620, in dump
    return Pickler.dump(self, obj)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 485, in dump
    self.save(obj)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 601, in save
    self.save_reduce(obj=obj, *rv)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 689, in save_reduce
    save(func)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 601, in save
    self.save_reduce(obj=obj, *rv)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 689, in save_reduce
    save(func)
    File "C:\Users\zznZZ.conda\envs\minerl\lib\site-packages\ray\pickle5_files\pickle5\pickle.py", line 576, in save
    rv = reduce(self.proto)

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

@OopsYouDiedE OopsYouDiedE added the bug Something isn't working label Oct 10, 2022
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

1 participant