Neuraxle icon indicating copy to clipboard operation
Neuraxle copied to clipboard

Add prune feature

Open Rohith295 opened this issue 3 years ago • 8 comments

Neuraxle Pull Request

What it is

My pull request does: Pull request prune's the Models other than the chosen one by the Automl pipeline. 492

How it works

I coded it this way: Once the model is chosen by the automl pipeline. If the user tries to call apply method with prune as a input string. Automatically all the models which didn't perform well will be removed from the list of choices.

Example usage

Here is how you can use this new code as a end user:

# Note: Please make dimensions and types clear to the reader.
# E.g.: in the event fictious data is processed in this code example.
# Replace the current code example with your own.
# You may then use this PR code example to further document your code as a docstring!

this: Example = is_a_code_example
#automl_pipeline is a neuraxle pipeline
automl_pipeline.apply("prune")

Checklist before merging PR.

Things to check each time you contribute:

  • [x] If this is your first contribution to Neuraxle, please read the guide to contributing to the Neuraxle framework.
  • [x] Your local Git username is set to your GitHub username, and your local Git email is set to your GitHub email. This is important to avoid breaking the cla-bot and for your contributions to be linked to your profile. More info: https://github.com/settings/emails
  • [x] Argument's dimensions and types are specified for new steps (important), with examples in docstrings when needed.
  • [x] Class names and argument / API variables are very clear: there is no possible ambiguity. They also respect the existing code style (avoid duplicating words for the same concept) and are intuitive.
  • [x] Use typing like variable: Typing = ... as much as possible. Also use typing for function arguments and return values like def my_func(self, my_list: Dict[int, List[str]]) -> OrderedDict[int, str]:.
  • [x] Classes are documented: their behavior is explained beyond just the title of the class. You may even use the description written in your pull request above to fill some docstrings accurately.
  • [ ] If a numpy array is used, it is important to remember that these arrays are a special type that must be documented accordingly, and that numpy array should not be abused. This is because Neuraxle is a library that is not only limited to transforming numpy arrays. To this effect, numpy steps should probably be located in the existing numpy python files as much as possible, and not be all over the place. The same applies to Pandas DataFrames.
  • [ ] Code coverage is above 90% for the added code for the unit tests.
  • [ ] The above description of the pull request in natural language was used to document the new code inside the code's docstrings so as to have complete documentation, with examples.
  • [x] Respect the Unit Testing status check
  • [x] Respect the Codacy status check
  • [x] Respect the cla-bot status check (unless the cla-bot is truly broken - please try to debug it first)
  • [x] Code files that were edited were reformatted automatically using PyCharm's Ctrl+Alt+L shortcut. You may have reorganized imports as well.

Rohith295 avatar Jul 05 '21 09:07 Rohith295

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 09:07 cla-bot[bot]

New contributor? Ensure you do this.

  • [ ] Your local Git username is set to your GitHub username, and your local Git email is set to your GitHub email. This is important to avoid breaking the cla-bot and for your contributions to be linked to your profile. If at least 1 contribution is not commited properly using the good credentials, the cla-bot will break until your re-commit it.
  • [ ] Use the PyCharm IDE with PyTest to test your code. Reformatting your code at every file save is a good idea, using PyCharm's Ctrl+Alt+L shortcut. You may reorganize imports automatically as well, as long as your project root is well configured. Run the tests to see if everything works, and always ensure that all tests run before opening a pull request as well.
  • [ ] We recommend letting PyCharm manage the virtual environment by creating a new one just for this project, and using PyTest as a test runner in PyCharm. This is not required, but should help in getting you started.
  • [ ] Please make your pull request(s) editable, such as for us to add you to the list of contributors if you didn't add the entry, for example.
  • [ ] To contribute, first fork the project, then do your changes, and then open a pull request in the main repository.
  • [ ] Sign the Contributor License Agreement (CLA) to allow Neuraxio to use and publish your contributions under the Apache 2.0 license, in order for everyone to be able to use your open-source contributions. Follow the instructions of the cla-bot upon opening the pull request.

Things to check at each Pull Request (PR)

  • [ ] Your local Git username is set to your GitHub username, and your local Git email is set to your GitHub email. This is important to avoid breaking the cla-bot and for your contributions to be linked to your profile. More info: https://github.com/settings/emails
  • [ ] Argument's dimensions and types are specified for new steps (important), with examples in docstrings when needed.
  • [ ] Class names and argument / API variables are very clear: there is no possible ambiguity. They also respect the existing code style (avoid duplicating words for the same concept) and are intuitive.
  • [ ] Use typing like variable: Typing = ... as much as possible. Also use typing for function arguments and return values like def my_func(self, my_list: Dict[int, List[str]]) -> OrderedDict[int, str]:.
  • [ ] Classes are documented: their behavior is explained beyond just the title of the class. You may even use the description written in your pull request above to fill some docstrings accurately.
  • [ ] If a numpy array is used, it is important to remember that these arrays are a special type that must be documented accordingly, and that numpy array should not be abused. This is because Neuraxle is a library that is not only limited to transforming numpy arrays. To this effect, numpy steps should probably be located in the existing numpy python files as much as possible, and not be all over the place. The same applies to Pandas DataFrames.
  • [ ] Code coverage is above 90% for the added code for the unit tests.
  • [ ] Respect the Unit Testing status check
  • [ ] Respect the Codacy status check
  • [ ] Respect the cla-bot status check (unless the cla-bot is truly broken - please try to debug it first)
  • [ ] The above description of the pull request in natural language was used to document the new code inside the code's docstrings so as to have complete documentation, with examples.
  • [ ] Code files that were edited were reformatted automatically using PyCharm's Ctrl+Alt+L shortcut.

pull-checklist[bot] avatar Jul 05 '21 09:07 pull-checklist[bot]

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 09:07 cla-bot[bot]

@guillaume-chevalier need your input on the implementation.

Rohith295 avatar Jul 05 '21 09:07 Rohith295

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 09:07 cla-bot[bot]

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 12:07 cla-bot[bot]

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 12:07 cla-bot[bot]

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Rohith Rangaraju. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

cla-bot[bot] avatar Jul 05 '21 12:07 cla-bot[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in the next 180 days. Thank you for your contributions.

stale[bot] avatar Jan 10 '23 00:01 stale[bot]