question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Repeated trials in experiment (and numerical errors they sometimes cause: `RuntimeError: cholesky_cpu: U(63,63) is zero, singular U.`)

See original GitHub issue

I have a question regarding repeating trials. To my code I am not adding any new option compared to the Service API Example on Hartmann6 tutorial. However, I am changing the objective function and the parameters. Checking the results, I keep noticing that some runs produce lot of repeating trials. Am I missing something? Did it converge? If yes, how do I stop the repetition? By breaking the loop when the trial is identical to the previous one? Thanks.

for i in range(20):
    parameters, trial_index = ax.get_next_trial()
    ax.complete_trial(trial_index=trial_index, raw_data=evaluate(parameters))

Results: ax.get_trials_data_frame().sort_values('trial_index')

arm_name	MAE	trial_index	x1	x2	x3	x4
0	0_0	0.354344	0	3	29	56	a
3	1_0	0.392026	1	21	26	34	b
12	2_0	0.366922	2	15	88	67	a
13	3_0	0.395405	3	40	83	24	b
14	4_0	0.360699	4	7	8	60	a
15	5_0	0.36654		5	1	27	66	b
16	6_0	0.360878	6	1	35	47	b
17	7_0	0.354756	7	4	21	54	b
18	8_0	0.352988	8	4	29	55	b
19	9_0	0.355494	9	7	37	56	b
1	10_0	0.35465		10	5	31	54	b
2	11_0	0.366325	11	6	38	66	b
4	12_0	0.359888	12	5	27	57	b
5	13_0	0.351413	13	1	43	55	b
6	13_0	0.351413	14	1	43	55	b
7	13_0	0.351413	15	1	43	55	b
8	13_0	0.351413	16	1	43	55	b
9	13_0	0.351413	17	1	43	55	b
10	13_0	0.351413	18	1	43	55	b
11	13_0	0.351413	19	1	43	55	b

Note: x4 is not used in the function.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
sdaultoncommented, Sep 10, 2020

We have some improved methods in the works for better treatment of integer parameters (in the next couple weeks), which should resolve this issue. cc: @Balandat

2reactions
lena-kashtelyancommented, Dec 17, 2019

Update: we had a team discussion around this, and here are the outcomes:

  1. We are working on making our modeling layer more robust to the numerical errors caused by data logged for many repeated trials and will update this issue when the fix for that is in.
  2. We are also considering adding an option to specify experiment-level trial deduplication (currently we only offer deduplication for Sobol, but not for BayesOpt).
  3. In the meantime, when encountering identical or very similar trials, you can skip over repeated trials and eventually use them as a stopping criterion, as described in my commend above:

A better alternative might be not to stop when you get a repeated trial, but continue getting new trials (without completing them) until you get a new one (with some limit, of course, at which you can just stop the whole optimization).

  1. If standard errors on observations are known (or is the observations are known to be noiseless, in which case standard errors are 0.0), it’s better to actually pass those values to Ax, since in that case Ax will not need to infer noise level and numerical errors will be less likely to crop up.

cc @Balandat, @eytan, @bletham, @ldworkin

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error bars in experimental biology - PMC - NCBI
In this article we illustrate some basic features of error bars and explain how they can help communicate data and assist correct interpretation....
Read more >
Repeated Trials: Definition & Purpose - Study.com
Repeated trials are when you do a measurement multiple times - at least three, commonly five, but the more the better.
Read more >
Experimental Data and Uncertainty with Repeated Trials (IB ...
How to organize data, calculate uncertainties, and deal with repeated trials. Also a discussion of error bars.
Read more >
Practices of Science: Scientific Error
In order to address random error, scientists utilized replication. Replication is repeating a measurement many times and taking the average. Systematic error ......
Read more >
Experimental Errors and Error Analysis
Thus, the accuracy of the determination is likely to be much worse than the precision. This is often the case for experiments in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found