Skip to content

Add scoped deprecation warnings for entry-point plugins (#1253)#1253

Open
kiukchung wants to merge 1 commit intomainfrom
export-D96212551
Open

Add scoped deprecation warnings for entry-point plugins (#1253)#1253
kiukchung wants to merge 1 commit intomainfrom
export-D96212551

Conversation

@kiukchung
Copy link
Copy Markdown
Contributor

@kiukchung kiukchung commented 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

Reviewed By: AbishekS

Differential Revision: D96212551

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 12, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 12, 2026

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (b39d5bd) to head (8daf5af).

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              
Flag Coverage Δ
unittests 92.22% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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
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
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
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
@meta-codesync meta-codesync Bot changed the title Add scoped deprecation warnings for entry-point plugins Add scoped deprecation warnings for entry-point plugins (#1253) Mar 23, 2026
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
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
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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants