# Run tune.Tuner with a given policy

**URL:** <https://discuss.ray.io/t/run-tune-tuner-with-a-given-policy/16029>\
**Category:** RLlib\
**Created:** [October 18, 2024, 7:40am UTC](https://discuss.ray.io/t/run-tune-tuner-with-a-given-policy/16029 "2024-10-18T07:40:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbk80](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dbk80/32/1822_2.png) [@dbk80](https://discuss.ray.io/u/dbk80)\
**Post date:** [October 18, 2024, 7:40am UTC](https://discuss.ray.io/t/run-tune-tuner-with-a-given-policy/16029/1 "2024-10-18T07:40:34Z")

</div>

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:

```auto
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!
