Showing results for 
Search instead for 
Did you mean: 

Running same project N times with different random seeds

Running same project N times with different random seeds

Hi all,


I was wondering if there is a way of using the API to upload and run the same project N times using different random seeds. Basically cloning and re-running a project N times with all the same parameters except random seeds. 

The goal is having autopilot results coming from different seeds of the same input dataset.


Thank you in advance for any input.





Labels (1)
10 Replies

Hi @IraWatt  and @Lukas ,


Just wanted to add a little correction for the community. The previous code, while it did not generate an error, it was not setting the right amount of CV folds from the cloning project. This version below, is tested and works for 10 CV folds (note the variable "partitioning" added).



project = dr.Project.get('6262NNNNNNNNNNN')
partitioning = dr.StratifiedCV(holdout_pct = 20, reps = 10)

for x in range(6):
new_project = project.clone_project(new_project_name='test'+str(x))
new_project.set_target(target="your_target", advanced_options= dr.AdvancedOptions(seed= x), partitioning_method = partitioning)