# Empty checkpoint files with Tune.run

**URL:** https://discuss.ray.io/t/empty-checkpoint-files-with-tune-run/5596
**Category:** RLlib
**Created:** [March 29, 2022, 8:55pm UTC](https://discuss.ray.io/t/empty-checkpoint-files-with-tune-run/5596 "2022-03-29T20:55:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![luzgui](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/luzgui/32/2281_2.png) [@luzgui](https://discuss.ray.io/u/luzgui)
#### Post date: [March 29, 2022, 8:55pm UTC](https://discuss.ray.io/t/empty-checkpoint-files-with-tune-run/5596/1 "2022-03-29T20:55:27Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- High: It blocks me to complete my task.

Hello, I am using tune to perform different trials on hyperparameters with RLlib fin a custom environment  
My problem is that I was supposed to save a final checkpoint per trial but although I have a folder inside each trial folder with checkpoints they are not the correct files

Specifically I am getting the following folder structure

```
*Experiment*

```

- 

```
   Trial*

```

- 

```
       Checkpoint_-00001*

```

- 

```
           .is_checkpoint*

```

- 

```
           .null_marker*

```

- 

```
           .tune_metadata*

```

- 

```
       params*

```

- 

```
       progress*

```

- 

```
       results*

```

Essentially I was hopping to have a trained agent per trial and select the best agent that I could then restore to perform actions on my environment. From my understanding, the checkpoint\_at\_end=True was supposed to save these checkpoints

Is there another way to load a trained agent apart from checkpoints?

here is my snippet

```auto

def experiment(config):
    iterations = config.pop("train-iterations")
    train_agent = DQNTrainer(config=config)
    checkpoint = None
    train_results = {}
    for i in range(iterations):
        train_results = train_agent.train()
        tune.report(**train_results)
    train_agent.stop()

config["lr"]=tune.grid_search([1e-5, 1e-4])

tuneobject=tune.run(
    experiment,
    config=config,
    local_dir=raylog,
    checkpoint_at_end=True,
    checkpoint_freq=10,
    name='Exp1',
    checkpoint_score_attr="episode_reward_mean")

```

Thank you

---

<div class="post-metadata">

### Author: ![luzgui](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/luzgui/32/2281_2.png) [@luzgui](https://discuss.ray.io/u/luzgui)
#### Post date: [March 30, 2022, 1:36pm UTC](https://discuss.ray.io/t/empty-checkpoint-files-with-tune-run/5596/2 "2022-03-30T13:36:50Z")

</div>

I solved this issue using as a trainable just a `PPOTrainer` or a `DQNTrainer` instead of the `experiment` function
