Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 95a9c67

Browse files
authored
drop model_card support (#1092) (#1094)
1 parent 595871f commit 95a9c67

File tree

4 files changed

+0
-19
lines changed

4 files changed

+0
-19
lines changed

src/sparseml/transformers/masked_language_modeling.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ def compute_metrics(eval_preds):
744744
num_samples_to_export=data_args.num_export_samples
745745
)
746746

747-
if training_args.push_to_hub:
748-
trainer.push_to_hub(**kwargs)
749-
else:
750-
trainer.create_model_card(**kwargs)
751-
752747

753748
def _mp_fn(index):
754749
# For xla_spawn (TPUs)

src/sparseml/transformers/question_answering.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,10 +844,6 @@ def compute_metrics(p: EvalPrediction):
844844
trainer.save_sample_inputs_outputs(
845845
num_samples_to_export=data_args.num_export_samples
846846
)
847-
if training_args.push_to_hub:
848-
trainer.push_to_hub(**kwargs)
849-
else:
850-
trainer.create_model_card(**kwargs)
851847

852848

853849
def _mp_fn(index):

src/sparseml/transformers/text_classification.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,6 @@ def compute_metrics(p: EvalPrediction):
873873
num_samples_to_export=data_args.num_export_samples
874874
)
875875

876-
if training_args.push_to_hub:
877-
trainer.push_to_hub(**kwargs)
878-
else:
879-
trainer.create_model_card(**kwargs)
880-
881876

882877
def _split_train_val(train_dataset, val_ratio):
883878
# Fixed random seed to make split consistent across runs with the same ratio

src/sparseml/transformers/token_classification.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,6 @@ def compute_metrics(p):
729729
num_samples_to_export=data_args.num_export_samples
730730
)
731731

732-
if training_args.push_to_hub:
733-
trainer.push_to_hub(**kwargs)
734-
else:
735-
trainer.create_model_card(**kwargs)
736-
737732

738733
def _mp_fn(index):
739734
# For xla_spawn (TPUs)

0 commit comments

Comments
 (0)