Skip to content

bugfix for per-sample UQ - #202

Merged
lpottier merged 2 commits into
developfrom
hansen82/bugfix/sample_masking
Aug 18, 2026
Merged

bugfix for per-sample UQ#202
lpottier merged 2 commits into
developfrom
hansen82/bugfix/sample_masking

Conversation

@ckhansen

Copy link
Copy Markdown
Collaborator

This is a small bugfix for UQ. When I was running AMS it was appearing to give me per-sample-dimension uncertainty values or maybe just multiple dimension uncertainty values. This just takes the max value if multiple uncertainties are output.

@ckhansen ckhansen self-assigned this Aug 14, 2026
@ckhansen ckhansen added the bug Something isn't working label Aug 14, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v18.1.8

Click here for the full clang-format patch
diff --git a/src/AMSlib/ml/surrogate.cpp b/src/AMSlib/ml/surrogate.cpp
index 21babee..a1801e7 100644
--- a/src/AMSlib/ml/surrogate.cpp
+++ b/src/AMSlib/ml/surrogate.cpp
@@ -182 +182 @@ std::tuple<torch::Tensor, torch::Tensor> SurrogateModel::_evaluate(
-  
+
@@ -188 +188,2 @@ std::tuple<torch::Tensor, torch::Tensor> SurrogateModel::_evaluate(
-            "UQ model returned per-output uncertainty {}, reducing to per-sample by taking max",
+            "UQ model returned per-output uncertainty {}, reducing to "
+            "per-sample by taking max",

Have any feedback or feature suggestions? Share it here.

Comment thread src/AMSlib/ml/surrogate.cpp Outdated
Comment thread src/AMSlib/ml/surrogate.cpp Outdated

@lpottier lpottier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @ckhansen . Make sure to apply the clang-format recommendations before merging. Also make sure to rebase against develop (I just pushed a PR).

Signed-off-by: Loic Pottier <pottier1@llnl.gov>
@lpottier

Copy link
Copy Markdown
Member

@ckhansen I have push a commit with the correct clang-format. If tests are green, I will merge.

@ckhansen

Copy link
Copy Markdown
Collaborator Author

@lpottier Thanks for committing those changes!

@lpottier
lpottier merged commit 360cea1 into develop Aug 18, 2026
18 checks passed
@ckhansen
ckhansen deleted the hansen82/bugfix/sample_masking branch August 24, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants