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

Generate structural change warnings and log_once functionality #2801

Merged
merged 5 commits into from
Nov 29, 2022

Conversation

arnavgarg1
Copy link
Contributor

@arnavgarg1 arnavgarg1 commented Nov 28, 2022

This PR adds two new functions to Ludwig:

  1. warn_structure_refactor creates a warning (once per module) to let users know that the location of a module has changed from location A to location B, and that they should update their imports.
  2. log_once enables logging a warning just once based on the key passed in, which is very useful for things like warnings, failed image/data processing reads, etc.

The motivation to add this functionality to help create neat deprecation warnings for module/structural level changes in the future (such as moving automl utils into the automl top level directory).

@arnavgarg1 arnavgarg1 changed the title Autogeneration of structural change warnings and log_once functionality Generate structural change warnings and log_once functionality Nov 28, 2022
@github-actions
Copy link

github-actions bot commented Nov 28, 2022

Unit Test Results

         6 files  +    1           6 suites  +1   3h 34m 11s ⏱️ + 26m 35s
  3 529 tests ±    0    3 454 ✔️ ±    0    75 💤 ±  0  0 ±0 
10 587 runs  +178  10 344 ✔️ +157  243 💤 +21  0 ±0 

Results for commit a05433c. ± Comparison against base commit 9bfd7a9.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@justinxzhao justinxzhao left a comment

Choose a reason for hiding this comment

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

LGTM! Could you update the PR description?

@arnavgarg1
Copy link
Contributor Author

LGTM! Could you update the PR description?

Done!

@arnavgarg1 arnavgarg1 merged commit 048faa0 into master Nov 29, 2022
@arnavgarg1 arnavgarg1 deleted the add_structural_warning branch November 29, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants