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: convert invalid hparam types to json string #9449

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

AmanuelAaron
Copy link
Contributor

@AmanuelAaron AmanuelAaron commented May 29, 2024

Ticket

ET-292

Description

Instead of throwing an error, we want to convert run hparams that are not text,numbers or dates into strings before being added to the run_hparam perf table

Test Plan

This is a fix for the nightly tests. Specifically test-e2e-mmdetection. This test should no longer fail

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 canceled.

Name Link
🔨 Latest commit 152405f
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66609ae530080a0008263fda

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 48.99%. Comparing base (13a5142) to head (152405f).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9449      +/-   ##
==========================================
- Coverage   49.00%   48.99%   -0.01%     
==========================================
  Files        1234     1234              
  Lines      159671   159677       +6     
  Branches     2779     2778       -1     
==========================================
- Hits        78248    78240       -8     
- Misses      81248    81262      +14     
  Partials      175      175              
Flag Coverage Δ
backend 43.76% <0.00%> (-0.03%) ⬇️
harness 64.05% <ø> (+<0.01%) ⬆️
web 44.12% <ø> (ø)

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

Files Coverage Δ
master/internal/db/postgres_trial.go 62.51% <0.00%> (-0.59%) ⬇️

... and 9 files with indirect coverage changes

@AmanuelAaron AmanuelAaron changed the title nested error msg bug: skip invalid hparam types for run_hparam table inserts Jun 4, 2024
@AmanuelAaron AmanuelAaron changed the title bug: skip invalid hparam types for run_hparam table inserts fix: skip invalid hparam types for run_hparam table inserts Jun 4, 2024
@AmanuelAaron AmanuelAaron marked this pull request as ready for review June 4, 2024 18:46
@AmanuelAaron AmanuelAaron requested a review from a team as a code owner June 4, 2024 18:46
Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

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

LGTM

@AmanuelAaron AmanuelAaron changed the title fix: skip invalid hparam types for run_hparam table inserts fix: convert invalid hparam types to json string Jun 4, 2024
Copy link
Contributor

@NicholasBlaskey NicholasBlaskey left a comment

Choose a reason for hiding this comment

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

lgtm

valBytes, err := json.Marshal(v)
if err != nil {
return hparamsModel, projHparamsModel,
fmt.Errorf("cannot assign hyperparameter %s, failed to encode type %T", hpName, val)
Copy link
Contributor

Choose a reason for hiding this comment

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

include the json error here

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 merged commit 418525e into main Jun 5, 2024
82 of 97 checks passed
@AmanuelAaron AmanuelAaron deleted the aaron_amanuel/run-hparam-error-fix branch June 5, 2024 17:40
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