hugpy-engine 0.3.12__tar.gz → 0.3.14__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.12 → hugpy_engine-0.3.14}/PKG-INFO +1 -1
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/pyproject.toml +1 -1
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/llama/runners/fitevict_runner.py +6 -1
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/model_resolver.py +11 -1
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/task_endpoints.py +9 -3
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine.egg-info/PKG-INFO +1 -1
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/README.md +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/setup.cfg +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/categories.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/main.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/models/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/models/models_config.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/models/models_default.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/core_auth.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/dispatch/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/dispatch/dispatch.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/fit/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/fit/types.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/imports/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/imports/classes.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/imports/constants.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/imports/functions.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/imports/init_imports.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/llama/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/llama/runners/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/name_match.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/placement.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/py.typed +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/assure_model_key.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/categories/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/categories/builders.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/categories/frameworks.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/task_resolution.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/chat_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/event_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/metadata_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/model_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/runner_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/schemas/task_schemas.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/task_deps.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/tasks.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/utils/__init__.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/utils/json_scavenge.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/utils/model_marker.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/utils/no_think.py +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine.egg-info/SOURCES.txt +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine.egg-info/dependency_links.txt +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine.egg-info/requires.txt +0 -0
- {hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/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.14
|
|
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.14"
|
|
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"
|
{hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/llama/runners/fitevict_runner.py
RENAMED
|
@@ -92,6 +92,10 @@ class FitevictChatRunner:
|
|
|
92
92
|
self.cfg = cfg
|
|
93
93
|
self.model_key = cfg.model_key
|
|
94
94
|
self.knobs = None
|
|
95
|
+
# Every call names WHY it happened (operator 2026-10-23): callers that
|
|
96
|
+
# construct this runner for a purpose (grading, assist, planning, ...)
|
|
97
|
+
# pass intent=...; a bare construction is ordinary generation.
|
|
98
|
+
self.intent = runtime_kwargs.pop("intent", None) or "generation"
|
|
95
99
|
if runtime_kwargs:
|
|
96
100
|
logger.debug("FitevictChatRunner ignoring runtime_kwargs %s for %s "
|
|
97
101
|
"(placement is the front door's)", sorted(runtime_kwargs),
|
|
@@ -109,7 +113,8 @@ class FitevictChatRunner:
|
|
|
109
113
|
"top_p": req.top_p,
|
|
110
114
|
"task": "chat",
|
|
111
115
|
"metadata": {"hugpy_request_id": req.request_id,
|
|
112
|
-
"hugpy_model_key": req.model_key or self.model_key
|
|
116
|
+
"hugpy_model_key": req.model_key or self.model_key,
|
|
117
|
+
"intent": getattr(req, "intent", None) or self.intent},
|
|
113
118
|
}
|
|
114
119
|
if self.knobs:
|
|
115
120
|
body["knobs"] = self.knobs
|
|
@@ -65,6 +65,15 @@ def _refuse_if_unclassified(model_key, cfg) -> None:
|
|
|
65
65
|
# resolve_model_key — picks the model. Default-resolution chain only.
|
|
66
66
|
# Does NOT pick task; that's resolve()'s job.
|
|
67
67
|
# ---------------------------------------------------------------------------
|
|
68
|
+
def _vl_answers_text(cfg, task) -> bool:
|
|
69
|
+
"""A vision-language chat model answers a text-only chat (operator 2026-10-24:
|
|
70
|
+
the producer plan's role default Surogate-3.5-2B, registered image-text-to-text
|
|
71
|
+
only, refused every `text-generation` call). Its chat endpoint takes image parts
|
|
72
|
+
as optional content, so a `text-generation` request rides the ordinary chat
|
|
73
|
+
builder to the same model — no image, no other change."""
|
|
74
|
+
return task == "text-generation" and "image-text-to-text" in (getattr(cfg, "tasks", None) or [])
|
|
75
|
+
|
|
76
|
+
|
|
68
77
|
def _adopt_vl_tasks_from_disk(model_key, cfg, task):
|
|
69
78
|
"""A stale registry row refusing ``image-text-to-text`` for a GGUF: re-apply
|
|
70
79
|
the vision-GGUF rule (hugpy_marker.vl_gguf_tasks — the rule the marker
|
|
@@ -238,6 +247,7 @@ def resolve_model_key_traced(
|
|
|
238
247
|
)
|
|
239
248
|
_refuse_if_unclassified(model_key, MODEL_REGISTRY[model_key])
|
|
240
249
|
if task is not None and task not in MODEL_REGISTRY[model_key].tasks \
|
|
250
|
+
and not _vl_answers_text(MODEL_REGISTRY[model_key], task) \
|
|
241
251
|
and _adopt_vl_tasks_from_disk(model_key, MODEL_REGISTRY[model_key], task) is None:
|
|
242
252
|
raise ValueError(
|
|
243
253
|
f"Model {model_key!r} does not support task={task!r}; "
|
|
@@ -411,7 +421,7 @@ def resolve(prompt_kwargs: Dict[str, Any]) -> Resolution:
|
|
|
411
421
|
|
|
412
422
|
if task not in cfg.tasks:
|
|
413
423
|
cfg = _adopt_vl_tasks_from_disk(model_key, cfg, task) or cfg
|
|
414
|
-
if task not in cfg.tasks:
|
|
424
|
+
if task not in cfg.tasks and not _vl_answers_text(cfg, task):
|
|
415
425
|
raise ValueError(
|
|
416
426
|
f"Model {model_key!r} does not support task={task!r}; "
|
|
417
427
|
f"supported: {sorted(cfg.tasks)}"
|
|
@@ -342,10 +342,16 @@ class TaskEndpointRunner:
|
|
|
342
342
|
self.cfg = cfg
|
|
343
343
|
self.model_key = getattr(cfg, "model_key", None)
|
|
344
344
|
|
|
345
|
-
def _post(self, url: str, body: dict, timeout: float
|
|
345
|
+
def _post(self, url: str, body: dict, timeout: float,
|
|
346
|
+
request_id: "str | None" = None) -> "tuple[int, dict]":
|
|
346
347
|
from hugpy_engine.core_auth import core_headers
|
|
348
|
+
headers = {"Content-Type": "application/json"}
|
|
349
|
+
if request_id:
|
|
350
|
+
# core records it as this call's parent and forwards it as the chain's
|
|
351
|
+
# root, so the job can find the worker's call row by its own id
|
|
352
|
+
headers["X-Hugpy-Parent-Request-Id"] = request_id
|
|
347
353
|
req = urllib.request.Request(url, data=json.dumps(body).encode("utf-8"),
|
|
348
|
-
headers=core_headers(url,
|
|
354
|
+
headers=core_headers(url, headers),
|
|
349
355
|
method="POST")
|
|
350
356
|
try:
|
|
351
357
|
with urllib.request.urlopen(req, timeout=timeout) as r:
|
|
@@ -376,7 +382,7 @@ class TaskEndpointRunner:
|
|
|
376
382
|
raise TypeError("TaskEndpointRunner requires an EndpointRequest")
|
|
377
383
|
body = {**req.body, "model": req.model_key}
|
|
378
384
|
status, payload = await asyncio.to_thread(
|
|
379
|
-
self._post, CORE_URL + req.route, body, req.timeout_s)
|
|
385
|
+
self._post, CORE_URL + req.route, body, req.timeout_s, req.request_id)
|
|
380
386
|
return self._result(req, status, payload)
|
|
381
387
|
|
|
382
388
|
async def stream(self, req: EndpointRequest, cancel_event=None):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hugpy-engine
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.14
|
|
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
|
{hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/config/models/models_default.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/categories/__init__.py
RENAMED
|
File without changes
|
{hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/src/hugpy_engine/resolvers/categories/builders.py
RENAMED
|
File without changes
|
{hugpy_engine-0.3.12 → hugpy_engine-0.3.14}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|