Skip to content

test(dynacell/eval): stub the metrics names added since #499 and #500 - #516

Merged
alxndrkalinin merged 1 commit into
dynacell-modelsfrom
test/pipeline-stub-cp-rounding
Sep 30, 2026
Merged

alxndrkalinin merged 1 commit into
dynacell-modelsfrom
test/pipeline-stub-cp-rounding

Conversation

@alxndrkalinin

Copy link
Copy Markdown
Collaborator

test_evaluate_model_reuses_cache_without_feature_metrics fails whenever it runs first in its process: on its own, or as the first test on an xdist worker. It passes only when an earlier test has already imported the real cp_reference and pipeline_cache.

The cause: _import_pipeline_with_stubs swaps dynacell.evaluation.metrics for a stub module that lacked two names imported at module top:

An AST scan of every top-level from dynacell.evaluation.metrics import … in the package now finds all names present in the stub.

Verified: run alone, the test failed before this change (on both the main .venv and cpdino-eval-cubic090a3) and passes after it.

🤖 Generated with Claude Code

https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA

_import_pipeline_with_stubs replaces dynacell.evaluation.metrics with a
module listing only the names pipeline imports. #499 added a
CP_FEATURE_NAMES_BY_VERSION import in pipeline_cache and #500 added a
round_device_dependent_cp_columns import in cp_reference. The stub
lacked both, so the test raised ImportError whenever it ran before any
other test had imported the real modules -- alone, or first on an xdist
worker. Every top-level metrics import in the package is now stubbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test-only changes correctly satisfy the newly introduced imports.

Review effort: Balanced
Findings: None

What changed in this PR

Updates the Dynacell evaluation pipeline test stubs to match newly imported metrics APIs, ensuring reliable isolated execution.

Changes:

  • Adds the CP feature-name mapping stub.
  • Adds the device-dependent CP rounding stub.
File Description
applications/​dynacell/​tests/​test_evaluation_pipeline.py Completes metrics stubs required by the evaluation pipeline import chain.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@alxndrkalinin
alxndrkalinin merged commit 3168f74 into dynacell-models Sep 30, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants