From ea00dd08528399405943f880b27ecc60e4d83cdf Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Fri, 9 Feb 2024 14:54:31 -0500 Subject: [PATCH] don't use load and push together (#1284) --- .github/workflows/main.yml | 1 - src/axolotl/train.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93fb15e4c..e699bc9ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,6 @@ jobs: uses: docker/build-push-action@v5 with: context: . - load: true build-args: | BASE_TAG=${{ github.ref_name }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }} CUDA=${{ matrix.cuda }} diff --git a/src/axolotl/train.py b/src/axolotl/train.py index 014c281ec..0b5ef7671 100644 --- a/src/axolotl/train.py +++ b/src/axolotl/train.py @@ -208,7 +208,10 @@ def train( model.save_pretrained(cfg.output_dir, safe_serialization=safe_serialization) if not cfg.hub_model_id: - trainer.create_model_card(model_name=cfg.output_dir.lstrip("./")) + try: + trainer.create_model_card(model_name=cfg.output_dir.lstrip("./")) + except AttributeError: + pass elif cfg.hub_model_id: # defensively push to the hub to ensure the model card is updated trainer.push_to_hub()