-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
when I run the code:
ModelCatalog.register_custom_model("MLPModel", MyKerasQModel)
obs_space = gym.spaces.Box(low=0, high=1, shape=(8,))
act_space = gym.spaces.Discrete(2)
def gen_policy(i):
config = {
"model": {
"custom_model": "MLPModel",
},
"gamma": 0.99,
}
return (None, obs_space, act_space, config)
policies = {"policy_0": gen_policy(0)}
policy_ids = list(policies.keys())
trainer = ray.rllib.agents.dqn.ApexTrainer(
trainer = ray.rllib.agents.dqn.DQNTrainer(
env="Game",
config={
"env_config": {},
# General
"log_level": "ERROR",
# Method specific
"multiagent": {
"policies": policies,
"policy_mapping_fn": (
lambda agent_id: policy_ids[0]),
},
"lr": 0.0005,
},
)
the return is:
ValueError: ('The given model must subclass', <class 'ray.rllib.agents.dqn.distributional_q_model.DistributionalQModel'>)
Metadata
Metadata
Assignees
Labels
No labels