Add a pickle-size regression test for fitted learners (v1.0 M1)

Open
#1,063 0 comments 0 reactions 0 assignees View on GitHub

@techi101 is already working on this.

Since Nov 7, 2026.

  • #1064 by @techi101 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Read the v1.0 M1 roadmap item in #938 and inspect the small datasets in conftest. Add one test file covering fitted meta-learners, causal and uplift trees, and forests by pickling each model and checking its size against the proposed budget of about twice today's size. Done means the test passes in the normal suite and catches pickle sizes that grow with training rows.

Written by the indexing model from the issue text.

Description

The v1.0 roadmap in #938 lists "a pickle-size regression guard in CI" under M1. I'd like to pick this up.

The plan is one test file that fits each meta-learner (S, T, X, R, DR, regressor and classifier) plus the causal and uplift tree and forest on the small conftest datasets, pickles each one, and checks the size against a budget of about 2x today's size. Today these pickle to roughly 1 to 20 KB and don't grow with the number of training rows, so a change that starts keeping training data on a fitted model would fail the test right away. It runs in the normal test suite in about 10 seconds with no CI changes.

Happy to adjust the learner list or headroom if you have a preference.

Dominant language
Python
Stars
6k
Forks
892
Avg merge
11h 53m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uber/causalml

All issues in uber/causalml

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.