Skip to content

Additional cleanup of the codebase #750

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

Merged
merged 9 commits into from
Apr 11, 2023

Conversation

vloncar
Copy link
Contributor

@vloncar vloncar commented Apr 7, 2023

Description

Minor cleanups around the codebase:

  • Removed unused template functions from Layer
  • Moved numbers_cpp() from Layer to Writers so that no C++ code generation happens in IR
  • Moved definitions of Quantizers to types.py
  • Cleaned up qkeras imports (it is now a hard dependency so no need for checks if it is available)

Type of change

  • Other (Specify) - Cleanup

Tests

No need for extra tests, no new features were introduced

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@vloncar vloncar requested review from jmduarte and jmitrevs April 7, 2023 22:01
@vloncar vloncar added the please test Trigger testing by creating local PR branch label Apr 7, 2023
@jmitrevs jmitrevs added please test Trigger testing by creating local PR branch and removed please test Trigger testing by creating local PR branch labels Apr 7, 2023
@jmitrevs
Copy link
Contributor

jmitrevs commented Apr 7, 2023

Is this for 0.7.0 or 0.8.0?

Copy link
Member

@jmduarte jmduarte left a comment

Choose a reason for hiding this comment

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

Looks good to me and the qkeras tests pass: https://gitlab.cern.ch/fastmachinelearning/hls4ml/-/jobs/28750168

Is there anything else we should test specifically?

@vloncar
Copy link
Contributor Author

vloncar commented Apr 8, 2023

Is this for 0.7.0 or 0.8.0?

0.7.0. It doesn't make any changes to the functionality, it just reorganizes things a little bit. so it should be safe. If this messed up some imports, we would either get circular imports (all tests fail), or failure to import qkeras stuff (qkeras tests fail). But we can see from the logs that there are no import warnings and all tests pass.

@vloncar vloncar added please test Trigger testing by creating local PR branch and removed please test Trigger testing by creating local PR branch labels Apr 10, 2023
@jmitrevs jmitrevs added this to the v0.7.0 milestone Apr 11, 2023
@jmitrevs jmitrevs merged commit a031b6a into fastmachinelearning:main Apr 11, 2023
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please test Trigger testing by creating local PR branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants