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

fix: Revert to get_checkpoints.sql call to enable NaN & Infinity values in searcher metric #9440

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

AmanuelAaron
Copy link
Contributor

@AmanuelAaron AmanuelAaron commented May 29, 2024

Ticket

ET-156

Description

Bun unmarshalling of JSON does not support NaN, Infinity & -Infinity values

Test Plan

Unit tests should pass.
Create checkpoints with a NaN, Infinity & -Infinity values, similar to the ones in the added test and call GetCheckpoint. It should return with the correct values in both searcher_metric & validation_metrics.

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@cla-bot cla-bot bot added the cla-signed label May 29, 2024
Copy link

netlify bot commented May 29, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 082819d
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/665ef61ebe1be80008115f16
😎 Deploy Preview https://deploy-preview-9440--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.

Project coverage is 49.00%. Comparing base (d50433d) to head (082819d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9440   +/-   ##
=======================================
  Coverage   49.00%   49.00%           
=======================================
  Files        1234     1234           
  Lines      159669   159671    +2     
  Branches     2779     2779           
=======================================
+ Hits        78240    78246    +6     
+ Misses      81254    81250    -4     
  Partials      175      175           
Flag Coverage Δ
backend 43.78% <45.45%> (+0.01%) ⬆️
harness 64.04% <ø> (ø)
web 44.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
master/internal/db/postgres_experiments.go 60.44% <ø> (ø)
master/internal/api_model.go 28.65% <50.00%> (-0.24%) ⬇️
master/internal/api_checkpoint.go 55.11% <42.85%> (-0.19%) ⬇️

... and 6 files with indirect coverage changes

@AmanuelAaron AmanuelAaron changed the title change to value type feat: Revert to get_checkpoints.sql call to enable NaN & Infinity values in searcher metric May 29, 2024
@AmanuelAaron AmanuelAaron changed the title feat: Revert to get_checkpoints.sql call to enable NaN & Infinity values in searcher metric fix: Revert to get_checkpoints.sql call to enable NaN & Infinity values in searcher metric May 29, 2024
@AmanuelAaron AmanuelAaron requested a review from erikwilson May 30, 2024 17:26
@AmanuelAaron AmanuelAaron marked this pull request as ready for review May 30, 2024 17:26
@AmanuelAaron AmanuelAaron requested a review from a team as a code owner May 30, 2024 17:26
})
require.NoError(t, err)

_, err = api.GetCheckpoint(ctx, &apiv1.GetCheckpointRequest{
Copy link
Contributor

Choose a reason for hiding this comment

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

small nit: would be good to verify the checkpoint too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@AmanuelAaron AmanuelAaron requested a review from salonig23 May 31, 2024 13:15
Copy link
Contributor

@salonig23 salonig23 left a comment

Choose a reason for hiding this comment

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

LGTM!

ckpt, err := internaldb.GetCheckpoint(ctx, req.CheckpointUuid)
if err != nil {
return resp, errors.Wrapf(err, "error fetching checkpoint %s from database", req.CheckpointUuid)
if err := a.m.db.QueryProto(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a comment here saying not to use Bun?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. Thanks!

Copy link
Contributor

@erikwilson erikwilson left a comment

Choose a reason for hiding this comment

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

🎉

@AmanuelAaron AmanuelAaron merged commit 13a5142 into main Jun 4, 2024
82 of 97 checks passed
@AmanuelAaron AmanuelAaron deleted the aaron_amanuel/get-checkpoint-nan-fix branch June 4, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants