Skip to content

Simplify task value remapping API (#3146)#3163

Open
hvarfner wants to merge 2 commits intometa-pytorch:mainfrom
hvarfner:export-D90998243
Open

Simplify task value remapping API (#3146)#3163
hvarfner wants to merge 2 commits intometa-pytorch:mainfrom
hvarfner:export-D90998243

Conversation

@hvarfner
Copy link
Contributor

@hvarfner hvarfner commented Feb 5, 2026

Summary:
X-link: facebook/Ax#4860

Simplifies the get_task_value_remapping() API from 4 parameters to 2, addressing confusion reported in #3085.

The observed_task_values parameter is removed because the parent diff (D90769576) now makes MultiTaskGP track observed/unobserved tasks internally via _observed_task_indices and _unobserved_task_indices. The default_task_value parameter is removed because the previous behavior—silently mapping unknown tasks to an arbitrary fallback—was confusing and error-prone; instead, unrecognized tasks now map to NaN, providing an explicit error sentinel with a clear warning message.

Differential Revision: D90998243

Carl Hvarfner added 2 commits February 5, 2026 10:51
Summary:

Permits an MTGP to predict on an unobserved task, addressing these issues:
meta-pytorch#2360
meta-pytorch#3085
To do this, we assume that the unobserved task is maximally correlated with the target tasks (equally with each, by averaging the elements). Exact heuristic on correlation is definitely up for discussion, but this seems like a decent default assumption.
Will come in handy for TL initialization.

Differential Revision: D90769576
Summary:
X-link: facebook/Ax#4860


Simplifies the get_task_value_remapping() API from 4 parameters to 2, addressing confusion reported in meta-pytorch#3085. 

The observed_task_values parameter is removed because the parent diff (D90769576) now makes MultiTaskGP track observed/unobserved tasks internally via _observed_task_indices and _unobserved_task_indices. The default_task_value parameter is removed because the previous behavior—silently mapping unknown tasks to an arbitrary fallback—was confusing and error-prone; instead, unrecognized tasks now map to NaN, providing an explicit error sentinel with a clear warning message.

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

meta-codesync bot commented Feb 5, 2026

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

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (d043f05) to head (0943495).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3163   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files         219      219           
  Lines       21221    21250   +29     
=======================================
+ Hits        21216    21245   +29     
  Misses          5        5           

☔ 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.

1 participant