Failed to run the code: JSSEnv not found
First of all I would like to thank you for doing the implementation of the idea you proposed in your paper and also for such a real nice paper. Learnt a lot from it! I am doing research in similar area and your paper has been a great starting point.
I am using Ubuntu 21.10 and Python version 3.9
While running the code I found lot of errors while installing the packages listed in requirements.txt because of the dependencies and deprecated versions so
and that makes sense because now lot of newer version of these packages are there and the older ones do no support so I tried installing the packages listed in requirements.txt by removing all the versions in there and it did install successfully.
But then somehow the JSSEnv is not available although I did install it.
Here is the error that I am getting and somehow I am stuck here, Any help will be appreciated alot.
wandb: Currently logged in as: smita09 (usewandb login --reloginto force relogin) wandb: Tracking run with wandb version 0.12.11 wandb: Run data is saved locally in /home/smita/RL-Job-Shop-Scheduling/JSS/wandb/run-20220304_054910-393en4ar wandb: Runwandb offlineto turn off syncing. wandb: Syncing run worldly-flower-21 wandb: ⭐️ View project at https://wandb.ai/smita09/RL-Job-Shop-Scheduling-JSS wandb: 🚀 View run at https://wandb.ai/smita09/RL-Job-Shop-Scheduling-JSS/runs/393en4ar E0304 05:49:15.560678575 29964 fork_posix.cc:70] Fork support is only compatible with the epoll1 and poll polling strategies E0304 05:49:15.955048134 29964 fork_posix.cc:70] Fork support is only compatible with the epoll1 and poll polling strategies 2022-03-04 05:49:17,754 INFO services.py:1374 -- View the Ray dashboard at http://127.0.0.1:8265 E0304 05:49:17.774863530 29964 fork_posix.cc:70] Fork support is only compatible with the epoll1 and poll polling strategies E0304 05:49:17.810299565 29964 fork_posix.cc:70] Fork support is only compatible with the epoll1 and poll polling strategies 2022-03-04 05:49:21,270 INFO trainer.py:2054 -- Your framework setting is 'tf', meaning you are using static-graph mode. Set framework='tf2' to enable eager execution with tf2.x. You may also then want to set eager_tracing=True in order to reach similar execution speed as with static-graph mode. 2022-03-04 05:49:21,281 WARNING deprecation.py:45 -- DeprecationWarning:simple_optimizerhas been deprecated. This will raise an error in the future! 2022-03-04 05:49:21,282 WARNING deprecation.py:45 -- DeprecationWarning:metrics_smoothing_episodeshas been deprecated. Usemetrics_num_episodes_for_smoothinginstead. This will raise an error in the future! 2022-03-04 05:49:21,282 WARNING deprecation.py:45 -- DeprecationWarning:metrics_smoothing_episodeshas been deprecated. Usemetrics_num_episodes_for_smoothinginstead. This will raise an error in the future! 2022-03-04 05:49:21,282 WARNING ppo.py:223 --train_batch_size(33000) cannot be achieved with your other settings (num_workers=2 num_envs_per_worker=4 rollout_fragment_length=704)! Auto-adjustingrollout_fragment_length` to 4125.
2022-03-04 05:49:21,282 INFO ppo.py:249 -- In multi-agent mode, policies will be optimized sequentially by the multi-GPU optimizer. Consider setting simple_optimizer=True if this doesn't work for you.
2022-03-04 05:49:21,282 INFO trainer.py:790 -- Current log_level is WARN. For more information, set 'log_level': 'INFO' / 'DEBUG' or use the -v and -vv flags.
(pid=30192)
(pid=30190)
Traceback (most recent call last):
File "/home/smita/second_env/lib/python3.9/site-packages/ray/rllib/agents/trainer.py", line 811, in setup
self._init(self.config, self.env_creator)
File "/home/smita/second_env/lib/python3.9/site-packages/ray/rllib/agents/trainer.py", line 923, in _init
raise NotImplementedError
NotImplementedError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/smita/RL-Job-Shop-Scheduling/JSS/main.py", line 161, in JSSEnv:jss doesn't exist.
During handling of the above exception, another exception occurred:
ray::RolloutWorker.init() (pid=30190, ip=192.168.140.128) File "/home/smita/second_env/lib/python3.9/site-packages/ray/rllib/evaluation/rollout_worker.py", line 460, in init self.env = env_creator(copy.deepcopy
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb:
wandb: Synced worldly-flower-21: https://wandb.ai/smita09/RL-Job-Shop-Scheduling-JSS/runs/393en4ar
wandb: Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: ./wandb/run-20220304_054910-393en4ar/logs`
Thanks in Advance! Have a great day! :)
Hi @smita-09
Thank you for your kind words :)
It seems there is some issue with the registration of the environment. Could you try to add those lines at the beginning of the main file:
gym.envs.register(
id='JSSEnv:jss-v1',
entry_point='JSSEnv:JSSEnv'
)
This should register the custom environment and point the id to the correct entry point.
Example of the full script:
import gym
gym.envs.register(
id='JSSEnv:jss-v1',
entry_point='JSSEnv:JSSEnv'
)
env = gym.make('JSSEnv:jss-v1')
print(env.reset())
I hope this will fix your issue :)
First of all I would like to thank you for doing the implementation of the idea you proposed in your paper and also for such a real nice paper. Learnt a lot from it! I am doing research in similar area and your paper has been a great starting point. I am using the python=3.6 and running in Windows ,but when i run it show ModuleNotFoundError: No module named 'tree' . but i have installed it . what should i do
Hi @smita-09
Thank you for your kind words :)
It seems there is some issue with the registration of the environment. Could you try to add those lines at the beginning of the main file:
gym.envs.register( id='JSSEnv:jss-v1', entry_point='JSSEnv:JSSEnv' )This should register the custom environment and point the id to the correct entry point.
Example of the full script:
import gym gym.envs.register( id='JSSEnv:jss-v1', entry_point='JSSEnv:JSSEnv' ) env = gym.make('JSSEnv:jss-v1') print(env.reset())I hope this will fix your issue :)
I tried, it didn't work, I have the same issues..