ray.tune.Callback.setup#
- Callback.setup(stop: Stopper | None = None, num_samples: int | None = None, total_num_samples: int | None = None, **info)[source]#
- Called once at the very beginning of training. - Any Callback setup should be added here (setting environment variables, etc.) - Parameters:
- stop – Stopping criteria. If - time_budget_swas passed to- tune.RunConfig, a- TimeoutStopperwill be passed here, either by itself or as a part of a- CombinedStopper.
- num_samples – Number of times to sample from the hyperparameter space. Defaults to 1. If - grid_searchis provided as an argument, the grid will be repeated- num_samplesof times. If this is -1, (virtually) infinite samples are generated until a stopping condition is met.
- total_num_samples – Total number of samples factoring in grid search samplers. 
- **info – Kwargs dict for forward compatibility.