Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformerBasedClassification: validations_per_epoch > 2 leaves the model in eval mode #40

Closed
chschroeder opened this issue Jul 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@chschroeder
Copy link
Contributor

Bug description

When TransformerBasedClassification is initialized with validations_per_epoch greater 1, then the model is incorrectly in eval mode in _train_loop_process_batches() (starting with the second iteration).

Steps to reproduce

Set validations_per_epoch to 2 and observe the training loop using the debugger.

Expected behavior

--

Environment:

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

Addition information

Fixing the functionality is a one liner, the test is most of the effort. Luckily, this setting is 1 by default, so unless you set this purpose, you are likely not affected by this bug.

@chschroeder chschroeder added the bug Something isn't working label Jul 25, 2023
chschroeder added a commit that referenced this issue Aug 19, 2023
)

Signed-off-by: Christopher Schröder <chschroeder@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant