Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Should get_scorer return a deep copy of the scorer object #17942

Closed
@glemaitre

Description

@glemaitre

I stumble in something that I am wondering if this is an issue:

scorer = get_scorer("roc_auc")
# somehow set the pos_label
scorer._kwargs["pos_label"] = "xxx"

scorer_2 = get_scorer("roc_auc")
# I would expect it to be a deep copy and not the same as scorer
assert scorer is not scorer_2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions