truefoundry 0.4.4rc12__py3-none-any.whl → 0.4.5__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.

@@ -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
- TFY_CLI_LOCAL_DEV_MODE: bool = False
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"
@@ -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
@@ -15,3 +15,4 @@ def add_cli_handler(level: int = logging.INFO, show_path=False):
15
15
  handler.setLevel(level)
16
16
  logger.addHandler(handler)
17
17
  logger.setLevel(logging.DEBUG)
18
+ logger.propagate = False