mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 06:52:20 +02:00
chore(publication): close pre-integration release blockers
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
add_hwfit_models.py — bulk-add Hugging Face models to the hwfit catalog
|
||||
(services/hwfit/data/hf_models.json).
|
||||
(DATA_DIR/hwfit/hf_models.json, mutable user data).
|
||||
|
||||
Adds:
|
||||
* every model from one or more HF authors (e.g. cyankiwi's AWQ quants)
|
||||
@@ -28,8 +28,10 @@ from datetime import datetime
|
||||
from huggingface_hub import HfApi, hf_hub_download
|
||||
from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError
|
||||
|
||||
DATA_PATH = os.path.join(os.path.dirname(__file__), "..", "services", "hwfit", "data", "hf_models.json")
|
||||
DATA_PATH = os.path.abspath(DATA_PATH)
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from services.hwfit.models import model_catalog_path
|
||||
|
||||
DATA_PATH = model_catalog_path()
|
||||
|
||||
# Official / major model-provider orgs to refresh into the Cookbook catalog.
|
||||
# Keep this broad enough that new first-party releases appear after running the
|
||||
@@ -437,8 +439,12 @@ def _is_likely_catalog_model(mi):
|
||||
|
||||
|
||||
def main():
|
||||
with open(DATA_PATH, encoding="utf-8") as f:
|
||||
catalog = json.load(f)
|
||||
os.makedirs(os.path.dirname(DATA_PATH), exist_ok=True)
|
||||
if os.path.exists(DATA_PATH):
|
||||
with open(DATA_PATH, encoding="utf-8") as f:
|
||||
catalog = json.load(f)
|
||||
else:
|
||||
catalog = []
|
||||
by_name = {m["name"]: m for m in catalog}
|
||||
existing = set(by_name)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Backfill release_date on entries in services/hwfit/data/hf_models.json.
|
||||
"""Backfill release_date on entries in DATA_DIR/hwfit/hf_models.json.
|
||||
|
||||
Why: the `newest` sort in the cookbook ranks rows by release_date. Anything
|
||||
missing a date sorts to the bottom. This script pulls `created_at` from the
|
||||
@@ -30,7 +30,10 @@ except ImportError:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
CATALOG_PATH = Path(__file__).resolve().parent.parent / "services" / "hwfit" / "data" / "hf_models.json"
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from services.hwfit.models import model_catalog_path
|
||||
|
||||
CATALOG_PATH = Path(model_catalog_path())
|
||||
|
||||
|
||||
def fetch_release_date(api: HfApi, repo_id: str) -> str | None:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Import models from the upstream vllm-project/recipes catalog into our
|
||||
local hf_models.json. Two modes:
|
||||
runtime DATA_DIR/hwfit/hf_models.json. Two modes:
|
||||
|
||||
--update-existing Stamp min_vllm_version + vllm_recipe=True on rows we
|
||||
already carry. Cheap, no HF API calls.
|
||||
@@ -44,7 +44,10 @@ except ImportError:
|
||||
HfHubHTTPError = Exception
|
||||
|
||||
|
||||
CATALOG_PATH = Path(__file__).resolve().parent.parent / "services" / "hwfit" / "data" / "hf_models.json"
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from services.hwfit.models import model_catalog_path
|
||||
|
||||
CATALOG_PATH = Path(model_catalog_path())
|
||||
RECIPES_TREE_URL = (
|
||||
"https://api.github.com/repos/vllm-project/recipes/git/trees/main?recursive=1"
|
||||
)
|
||||
@@ -253,8 +256,12 @@ def main():
|
||||
if not args.update_existing and not args.add_missing:
|
||||
args.update_existing = args.add_missing = True
|
||||
|
||||
with CATALOG_PATH.open(encoding="utf-8") as f:
|
||||
catalog = json.load(f)
|
||||
CATALOG_PATH.parent.mkdir(parents=True, exist_ok=True)
|
||||
if CATALOG_PATH.exists():
|
||||
with CATALOG_PATH.open(encoding="utf-8") as f:
|
||||
catalog = json.load(f)
|
||||
else:
|
||||
catalog = []
|
||||
by_name = {m.get("name"): m for m in catalog if m.get("name")}
|
||||
|
||||
client = httpx.Client(follow_redirects=True)
|
||||
|
||||
Reference in New Issue
Block a user