From 03d774f7d4735c98b814aa1be21c5d8732c7fb9e Mon Sep 17 00:00:00 2001 From: Rishiraj Acharya <44090649+rishiraj@users.noreply.github.com> Date: Sun, 22 Oct 2023 11:54:37 +0530 Subject: [PATCH] remove changes from deprecated files --- src/autotrain/trainers/lm_trainer.py | 6 +++--- src/autotrain/trainers/text_classification.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/autotrain/trainers/lm_trainer.py b/src/autotrain/trainers/lm_trainer.py index 4567d154b9..664a1b0195 100644 --- a/src/autotrain/trainers/lm_trainer.py +++ b/src/autotrain/trainers/lm_trainer.py @@ -387,7 +387,7 @@ def group_texts(examples): logging_steps = int(0.2 * len(valid_data) / job_config.train_batch_size) if logging_steps == 0: logging_steps = 1 - + training_args = dict( output_dir=model_path, per_device_train_batch_size=job_config.train_batch_size, @@ -400,7 +400,7 @@ def group_texts(examples): save_strategy="epoch", disable_tqdm=not bool(os.environ.get("ENABLE_TQDM", 0)), gradient_accumulation_steps=job_config.gradient_accumulation_steps, - report_to=job_config.log, + report_to="none", auto_find_batch_size=True, lr_scheduler_type=job_config.scheduler, optim=job_config.optimizer, @@ -465,4 +465,4 @@ def group_texts(examples): model_repo.git_pull() model_repo.git_add() model_repo.git_commit(commit_message="Commit From AutoTrain") - model_repo.git_push() + model_repo.git_push() \ No newline at end of file diff --git a/src/autotrain/trainers/text_classification.py b/src/autotrain/trainers/text_classification.py index e2ca3a5352..f091fd6667 100644 --- a/src/autotrain/trainers/text_classification.py +++ b/src/autotrain/trainers/text_classification.py @@ -204,7 +204,7 @@ def train(co2_tracker, payload, huggingface_token, model_path): fp16 = True if model_config.model_type in FP32_MODELS or device == "cpu": fp16 = False - + training_args = dict( output_dir="/tmp/autotrain", per_device_train_batch_size=job_config.train_batch_size, @@ -219,7 +219,7 @@ def train(co2_tracker, payload, huggingface_token, model_path): save_strategy="epoch", disable_tqdm=not bool(os.environ.get("ENABLE_TQDM", 0)), gradient_accumulation_steps=job_config.gradient_accumulation_steps, - report_to=job_config.log, + report_to="none", auto_find_batch_size=True, lr_scheduler_type=job_config.scheduler, optim=job_config.optimizer, @@ -274,4 +274,4 @@ def train(co2_tracker, payload, huggingface_token, model_path): model_repo.git_pull() model_repo.git_add() model_repo.git_commit(commit_message="Commit From AutoTrain") - model_repo.git_push() + model_repo.git_push() \ No newline at end of file