Fix Transformers modeling backend usage stats (#47472)
This commit is contained in:
+8
-1
@@ -689,8 +689,15 @@ def report_usage_stats(
|
|||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if model_config.using_transformers_backend():
|
||||||
|
backend_cls = model_config._model_info.architecture
|
||||||
|
# Show what was wrapped e.g. TransformersForCausalLM(Starcoder2ForCausalLM)
|
||||||
|
architecture = f"{backend_cls}({model_config.architectures[0]})"
|
||||||
|
else:
|
||||||
|
architecture = get_architecture_class_name(model_config)
|
||||||
|
|
||||||
usage_message.report_usage(
|
usage_message.report_usage(
|
||||||
get_architecture_class_name(model_config),
|
architecture,
|
||||||
usage_context,
|
usage_context,
|
||||||
extra_kvs={
|
extra_kvs={
|
||||||
# Common configuration
|
# Common configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user