Hi,
I would like to set up a tune.Tuner
object and run tuner.fit()
for an experiment using a Policy
object restored from a checkpoint. Could you please guide me on how to achieve this?
To clarify, here’s what I’m currently doing:
from ray.rllib.policy import Policy
policy = Policy.from_checkpoint(<path>)['default_policy']
weights = policy.get_weights()
weights = {'default_policy': weights}
from ray.tune.registry import get_trainable_cls
config = (
get_trainable_cls("PPO")
.get_default_config()
.environment(..., env_config=env_config)
.training(..., model={custom_model_config=custom_model_config})
)
algo = config.build()
algo.set_weights(weights)
At this point, I can call algo.train()
, but how can I achieve something similar using a tuner
?
Specifically, I’m interested in configuring a new environment (a new env_config
) and passing on a custom model config (a new custom_model_config
) in this setup.
Thank you in advance for your help!