Skip to content

Commit 4e4cdbf

Browse files
authored
create assets if it doesn't exist (#53)
1 parent 14dc495 commit 4e4cdbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/data_designer/config/default_model_settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from .models import InferenceParameters, ModelConfig, ModelProvider
1111
from .utils.constants import (
12+
MANAGED_ASSETS_PATH,
1213
MODEL_CONFIGS_FILE_PATH,
1314
MODEL_PROVIDERS_FILE_PATH,
1415
PREDEFINED_PROVIDERS,
@@ -109,6 +110,10 @@ def resolve_seed_default_model_settings() -> None:
109110
MODEL_PROVIDERS_FILE_PATH, {"providers": [p.model_dump() for p in get_builtin_model_providers()]}
110111
)
111112

113+
if not MANAGED_ASSETS_PATH.exists():
114+
logger.debug(f"🏗️ Default managed assets path was not found, so creating it at {str(MANAGED_ASSETS_PATH)!r}")
115+
MANAGED_ASSETS_PATH.mkdir(parents=True, exist_ok=True)
116+
112117

113118
@lru_cache(maxsize=1)
114119
def _get_default_providers_file_content(file_path: Path) -> dict[str, Any]:

0 commit comments

Comments
 (0)