fix: resolve fast-unit-tests CI collection errors and stale config assertions#77
Open
fix: resolve fast-unit-tests CI collection errors and stale config assertions#77
Conversation
…sertions
Four issues were causing the fast-unit-tests CI job to fail at collection time:
1. tests/test_jax_losses.py, test_jax_policy.py, test_jax_trainer_wandboard.py:
All three fail with ModuleNotFoundError for jax/flax which are not in
requirements-ci.txt. Added pytest.skip(allow_module_level=True) guards so
tests are cleanly skipped when jax/flax are absent rather than erroring.
2. tests/test_train_crypto_lora_sweep.py:
ImportError for resolve_data_path which was missing from
scripts/train_crypto_lora_sweep.py. Added resolve_data_path() that checks
both {root}/{symbol}.csv (flat) and {root}/stocks/{symbol}.csv (sub-dir)
layouts, and updated main() to use it.
3. tests/test_120d_eval_scripts.py::test_deployed_config_values:
DEPLOYED_CONFIG in scripts/run_120d_worksteal_eval.py was updated (dip_pct
0.20->0.18, profit_target_pct 0.15->0.20, stop_loss_pct 0.10->0.15) but
the test assertions were not kept in sync. Updated test to match actual
deployed values.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Codex Infinity Start a task on this PR's branch by commenting:
Tasks and logs: https://codex-infinity.com |
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
Four issues were causing the `fast-unit-tests` CI job (Python 3.13) to fail at collection time on PR #76:
JAX import errors (`test_jax_losses.py`, `test_jax_policy.py`, `test_jax_trainer_wandboard.py`): All three failed with `ModuleNotFoundError: No module named 'jax'` / `'flax'`. These packages are not in `requirements-ci.txt`. Added `pytest.skip(allow_module_level=True)` guards so the tests are cleanly skipped when jax/flax are absent instead of crashing collection.
Missing `resolve_data_path` function (`test_train_crypto_lora_sweep.py`): `ImportError: cannot import name 'resolve_data_path' from 'scripts.train_crypto_lora_sweep'`. Added `resolve_data_path(symbol, data_root)` that checks both flat (`{root}/{symbol}.csv`) and stocks-subdirectory (`{root}/stocks/{symbol}.csv`) layouts, and updated `main()` to use it.
Stale config assertions (`test_120d_eval_scripts.py::test_deployed_config_values`): `DEPLOYED_CONFIG` in `scripts/run_120d_worksteal_eval.py` was updated (`dip_pct` 0.20→0.18, `profit_target_pct` 0.15→0.20, `stop_loss_pct` 0.10→0.15) but the test assertions were not kept in sync. Updated test to match actual deployed values.
Tests run
```
CI=1 FAST_CI=1 CPU_ONLY=1 python -m pytest -v
-m "unit and not slow and not model_required and not cuda_required"
--tb=short --maxfail=10 tests/
```
Result: 78 passed, 14 skipped, 3963 deselected (0 failures, 0 collection errors)
Also verified `tests/test_train_crypto_lora_sweep.py::test_resolve_data_path_supports_mixed_hourly_root` passes independently.
🤖 Generated with Claude Code