Skip to content

Comments

add support for general box bounds to RandomGenerators.#4932

Open
bletham wants to merge 1 commit intofacebook:mainfrom
bletham:export-D94118103
Open

add support for general box bounds to RandomGenerators.#4932
bletham wants to merge 1 commit intofacebook:mainfrom
bletham:export-D94118103

Conversation

@bletham
Copy link
Contributor

@bletham bletham commented Feb 24, 2026

Summary:
Currently RandomGenerators require that the space be mapped to [0, 1]^d, for the convenience of random number generators operating on that space by default. In a stacked diff I would like to super() gen on a random generator but need the returned points to be in raw space, no UnitX transformation.

It is a relatively small change for RandomGenerators to be capable of operating with arbitrary bounds, which change this diff makes.

Differential Revision: D94118103

Summary:
Currently RandomGenerators require that the space be mapped to [0, 1]^d, for the convenience of random number generators operating on that space by default. In a stacked diff I would like to super() gen on a random generator but need the returned points to be in raw space, no UnitX transformation.

It is a relatively small change for RandomGenerators to be capable of operating with arbitrary bounds, which change this diff makes.

Differential Revision: D94118103
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 24, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 24, 2026

@bletham has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94118103.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.80%. Comparing base (cf057df) to head (ef675eb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4932   +/-   ##
=======================================
  Coverage   96.80%   96.80%           
=======================================
  Files         595      595           
  Lines       63160    63167    +7     
=======================================
+ Hits        61141    61148    +7     
  Misses       2019     2019           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants