chore(ml): remove machine learning model files

This commit is contained in:
MythEclipse
2026-06-11 20:23:57 +07:00
parent 09602b3fe0
commit 3e2f04413e
27 changed files with 1140 additions and 1006 deletions
-6
View File
@@ -1,6 +0,0 @@
best_model/best_model.keras filter=lfs diff=lfs merge=lfs -text
model/saved_model/variables/variables.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
model/tfjs_model/*.bin filter=lfs diff=lfs merge=lfs -text
**/best_model.keras filter=lfs diff=lfs merge=lfs -text
**/variables.data* filter=lfs diff=lfs merge=lfs -text
**/tfjs_model/*.bin filter=lfs diff=lfs merge=lfs -text
+11 -13
View File
@@ -28,8 +28,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set image prefix
run: echo "IMAGE_PREFIX=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV"
@@ -37,19 +35,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Python for ONNX conversion
- name: Download ONNX model from Hugging Face Hub
if: matrix.service.name == 'ml'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Generate ONNX model artifact
if: matrix.service.name == 'ml'
working-directory: Machine_Learning
env:
HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
run: |
python -m pip install --upgrade pip
python -m pip install 'tensorflow>=2.13.0' 'tf2onnx>=1.16.1' 'onnx>=1.16.0'
python convert_onnx.py
mkdir -p Machine_Learning/model
if [ -n "$HF_TOKEN" ]; then
AUTH_HEADER="-H Authorization: Bearer $HF_TOKEN"
fi
curl -fL $AUTH_HEADER \
"https://huggingface.co/MythEclipse2737/zeavis-edu-model/resolve/main/model/model.onnx" \
-o "Machine_Learning/model/model.onnx"
ls -lh Machine_Learning/model/model.onnx
- name: Log in to GHCR
uses: docker/login-action@v3
+27
View File
@@ -0,0 +1,27 @@
# Durable Memory Wiki
Consolidated knowledge and long-term facts.
## Core Learnings
- **Topic:** error response daemon
**Context:** Failure observation: Exit code 1
Error response from daemon: No such container: telemetry-prometheus
*Promoted on:* 2026-06-11T12:19:50.638Z
- **Topic:** error 32603 pattern
**Context:** Failure observation: MCP error -32603: pattern must be a non-empty string.
*Promoted on:* 2026-06-11T12:19:50.638Z
- **Topic:** traceback recent string
**Context:** Failure observation: Exit code 1
Traceback (most recent call last):
File "<string>", line 25, in <module>
with urllib.request.urlopen(req) as resp:
~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3.14/ur
*Promoted on:* 2026-06-11T12:58:56.451Z
- **Topic:** exist current working
**Context:** Failure observation: File does not exist. Note: your current working directory is /mnt/code/ZeaVis-Edu.
*Promoted on:* 2026-06-11T13:03:39.178Z
+9
View File
@@ -0,0 +1,9 @@
# Model artifacts — not stored in git. Uploaded to Hugging Face Hub after training.
best_model/
model/
dataset/
dataset.zip
venv/
__pycache__/
*.pyc
*.pyo
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e8e3a4f86ae1594aeb221c40db3bc80e87c05b05f386bbb628ff1da16397424
size 112903200
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail
# Download best_model.keras from Hugging Face Hub.
#
# Usage:
# bash download_model.sh # public repo — no auth needed
# HF_TOKEN=hf_xxx bash download_model.sh # private repo
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEST="${SCRIPT_DIR}/best_model/best_model.keras"
REPO_ID="MythEclipse2737/zeavis-edu-model"
: "${HF_TOKEN:=}"
FORCE="${1:-}"
if [ -f "$DEST" ] && [ "$FORCE" != "--force" ]; then
echo "Model already exists at $DEST (use --force to overwrite)"
exit 0
fi
mkdir -p "$(dirname "$DEST")"
if command -v huggingface-cli &>/dev/null; then
huggingface-cli download "$REPO_ID" "best_model/best_model.keras" --local-dir "$(dirname "$DEST")" $( [ -n "$HF_TOKEN" ] && echo "--token $HF_TOKEN" )
elif command -v hf &>/dev/null; then
hf download "$REPO_ID" "best_model/best_model.keras" --output "$DEST"
elif command -v curl &>/dev/null; then
URL="https://huggingface.co/${REPO_ID}/resolve/main/best_model/best_model.keras"
curl -fL -o "$DEST" $( [ -n "$HF_TOKEN" ] && echo "-H Authorization: Bearer $HF_TOKEN" ) "$URL"
else
echo "ERROR: Need curl or huggingface-cli installed."
exit 1
fi
if [ -f "$DEST" ]; then
echo "Downloaded: $DEST"
ls -lh "$DEST"
else
echo "ERROR: Download failed."
exit 1
fi
Binary file not shown.
@@ -1 +0,0 @@
©©ءّ¸ث‡ق¬§¢¥ؤج™إأà’–‎سèز÷ئخ ’ڑھ¸¥ؤي—·(،وظ—ئƒ„÷ٌ2:10851638082828504866
Binary file not shown.
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e3831052cde64562f0a4e51d5f224c2c819dd625a1d89b35ef58d74b82f1858
size 53214594
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:613179718d653f027cf5e70a02f223b423a98abaffe7120ef626793aec23177f
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20325958a36f2afdf149083a4a2079aee4725bb3d0c01f96694f617bb7c29a27
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:853bb38c854ff011b06ed98d7037b25501e02a0b718e65159acbbc62e97874ae
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf9a4b64fb22a0e83a2862f119a61842a72ec8ba15981ece3291b049dd4db11a
size 2432372
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:84e7ddbfcf1fd5d55bf1198cc65fb024ff9110e544195779b42281245246b16d
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d98aa415626d122e2a324d5ffd3a536bcd03f42957114bc23b3d4fc706c7eb8
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30cb3863522eb0e1f1688249f58629ed1e1f03e82d723fde7a13763ade2d60da
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f8fffbfc14379d113100374729ce0236306b6f1aa8b32808e07020adfb3f0a0
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:516a4af1cae907747b7dc91169579a29bd477a99ad4e638fbb205a9b0acaae9d
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76757c0eb38bc7c38c12d8a8ab8ab68b83d17f377cceca985905e5c48dece798
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5f1a2bd449370e6ffd13143d78e6d1b2803df4cbae968fee5ab4244349a64b5
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c79a0792c83c7bcbf8cb2768d3e6d12a928f95506c64c6818698cea0e3f2fec
size 4194304
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c5a36d2a203ece90b2978f5295f42c7a0f9ff72a2edcdbcaa306e67c29b3d72
size 4194304
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env bash
set -euo pipefail
# Upload exported model artifacts (ONNX, TFLite) to Hugging Face Hub.
#
# Usage:
# bash upload_model.sh
# HF_TOKEN=hf_xxx bash upload_model.sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ID="MythEclipse2737/zeavis-edu-model"
: "${HF_TOKEN:=}"
: "${HF_USER:=MythEclipse2737}"
echo "Uploading model artifacts to Hugging Face Hub..."
if ! command -v huggingface-cli &>/dev/null && ! python3 -c "from huggingface_hub import HfApi" 2>/dev/null; then
echo "ERROR: huggingface_hub not installed. pip install huggingface_hub"
exit 1
fi
python3 << PYEOF
import os, sys
sys.path.insert(0, "${SCRIPT_DIR}")
from huggingface_hub import HfApi
api = HfApi(token="${HF_TOKEN}" if "${HF_TOKEN}" else None)
model_dir = "${SCRIPT_DIR}/model"
onnx = os.path.join(model_dir, "model.onnx")
tflite = os.path.join(model_dir, "model.tflite")
saved_model_pb = os.path.join(model_dir, "saved_model", "saved_model.pb")
repo_id = "${REPO_ID}"
files_to_upload = []
for local, remote in [
(onnx, "model/model.onnx"),
(tflite, "model/model.tflite"),
(saved_model_pb, "model/saved_model/saved_model.pb"),
]:
if os.path.isfile(local):
files_to_upload.append((local, remote))
print(f" Queued: {local} -> {remote}")
else:
print(f" Skip (not found): {local}")
for local, remote in files_to_upload:
print(f" Uploading {remote}...")
api.upload_file(
path_or_fileobj=local,
path_in_repo=remote,
repo_id=repo_id,
repo_type="model",
)
print(f" ✅ {remote} uploaded")
if not files_to_upload:
print(" Nothing to upload.")
else:
print(f"Upload complete: https://huggingface.co/{repo_id}")
PYEOF