Skip to content

Conversation

@Enan456
Copy link
Owner

@Enan456 Enan456 commented Jan 4, 2026

Summary

Fix functional test suite to use current DSL API signature.

Changes

  • test_dsl.py: Updated all 6 test functions to use current API
  • test_power_dsl.py: Updated dsl() call to use current API
  • Removed deprecated parameters: formula, predicted_var, prediction, data, sl_method, feature, family, cross_fit, sample_split, seed
  • Added patsy.dmatrices() for design matrix creation
  • New signature: dsl(X, y, labeled_ind, sample_prob, model, method)

Testing

Tests now call correct API. Note: Tests fail with optimization errors (filed gt-vr7 - separate issue).

Related

  • Resolves: gt-wmw
  • Unblocks: furiosa's R environment work
  • Follow-up: gt-vr7 (optimization failures)

🤖 Generated with Claude Code


Note

Updates functional tests to the current matrix-based DSL API.

  • Refactors all test_dsl.py cases to construct X/y via patsy.dmatrices and call dsl(X, y, labeled_ind, sample_prob, model, method) (linear, logistic, and fixed-effects variants)
  • Removes deprecated args (formula, predicted_var, prediction, data, sl_method, feature, family, cross_fit, sample_split, seed) and associated setup
  • Adjusts scenarios without labeled/sample_prob to use np.ones(...) for defaults
  • In test_power_dsl.py, updates the dsl() setup for test_power_dsl_with_dsl_output to the new API while keeping downstream power_dsl assertions unchanged
  • Adds patsy and numpy imports in tests and maintains shape/type assertions for result fields

Written by Cursor Bugbot for commit c68be11. This will update automatically on new commits. Configure here.

Update test_dsl.py and test_power_dsl.py to use current DSL API:
- Remove formula parameter from dsl() calls
- Use patsy.dmatrices() to create design matrices (X, y) from formulas
- Update to dsl(X, y, labeled_ind, sample_prob, model, method) signature

Resolves: gt-wmw

Note: Tests now call correct API but fail with optimization errors (filed gt-vr7)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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