don't use load and push together (#1284)
Browse files- .github/workflows/main.yml +0 -1
- src/axolotl/train.py +4 -1
.github/workflows/main.yml
CHANGED
@@ -55,7 +55,6 @@ jobs:
|
|
55 |
uses: docker/build-push-action@v5
|
56 |
with:
|
57 |
context: .
|
58 |
-
load: true
|
59 |
build-args: |
|
60 |
BASE_TAG=${{ github.ref_name }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}
|
61 |
CUDA=${{ matrix.cuda }}
|
|
|
55 |
uses: docker/build-push-action@v5
|
56 |
with:
|
57 |
context: .
|
|
|
58 |
build-args: |
|
59 |
BASE_TAG=${{ github.ref_name }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}
|
60 |
CUDA=${{ matrix.cuda }}
|
src/axolotl/train.py
CHANGED
@@ -208,7 +208,10 @@ def train(
|
|
208 |
model.save_pretrained(cfg.output_dir, safe_serialization=safe_serialization)
|
209 |
|
210 |
if not cfg.hub_model_id:
|
211 |
-
|
|
|
|
|
|
|
212 |
elif cfg.hub_model_id:
|
213 |
# defensively push to the hub to ensure the model card is updated
|
214 |
trainer.push_to_hub()
|
|
|
208 |
model.save_pretrained(cfg.output_dir, safe_serialization=safe_serialization)
|
209 |
|
210 |
if not cfg.hub_model_id:
|
211 |
+
try:
|
212 |
+
trainer.create_model_card(model_name=cfg.output_dir.lstrip("./"))
|
213 |
+
except AttributeError:
|
214 |
+
pass
|
215 |
elif cfg.hub_model_id:
|
216 |
# defensively push to the hub to ensure the model card is updated
|
217 |
trainer.push_to_hub()
|