fred-oss 0.51.1__tar.gz → 0.52.1__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.
- {fred_oss-0.51.1/src/main/fred_oss.egg-info → fred_oss-0.52.1}/PKG-INFO +2 -1
- {fred_oss-0.51.1 → fred_oss-0.52.1}/requirements.txt +1 -0
- fred_oss-0.52.1/src/main/fred/utils/mlops/__init__.py +1 -0
- fred_oss-0.52.1/src/main/fred/utils/mlops/auto.py +76 -0
- fred_oss-0.52.1/src/main/fred/version +1 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/interface.py +9 -2
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/settings.py +1 -1
- {fred_oss-0.51.1 → fred_oss-0.52.1/src/main/fred_oss.egg-info}/PKG-INFO +2 -1
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred_oss.egg-info/SOURCES.txt +2 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred_oss.egg-info/requires.txt +1 -0
- fred_oss-0.51.1/src/main/fred/version +0 -1
- {fred_oss-0.51.1 → fred_oss-0.52.1}/MANIFEST.in +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/NOTICE.txt +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/README.md +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/setup.cfg +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/setup.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/_keyval.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/_pubsub.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/_queue.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/comp/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/_minio.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/_redis.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/_stdlib.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/dao/service/utils.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/callback/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/callback/_function.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/callback/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/callback/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/impl.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/result.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/settings.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/future/utils.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/monad/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/monad/_either.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/monad/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/monad/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/settings.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imops.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/_filesystem.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/_minio.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/_string.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/imout/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/version.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/backend.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/client.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/handler.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/_handler.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/_item.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/_request.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/_runner_spec.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/model/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/plugins/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/plugins/_local.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/plugins/_runpod.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/plugins/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/plugins/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/auth.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/cli_ext.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/routers/__init__.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/routers/_runner.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/routers/catalog.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/routers/interface.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/server.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/rest/settings.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/settings.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/signal.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/status.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/worker/runner/utils.py +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred_oss.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fred-oss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.52.1
|
|
4
4
|
Summary: FREDOSS
|
|
5
5
|
Home-page: https://fred.fahera.mx
|
|
6
6
|
Author: Fahera Research, Education, and Development
|
|
@@ -16,6 +16,7 @@ Requires-Dist: fastapi==0.116.2
|
|
|
16
16
|
Requires-Dist: uvicorn[standard]==0.35.0
|
|
17
17
|
Requires-Dist: minio==7.2.18
|
|
18
18
|
Requires-Dist: pillow==11.3.0
|
|
19
|
+
Requires-Dist: torch==2.8.0
|
|
19
20
|
Dynamic: author
|
|
20
21
|
Dynamic: author-email
|
|
21
22
|
Dynamic: description
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Machine Learning Operations (MLOps) utilities
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
from typing import Literal, Optional, overload
|
|
2
|
+
|
|
3
|
+
import torch
|
|
4
|
+
|
|
5
|
+
from fred.settings import get_environ_variable
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_device(
|
|
9
|
+
device: Optional[str] = None,
|
|
10
|
+
env_fallback: Optional[str] = None,
|
|
11
|
+
default: Optional[str] = None,
|
|
12
|
+
) -> str:
|
|
13
|
+
env_default = get_environ_variable(
|
|
14
|
+
env_fallback or "FRD_MLOPS_DEVICE",
|
|
15
|
+
default=None
|
|
16
|
+
)
|
|
17
|
+
# Determine the device to use for model inference
|
|
18
|
+
return device or env_default or default or (
|
|
19
|
+
"cuda" if torch.cuda.is_available() else
|
|
20
|
+
"mps" if torch.backends.mps.is_available() else
|
|
21
|
+
"cpu"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@overload
|
|
26
|
+
def get_dtype(
|
|
27
|
+
dtype: Optional[str] = None,
|
|
28
|
+
as_str: Literal[True] = True,
|
|
29
|
+
env_fallback: Optional[str] = None,
|
|
30
|
+
default: Optional[str] = None,
|
|
31
|
+
) -> str:
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@overload
|
|
36
|
+
def get_dtype(
|
|
37
|
+
dtype: Optional[str] = None,
|
|
38
|
+
as_str: Literal[False] = False,
|
|
39
|
+
env_fallback: Optional[str] = None,
|
|
40
|
+
default: Optional[str] = None,
|
|
41
|
+
) -> torch.dtype:
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def get_dtype(
|
|
46
|
+
dtype: Optional[str] = None,
|
|
47
|
+
as_str: bool = False,
|
|
48
|
+
env_fallback: Optional[str] = None,
|
|
49
|
+
default: Optional[str] = None,
|
|
50
|
+
) -> str | torch.dtype:
|
|
51
|
+
"""
|
|
52
|
+
Determine the data type to use for model inference.
|
|
53
|
+
Args:
|
|
54
|
+
dtype (Optional[str]): The desired data type as a string (e.g., "float16", "float32").
|
|
55
|
+
as_str (bool): If True, return the data type as a string; otherwise, return the torch.dtype object.
|
|
56
|
+
env_fallback (Optional[str]): The name of the environment variable to use as a fallback for the data type. If not provided, defaults to "FRD_MLOPS_DTYPE".
|
|
57
|
+
default (Optional[str]): The default data type to use if neither `dtype` nor the environment variable is set.
|
|
58
|
+
Returns:
|
|
59
|
+
str | torch.dtype: The data type as a string or torch.dtype object.
|
|
60
|
+
"""
|
|
61
|
+
# Early exit for string return
|
|
62
|
+
if as_str:
|
|
63
|
+
env_default = get_environ_variable(
|
|
64
|
+
env_fallback or "FRD_MLOPS_DTYPE",
|
|
65
|
+
default=None
|
|
66
|
+
)
|
|
67
|
+
return dtype or env_default or default or (
|
|
68
|
+
"float16" if torch.cuda.is_available() else
|
|
69
|
+
"float32"
|
|
70
|
+
)
|
|
71
|
+
# Return the actual torch.dtype object if not as_str
|
|
72
|
+
return getattr(
|
|
73
|
+
torch,
|
|
74
|
+
get_dtype(dtype=dtype, as_str=True),
|
|
75
|
+
torch.float32,
|
|
76
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.52.1
|
|
@@ -2,7 +2,7 @@ import time
|
|
|
2
2
|
from typing import overload, Callable, Optional
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
4
|
|
|
5
|
-
from fred.worker.settings import
|
|
5
|
+
from fred.worker.settings import FRD_WORKER_BROADCAST_DEFAULT
|
|
6
6
|
from fred.future.impl import Future # Should we make this import lazy?
|
|
7
7
|
from fred.utils.dateops import datetime_utcnow
|
|
8
8
|
from fred.settings import (
|
|
@@ -159,10 +159,17 @@ class HandlerInterface:
|
|
|
159
159
|
If requested as a Future, returns a Future that will resolve to the response dictionary.
|
|
160
160
|
"""
|
|
161
161
|
if as_future:
|
|
162
|
+
for bflag in [broadcast, event.pop("broadcast", None), FRD_WORKER_BROADCAST_DEFAULT, False]:
|
|
163
|
+
if isinstance(bflag, bool):
|
|
164
|
+
break
|
|
165
|
+
else:
|
|
166
|
+
logger.warning("Could not determine fred-worker broadcast flag... setting to False.")
|
|
167
|
+
bflag = False
|
|
168
|
+
logger.info(f"Worker future-broadcast flag set to: {bflag}")
|
|
162
169
|
return Future(
|
|
163
170
|
future_id=future_id,
|
|
164
171
|
function=lambda: self.run(event=event, as_future=False),
|
|
165
|
-
broadcast=
|
|
172
|
+
broadcast=bflag,
|
|
166
173
|
)
|
|
167
174
|
# Extract payload and event ID
|
|
168
175
|
payload = event.get("input", {})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fred-oss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.52.1
|
|
4
4
|
Summary: FREDOSS
|
|
5
5
|
Home-page: https://fred.fahera.mx
|
|
6
6
|
Author: Fahera Research, Education, and Development
|
|
@@ -16,6 +16,7 @@ Requires-Dist: fastapi==0.116.2
|
|
|
16
16
|
Requires-Dist: uvicorn[standard]==0.35.0
|
|
17
17
|
Requires-Dist: minio==7.2.18
|
|
18
18
|
Requires-Dist: pillow==11.3.0
|
|
19
|
+
Requires-Dist: torch==2.8.0
|
|
19
20
|
Dynamic: author
|
|
20
21
|
Dynamic: author-email
|
|
21
22
|
Dynamic: description
|
|
@@ -59,6 +59,8 @@ src/main/fred/utils/imout/_minio.py
|
|
|
59
59
|
src/main/fred/utils/imout/_string.py
|
|
60
60
|
src/main/fred/utils/imout/catalog.py
|
|
61
61
|
src/main/fred/utils/imout/interface.py
|
|
62
|
+
src/main/fred/utils/mlops/__init__.py
|
|
63
|
+
src/main/fred/utils/mlops/auto.py
|
|
62
64
|
src/main/fred/worker/__init__.py
|
|
63
65
|
src/main/fred/worker/interface.py
|
|
64
66
|
src/main/fred/worker/settings.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.51.1
|
|
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
|
|
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
|
{fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.51.1 → fred_oss-0.52.1}/src/main/fred/integrations/databricks/wrappers/dbutils.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
|
|
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
|
|
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
|