Fix Dirichlet variation generation to honor base material min/max bounds#98
Draft
Copilot wants to merge 2 commits into
Draft
Fix Dirichlet variation generation to honor base material min/max bounds#98Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/sprince0031/LIBSDataCurator/sessions/f9f1fd8d-b913-4d6f-a08f-e3c6bae51c41 Co-authored-by: sprince0031 <19924682+sprince0031@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Dirichlet variations for certain materials
Fix Dirichlet variation generation to honor base material min/max bounds
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dirichlet sampling could fail to produce valid variations for some materials because generated samples were effectively shaped by broad overview-sheet statistics, then normalized into values that violated the narrower per-grade element bounds. This change keeps variation generation constrained to the base material’s element ranges while still producing compositional vectors that sum to 100%.
Bounded Dirichlet projection in sampler
DirichletSampler#createElementVariationto map each sample into the base composition bounds (Element.min/max) instead of relying on unconstrained normalization.[min, max]and satisfy total composition = 100%.Preserve domain constraints through generation
Regression coverage for narrow-range materials
CompositionalVariationsTestto cover the case where:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --use-angle=swiftshader-webgl --crashpad-handler-pid=5897 --enable-crash-reporter=, --noerrdialogs --user-agent=Chrome/120.0.0.0 --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.lk2YaY --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16022446666412780126,3040340503438469386,262144 --disable-features=IgnoreDuplicateNavs,PaintHolding,Prewarm --variations-seed-version --pseudonymization-salt-handle=7,i,14025070495839717569,282331497969182528,4 --trace-process-track-uuid=3190708989122997041 --enable-logging --log-level=0(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --allow-pre-commit-input --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-blink-features=AutomationControlled --disable-client-side-phishing-detection --disable-default-apps --disable-features=IgnoreDuplicateNavs,Prewarm --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-logging --headless --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0(dns block)android.clients.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --use-angle=swiftshader-webgl --crashpad-handler-pid=5897 --enable-crash-reporter=, --noerrdialogs --user-agent=Chrome/120.0.0.0 --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.lk2YaY --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16022446666412780126,3040340503438469386,262144 --disable-features=IgnoreDuplicateNavs,PaintHolding,Prewarm --variations-seed-version --pseudonymization-salt-handle=7,i,14025070495839717569,282331497969182528,4 --trace-process-track-uuid=3190708989122997041 --enable-logging --log-level=0(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --allow-pre-commit-input --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-blink-features=AutomationControlled --disable-client-side-phishing-detection --disable-default-apps --disable-features=IgnoreDuplicateNavs,Prewarm --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-logging --headless --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0(dns block)clients2.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --use-angle=swiftshader-webgl --crashpad-handler-pid=5897 --enable-crash-reporter=, --noerrdialogs --user-agent=Chrome/120.0.0.0 --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.lk2YaY --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16022446666412780126,3040340503438469386,262144 --disable-features=IgnoreDuplicateNavs,PaintHolding,Prewarm --variations-seed-version --pseudonymization-salt-handle=7,i,14025070495839717569,282331497969182528,4 --trace-process-track-uuid=3190708989122997041 --enable-logging --log-level=0(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --allow-pre-commit-input --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-blink-features=AutomationControlled --disable-client-side-phishing-detection --disable-default-apps --disable-features=IgnoreDuplicateNavs,Prewarm --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-logging --headless --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0(dns block)dl.google.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)optimizationguide-pa.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --use-angle=swiftshader-webgl --crashpad-handler-pid=5897 --enable-crash-reporter=, --noerrdialogs --user-agent=Chrome/120.0.0.0 --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.lk2YaY --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16022446666412780126,3040340503438469386,262144 --disable-features=IgnoreDuplicateNavs,PaintHolding,Prewarm --variations-seed-version --pseudonymization-salt-handle=7,i,14025070495839717569,282331497969182528,4 --trace-process-track-uuid=3190708989122997041 --enable-logging --log-level=0(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --allow-pre-commit-input --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-blink-features=AutomationControlled --disable-client-side-phishing-detection --disable-default-apps --disable-features=IgnoreDuplicateNavs,Prewarm --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-logging --headless --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0(dns block)www.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --use-angle=swiftshader-webgl --crashpad-handler-pid=5897 --enable-crash-reporter=, --noerrdialogs --user-agent=Chrome/120.0.0.0 --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.lk2YaY --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16022446666412780126,3040340503438469386,262144 --disable-features=IgnoreDuplicateNavs,PaintHolding,Prewarm --variations-seed-version --pseudonymization-salt-handle=7,i,14025070495839717569,282331497969182528,4 --trace-process-track-uuid=3190708989122997041 --enable-logging --log-level=0(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --allow-pre-commit-input --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-blink-features=AutomationControlled --disable-client-side-phishing-detection --disable-default-apps --disable-features=IgnoreDuplicateNavs,Prewarm --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-logging --headless --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0(dns block)If you need me to access, download, or install something from one of these locations, you can either: