Skip to content

Support fitted IsolationForest conversion to scikit-learn #8479

Description

@csadorf

Problem

cuml.accel synchronizes fitted GPU state to the CPU estimator before returning public fitted attributes, falling back to CPU after a GPU fit, or pickling the proxy.

cuml.ensemble.IsolationForest._attrs_to_cpu currently raises UnsupportedOnCPU for every fitted model, leaving the CPU estimator unfitted. Consequently, #8477 cannot fully implement the proxy contract required by #8468 without error-only behavior.

Acceptance criteria

  • as_sklearn() succeeds for a fitted cuML IsolationForest.
  • Converted score_samples() results agree with cuML within an appropriate floating-point tolerance.
  • Converted predictions agree across default, max_features, contamination, and bootstrap configurations.
  • Required fitted attributes and scikit-learn fit caches are populated.
  • The converted estimator preserves behavior across a pickle round trip.
  • cuml.accel can synchronize fitted state for attribute access, post-fit CPU fallback, and pickling.
  • Ambiguous sample-count reconstruction fails with a clear error.

The reverse scikit-learn → cuML conversion and populating Treelite data_count are follow-up work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions