VESSL provides integrations for 🤗 Transformers by HuggingFace in form of TrainerCallback.


VesslCallback extends TrainerCallback in Transformers, which can define the behaviors of Trainer during the training. Add VesslCallback to callback parameter of Trainer class, so that the metrics logged by trainer are tracked by VESSL as well. You can add instantiated VesslCallback to use another organization and project.

access_tokenAccess token to override.
organization_nameOrganization name to override.
project_nameProject name to override.
credentials_fileCredential file to access the organization and the project
force_update_access_tokenTrue if force update access token

Logging metrics

from vessl.integration.transformers import VesslCallback

# Add callback class itself, so that the default organization and project are used
trainer = Trainer(

# ... or you can specify the configuration you want
callback = VesslCallback(
    project_name = "your_project",
trainer = Trainer(

Currently, uploading model is only available on VESSL Experiments and local experiments. Uploading model in VESSL Run will be supported soon.