Add examples telemetry (#17552)
* Add examples telemetry * Alternative approach * Add to all other examples * Add to templates as well * Put framework separately * Same for TensorFlow
This commit is contained in:
@@ -39,7 +39,7 @@ from transformers import (
|
||||
set_seed,
|
||||
)
|
||||
from transformers.trainer_utils import get_last_checkpoint, is_main_process
|
||||
from transformers.utils import check_min_version
|
||||
from transformers.utils import check_min_version, send_example_telemetry
|
||||
|
||||
|
||||
# region Helper functions
|
||||
@@ -206,6 +206,10 @@ def main():
|
||||
else:
|
||||
model_args, data_args, training_args = parser.parse_args_into_dataclasses()
|
||||
|
||||
# Sending telemetry. Tracking the example usage helps us better allocate resources to maintain them. The
|
||||
# information sent is the one passed as arguments along with your Python/PyTorch versions.
|
||||
send_example_telemetry("run_glue", model_args, data_args, framework="tensorflow")
|
||||
|
||||
if not (training_args.do_train or training_args.do_eval or training_args.do_predict):
|
||||
exit("Must specify at least one of --do_train, --do_eval or --do_predict!")
|
||||
# endregion
|
||||
|
||||
Reference in New Issue
Block a user