Integrations
Transformers
VESSL provides integrations for 🤗 Transformers by HuggingFace in form of TrainerCallback
.
VesslCallback
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.
Parameter | Description |
---|---|
access_token | Access token to override. |
organization_name | Organization name to override. |
project_name | Project name to override. |
credentials_file | Credential file to access the organization and the project |
force_update_access_token | True 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(
...
callbacks=[VesslCallback]
)
# ... or you can specify the configuration you want
callback = VesslCallback(
access_token=YOUR_ACCESS_TOKEN,
organization_name="your_organization",
project_name = "your_project",
)
trainer = Trainer(
...,
callbacks=[callback]
)
trainer.train()
...
Currently, uploading model is only available on VESSL Experiments and local experiments. Uploading model in VESSL Run will be supported soon.