# Add trials to experiment for later analysis

**URL:** <https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173>\
**Category:** Uncategorized\
**Created:** [June 27, 2023, 9:17am UTC](https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173 "2023-06-27T09:17:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaydeen](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jaydeen/32/4591_2.png) [@Jaydeen](https://discuss.ray.io/u/Jaydeen)\
**Post date:** [June 27, 2023, 9:17am UTC](https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173/1 "2023-06-27T09:17:39Z")

</div>

Hi!  
I am running an experiment with

```
tuner = tune.Tuner(trainable_with_resources, param_space=config, tune_config=tune_config, run_config=run_config)
results = tuner.fit()

```

That’s all nice, but what if I want to add trials to my experiment later, such that I can do something like

> analysis = ExperimentAnalysis((run\_config.storage\_path)

for all trials within run\_config.storage\_path?

- If I just start a new experiment and save it into run\_config.strorage\_path, only the new trials will be read for analysis.
- Tuner.restore is only meant for incomplete experiments

I have not found a solution that works for me, yet…Thank you!

---

<div class="post-metadata">

**Author:** ![yunxuanx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yunxuanx/32/4354_2.png) [@yunxuanx](https://discuss.ray.io/u/yunxuanx)\
**Post date:** [July 3, 2023, 7:35pm UTC](https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173/2 "2023-07-03T19:35:22Z")

</div>

Hi @Jaydeen , do you mean you want to save two experiment results into the same storage path? May I know your use case?

Currently ExperimentAnalysis doesn’t support it. For result analysis, maybe you can merge multiple `result.json` files in different experiment folders.

---

<div class="post-metadata">

**Author:** ![Jaydeen](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jaydeen/32/4591_2.png) [@Jaydeen](https://discuss.ray.io/u/Jaydeen)\
**Post date:** [July 4, 2023, 8:19am UTC](https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173/3 "2023-07-04T08:19:50Z")

</div>

Hi! Thanks for your reply! Say I conducted a grid\_search for parameters A and B with the param\_space:

> A: tune.grid\_search([1,2,3])  
> B: tune.grid\_search([4,5])

At a later time I want to add the option B = 6 to my search space. How would I do that? Yes, I can run a new experiment with

> A: tune.grid\_search([1,2,3])  
> B: tune.grid\_search([6])

but if I want to analyse my results later I would somehow need to merge the results manually. It would be nice if I could just add the runs to the original experiment folder …

Hope that was clearer? Thank you!

---

<div class="post-metadata">

**Author:** ![yunxuanx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yunxuanx/32/4354_2.png) [@yunxuanx](https://discuss.ray.io/u/yunxuanx)\
**Post date:** [July 5, 2023, 8:00am UTC](https://discuss.ray.io/t/add-trials-to-experiment-for-later-analysis/11173/4 "2023-07-05T08:00:11Z")

</div>

Got it. Thank you @Jaydeen. Currently Ray Tune doesn’t support this feature yet, you have to manually merge the result files and do some post-process.  
I think this is a reasonable use case, we’ll discuss internally whether to support this feature.
