Skip to content

Python: cross_validated assert on y is None, but it's not None. #105

@adamwelsh

Description

@adamwelsh

Following the example from: https://optunity.readthedocs.io/en/latest/notebooks/notebooks/sklearn-automated-classification.html#
I receive this assert:

Traceback (most recent call last):
  File "./test.py", line 57, in <module>
    @optunity.cross_validated(x=data, y=labels, num_folds=5)
  File "/x/x/x/x/venv/lib/python3.8/site-packages/optunity/cross_validation.py", line 484, in cross_validated
    assert y is None

However, in cross_validation.py , if i print(y) before the assert, y is not None, it is type List populated with data.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions