truefoundry 0.4.4rc12__py3-none-any.whl → 0.5.0rc1__py3-none-any.whl
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.
Potentially problematic release.
This version of truefoundry might be problematic. Click here for more details.
- truefoundry/common/constants.py +6 -1
- truefoundry/common/utils.py +0 -18
- truefoundry/logger.py +1 -0
- truefoundry/ml/__init__.py +36 -0
- truefoundry/ml/artifact/truefoundry_artifact_repo.py +433 -415
- truefoundry/ml/autogen/client/__init__.py +29 -6
- truefoundry/ml/autogen/client/api/__init__.py +3 -3
- truefoundry/ml/autogen/client/api/deprecated_api.py +7 -7
- truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +526 -0
- truefoundry/ml/autogen/client/models/__init__.py +26 -3
- truefoundry/ml/autogen/client/models/command.py +152 -0
- truefoundry/ml/autogen/client/models/create_workflow_task_config_request_dto.py +72 -0
- truefoundry/ml/autogen/client/models/external_model_source.py +3 -2
- truefoundry/ml/autogen/client/models/fast_ai_framework.py +75 -0
- truefoundry/ml/autogen/client/models/framework.py +250 -14
- truefoundry/ml/autogen/client/models/gluon_framework.py +74 -0
- truefoundry/ml/autogen/client/models/{upload_model_source.py → h2_o_framework.py} +11 -11
- truefoundry/ml/autogen/client/models/keras_framework.py +74 -0
- truefoundry/ml/autogen/client/models/light_gbm_framework.py +75 -0
- truefoundry/ml/autogen/client/models/model_version_manifest.py +1 -1
- truefoundry/ml/autogen/client/models/onnx_framework.py +74 -0
- truefoundry/ml/autogen/client/models/paddle_framework.py +75 -0
- truefoundry/ml/autogen/client/models/py_torch_framework.py +75 -0
- truefoundry/ml/autogen/client/models/sklearn_framework.py +75 -0
- truefoundry/ml/autogen/client/models/source.py +9 -32
- truefoundry/ml/autogen/client/models/spa_cy_framework.py +74 -0
- truefoundry/ml/autogen/client/models/stats_models_framework.py +75 -0
- truefoundry/ml/autogen/client/models/{tensorflow_framework.py → tensor_flow_framework.py} +10 -9
- truefoundry/ml/autogen/client/models/transformers_framework.py +3 -2
- truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +90 -0
- truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +71 -0
- truefoundry/ml/autogen/client/models/truefoundry_model_source.py +5 -3
- truefoundry/ml/autogen/client/models/xg_boost_framework.py +75 -0
- truefoundry/ml/autogen/client_README.md +22 -5
- truefoundry/ml/autogen/entities/artifacts.py +19 -2
- truefoundry/ml/log_types/artifacts/artifact.py +10 -6
- truefoundry/ml/log_types/artifacts/dataset.py +13 -5
- truefoundry/ml/log_types/artifacts/general_artifact.py +3 -1
- truefoundry/ml/log_types/artifacts/model.py +172 -194
- truefoundry/ml/log_types/artifacts/utils.py +43 -26
- truefoundry/ml/log_types/image/image.py +2 -0
- truefoundry/ml/log_types/plot.py +2 -0
- truefoundry/ml/mlfoundry_api.py +47 -18
- truefoundry/ml/mlfoundry_run.py +27 -12
- truefoundry/ml/model_framework.py +169 -0
- truefoundry/workflow/__init__.py +3 -1
- truefoundry/workflow/remote_filesystem/__init__.py +8 -0
- truefoundry/workflow/remote_filesystem/logger.py +36 -0
- truefoundry/{common → workflow/remote_filesystem}/tfy_signed_url_client.py +1 -2
- truefoundry/{common → workflow/remote_filesystem}/tfy_signed_url_fs.py +5 -2
- {truefoundry-0.4.4rc12.dist-info → truefoundry-0.5.0rc1.dist-info}/METADATA +1 -1
- {truefoundry-0.4.4rc12.dist-info → truefoundry-0.5.0rc1.dist-info}/RECORD +54 -36
- truefoundry/ml/autogen/client/api/python_deployment_config_api.py +0 -201
- {truefoundry-0.4.4rc12.dist-info → truefoundry-0.5.0rc1.dist-info}/WHEEL +0 -0
- {truefoundry-0.4.4rc12.dist-info → truefoundry-0.5.0rc1.dist-info}/entry_points.txt +0 -0
truefoundry/common/constants.py
CHANGED
|
@@ -31,6 +31,7 @@ class TrueFoundrySdkEnv(BaseSettings):
|
|
|
31
31
|
TFY_INTERNAL_SIGNED_URL_SERVER_MAX_TIMEOUT: int = 5 # default: 5 seconds
|
|
32
32
|
TFY_INTERNAL_SIGNED_URL_SERVER_DEFAULT_TTL: int = 3600 # default: 1 hour
|
|
33
33
|
TFY_INTERNAL_SIGNED_URL_REQUEST_TIMEOUT: int = 3600 # default: 1 hour
|
|
34
|
+
TFY_INTERNAL_SIGNED_URL_CLIENT_LOG_LEVEL: str = "WARNING"
|
|
34
35
|
|
|
35
36
|
# Artifacts
|
|
36
37
|
TFY_ARTIFACTS_DOWNLOAD_CHUNK_SIZE_BYTES: int = 100 * 1000 * 1000
|
|
@@ -38,9 +39,13 @@ class TrueFoundrySdkEnv(BaseSettings):
|
|
|
38
39
|
TFY_ARTIFACTS_UPLOAD_MAX_WORKERS: int = max(min(32, (os.cpu_count() or 2) * 2), 4)
|
|
39
40
|
TFY_ARTIFACTS_DISABLE_MULTIPART_UPLOAD: bool = False
|
|
40
41
|
TFY_ARTIFACTS_DOWNLOAD_FSYNC_CHUNKS: bool = False
|
|
41
|
-
|
|
42
|
+
|
|
43
|
+
# Fo customizing the python image used for building via PythonBuild
|
|
42
44
|
TFY_PYTHONBUILD_PYTHON_IMAGE_REPO: str = "public.ecr.aws/docker/library/python"
|
|
43
45
|
|
|
46
|
+
# For local development, this enables futher configuration via _TFYServersConfig
|
|
47
|
+
TFY_CLI_LOCAL_DEV_MODE: bool = False
|
|
48
|
+
|
|
44
49
|
|
|
45
50
|
ENV_VARS = TrueFoundrySdkEnv()
|
|
46
51
|
API_SERVER_RELATIVE_PATH = "api/svc"
|
truefoundry/common/utils.py
CHANGED
|
@@ -10,7 +10,6 @@ from truefoundry.common.constants import (
|
|
|
10
10
|
MLFOUNDRY_SERVER_RELATIVE_PATH,
|
|
11
11
|
TFY_HOST_ENV_KEY,
|
|
12
12
|
)
|
|
13
|
-
from truefoundry.logger import logger
|
|
14
13
|
from truefoundry.pydantic_v1 import BaseSettings
|
|
15
14
|
|
|
16
15
|
T = TypeVar("T")
|
|
@@ -103,20 +102,3 @@ def resolve_tfy_host(tfy_host: Optional[str] = None) -> str:
|
|
|
103
102
|
tfy_host = tfy_host.strip("/")
|
|
104
103
|
validate_tfy_host(tfy_host)
|
|
105
104
|
return tfy_host
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def log_time(prefix: str = ""):
|
|
109
|
-
"""Decorator to log the time taken by I/O operations."""
|
|
110
|
-
|
|
111
|
-
def decorator(func):
|
|
112
|
-
@wraps(func)
|
|
113
|
-
def wrapper(*args, **kwargs):
|
|
114
|
-
start_time = time.time()
|
|
115
|
-
result = func(*args, **kwargs)
|
|
116
|
-
elapsed_time = time.time() - start_time
|
|
117
|
-
logger.info(f"{prefix}{func.__name__} took {elapsed_time:.2f} seconds")
|
|
118
|
-
return result
|
|
119
|
-
|
|
120
|
-
return wrapper
|
|
121
|
-
|
|
122
|
-
return decorator
|
truefoundry/logger.py
CHANGED
truefoundry/ml/__init__.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from truefoundry.ml.autogen.client.models.library_name import LibraryName
|
|
1
2
|
from truefoundry.ml.enums import (
|
|
2
3
|
DataSlice,
|
|
3
4
|
FileFormat,
|
|
@@ -10,15 +11,34 @@ from truefoundry.ml.log_types import Image, Plot
|
|
|
10
11
|
from truefoundry.ml.log_types.artifacts.artifact import ArtifactPath, ArtifactVersion
|
|
11
12
|
from truefoundry.ml.log_types.artifacts.dataset import DataDirectory, DataDirectoryPath
|
|
12
13
|
from truefoundry.ml.log_types.artifacts.model import (
|
|
14
|
+
BlobStorageModelDirectory,
|
|
13
15
|
ModelVersion,
|
|
14
16
|
)
|
|
15
17
|
from truefoundry.ml.logger import init_logger
|
|
16
18
|
from truefoundry.ml.mlfoundry_api import get_client
|
|
17
19
|
from truefoundry.ml.mlfoundry_run import MlFoundryRun
|
|
20
|
+
from truefoundry.ml.model_framework import (
|
|
21
|
+
FastAIFramework,
|
|
22
|
+
GluonFramework,
|
|
23
|
+
H2OFramework,
|
|
24
|
+
KerasFramework,
|
|
25
|
+
LightGBMFramework,
|
|
26
|
+
ModelFrameworkType,
|
|
27
|
+
ONNXFramework,
|
|
28
|
+
PaddleFramework,
|
|
29
|
+
PyTorchFramework,
|
|
30
|
+
SklearnFramework,
|
|
31
|
+
SpaCyFramework,
|
|
32
|
+
StatsModelsFramework,
|
|
33
|
+
TensorFlowFramework,
|
|
34
|
+
TransformersFramework,
|
|
35
|
+
XGBoostFramework,
|
|
36
|
+
)
|
|
18
37
|
|
|
19
38
|
__all__ = [
|
|
20
39
|
"ArtifactPath",
|
|
21
40
|
"ArtifactVersion",
|
|
41
|
+
"BlobStorageModelDirectory",
|
|
22
42
|
"DataDirectory",
|
|
23
43
|
"DataDirectoryPath",
|
|
24
44
|
"DataSlice",
|
|
@@ -32,6 +52,22 @@ __all__ = [
|
|
|
32
52
|
"Plot",
|
|
33
53
|
"ViewType",
|
|
34
54
|
"get_client",
|
|
55
|
+
"FastAIFramework",
|
|
56
|
+
"GluonFramework",
|
|
57
|
+
"H2OFramework",
|
|
58
|
+
"KerasFramework",
|
|
59
|
+
"LightGBMFramework",
|
|
60
|
+
"ONNXFramework",
|
|
61
|
+
"PaddleFramework",
|
|
62
|
+
"PyTorchFramework",
|
|
63
|
+
"SklearnFramework",
|
|
64
|
+
"SpaCyFramework",
|
|
65
|
+
"StatsModelsFramework",
|
|
66
|
+
"TensorFlowFramework",
|
|
67
|
+
"TransformersFramework",
|
|
68
|
+
"XGBoostFramework",
|
|
69
|
+
"LibraryName",
|
|
70
|
+
"ModelFrameworkType",
|
|
35
71
|
]
|
|
36
72
|
|
|
37
73
|
init_logger()
|