Hi!
I’m trying to run my RLlib custom environment in Google Colab. I tried first in my computer localy and all works good, but now in the Colab Notebook I have the following error:
ValueError Traceback (most recent call last)
<ipython-input-14-13576f35241d> in <cell line: 10>()
8
9 # Regiter of the environment in RLlib (not compatible with Gym regiter)
---> 10 register_env(
11 "EPEnv",
12 lambda args: EnergyPlusEnv_v0(args)
4 frames
/usr/local/lib/python3.10/dist-packages/ray/tune/registry.py in register_env(name, env_creator)
131 if not callable(env_creator):
132 raise TypeError("Second argument must be callable.", env_creator)
--> 133 _global_registry.register(ENV_CREATOR, name, env_creator)
134
135
/usr/local/lib/python3.10/dist-packages/ray/tune/registry.py in register(self, category, key, value)
235 "Unknown category {} not among {}".format(category, KNOWN_CATEGORIES)
236 )
--> 237 self._to_flush[(category, key)] = pickle.dumps_debug(value)
238 if _internal_kv_initialized():
239 self.flush_values()
/usr/local/lib/python3.10/dist-packages/ray/cloudpickle/__init__.py in dumps_debug(obj, *args, **kwargs)
37 def dumps_debug(obj, *args, **kwargs):
38 try:
---> 39 return dumps(obj, *args, **kwargs)
40 except (TypeError, PicklingError) as exc:
41 if os.environ.get("RAY_PICKLE_VERBOSE_DEBUG"):
/usr/local/lib/python3.10/dist-packages/ray/cloudpickle/cloudpickle_fast.py in dumps(obj, protocol, buffer_callback)
86 with io.BytesIO() as file:
87 cp = CloudPickler(file, protocol=protocol, buffer_callback=buffer_callback)
---> 88 cp.dump(obj)
89 return file.getvalue()
90
/usr/local/lib/python3.10/dist-packages/ray/cloudpickle/cloudpickle_fast.py in dump(self, obj)
731 def dump(self, obj):
732 try:
--> 733 return Pickler.dump(self, obj)
734 except RuntimeError as e:
735 if "recursion" in e.args[0]:
ValueError: ctypes objects containing pointers cannot be pickled
Any suggestion on how to fix it? Thanks in advance!!