-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When trying to train a ray.rllib algorithm on the jsp environment, this fails because of the handling of signals in graph_jsp_env.disjunctive_graph_jsp_visualizer.
Here is a minimal example which i expected to work as it is working with stablebaselines3:
import numpy as np
import ray
from graph_jsp_env.disjunctive_graph_jsp_env import DisjunctiveGraphJspEnv
from ray.rllib.algorithms import PPO
from ray.tune import register_env
jsp = np.array(
[
[
[0, 1, 2], # machines for job 0
[0, 2, 1], # machines for job 1
[0, 1, 2], # machines for job 2
],
[
[3, 2, 2], # task durations of job 0
[2, 1, 4], # task durations of job 1
[0, 4, 3], # task durations of job 2
],
]
)
register_env(
"jsp",
lambda env_config: DisjunctiveGraphJspEnv(
jps_instance=jsp,
),
)
ray.init()
algo = PPO(config=PPO.get_default_config().environment("jsp"))
algo.train()Perhaps a solution could be to make the signals handling optional so that we can deactivate it when using ray.rllib.
NB: if we set ray in local mode (ray.init(local_mode=True)), it is working but the goal is to be able to use ray in standard mode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels