Skip to content

Separate IRM default and return-type tests - #406

Open
leninworld wants to merge 1 commit into
DoubleML:mainfrom
leninworld:test-irm-contracts-issue-298
Open

leninworld wants to merge 1 commit into
DoubleML:mainfrom
leninworld:test-irm-contracts-issue-298

Conversation

@leninworld

Copy link
Copy Markdown
Contributor

This PR addresses part of issue #298.

Description

Move the legacy DoubleMLIRM default and return-type tests into doubleml/irm/tests/, using the existing shared assertion helpers. Preserve the explicit IRM defaults, learner-parameter check, fitted property and nuisance-output shapes, sensitivity checks, and both policy-tree contracts. Remove the corresponding IRM coverage from the two root test modules.

The fitted IRM fixture uses the supported PSProcessorConfig(clipping_threshold=0.1) configuration. Production code and public APIs are unchanged. Other model families and the external testing guide remain outside this partial migration.

Reference to Issues or PRs

Related to #298. This PR does not complete or close the broader issue.

Validation

  • Full repository suite with frozen development and RDD dependencies: 11,500 passed, 66 skipped, 3,396 warnings in 1,793.07 seconds.
  • Environment: Python 3.12.13, Linux ARM64, rdrobust==2.0.0, dependencies frozen from the repository lockfile.
  • Command: python -m pytest . -p no:cacheprovider --tb=short --junitxml=/results/full-suite-a2.xml.
  • Skips: 48 non-single-repetition cases, 16 single-treatment-level cases, and 2 multi-instrument cases unsupported by the IV-type score.
  • Focused migrated tests on commit d8248099c0fefd76eb5f34daf085701eab6314ca: 6 passed in 2.53 seconds; Ruff passed for all four changed files with --no-cache.
  • Black leaves three changed files unchanged and reports only a pre-existing tuple-format difference in the root return-type module, also present at the base.
  • This local result does not establish other platforms or Python versions; upstream CI results remain pending publication.

PR Checklist

  • The title of the pull request summarizes the changes made.
  • The PR contains a detailed description of all changes and additions.
  • References to related issues or PRs are added.
  • The code passes all (unit) tests.
  • Enhancements or new feature are equipped with unit tests.
  • The changes adhere to the PEP8 standards (Ruff passed; existing Black drift noted above).

Local validation evidence

validation-evidence

This branch has not been deployed

No deployments
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.

1 participant