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

Composite Model Parameter #144

Merged
merged 5 commits into from
Jul 5, 2024
Merged

Conversation

teubert
Copy link
Contributor

@teubert teubert commented Jul 5, 2024

Closes #143

Updated composite model so that setting parameters in the composite model will update the composed models. For example, setting "abc.def" will update parameter "def" of composed model "abc".

Also added to jupyter notebook and added test.

This feature was requested by the SWS project for a model of their SWS Safety Service

@teubert teubert requested a review from kjjarvis July 5, 2024 20:32
@teubert teubert added components: models enhancement New feature or request project: SWS System Wide Safety Project labels Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

@teubert teubert linked an issue Jul 5, 2024 that may be closed by this pull request
5 tasks
@teubert teubert self-assigned this Jul 5, 2024
Copy link
Contributor

@kjjarvis kjjarvis left a comment

Choose a reason for hiding this comment

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

Nice addition!

src/progpy/composite_model.py Outdated Show resolved Hide resolved
"cell_type": "markdown",
"metadata": {},
"source": [
"Parameters in composed models can be updated directly using the model_name.parameter name parameter of the composite model. Like so:"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should "model_name.parameter name" be "model_name['parameter name']" to match the code below it? (perhaps either syntax would work?)

teubert and others added 2 commits July 5, 2024 14:19
Co-authored-by: Katy Jarvis Griffith <55932920+kjjarvis@users.noreply.github.com>
7.3 kB was a bit excessive a req.
@teubert teubert merged commit 8ee90ba into dev Jul 5, 2024
29 of 30 checks passed
@teubert teubert deleted the feature/143-improved-composite-parameters branch July 5, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
components: models enhancement New feature or request project: SWS System Wide Safety Project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved Composite parameters
2 participants