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

test: add model parameter validation rules and persistence tests #3618

Merged

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Sep 10, 2024

Describe Your Changes

This PR is a follow-up to the changes in #3615, where none of the model parameters (including inference and model load parameters) of pre-persistence layer were covered by tests.

  1. Added validation rules for parameters so they can be verified before being persisted (sent to the endpoint later when cortex.cpp manages the models).
  2. Added tests for both validation rules (parameters extraction utility) and the updateModelParameter hook.
  3. Fixed an issue where Jest Babel failed to compile modules. See jest.config.js [22].
  4. Removed Debug: prefix, which confused users.
  5. Outputs an error to the FE console if a model parameters UI component is broken.
  6. Fixed an issue where model settings inputs allowed invalid values.
  7. Normalize values before sending out (e.g. float vs int)

Related PRs & comments

To test this PRs

  • Run make dev

@github-actions github-actions bot added the type: chore Maintenance, integration, packaging related label Sep 10, 2024
@louis-jan louis-jan force-pushed the test/add-validation-rules-and-tests-to-parameters-persistence branch from 60e8bf5 to 5b9c85a Compare September 10, 2024 11:55
@louis-jan louis-jan marked this pull request as draft September 10, 2024 11:59
@louis-jan louis-jan force-pushed the test/add-validation-rules-and-tests-to-parameters-persistence branch from 83a8c26 to 53c9110 Compare September 11, 2024 08:58
Copy link
Contributor

github-actions bot commented Sep 11, 2024

Barecheck - Code coverage report

Total: 57.31%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@dan-homebrew
Copy link
Contributor

Thanks for working on tests @louis-jan

@louis-jan louis-jan force-pushed the test/add-validation-rules-and-tests-to-parameters-persistence branch from 53c9110 to 55549e1 Compare September 12, 2024 00:54
@louis-jan louis-jan force-pushed the test/add-validation-rules-and-tests-to-parameters-persistence branch from 55549e1 to 53d98a6 Compare September 13, 2024 08:50
@louis-jan louis-jan marked this pull request as ready for review September 15, 2024 14:49
Copy link
Contributor

@dan-homebrew dan-homebrew left a comment

Choose a reason for hiding this comment

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

Thank you @louis-jan!

@louis-jan louis-jan merged commit 98bef7b into dev Sep 17, 2024
9 checks passed
@louis-jan louis-jan deleted the test/add-validation-rules-and-tests-to-parameters-persistence branch September 17, 2024 01:35
@github-actions github-actions bot added this to the v0.5.5 milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Maintenance, integration, packaging related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants