luisgarciar / 3d-bin-packing Goto Github PK
View Code? Open in Web Editor NEWSolving the 3D bin packing problem with reinforcement learning
License: MIT License
Solving the 3D bin packing problem with reinforcement learning
License: MIT License
Hello, can you tell me whether the 3D boxing test of the PPO environment is successful? Here I display: ValueError: operators could not be broadcast together with shapes (10,) (3,) (10,). How can I handle this error?
Hello,
I cannot find the demo file "demo_ffd" mentioned in README.md:
-->A demo notebook demo_ffd
implementing the heuristic-based method 'First Fit Decreasing' is available in the nb
folder.
Hi,
I had an error using the example notebooks on my PC.
The error is the same one mentioned here:
https://stackoverflow.com/questions/76233793/getting-environment-must-inherit-from-the-gym-env-when-it-already-does-in-stable
Their solution worked for me too.
I added the following line to the requirements file to fix the error:
stable-baselines3==1.7
Best,
Hi Luis,
I am trying to run the code, even if it is difficult, I managed to bring all libraries to the same versions in requirements, but I get the following problem.
Can you help me?
model = MaskablePPO("MultiInputPolicy", env, verbose=2)
print("begin training")
model.learn(total_timesteps=1000)
print("done training")
model.save("ppo_mask")
Using cpu device
Wrapping the env with a Monitor
wrapper
Wrapping the env in a DummyVecEnv.
begin training
TypeError Traceback (most recent call last)
in <cell line: 3>()
1 model = MaskablePPO("MultiInputPolicy", env, verbose=2)
2 print("begin training")
----> 3 model.learn(total_timesteps=1000)
4 print("done training")
5 model.save("ppo_mask")
3 frames
/usr/local/lib/python3.10/dist-packages/sb3_contrib/ppo_mask/ppo_mask.py in learn(self, total_timesteps, callback, log_interval, tb_log_name, reset_num_timesteps, use_masking, progress_bar)
512 iteration = 0
513
--> 514 total_timesteps, callback = self._setup_learn(
515 total_timesteps,
516 callback,
/usr/local/lib/python3.10/dist-packages/sb3_contrib/ppo_mask/ppo_mask.py in _setup_learn(self, total_timesteps, callback, reset_num_timesteps, tb_log_name, use_masking, progress_bar)
237 # Avoid resetting the environment when calling .learn()
consecutive times
238 if reset_num_timesteps or self._last_obs is None:
--> 239 self._last_obs = self.env.reset()
240 self._last_episode_starts = np.ones((self.env.num_envs,), dtype=bool)
241 # Retrieve unnormalized observation for saving into the buffer
/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/dummy_vec_env.py in reset(self)
76 maybe_options = {"options": self._options[env_idx]} if self._options[env_idx] else {}
77 obs, self.reset_infos[env_idx] = self.envs[env_idx].reset(seed=self._seeds[env_idx], **maybe_options)
---> 78 self._save_obs(env_idx, obs)
79 # Seeds and options are only used once
80 self._reset_seeds()
/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/dummy_vec_env.py in _save_obs(self, env_idx, obs)
108 self.buf_obs[key][env_idx] = obs
109 else:
--> 110 self.buf_obs[key][env_idx] = obs[key] # type: ignore[call-overload]
111
112 def _obs_from_buf(self) -> VecEnvObs:
TypeError: string indices must be integers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.