Skip to content

Conversation

@kiukchung
Copy link
Contributor

Summary:
Create torchx.specs.overlays module to standardize how scheduler request overlays work.

Currently overlays are JSON (dict[str, object]) that follows the same structure as the scheduler's request type.

Overlays are stored as metadata in two places:

  1. AppDef.metadata: job level overlays
  2. Role.metadata: gang-level overlays

Overlays follow the rules below:

  1. value types must be the same as the scheduler's request type at the same attribute.
  2. dicts get upserted
  3. nested dicts get recursively overlayed
  4. lists get appended, no deduplication attempts are made
  5. lists are NOT recursed, that is, lists for which elements are containers are not recursively overlayed, they are simply treated as primitives.
  6. primitive attributes are replaced

Differential Revision: D88545380

@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 Dec 6, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 6, 2025

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (2b2af7c) to head (5b871b9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1171      +/-   ##
==========================================
+ Coverage   91.66%   91.68%   +0.02%     
==========================================
  Files          85       86       +1     
  Lines        6619     6636      +17     
==========================================
+ Hits         6067     6084      +17     
  Misses        552      552              
Flag Coverage Δ
unittests 91.68% <100.00%> (+0.02%) ⬆️

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.

facebook-github-bot pushed a commit that referenced this pull request Dec 6, 2025
Summary:

Create `torchx.specs.overlays` module to standardize how scheduler request overlays work.

Currently overlays are JSON (`dict[str, object]`) that follows the same structure as the scheduler's request type.

Overlays are stored as metadata in two places:

1. `AppDef.metadata`: job level overlays
2. `Role.metadata`: gang-level overlays

Overlays follow the rules below:

1. value types must be the same as the scheduler's request type at the same attribute.
2. dicts get upserted
3. nested dicts get recursively overlayed
4. lists get appended, no deduplication attempts are made
5. lists are NOT recursed, that is, lists for which elements are containers are not recursively overlayed, they are simply treated as primitives.
6. primitive attributes are replaced

Differential Revision: D88545380
@facebook-github-bot facebook-github-bot force-pushed the export-D88545380 branch 2 times, most recently from 2bf966f to d5cf746 Compare December 6, 2025 05:00
facebook-github-bot pushed a commit that referenced this pull request Dec 6, 2025
Summary:

Create `torchx.specs.overlays` module to standardize how scheduler request overlays work.

Currently overlays are JSON (`dict[str, object]`) that follows the same structure as the scheduler's request type.

Overlays are stored as metadata in two places:

1. `AppDef.metadata`: job level overlays
2. `Role.metadata`: gang-level overlays

Overlays follow the rules below:

1. value types must be the same as the scheduler's request type at the same attribute.
2. dicts get upserted
3. nested dicts get recursively overlayed
4. lists get appended, no deduplication attempts are made
5. lists are NOT recursed, that is, lists for which elements are containers are not recursively overlayed, they are simply treated as primitives.
6. primitive attributes are replaced

Differential Revision: D88545380
facebook-github-bot pushed a commit that referenced this pull request Dec 7, 2025
Summary:

Create `torchx.specs.overlays` module to standardize how scheduler request overlays work.

Currently overlays are JSON (`dict[str, object]`) that follows the same structure as the scheduler's request type.

Overlays are stored as metadata in two places:

1. `AppDef.metadata`: job level overlays
2. `Role.metadata`: gang-level overlays

Overlays follow the rules below:

1. value types must be the same as the scheduler's request type at the same attribute.
2. dicts get upserted
3. nested dicts get recursively overlayed
4. lists get appended, no deduplication attempts are made
5. lists are NOT recursed, that is, lists for which elements are containers are not recursively overlayed, they are simply treated as primitives.
6. primitive attributes are replaced

Differential Revision: D88545380
Summary:

Create `torchx.specs.overlays` module to standardize how scheduler request overlays work.

Currently overlays are JSON (`dict[str, object]`) that follows the same structure as the scheduler's request type.

Overlays are stored as metadata in two places:

1. `AppDef.metadata`: job level overlays
2. `Role.metadata`: gang-level overlays

Overlays follow the rules below:

1. value types must be the same as the scheduler's request type at the same attribute.
2. dicts get upserted
3. nested dicts get recursively overlayed
4. lists get appended, no deduplication attempts are made
5. lists are NOT recursed, that is, lists for which elements are containers are not recursively overlayed, they are simply treated as primitives.
6. primitive attributes are replaced

Differential Revision: D88545380
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.

3 participants