From 7ff3768c2bb00f4a25f249e95160b2c0ece48bc5 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Sat, 7 Oct 2023 13:55:57 -0700 Subject: [PATCH] Fix tokenizer model and remove debug logging (#50) --- base/scripts/run-notebook.py | 4 ++-- model-trainer-huggingface/src/train.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/scripts/run-notebook.py b/base/scripts/run-notebook.py index 71611ca..7606cad 100755 --- a/base/scripts/run-notebook.py +++ b/base/scripts/run-notebook.py @@ -20,8 +20,8 @@ parser.add_argument('-c', '--cwd', help="Change the working directory") args = parser.parse_args() -logging.basicConfig(level=logging.DEBUG, format="%(message)s") -logger.setLevel(logging.DEBUG) +logging.basicConfig(level=logging.INFO, format="%(message)s") +logger.setLevel(logging.INFO) class HTMLExecutionManager(NotebookExecutionManager): def __init__(self, *args, **kwargs): diff --git a/model-trainer-huggingface/src/train.ipynb b/model-trainer-huggingface/src/train.ipynb index aee21c5..cd95555 100644 --- a/model-trainer-huggingface/src/train.ipynb +++ b/model-trainer-huggingface/src/train.ipynb @@ -737,8 +737,8 @@ " model.push_to_hub(repo_id)\n", " tokenizer.push_to_hub(repo_id)\n", " hf_api = HfApi()\n", - " # Upload tokenizer.model if it was not included in trained model but was in base model\n", - " if tokenizer_model_path_base.exists() and not tokenizer_model_path_trained.exists():\n", + " # Upload tokenizer.model if it was in base model\n", + " if tokenizer_model_path_base.exists():\n", " hf_api.upload_file(\n", " path_or_fileobj=tokenizer_model_path_base,\n", " path_in_repo=tokenizer_model_path_base.name,\n",