Skip to content

Conversation

kiukchung
Copy link
Contributor

Summary:
Removes the redunant (and potentially confusing) skip_defaults flag from:

from torchx.utils.entrypoints import load_group

load_group(group, default, skip_defaults)

This is because the same can be achieved at the call-site by passing default=None. That is:

load_group(group_name, defaults=None if skip_defaults else default_value)

Coincidentally also fixes an illegal type return in torchx.schedulers.get_scheduler_factories (should always return a dict[str, SchedulerFactory] (an empty dict if none found) where passing get_scheduler_factories(..., skip_defaults=True) currently returns None which violates the return type hint.

Differential Revision: D83991870

@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 Oct 6, 2025
@facebook-github-bot
Copy link
Contributor

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

…ints.load() (#1140)

Summary:

Removes the redunant (and potentially confusing) `skip_defaults` flag from:

```
from torchx.utils.entrypoints import load_group

load_group(group, default, skip_defaults)
```

This is because the same can be achieved at the call-site by passing `default=None`. That is:

```
load_group(group_name, defaults=None if skip_defaults else default_value)
```

Coincidentally also fixes an illegal type return in `torchx.schedulers.get_scheduler_factories` (should always return a `dict[str, SchedulerFactory]` (an empty dict if none found) where  passing `get_scheduler_factories(..., skip_defaults=True)` currently returns `None` which violates the return type hint.

Differential Revision: D83991870
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.63%. Comparing base (1e3df20) to head (834e55a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1140      +/-   ##
==========================================
+ Coverage   91.60%   91.63%   +0.03%     
==========================================
  Files          83       83              
  Lines        6431     6431              
==========================================
+ Hits         5891     5893       +2     
+ Misses        540      538       -2     
Flag Coverage Δ
unittests 91.63% <100.00%> (+0.03%) ⬆️

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 meta-codesync bot merged commit 7031222 into main Oct 6, 2025
21 of 22 checks passed
@meta-codesync meta-codesync bot deleted the export-D83991870 branch October 6, 2025 22:36
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.

4 participants