Skip to content

[Code Cleanup] [Low prio] budget type and budget #177

Closed
@ArlindKadra

Description

budget_type: Optional[str] = None,
budget: Optional[float] = None,

budget_type (Optional[str]):
Type of budget to be used when fitting the pipeline.
Either 'epochs' or 'runtime'. If not provided, uses
the default in the pipeline config ('epochs')
budget (Optional[float]):
Budget to fit a single run of the pipeline. If not
provided, uses the default in the pipeline config
total_walltime_limit (int), (default=100): Time limit

With what I was looking through the code, budget_type and budget never get default values, which contradicts the documentation, also the fact that they are given as Optional. Additionally, the check below disregards budget not being given and would raise the wrong error message.

budget_config: Dict[str, Union[float, str]] = {}
if budget_type is not None and budget is not None:
budget_config['budget_type'] = budget_type
budget_config[budget_type] = budget
elif budget_type is not None or budget is not None:
raise ValueError(
"budget type was not specified in budget_config"
)

Metadata

Labels

refactoringImprovement of readability and abstract codes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions