Best practice for running multiple (possible parallel) experiments
See original GitHub issueTake a really basic example like this
ex = Experiment('basic')
ex.observers.append(FileStorageObserver.create('my_runs'))
@ex.config
def cfg():
x = 2
@ex.automain
def run(x):
print (x, x**3)
What is the best way of configuring multiple experiments that could be run independently, each one producing it’s own config output, e.g.
ex = Experiment('basic')
ex.observers.append(FileStorageObserver.create('my_runs'))
@ex.config
def cfg():
x = [2, 3, 4] # take one of these at a time and pass to run
@ex.automain
def run(x):
print (x, x**3)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Running Multiple A/B Tests at The Same Time: Do's and Don'ts
First, running tests in parallel isolated lanes (testing silos) doesn't really make sense from an efficiency standpoint. With any given number ...
Read more >Simultaneous Experimentation: Run Multiple A/B Tests ...
Learn how running simultaneous experiments improve your product as well as increase your revenue and overall velocity.
Read more >Running Multiple Improvement Experiments in Parallel
Although this strategy will help your team to increase its rate of improvement, there are two fundamental challenges with it. First, it is ......
Read more >Running multiple A/B tests in parallel - Bytepawn
I show using Monte Carlo simulations that randomizing user assignments into A/B test experiments makes it possible to run multiple A/B tests ......
Read more >Can You Run Multiple A/B Tests at the Same Time? - CXL
The reason you'd want to do this is to eliminate noise or bias from your results. The possible downside is that it might...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There is no notion of providing several options inside the configuration. The code you posted will simply assign the list
[2, 3, 4}
to x.For trying multiple options I often use a separate script that imports the experiment and runs it many times. So e.g. like this:
A grid search can then also easily be implemented using
itertools.product
.If you are interested in parallel execution, then I agree with @trickmeyer: the simplest way is to use the commanline interface, and just call the experiment many times with different parameters.
A different strategy, that is only partially supported at this point is to use the queueing function of sacred (
-q
) to store the configurations that you plan on running in the database with the statusQUEUED
, and have a set of workers that periodically query the database for such entries and run them. The querying is fully supported, but there is currently no code for the workers. I have a prototype locally, that should be included in sacred soon. But I can also post it here if you are interested.Closing, since it seems resolved to me, and further job scheduling support deserves its own issue(s).