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

Export scaled controls when running forward models #9932

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

verveerpj
Copy link
Contributor

Issue
Resolves #8814

Approach
Export an additional JSON file with rescaled controls, so that forward model can check for its existence and use it.

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@verveerpj verveerpj added release-notes:new-feature Automatically categorise as new feature in release notes everest labels Jan 31, 2025
@verveerpj verveerpj self-assigned this Jan 31, 2025
@verveerpj verveerpj removed release-notes:new-feature Automatically categorise as new feature in release notes everest labels Jan 31, 2025
Copy link

codspeed-hq bot commented Jan 31, 2025

CodSpeed Performance Report

Merging #9932 will not alter performance

Comparing export-scaled-controls (dea809b) with main (2a53a93)

Summary

✅ 25 untouched benchmarks

@verveerpj verveerpj force-pushed the export-scaled-controls branch from aca6c93 to 608efd3 Compare February 3, 2025 07:23
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
480 1 479 31
View the top 1 failed tests by shortest run time
tests/everest/test_ropt_initialization.py::test_everest2ropt_controls_auto_scale
Stack Traces | 0.119s run time
def test_everest2ropt_controls_auto_scale():
        config = EverestConfig.load_file(os.path.join(_CONFIG_DIR, _CONFIG_FILE))
        controls = config.controls
        controls[0].auto_scale = True
        controls[0].scaled_range = [0.3, 0.7]
        ropt_config = everest2ropt(config, transforms=get_opt_model_transforms(config))
>       assert numpy.allclose(ropt_config.variables.lower_bounds, 0.3)
E       NameError: name 'numpy' is not defined

.../tests/everest/test_ropt_initialization.py:46: NameError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@verveerpj verveerpj force-pushed the export-scaled-controls branch 4 times, most recently from e73d225 to 9f71863 Compare February 3, 2025 13:06
@verveerpj verveerpj force-pushed the export-scaled-controls branch from 9f71863 to dea809b Compare February 3, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Handling of auto-scaled controls in forward models
2 participants