Repository navigation
refactor: consolidate scripts/tests and clean up defensive programming - #33
Merged
Merged
Conversation
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
This PR prepares Libra as a cleaner, easier-to-adopt research baseline by removing obsolete one-off cluster scripts, redundant tests/examples, dead NPU/HCCL code, and redundant defensive boilerplate.
1. Repository & Test Consolidation
scripts/): Deleted 40 site-specific.slurm, zombie cleanup, probe, and ad-hoc helper scripts while keeping core analysis, serving, preflight, and CPU CI scripts.examples/test_*/ validation scripts (keeping 6 core workflow entrypoints) and 10 obsolete cluster-specific YAML configs; fixedconfigs/dapo_math_cmlfq_qwen3_4b.yamlmodel_arch_configpath.tests/&scripts/test_cpu_ci.sh): Mergedtest_qwen3_config.pyintotests/test_config_parsing.py, removed 69 redundant test files, simplifiedscripts/test_cpu_ci.shto runpytestovertests/(20 core test files), addedtests/conftest.pyfor local editable import resilience, and quoted executable paths in subprocess tests (test_global_resource_planner_simulators.py,test_preflight_planner.py).docs/ci.md.2. Defensive-Programming Cleanup
trainer/async_rl_trainer.py(torch.npu.*, silent fallback exceptions), standardizing ontorch.cuda.is_available().getattr/hasattrcalls on strongly-typed dataclasses (AsyncRLConfig,GlobalResourcePlannerConfig,HeterogeneousRolloutConfig,ResourceConfig) and initializedself.*attributes acrossconfig.py,trainer/async_rl_trainer.py,engine/heterogeneous_engine.py,infra/elastic/runtime_executor.py,infra/elastic/rollout_lending.py,infra/elastic/rollout_lifecycle.py,infra/cost_model/global_resource_planner.py,infra/cost_model/simulator_adapters.py, andinfra/observability/history_collector.py.(OSError, json.JSONDecodeError)/(OSError, urllib.error.URLError).SimpleNamespaceconfig mocks intests/test_ehp_batch_partition.pyandtests/test_grpo_grouping.pyin favor of realAsyncRLConfigandGlobalResourcePlannerConfig.Verification
bash scripts/test_cpu_ci.sh: 249 passed in 20.12s (0 failed, 0 skipped).