I have this code:
search_alg = HyperOptSearch()
hyperopt_search = HyperOptSearch(
metric="val_acc", mode="max")
tuner = tune.Tuner(tune.with_resources(train_fn, {"cpu": 1}), tune_config=tune.TuneConfig(num_samples=100,search_alg=hyperopt_search),param_space=config_dict,run_config= RunConfig(local_dir='/home/pytorch_test/am/runs/'))
results = tuner.fit()
best_result = results.get_best_result(metric="val_acc", mode="max")
where train_fn()
is a pytorch lightning model of a neural network.
The method runs fine, but because ray tune is saving the output from every single run, I cannot complete a large run without running out of space on disk (smaller runs complete without error).
Is there a parameter I can use in this code that doesn’t save the full data for all ray tune runs? At the end, I only want the data for the best run according to the metric I’ve selected - could someone explain how to do this/how to take up less space?