probml / probml/dynamax

Trim heavy dependencies: reconsider hard scikit-learn dependency for KMeans-only usage

Open
#459 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
114
Avg merge
19h 14m
Merged PRs (30d)
1

Description

This appears to be a hard dependency purely for KMeans used in initialization for HMMs. Pulling in sklearn as a top-level dependency brings in a large, non-JAX dependency chain for what's a single clustering call used at init time.

Can an HMM extra be added, and sklearn can be moved over to it?

Contributor guide

Open the contributing guide

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.

Research direction

Inspect the package dependency configuration and the HMM initialization path that uses KMeans. Confirm which dependency is needed for a base installation versus the HMM extra, then verify that the extra provides scikit-learn and that HMM initialization still works without it installed by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
build-system, machine-learning
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.