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

[2pt] Fixing incorrect benchmark results and Geocurves #320

Merged
merged 11 commits into from
May 24, 2024

Conversation

RobHanna-NOAA
Copy link
Collaborator

@RobHanna-NOAA RobHanna-NOAA commented Apr 9, 2024

During testing and comparing ras2fim output units to benchmark data, we discovered some problems with geocurves. Many were not being created as expected.

Part of the evaluation of a unit is to use a new tool called run_eval_bench_data.py. This is a WIP tool and requires a fair bit of hardcoding to be used at this time, but it is expected to evolve as time permits later.

The normal "alpha testing" evaluation of a unit is to run the run_test_cases.py against a unit, then run run_eval_bench_data.py to see metrics and agreement rasters.

Note: This release does require a ras2fim Conda environment reload

Additions

  • tools\run_eval_bench_data.py: as described above.

File Renamed

  • Was: tools\run_unit_benchmark_tests.py, Now: run_test_cases.py: This is the same name as used in the FIM product for this functionality and helps minimize confusion.

Changes

  • environment.yml: Adding seaborn used for plots and updated a few other packages
  • src
    • conflate_hecras_to_nwm.py: Linting fixes
    • create_geocurves.py: A wide number of changes to fix the bug listed above. It also has significantly upgraded logging.
    • create_shapes_from_hecras.py: Added a note about an import fix required later. See Issue 323 Change logic of filtering out models and key model files.
  • tools
    • ras2inundation.py: A validation fix.
    • run_test_cases.py: (renamed as mentioned above): Some linting updates and some debugging cleanup
    • acquire_and_preprocess_3dep_dems.py: A small fix to disable the levee system in this script. The levee system is not fully operational system wide.

Testing

A very wide array of testing was done with small set models, plus full units (all models).

To test:

  • Update your conda environment.
  • Ensure you have or build a full set of models for a HUC.
  • Load the latest eval_PROD_metrics.csv from S3. If you already have on downloaded, remember that the eval system will overwrite records in the metrics file that match the unit_name and unit_version. ie) 12090301_2277_ble_240519.
  • Run the tools\run_test_cases.py. Watch the notes and args as this is stable tool but some args have never been tested. It is encouraged to use the defaults args and pathing. This will give you metrics files and agreement files.
  • Run the tools\run_eval_bench_data.py. It is a very new tool and is in rough prototype form. You will need to change some hardcoded values in order to use at this time, but it is very valuable to comparing results from V1 to V2 or any version of a unit.

Checklist

You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.

  • Informative and human-readable title, using the format: [_pt] PR: <description>
  • Pre-commit executed and linting changes made.
  • Links are provided if this PR resolves an issue, or depends on another other PR
  • If submitting a PR to the dev branch (the default branch), you have a descriptive Feature Branch name using the format: dev-<description-of-change> (e.g.: dev-revise-levee-masking)
  • Changes are limited to a single goal (no scope creep)
  • The feature branch you're submitting as a PR is up to date (merged) with the latest dev branch
  • Changes adhere to PEP-8 Style Guidelines
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (CHANGELOG and/or README)
  • Reviewers requested

Merge Checklist (For Technical Lead use only)

  • Update CHANGELOG with latest version number and merge date

@hhs732
Copy link
Contributor

hhs732 commented May 20, 2024

Geocurves script is ready to go.
image

@hhs732
Copy link
Contributor

hhs732 commented May 20, 2024

image

@hhs732
Copy link
Contributor

hhs732 commented May 20, 2024

image

@RobHanna-NOAA RobHanna-NOAA linked an issue May 21, 2024 that may be closed by this pull request
@RobHanna-NOAA RobHanna-NOAA requested a review from hhs732 May 21, 2024 19:44
@RobHanna-NOAA RobHanna-NOAA marked this pull request as ready for review May 21, 2024 19:44
@RobHanna-NOAA RobHanna-NOAA changed the title WIP: Fixing incorrect benchmark results [2pt] Fixing incorrect benchmark results and Geocurves May 23, 2024
Copy link
Contributor

@hhs732 hhs732 left a comment

Choose a reason for hiding this comment

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

The PR was tested for HUC 12090301. Two tools of run_eval_bench_data.py and run_test_cases.py were successfully executed.

@CarsonPruitt-NOAA CarsonPruitt-NOAA merged commit 9b9892c into dev May 24, 2024
@CarsonPruitt-NOAA CarsonPruitt-NOAA deleted the dev-inundation-fix branch May 24, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority ras2fim_V2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[13pt] NWS benchmark scores have dropped significantly
3 participants