# Train with tune doesnt set the right logdir

**URL:** <https://discuss.ray.io/t/train-with-tune-doesnt-set-the-right-logdir/5471>\
**Category:** Ray Train\
**Created:** [March 20, 2022, 1:51am UTC](https://discuss.ray.io/t/train-with-tune-doesnt-set-the-right-logdir/5471 "2022-03-20T01:51:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![matthewdeng](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/matthewdeng/32/1446_2.png) [@matthewdeng](https://discuss.ray.io/u/matthewdeng)\
**Post date:** [March 22, 2022, 5:09am UTC](https://discuss.ray.io/t/train-with-tune-doesnt-set-the-right-logdir/5471/7 "2022-03-22T05:09:22Z")

</div>

Hmm, I tried running the following simple example:

```python
from ray.train import Trainer
from ray import train, tune

def train_func():
    train.save_checkpoint(metric=123)

trainer = Trainer(backend="torch",num_workers=2)
trainable = trainer.to_tune_trainable(train_func)

tune.run(trainable)

```

And the checkpoint was written to:  
`~/tune_function_2022-03-21_22-02-05/tune_function_37f72_00000_0_2022-03-21_22-02-05/checkpoint_000000/checkpoint`

The file isn’t expected to be named `train_stuff` here.

---

_[View the full topic](https://discuss.ray.io/t/train-with-tune-doesnt-set-the-right-logdir/5471)._
