Created
May 13, 2020 16:41
-
-
Save Nanthini10/c703f4f5ef4ecd55128ed77482f440a0 to your computer and use it in GitHub Desktop.
Running a Tune experiment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analysis = tune.run( | |
WrappedTrainable, | |
name=exp_name, | |
scheduler=sched, | |
search_alg=search, | |
stop={"training_iteration": CV_folds, "is_bad": True,}, | |
resources_per_trial={"cpu": cpu_per_sample, "gpu": int(compute == "GPU")}, | |
num_samples=num_samples, | |
checkpoint_at_end=True, | |
keep_checkpoints_num=1, | |
local_dir="./results", | |
trial_name_creator=get_trial_name, | |
checkpoint_score_attr="test_accuracy", | |
config={ | |
"n_estimators": tune.randint(n_estimators_range[0], n_estimators_range[1]), | |
"max_depth": tune.randint(max_depth_range[0], | |
max_depth_range[1]), | |
"max_features": tune.loguniform(max_features_range[0], max_features_range[1]), | |
}, | |
verbose=1, | |
raise_on_failed_trial=False, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment