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

Skip to content

Bug when using Aim Huggingface callback with models that aren't classification modelsΒ #2584

@justin-barton

Description

@justin-barton

πŸ› Bug

The Aim Huggingface callback is doing the following:
self._run.set('model', {**vars(model.config), 'num_labels': model.num_labels}, strict=False)

Most Huggingface model classes do not have a .num_labels attribute, only the classification model classes have this attribute.

To reproduce

Use the Aim Huggingface callback with a Huggingface model that is not a classification model

Expected behavior

To run without raising an AttributeError which halts model training

Environment

  • Aim Version v3.16.2
  • Python version 3.9.7
  • pip version 23.0.1

Metadata

Metadata

Assignees

Labels

area / SDK-storageIssue area: SDK and storage related issueshelp wantedExtra attention is neededphase / in-progressIssue phase: issue is in the development phasetype / bugIssue type: something isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions