webis-de / small-text

Active Learning for Text Classification in Python
https://small-text.readthedocs.io/
MIT License
557 stars 61 forks source link

Passing a scheduler through fit results in AttributeError #16

Closed chschroeder closed 2 years ago

chschroeder commented 2 years ago

Bug description

Passing a scheduler to TransformerBasedClassification.fit() results in AttributeError: 'str' object has no attribute 'step'.

Steps to reproduce

clf.fit(dataset, optimizer=optimizer, scheduler=scheduler)

where clf is an instance of TransformerBasedClassification and optimizer and scheduler are not None.

Expected behavior

The given optimizer and scheduler should be used.

Environment:

small-text version: 1.0.0 small-text integrations (e.g., transformers): transformers

Addition information

The error is here