From 7dd4df3b06091c4c594a980500111c94ad468264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mr=C3=A1zek?= Date: Wed, 24 Aug 2022 15:20:42 +0200 Subject: [PATCH] fix: allow empty network for jobs --- src/wanna/core/deployment/models.py | 2 +- src/wanna/core/models/gcp_profile.py | 2 +- src/wanna/core/services/base.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wanna/core/deployment/models.py b/src/wanna/core/deployment/models.py index 2e23906..2e4a1fb 100644 --- a/src/wanna/core/deployment/models.py +++ b/src/wanna/core/deployment/models.py @@ -90,7 +90,7 @@ class JobResource(GCPResource, Generic[JOB]): job_payload: Dict[str, Any] image_refs: List[str] = [] tensorboard: Optional[str] - network: str + network: Optional[str] job_config: JOB encryption_spec_key_name: Optional[str] diff --git a/src/wanna/core/models/gcp_profile.py b/src/wanna/core/models/gcp_profile.py index bb14790..e0f0307 100644 --- a/src/wanna/core/models/gcp_profile.py +++ b/src/wanna/core/models/gcp_profile.py @@ -14,7 +14,7 @@ class GCPProfileModel(BaseModel, extra=Extra.forbid): labels: Optional[Dict[str, str]] bucket: str service_account: Optional[str] - network: str = "default" + network: Optional[str] subnet: Optional[str] kms_key: Optional[str] docker_repository: str = "wanna" diff --git a/src/wanna/core/services/base.py b/src/wanna/core/services/base.py index c991abf..ad91d48 100644 --- a/src/wanna/core/services/base.py +++ b/src/wanna/core/services/base.py @@ -145,7 +145,7 @@ def _get_resource_network( project_id: str, push_mode: PushMode, resource_network: Optional[str], - fallback_project_network: str, + fallback_project_network: Optional[str], use_project_number: bool = True, ): resource_network = resource_network if resource_network else fallback_project_network