hugpy-engine 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/PKG-INFO +1 -1
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/pyproject.toml +1 -1
- hugpy_engine-0.3.2/src/hugpy_engine/task_deps.py +67 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine.egg-info/PKG-INFO +1 -1
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine.egg-info/SOURCES.txt +1 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/README.md +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/setup.cfg +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/categories.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/config/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/config/main.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/config/models/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/config/models/models_config.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/config/models/models_default.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/dispatch/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/dispatch/dispatch.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/fit/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/fit/types.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/llama/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/llama/runners/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/llama/runners/fitevict_runner.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/name_match.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/placement.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/py.typed +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/assure_model_key.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/categories/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/categories/builders.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/categories/frameworks.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/model_resolver.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/__init__.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/chat_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/event_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/metadata_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/model_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/runner_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/schemas/task_schemas.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/tasks.py +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine.egg-info/dependency_links.txt +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine.egg-info/requires.txt +0 -0
- {hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hugpy-engine
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams
|
|
5
5
|
Author-email: putkoff <support@hugpy.ai>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hugpy-engine"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Canonical ML-amenity task -> dependency map + a cheap capability probe.
|
|
2
|
+
|
|
3
|
+
Single source of truth shared by:
|
|
4
|
+
* central's ``/ml`` readiness (``flask_app.../ml_routes`` builds its route-keyed
|
|
5
|
+
``ML_DEP`` from this), and
|
|
6
|
+
* the worker agent's advertised ``task_capabilities`` heartbeat field
|
|
7
|
+
(``worker_agent.agent._task_capabilities``),
|
|
8
|
+
so the two can never DRIFT on which import module powers which dispatch task.
|
|
9
|
+
|
|
10
|
+
Deliberately dependency-free (stdlib ``importlib`` only): central imports it in a
|
|
11
|
+
phone-clean ``GET /ml`` and the worker imports it to build EVERY heartbeat, so it
|
|
12
|
+
must never drag a heavy ML import. The probe is ``find_spec`` ONLY — it resolves
|
|
13
|
+
whether a module is importable without importing it. The one task where
|
|
14
|
+
``find_spec`` is insufficient (whisper: resolvable yet ``import whisper`` can die
|
|
15
|
+
under the numba/numpy>=2.5 landmine, 2026-07-11) keeps its guarded real import in
|
|
16
|
+
the worker agent, on top of this map.
|
|
17
|
+
"""
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import importlib.util
|
|
21
|
+
from typing import Dict, Tuple
|
|
22
|
+
|
|
23
|
+
# task (the dispatch/`/ml` task key) -> (import module, pip extra that provides it).
|
|
24
|
+
# Mirrors — and is the source for — ml_routes.ML_DEP (which is keyed by ROUTE name
|
|
25
|
+
# and joins through ml_routes.ML_TASKS). Keep the two key spaces in sync via that
|
|
26
|
+
# join, never by hand-copying values.
|
|
27
|
+
TASK_DEPS: Dict[str, Tuple[str, str]] = {
|
|
28
|
+
"automatic-speech-recognition": ("whisper", "audio"),
|
|
29
|
+
# SPEECH OUT (chatterbox seat). The distribution is ``chatterbox-tts`` and
|
|
30
|
+
# the import name is ``chatterbox`` — they differ, and this table's probe is
|
|
31
|
+
# by MODULE, so the module name is what belongs here. A worker that seats the
|
|
32
|
+
# backend in a per-model env-PROFILE venv (its torch pins collide with the
|
|
33
|
+
# agent's) answers False to this find_spec and True to the agent's overlay —
|
|
34
|
+
# see managers.tts.seat, the same shape as the whisper special case below.
|
|
35
|
+
"text-to-speech": ("chatterbox", "tts"),
|
|
36
|
+
"text-summarization": ("transformers", "transformers"),
|
|
37
|
+
"keyword-extraction": ("keybert", "keywords"),
|
|
38
|
+
"feature-extraction": ("sentence_transformers", "embed"),
|
|
39
|
+
"sentence-similarity": ("sentence_transformers", "embed"),
|
|
40
|
+
"image-text-to-text": ("llama_cpp", "engine"),
|
|
41
|
+
"text-to-image": ("diffusers", "imagegen"),
|
|
42
|
+
"document-extraction": ("pdfplumber", "extract"),
|
|
43
|
+
"url-extraction": ("bs4", "web"),
|
|
44
|
+
"depth-estimation": ("transformers", "transformers"),
|
|
45
|
+
"object-detection": ("transformers", "transformers"),
|
|
46
|
+
"image-classification": ("transformers", "transformers"),
|
|
47
|
+
"image-segmentation": ("transformers", "transformers"),
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def have(mod: str) -> bool:
|
|
52
|
+
"""Whether ``mod`` is importable — ``find_spec`` only, never imports it."""
|
|
53
|
+
try:
|
|
54
|
+
return importlib.util.find_spec(mod) is not None
|
|
55
|
+
except (ImportError, ValueError):
|
|
56
|
+
return False
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def task_capabilities() -> Dict[str, bool]:
|
|
60
|
+
"""``{task: bool}`` from the ``find_spec`` probe (cheap, no heavy imports).
|
|
61
|
+
|
|
62
|
+
The worker overlays TWO special cases on top of this base map before
|
|
63
|
+
advertising it (see worker_agent.agent._task_capabilities): whisper (a
|
|
64
|
+
guarded real import) and text-to-speech (a seat that may live in a separate
|
|
65
|
+
env-profile venv, which no probe of THIS interpreter can see).
|
|
66
|
+
"""
|
|
67
|
+
return {task: have(mod) for task, (mod, _extra) in TASK_DEPS.items()}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hugpy-engine
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams
|
|
5
5
|
Author-email: putkoff <support@hugpy.ai>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hugpy_engine-0.3.1 → hugpy_engine-0.3.2}/src/hugpy_engine/resolvers/categories/frameworks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|