HuggingFace's Transformers provide general-purpose Machine Learning models for Natural Language Understanding (NLP). Transformers give you easy access to pre-trained model weights, and interoperability between PyTorch and TensorFlow.
This page describes the intergration of Transformers and Comet.ml.
Transformers + Comet¶
HuggingFace's Transformers are intergrated with Comet's logging and experiment management. You only need to have Comet installed and your Comet API key defined.
COMET_API_KEY="MY-API-KEY" python transformers-script.py
In addition, you can control your Comet Experiment using the
COMET_MODE environment variable. You can set that to "ONLINE" or
"OFFLINE" to create a live
Experiment, or an
respectively. To disable comet_ml when using Transformers, set
COMET_MODE to "DISABLE".
By default, your Experiment will be logged to your
project. However that, and many other settings, can be controlled by other
Comet environment variables,
especially the Experiment Configuration Parameters.
Also note that you can configure those settings in a
variety of methods.