Add scoped deprecation warnings for entry-point plugins (#1253)#1253
Open
Add scoped deprecation warnings for entry-point plugins (#1253)#1253
Conversation
|
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96212551. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1253 +/- ##
==========================================
+ Coverage 92.21% 92.22% +0.01%
==========================================
Files 95 95
Lines 6744 6755 +11
==========================================
+ Hits 6219 6230 +11
Misses 525 525
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
meta-codesync Bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
Summary:
Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes
deprecation warnings to only PluginType-defined groups.
**Problem:** Entry-point plugins needed deprecation warnings to guide users
toward the new `torchx_plugins.*` namespace-package system, but the warnings
should only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
**Solution:**
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
**Changes:**
- New `torchx.deprecations` module with `deprecated_entrypoint()`
- `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion
- `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded
- Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out
Differential Revision: D96212551
994a637 to
d2353ee
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
Summary:
Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes
deprecation warnings to only PluginType-defined groups.
**Problem:** Entry-point plugins needed deprecation warnings to guide users
toward the new `torchx_plugins.*` namespace-package system, but the warnings
should only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
**Solution:**
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
**Changes:**
- New `torchx.deprecations` module with `deprecated_entrypoint()`
- `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion
- `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded
- Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out
Differential Revision: D96212551
d2353ee to
b702f5c
Compare
kiukchung
added a commit
that referenced
this pull request
Mar 12, 2026
Summary: Pull Request resolved: #1253 Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes deprecation warnings to only PluginType-defined groups. **Problem:** Entry-point plugins needed deprecation warnings to guide users toward the new `torchx_plugins.*` namespace-package system, but the warnings should only fire for groups that actually have namespace alternatives (schedulers, named_resources, tracker) — not for every entry-point group (components, file, schedulers.orchestrator). **Solution:** deprecated_entrypoint(group, ep_names) │ ├── group in _PLUGIN_GROUPS? → emit DeprecationWarning │ (torchx.schedulers, torchx.named_resources, torchx.tracker) │ └── group NOT in _PLUGIN_GROUPS? → silently return (no warning) **Changes:** - New `torchx.deprecations` module with `deprecated_entrypoint()` - `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion - `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded - Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out Differential Revision: D96212551
b702f5c to
337e6ed
Compare
kiukchung
added a commit
that referenced
this pull request
Mar 23, 2026
Summary: Pull Request resolved: #1253 Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes deprecation warnings to only PluginType-defined groups. **Problem:** Entry-point plugins needed deprecation warnings to guide users toward the new `torchx_plugins.*` namespace-package system, but the warnings should only fire for groups that actually have namespace alternatives (schedulers, named_resources, tracker) — not for every entry-point group (components, file, schedulers.orchestrator). **Solution:** deprecated_entrypoint(group, ep_names) │ ├── group in _PLUGIN_GROUPS? → emit DeprecationWarning │ (torchx.schedulers, torchx.named_resources, torchx.tracker) │ └── group NOT in _PLUGIN_GROUPS? → silently return (no warning) **Changes:** - New `torchx.deprecations` module with `deprecated_entrypoint()` - `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion - `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded - Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out Reviewed By: AbishekS Differential Revision: D96212551
337e6ed to
fce8797
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
Summary:
Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes
deprecation warnings to only PluginType-defined groups.
**Problem:** Entry-point plugins needed deprecation warnings to guide users
toward the new `torchx_plugins.*` namespace-package system, but the warnings
should only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
**Solution:**
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
**Changes:**
- New `torchx.deprecations` module with `deprecated_entrypoint()`
- `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion
- `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded
- Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out
Reviewed By: AbishekS
Differential Revision: D96212551
fce8797 to
0cd9ad0
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
Summary:
Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes
deprecation warnings to only PluginType-defined groups.
**Problem:** Entry-point plugins needed deprecation warnings to guide users
toward the new `torchx_plugins.*` namespace-package system, but the warnings
should only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
**Solution:**
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
**Changes:**
- New `torchx.deprecations` module with `deprecated_entrypoint()`
- `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion
- `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded
- Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out
Reviewed By: AbishekS
Differential Revision: D96212551
0cd9ad0 to
d29cb3b
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Mar 23, 2026
Summary:
Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes
deprecation warnings to only PluginType-defined groups.
**Problem:** Entry-point plugins needed deprecation warnings to guide users
toward the new `torchx_plugins.*` namespace-package system, but the warnings
should only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
**Solution:**
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
**Changes:**
- New `torchx.deprecations` module with `deprecated_entrypoint()`
- `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion
- `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded
- Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out
Reviewed By: AbishekS
Differential Revision: D96212551
d29cb3b to
5960c7a
Compare
kiukchung
added a commit
that referenced
this pull request
Mar 23, 2026
Summary: Pull Request resolved: #1253 Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes deprecation warnings to only PluginType-defined groups. **Problem:** Entry-point plugins needed deprecation warnings to guide users toward the new `torchx_plugins.*` namespace-package system, but the warnings should only fire for groups that actually have namespace alternatives (schedulers, named_resources, tracker) — not for every entry-point group (components, file, schedulers.orchestrator). **Solution:** deprecated_entrypoint(group, ep_names) │ ├── group in _PLUGIN_GROUPS? → emit DeprecationWarning │ (torchx.schedulers, torchx.named_resources, torchx.tracker) │ └── group NOT in _PLUGIN_GROUPS? → silently return (no warning) **Changes:** - New `torchx.deprecations` module with `deprecated_entrypoint()` - `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion - `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded - Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out Reviewed By: AbishekS Differential Revision: D96212551
5960c7a to
1ead040
Compare
Summary: Pull Request resolved: #1253 Add `torchx.deprecations` module with `deprecated_entrypoint()` that scopes deprecation warnings to only PluginType-defined groups. **Problem:** Entry-point plugins needed deprecation warnings to guide users toward the new `torchx_plugins.*` namespace-package system, but the warnings should only fire for groups that actually have namespace alternatives (schedulers, named_resources, tracker) — not for every entry-point group (components, file, schedulers.orchestrator). **Solution:** deprecated_entrypoint(group, ep_names) │ ├── group in _PLUGIN_GROUPS? → emit DeprecationWarning │ (torchx.schedulers, torchx.named_resources, torchx.tracker) │ └── group NOT in _PLUGIN_GROUPS? → silently return (no warning) **Changes:** - New `torchx.deprecations` module with `deprecated_entrypoint()` - `_PLUGIN_GROUPS` frozenset kept in sync with `PluginType` via test assertion - `_registry._find()` calls `deprecated_entrypoint()` when entry points are loaded - Warning message includes migration guidance and `TORCHX_NO_ENTRYPOINTS=1` opt-out Reviewed By: AbishekS Differential Revision: D96212551
1ead040 to
8daf5af
Compare
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.
Summary:
Add
torchx.deprecationsmodule withdeprecated_entrypoint()that scopesdeprecation warnings to only PluginType-defined groups.
Problem: Entry-point plugins needed deprecation warnings to guide users
toward the new
torchx_plugins.*namespace-package system, but the warningsshould only fire for groups that actually have namespace alternatives
(schedulers, named_resources, tracker) — not for every entry-point group
(components, file, schedulers.orchestrator).
Solution:
deprecated_entrypoint(group, ep_names)
│
├── group in _PLUGIN_GROUPS? → emit DeprecationWarning
│ (torchx.schedulers, torchx.named_resources, torchx.tracker)
│
└── group NOT in _PLUGIN_GROUPS? → silently return (no warning)
Changes:
torchx.deprecationsmodule withdeprecated_entrypoint()_PLUGIN_GROUPSfrozenset kept in sync withPluginTypevia test assertion_registry._find()callsdeprecated_entrypoint()when entry points are loadedTORCHX_NO_ENTRYPOINTS=1opt-outReviewed By: AbishekS
Differential Revision: D96212551