ray icon indicating copy to clipboard operation
ray copied to clipboard

[<Ray component: Core|RLlib|etc...>] SAC config error about framework

Open mahao18cm opened this issue 10 months ago • 1 comments

What happened + What you expected to happen

When i tried to use SAC to train my model, the error happened.

Versions / Dependencies

Ray:Version: 2.46.0 python:Python 3.10.17

Reproduction script

agent, checkpoint_path = load_policy(algo, env_name, load_policy_path, env_config=env_config, seed=seed) def load_policy(algo, env_name, policy_path=None, seed=0, env_config={}, eval=False): if algo == 'ppo': agent = ppo.PPOTrainer(setup_config(algo, seed, env_config, eval=eval), env_name, logger_creator=custom_log_creator("", env_name) ) elif algo == 'sac': config = setup_config(algo, seed, env_config, eval=eval) agent = SAC(config=config,
logger_creator=custom_log_creator("
", env_name) ) When i tried to use agent = SAC(config=config, logger_creator=custom_log_creator("**", env_name), the error happened. The EnvRunnerGroup's setup method self._local_config = local_config_raw.framework(tf_session_args=config.copy(copy_frozen=False)). The return error TypeError: 'str' object is not callable. However my config type is <class 'ray.rllib.algorithms.sac.sac.SACConfig'>

Issue Severity

High: It blocks me from completing my task.

mahao18cm avatar Jun 10 '25 07:06 mahao18cm

Anyone help?

mahao18cm avatar Jun 17 '25 01:06 mahao18cm