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:
@@ -37,7 +37,7 @@ from transformers import (
|
||||
TFTrainingArguments,
|
||||
set_seed,
|
||||
)
|
||||
from transformers.utils import CONFIG_NAME, TF2_WEIGHTS_NAME
|
||||
from transformers.utils import CONFIG_NAME, TF2_WEIGHTS_NAME, send_example_telemetry
|
||||
|
||||
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1" # Reduce the amount of console output from TF
|
||||
@@ -196,6 +196,11 @@ def main():
|
||||
model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
|
||||
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_text_classification", model_args, data_args, framework="tensorflow")
|
||||
|
||||
output_dir = Path(training_args.output_dir)
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
# endregion
|
||||
|
||||
Reference in New Issue
Block a user