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

refactor: rename neps.XParameter to neps.X #149

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

gopaljigaur
Copy link
Collaborator

This pull request introduces the update to neps.XParameter classes and replaces them with the new neps.X classes, while maintaining backwards compatibility for neps.XParameter usage. Deprecation warnings have been introduced for neps.XParameter classes to inform the users of the changes and advise them to update their code accordingly.

Renaming Parameter Classes:

  • README.md, docs/index.md, docs/getting_started.md, docs/doc_yamls/architecture_search_space.py: Updated parameter class names from FloatParameter, IntegerParameter, CategoricalParameter, and ConstantParameter to Float, Integer, Categorical, and Constant, respectively. [1] [2] [3] [4]
  • docs/reference/pipeline_space.md: Reflected the new parameter class names in the documentation. [1] [2] [3]

Source Code Updates:

  • neps/__init__.py: Removed old parameter class aliases and added new ones to the import list.
  • neps/api.py, neps/optimizers/grid_search/optimizer.py, neps/optimizers/multi_fidelity/ifbo.py, neps/optimizers/multi_fidelity/successive_halving.py, neps/optimizers/multi_fidelity_prior/utils.py, neps/sampling/priors.py: Updated references to the renamed parameter classes. [1] [2] [3] [4] [5] [6]

Import Adjustments:

These changes ensure consistency across the codebase and documentation, making the parameter class names more intuitive and easier to understand.

@gopaljigaur gopaljigaur marked this pull request as ready for review October 16, 2024 17:29
Copy link
Contributor

@eddiebergman eddiebergman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing really need to change, looks fine :)

Quick question on how you did the PR description looks like it was generated?

@@ -49,7 +50,7 @@ def run_pipeline( # (1)!
)

return {
"loss": validation_error, #! (2)
"loss": validation_error, # ! (2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check that adding this leading whitespace still leads to correct rendering with the docs? You'd have to run mkdocs serve and check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting me know! I checked the generated docs and compared with the current ones and I see no issues with the rendered page after introduction of this whitespace. I think this was introduced during pre-commit run

@gopaljigaur
Copy link
Collaborator Author

gopaljigaur commented Oct 18, 2024

Quick question on how you did the PR description looks like it was generated?

I used Copilot button on PR to summarize the introduced changes (https://githubnext.com/projects/copilot-for-pull-requests)

image

@gopaljigaur gopaljigaur merged commit 26724bc into master Oct 18, 2024
7 checks passed
@gopaljigaur gopaljigaur deleted the rename-neps-parameters branch October 19, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants