Skip to content

[CI] test_logistic_regression_weighting fails with coefficient mismatch (flaky) #7298

@csadorf

Description

@csadorf

Summary

The test_logistic_regression_weighting test is failing due to a coefficient shape mismatch between scikit-learn and cuML implementations for multiclass logistic regression with class weighting.

Failing test/component: test_logistic_regression_weighting[multiclass-3-class_weight]

Failure observed in:

Environment

  • OS: rockylinux8
  • Python version: 3.12.11
  • CUDA version: 13.0.1
  • GPU: L4
  • Dependencies: latest-deps

Test Details

  • Test file: python/cuml/tests/test_linear_model.py
  • Test name: test_logistic_regression_weighting[multiclass-3-class_weight]
  • Error message:
    AssertionError: assert <array_equal: [[ 0.15458884  0.57219807  0.20086461  0.72615748  0.28467592] [-0.04120884 -0.95653517  0.27531644 -0.0... -0.0342683 ] [-0.02566717  0.85933513 -0.42952511 -0.25958989 -0.0948978 ]] unit_tol=0.2 total_tol=0.3 with_sign=True>
    

Additional output from test:

coef.shape:  (5, 3)
coef:
 [[ 0.06129447 -0.02292896  0.00468886]
 [ 0.48544116 -0.81974606  0.46844332]
 [-0.59215055 -0.28511068 -0.74525061]
 [ 0.58522586  0.33769497  0.29343246]
 [-0.25972732 -0.3635446  -0.37287772]]
cucoef.shape:  (3, 5)
cucoef:
 [[ 0.10089213  0.89434892 -0.08919029  0.39662385  0.15714772]
 [-0.0411478  -0.95494912  0.28194222 -0.07558644 -0.0342683 ]
 [-0.02566717  0.85933513 -0.42952511 -0.25958989 -0.0948978 ]]

Root Cause Analysis

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingciflaky

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions