Skip to content

Change default device selection #74

@chschroeder

Description

@chschroeder

Feature description

TransformerBasedClassification and SetFitClassification should select a GPU if available and no device was set (device=None which is the default).

Motivation

Other libraries that small-text uses, such as transformers, sentence-transformers, or setfit check if a GPU device is available and use it by default.

We should adapt the same behavior, this makes it easier for new users and CPU-only usage can still be forced by setting the device parameter.

Additional comments

Thanks to @eisioriginal for reporting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions