Comments (1)
A quick update. Per the above message, I've been trying to make Stable-Baselines3's SubprovVecEnv (make_vec_env with 2 or more parallel environments) work with ns3gym. DummyVecEnv works, but SubprocVecEnv seems to be running into some conflicts between pickle (messaging method used by Python for multiprocessing) and protobuf (messaging method used by ns3gym between agent/proxy in Pyhton and env in C++). I copy below the typical error messages. Please let me know if you have any ideas/suggestions for dealing with this issue.
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 40, in _worker
remote.send(observation)
File "/usr/lib/python3.10/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/usr/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
_pickle.PickleError: can't pickle repeated message fields, convert to list first
Traceback (most recent call last):
File "/home/ubuntu/repos/ns-3-allinone/ns-3.36/contrib/opengym/examples/lte_tilts/./try-test.py", line 48, in
model.learn(total_timesteps=8)
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/dqn/dqn.py", line 265, in learn
return super().learn(
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/off_policy_algorithm.py", line 323, in learn
total_timesteps, callback = self._setup_learn(
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/off_policy_algorithm.py", line 305, in _setup_learn
return super()._setup_learn(
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/base_class.py", line 408, in _setup_learn
self._last_obs = self.env.reset() # pytype: disable=annotation-type-mismatch
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 136, in reset
obs = [remote.recv() for remote in self.remotes]
File "/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 136, in
obs = [remote.recv() for remote in self.remotes]
File "/usr/lib/python3.10/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/usr/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes
buf = self._recv(4)
File "/usr/lib/python3.10/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError
from ns3-gym.
Related Issues (20)
- Errors during ./ns3 build procedure HOT 1
- Random Early Detection
- Run the code
- Installation Error HOT 3
- protobuf messages are not generated during build configuration HOT 13
- using gdb to debug ns3-script in a separate shell results into the script restarting HOT 1
- protobuf messages are generated but could not be found during build configuration HOT 1
- some problem in run cognitive-agent-v1.py HOT 2
- Missing header messages.pb.h for opengym HOT 2
- GNU version still not meets requirement after updating gcc/g++
- ./ns3 configure -d release --enable-examples --enable-tests HOT 2
- ubuntu2210
- implementation of reward and penalty HOT 1
- The `info` returned by `step()` must be a python dictionary, actual type: <class 'str'> HOT 1
- protobuf_generate command not found HOT 3
- Gym is unmaintained, replace it by Gymnasium
- python contrib/opengym/examples/opengym/simple_test.py Got new port for ns3gm interface: 7656 ns3 file not found. Quitting...
- install ns3-gym in tensorflow environment
- NS3 gym stable baseline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ns3-gym.