Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ArlindKadra opened this issue Apr 20, 2021 · 0 comments
Closed

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

ArlindKadra opened this issue Apr 20, 2021 · 0 comments
Assignees
Labels
refactoring Improvement of readability and abstract codes

Comments

@ArlindKadra
Copy link

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"
)

@ArlindKadra ArlindKadra added the refactoring Improvement of readability and abstract codes label Apr 20, 2021
@franchuterivera franchuterivera self-assigned this Jun 23, 2021
@ravinkohli ravinkohli added this to To do in release v0.1.0 Oct 26, 2021
@ravinkohli ravinkohli moved this from To do to Done in release v0.1.0 Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improvement of readability and abstract codes
Projects
No open projects
Development

No branches or pull requests

3 participants