Repository navigation
Tests: follow the tiled MLP hooks from #16125 (encoding, loader stubs, trainer logger) - #16196
Conversation
…, trainer logger)
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Problem
Main went red in three Backend CI shards after #16125 (tiled MLP) landed (seen on the staging run for #16071, reproduced on main):
Repo tests (CPU, rest): all oftests/test_optimized_precision_conflicts.pyfails withNameError: name 'check_tiling_available' is not defined. The fixture runsFastLanguageModel.from_pretrainedfromloader.pyin a hand-built namespace of stubs, and Tiled MLP: one flag or one line for any model, on the new sequence tiling engine #16125 added acheck_tiling_available(unsloth_tiled_mlp)call there that the namespace does not provide.Repo tests (CPU, rest-2):tests/test_source_read_encoding.pyflagstests/test_tiling_integration.py:148: read_text(). The new test file reads checked-in sources with the platform default encoding (7 calls).Repo tests (CPU, fsdp2): four tests intests/test_fsdp2_native_accelerator_loop_gloo.pycrash every rank withNameError: name 'logger' is not definedfrom_unsloth_trainer_init. The harness intests/test_fsdp2_native_trainer_args_gloo.pyexecs that wrapper in a stub namespace and auto-stubs the bare helper calls it makes. Tiled MLP: one flag or one line for any model, on the new sequence tiling engine #16125 added atry: revalidate_for_trainer(self) except Exception as e: logger.warning_once(...), and in the harness the revalidation raises, so the warning reacheslogger, which only exists as the real module's import.In all three cases the product is right (
loader.pyimportscheck_tiling_available,_utils.pyimportslogger); the tests' namespaces had not followed.Fix
tests/test_optimized_precision_conflicts.py: stub every nameloader.pyimports from..tiling, the way the fixture already stubs the Mistral-format helpers. So a future tiling helper called fromfrom_pretraineddoes not break the precision checks, which never reach tiling.tests/test_tiling_integration.py: everyread_text()namesencoding = "utf-8".tests/test_fsdp2_native_trainer_args_gloo.py: the harness namespace carries a no-oploggerstanding in for_utils.py's module logger.Verification
Before (main) and after (this branch), same local environment:
tests/test_optimized_precision_conflicts.pytests/test_fsdp2_native_accelerator_loop_gloo.pytests/test_source_read_encoding.pytests/test_tiling_integration.py(with unsloth-zoo main fortiling_registry)tests/test_fsdp2_native_trainer_args_gloo.py