Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/prek.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ jobs:
tests/unit/test_trainer_rank_validation.py \
tests/unit/test_trainer_rank_weird_shapes.py \
tests/unit/test_trainer_rank_split.py \
tests/unit/test_trainer_rank_cache_recovery.py::test_dense_cp_exact_demand_fits_after_recovery \
tests/unit/test_trainer_rank_cache_recovery.py::test_dense_cp_exact_demand_refuses_after_recovery \
tests/acceptance/trainer_rank_planner \
tests/integration/megatron/test_sft_packing.py::test_sft_packing_preserves_training_targets \
tests/integration/megatron/model_support/test_dispatcher_graph_retention.py \
Expand All @@ -240,6 +242,8 @@ jobs:
- name: Run unit tests
run: |
uv run --no-sync pytest --nbval --current-env --tb=short tests/unit \
--deselect=tests/unit/test_trainer_rank_cache_recovery.py::test_dense_cp_exact_demand_fits_after_recovery \
--deselect=tests/unit/test_trainer_rank_cache_recovery.py::test_dense_cp_exact_demand_refuses_after_recovery \
--ignore=tests/unit/test_megatron_reference_logprobs.py \
--ignore=tests/unit/test_moe_routing_replay.py \
--ignore=tests/unit/test_moe_routing_real_path.py \
Expand Down
547 changes: 445 additions & 102 deletions src/art/trainer_rank/_impl.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/unit/test_trainer_rank_active_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ def test_warm_admission_rechecks_current_residency(monkeypatch):
)
monkeypatch.delenv("ART_TRAINER_RANK_TEST_HOOKS", raising=False)
# Fresh memory accounting observes newly resident state without discarding
# a valid incremental profile; cached free blocks remain reusable.
# a valid incremental profile; cache alone is not physical availability.
for allocated, reserved, fits in [
(10_000, 10_000, True),
(90_000, 90_000, False),
(10_000, 90_000, True),
(10_000, 90_000, False),
]:
state.update(allocated=allocated, reserved=reserved)
check = rank._memory_check(plan)
assert check.estimated_required_bytes == required
assert check.available_bytes == total - allocated - 3000
assert check.available_bytes == total - reserved - 3000
assert check.fits == fits
assert rank._memory_profiles[plan.signature] == profile

Expand Down
Loading
Loading