# Access Trial Info within Trainable

**URL:** https://discuss.ray.io/t/access-trial-info-within-trainable/5632
**Category:** Ray Tune
**Created:** [March 31, 2022, 2:52pm UTC](https://discuss.ray.io/t/access-trial-info-within-trainable/5632 "2022-03-31T14:52:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Zhang\_David](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/zhang_david/32/2345_2.png) [@Zhang\_David](https://discuss.ray.io/u/Zhang_David)
#### Post date: [March 31, 2022, 2:52pm UTC](https://discuss.ray.io/t/access-trial-info-within-trainable/5632/1 "2022-03-31T14:52:27Z")

</div>

Is it possible to access Trial info within a Trainable?

---

<div class="post-metadata">

### Author: ![kai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/kai/32/3380_2.png) [@kai](https://discuss.ray.io/u/kai)
#### Post date: [April 4, 2022, 6:07pm UTC](https://discuss.ray.io/t/access-trial-info-within-trainable/5632/2 "2022-04-04T18:07:47Z")

</div>

It is - but it depends on what info you need.

Currently there are the following functions to get some information: `tune.get_trial_dir()` `tune.get_trial_name()` and `get_trial_id()`

See [Training (tune.Trainable, tune.report) — Ray 1.11.0](https://docs.ray.io/en/latest/tune/api_docs/trainable.html#ray.tune.get_trial_dir)

Does this suffice your usecase?

---

<div class="post-metadata">

### Author: ![Zhang\_David](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/zhang_david/32/2345_2.png) [@Zhang\_David](https://discuss.ray.io/u/Zhang_David)
#### Post date: [April 9, 2022, 3:17am UTC](https://discuss.ray.io/t/access-trial-info-within-trainable/5632/3 "2022-04-09T03:17:55Z")

</div>

Thanks - this is actually where I’m going…

> <https://github.com/ray-project/ray/issues/23654>
>
> \### Search before asking
> 
> \- \[X\] I had searched in the \[issues\](https://github.co…m/ray-project/ray/issues) and found no similar feature requirement.
> 
> 
> \### Description
> 
> Is it possible to have Trial wise dependencies? 
> 
> For example, within one \*big\* Trial, it needs the outputs of Trial A and Trial B to get the final result/score, yet there's no dependency b/w A and B. 
> 
> This is related to https://github.com/ray-project/ray/issues/6560 and https://github.com/ray-project/ray/issues/7744
> 
> I've looked at the Repeater design, but in that case, there's no dependencies among trials within a group. 
> 
> \### Use case
> 
> Cross Validation or any other Trial that could be break down into smaller Trials that may or may not have dependencies.
> 
> \### Related issues
> 
> This is related to https://github.com/ray-project/ray/issues/6560 and https://github.com/ray-project/ray/issues/7744
> 
> \### Are you willing to submit a PR?
> 
> \- \[\] Yes I am willing to submit a PR!
