fred-oss 0.51.0__tar.gz → 0.52.0__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.0/src/main/fred_oss.egg-info → fred_oss-0.52.0}/PKG-INFO +2 -1
- {fred_oss-0.51.0 → fred_oss-0.52.0}/requirements.txt +1 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/_keyval.py +3 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/_minio.py +1 -1
- fred_oss-0.52.0/src/main/fred/utils/mlops/__init__.py +1 -0
- fred_oss-0.52.0/src/main/fred/utils/mlops/auto.py +76 -0
- fred_oss-0.52.0/src/main/fred/version +1 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0/src/main/fred_oss.egg-info}/PKG-INFO +2 -1
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred_oss.egg-info/SOURCES.txt +2 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred_oss.egg-info/requires.txt +1 -0
- fred_oss-0.51.0/src/main/fred/version +0 -1
- {fred_oss-0.51.0 → fred_oss-0.52.0}/MANIFEST.in +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/NOTICE.txt +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/README.md +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/setup.cfg +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/setup.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/_pubsub.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/_queue.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/comp/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/_minio.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/_redis.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/_stdlib.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/dao/service/utils.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/callback/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/callback/_function.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/callback/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/callback/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/impl.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/result.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/settings.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/future/utils.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/monad/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/monad/_either.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/monad/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/monad/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/settings.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imops.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/_filesystem.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/_string.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/imout/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/version.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/backend.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/client.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/handler.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/_handler.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/_item.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/_request.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/_runner_spec.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/model/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/plugins/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/plugins/_local.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/plugins/_runpod.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/plugins/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/plugins/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/auth.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/cli_ext.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/routers/__init__.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/routers/_runner.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/routers/catalog.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/routers/interface.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/server.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/rest/settings.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/settings.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/signal.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/status.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/runner/utils.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/worker/settings.py +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.51.0 → fred_oss-0.52.0}/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.0
|
|
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
|
|
@@ -76,6 +76,9 @@ class FredKeyVal(ComponentInterface):
|
|
|
76
76
|
logger.warning("Expiration not implemented for MINIO service.")
|
|
77
77
|
# Prepare the value as a byte stream
|
|
78
78
|
value_bytes = value.encode("utf-8")
|
|
79
|
+
if kwargs.get("b64", False):
|
|
80
|
+
import base64
|
|
81
|
+
value_bytes = base64.b64decode(value)
|
|
79
82
|
value_stream = io.BytesIO(value_bytes)
|
|
80
83
|
value_stream.seek(0) # Ensure the stream is at the beginning
|
|
81
84
|
# Put the object into the bucket
|
|
@@ -22,7 +22,7 @@ class OutputMinio(ImageOutputInterface):
|
|
|
22
22
|
|
|
23
23
|
image_key = posixpath.join(bucket, filename)
|
|
24
24
|
image_string = image_to_b64(self.image)
|
|
25
|
-
self.client(key=image_key).set(image_string,
|
|
25
|
+
self.client(key=image_key).set(image_string, b64=True, **kwargs)
|
|
26
26
|
if not presigned:
|
|
27
27
|
return posixpath.join(
|
|
28
28
|
self.metadata.get("minio_endpoint", ""),
|
|
@@ -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.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fred-oss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.52.0
|
|
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.0
|
|
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.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.51.0 → fred_oss-0.52.0}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.51.0 → fred_oss-0.52.0}/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
|
|
File without changes
|