pqagent.sweeper module

pqagent.sweeper.convert_to_tune_distributions(distribution: str, args)[source]

Converts a distribution name and its arguments to a Tune distribution.

Args:

distribution (str): The name of the distribution. [link to more info](https://docs.ray.io/en/latest/tune/api/search_space.html?_gl=1*11zn049*_up*MQ..*_ga*NTc1NjE0MjM3LjE3NTExODkzMjM.*_ga_0LCWHW1N3S*czE3NTExODkzMjIkbzEkZzAkdDE3NTExODkzMjIkajYwJGwwJGgw) args: Additional arguments for the distribution.

Returns:

tune.distributions.Distribution: The converted Tune distribution.

Raises:

KeyError: If the given distribution name is not supported.

pqagent.sweeper.dict_to_tune(raytune_config_dict: dict)[source]

Converts a dictionary of configurations to Ray Tune compatible format.

Args:

raytune_config_dict (dict): A dictionary containing configurations.

Returns:

dict: A dictionary in Ray Tune compatible format.

pqagent.sweeper.get_best_result(results: ResultGrid, metric: str, metric_goal: str) tuple[Result, MLP][source]
pqagent.sweeper.get_result_for_best_epoch(result, metric: str, metric_goal: str) Result[source]
pqagent.sweeper.get_search_alg(alg: str, metric: str, mode: str)[source]
pqagent.sweeper.sweep(data: ~pqagent.mlp.TrainingDataDict, trainable, sweep_config: dict, param_space: dict, retrain: bool = False) -> (<class 'dict'>, <class 'pqagent.mlp.MLP'>)[source]
pqagent.sweeper.trial_dirname_creator(trial)[source]