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

Test DeepEnsemble with float32 #826

Merged
merged 7 commits into from
Mar 6, 2024
Merged

Conversation

uri-granta
Copy link
Collaborator

Related issue(s)/PRs:

Summary

...

Fully backwards compatible: yes / no

PR checklist

  • The quality checks are all passing
  • The bug case / new feature is covered by tests
  • Any new features are well-documented (in docstrings or notebooks)

@uri-granta uri-granta marked this pull request as ready for review March 1, 2024 07:51
Copy link
Collaborator

@hstojic hstojic left a comment

Choose a reason for hiding this comment

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

a step in the right direction :)
left some comments - this checks if all runs, which is necessary, but certain parts of the pipeline might nevertheless cast back and forth which we don't test here - I'm not sure whats the best way to do that, just saying this is not sufficient - we'll probably need to test each individual component, or perhaps each individual object should have a dtype property which could facilitate that...

cannot recall now, but do we have dtype checks in unit tests of the DE model - e.g. checking prediction, sample methods, and trajectory sampler?

tests/integration/test_bayesian_optimization.py Outdated Show resolved Hide resolved
@uri-granta
Copy link
Collaborator Author

uri-granta commented Mar 4, 2024

By patching tf.cast I've verified that there are no unexpected casts happening in the test. The only casts are in sample_model_index (which casts deep ensemble size to tf.int32) and write_summary_data_based_metrics (which casts dataset observations to the model prediction dtype).

Copy link
Collaborator

@hstojic hstojic left a comment

Choose a reason for hiding this comment

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

the diff became a bit mangled, but I think its good now

@uri-granta
Copy link
Collaborator Author

the diff became a bit mangled, but I think its good now

FYI you can add ?w=1 to the diff url to get it to ignore whitespace, which makes it much more readable!

@uri-granta uri-granta merged commit 45b230d into develop Mar 6, 2024
12 checks passed
@uri-granta uri-granta deleted the uri/test_de_with_float32 branch March 6, 2024 10:36
@uri-granta uri-granta restored the uri/test_de_with_float32 branch March 20, 2024 10:46
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