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

Added pm.Data to track data used in model #211

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

brendan-m-murphy
Copy link
Contributor

  • Summary of changes

Using pm.Data for external data used in the model will make sure that data is added to the InferenceData returned from sampling, and will apply dimensions and coordinates to that data.

This will make it easier to construct the outputs from the inversion.

I also added a check to make sure min_error is the correct size.

  • Please check if the PR fulfills these requirements
  • Closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passing
  • Documentation and tutorials updated/added
  • Added an entry to the CHANGELOG.md file
  • Added any new requirements to requirements.txt

Also a check to make sure `min_error` is the correct size.

Using `pm.Data` for external data used in the model will make sure
that data is added to the `InferenceData` returned from sampling, and
will apply dimensions and coordinates to that data.

This will make it easier to construct the outputs from the inversion.
Copy link
Contributor

@alexdanjou alexdanjou left a comment

Choose a reason for hiding this comment

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

Looks great, thanks Brendan!

Update to devel to test before resolving PR
Copy link
Contributor

@alexdanjou alexdanjou left a comment

Choose a reason for hiding this comment

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

My test run failed because min_error was a 0-dim array and not a float. Would suggest to change l.287 to
if isinstance(min_error, float) or min_error.shape==(): (or check why min_error arrives as a 0-d array)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants