@@ -36,6 +36,18 @@ class ModelDeploymentRuntime(Builder):
3636 The output stream ids of model deployment.
3737 model_uri: str
3838 The model uri of model deployment.
39+ bucket_uri: str
40+ The OCI Object Storage URI where large size model artifacts will be copied to.
41+ auth: Dict
42+ The default authentication is set using `ads.set_auth` API.
43+ region: str
44+ The destination Object Storage bucket region.
45+ overwrite_existing_artifact: bool
46+ Whether overwrite existing target bucket artifact or not.
47+ remove_existing_artifact: bool
48+ Whether artifacts uploaded to object storage bucket need to be removed or not.
49+ timeout: int
50+ The connection timeout in seconds for the client.
3951
4052 Methods
4153 -------
@@ -49,6 +61,18 @@ class ModelDeploymentRuntime(Builder):
4961 Sets the output stream ids of model deployment
5062 with_model_uri(model_uri)
5163 Sets the model uri of model deployment
64+ with_bucket_uri(bucket_uri)
65+ Sets the bucket uri when uploading large size model.
66+ with_auth(auth)
67+ Sets the default authentication when uploading large size model.
68+ with_region(region)
69+ Sets the region when uploading large size model.
70+ with_overwrite_existing_artifact(overwrite_existing_artifact)
71+ Sets whether to overwrite existing artifact when uploading large size model.
72+ with_remove_existing_artifact(remove_existing_artifact)
73+ Sets whether to remove existing artifact when uploading large size model.
74+ with_timeout(timeout)
75+ Sets the connection timeout when uploading large size model.
5276 """
5377
5478 CONST_MODEL_ID = "modelId"
@@ -60,6 +84,12 @@ class ModelDeploymentRuntime(Builder):
6084 CONST_INPUT_STREAM_IDS = "inputStreamIds"
6185 CONST_OUTPUT_STREAM_IDS = "outputStreamIds"
6286 CONST_ENVIRONMENT_CONFIG_DETAILS = "environmentConfigurationDetails"
87+ CONST_BUCKET_URI = "bucketUri"
88+ CONST_AUTH = "auth"
89+ CONST_REGION = "region"
90+ CONST_OVERWRITE_EXISTING_ARTIFACT = "overwriteExistingArtifact"
91+ CONST_REMOVE_EXISTING_ARTIFACT = "removeExistingArtifact"
92+ CONST_TIMEOUT = "timeout"
6393
6494 attribute_map = {
6595 CONST_ENV : "env" ,
@@ -68,6 +98,12 @@ class ModelDeploymentRuntime(Builder):
6898 CONST_OUTPUT_STREAM_IDS : "output_stream_ids" ,
6999 CONST_DEPLOYMENT_MODE : "deployment_mode" ,
70100 CONST_MODEL_URI : "model_uri" ,
101+ CONST_BUCKET_URI : "bucket_uri" ,
102+ CONST_AUTH : "auth" ,
103+ CONST_REGION : "region" ,
104+ CONST_OVERWRITE_EXISTING_ARTIFACT : "overwrite_existing_artifact" ,
105+ CONST_REMOVE_EXISTING_ARTIFACT : "remove_existing_artifact" ,
106+ CONST_TIMEOUT : "timeout"
71107 }
72108
73109 ENVIRONMENT_CONFIG_DETAILS_PATH = (
@@ -236,7 +272,172 @@ def with_model_uri(self, model_uri: str) -> "ModelDeploymentRuntime":
236272 The ModelDeploymentRuntime instance (self).
237273 """
238274 return self .set_spec (self .CONST_MODEL_URI , model_uri )
275+
276+ @property
277+ def bucket_uri (self ) -> str :
278+ """The bucket uri of model.
279+
280+ Returns
281+ -------
282+ str
283+ The bucket uri of model.
284+ """
285+ return self .get_spec (self .CONST_BUCKET_URI , None )
286+
287+ def with_bucket_uri (self , bucket_uri : str ) -> "ModelDeploymentRuntime" :
288+ """Sets the bucket uri of model.
289+
290+ Parameters
291+ ----------
292+ bucket_uri: str
293+ The bucket uri of model.
294+
295+ Returns
296+ -------
297+ ModelDeploymentRuntime
298+ The ModelDeploymentRuntime instance (self).
299+ """
300+ return self .set_spec (self .CONST_BUCKET_URI , bucket_uri )
301+
302+ @property
303+ def auth (self ) -> Dict :
304+ """The auth when uploading large-size model.
305+
306+ Returns
307+ -------
308+ Dict
309+ The auth when uploading large-size model.
310+ """
311+ return self .get_spec (self .CONST_AUTH , {})
312+
313+ def with_auth (self , auth : Dict ) -> "ModelDeploymentRuntime" :
314+ """Sets the auth when uploading large-size model.
315+
316+ Parameters
317+ ----------
318+ auth: Dict
319+ The auth when uploading large-size model.
320+
321+ Returns
322+ -------
323+ ModelDeploymentRuntime
324+ The ModelDeploymentRuntime instance (self).
325+ """
326+ return self .set_spec (self .CONST_AUTH , auth )
327+
328+ @property
329+ def region (self ) -> str :
330+ """The region when uploading large-size model.
239331
332+ Returns
333+ -------
334+ str
335+ The region when uploading large-size model.
336+ """
337+ return self .get_spec (self .CONST_REGION , None )
338+
339+ def with_region (self , region : str ) -> "ModelDeploymentRuntime" :
340+ """Sets the region when uploading large-size model.
341+
342+ Parameters
343+ ----------
344+ region: str
345+ The region when uploading large-size model.
346+
347+ Returns
348+ -------
349+ ModelDeploymentRuntime
350+ The ModelDeploymentRuntime instance (self).
351+ """
352+ return self .set_spec (self .CONST_REGION , region )
353+
354+ @property
355+ def overwrite_existing_artifact (self ) -> bool :
356+ """Overwrite existing artifact when uploading large size model.
357+
358+ Returns
359+ -------
360+ bool
361+ Overwrite existing artifact when uploading large size model.
362+ """
363+ return self .get_spec (self .CONST_OVERWRITE_EXISTING_ARTIFACT , True )
364+
365+ def with_overwrite_existing_artifact (
366+ self ,
367+ overwrite_existing_artifact : bool
368+ ) -> "ModelDeploymentRuntime" :
369+ """Sets whether to overwrite existing artifact when uploading large size model.
370+
371+ Parameters
372+ ----------
373+ overwrite_existing_artifact: bool
374+ Overwrite existing artifact when uploading large size model.
375+
376+ Returns
377+ -------
378+ ModelDeploymentRuntime
379+ The ModelDeploymentRuntime instance (self).
380+ """
381+ return self .set_spec (
382+ self .CONST_OVERWRITE_EXISTING_ARTIFACT ,
383+ overwrite_existing_artifact
384+ )
385+
386+ @property
387+ def remove_existing_artifact (self ) -> bool :
388+ """Remove existing artifact when uploading large size model.
389+
390+ Returns
391+ -------
392+ bool
393+ Remove existing artifact when uploading large size model.
394+ """
395+ return self .get_spec (self .CONST_REMOVE_EXISTING_ARTIFACT , True )
396+
397+ def with_remove_existing_artifact (
398+ self ,
399+ remove_existing_artifact : bool
400+ ) -> "ModelDeploymentRuntime" :
401+ """Sets whether to remove existing artifact when uploading large size model.
402+
403+ Parameters
404+ ----------
405+ remove_existing_artifact: bool
406+ Remove existing artifact when uploading large size model.
407+
408+ Returns
409+ -------
410+ ModelDeploymentRuntime
411+ The ModelDeploymentRuntime instance (self).
412+ """
413+ return self .set_spec (self .CONST_REMOVE_EXISTING_ARTIFACT , remove_existing_artifact )
414+
415+ @property
416+ def timeout (self ) -> int :
417+ """The timeout when uploading large-size model.
418+
419+ Returns
420+ -------
421+ int
422+ The timeout when uploading large-size model.
423+ """
424+ return self .get_spec (self .CONST_TIMEOUT , None )
425+
426+ def with_timeout (self , timeout : int ) -> "ModelDeploymentRuntime" :
427+ """Sets the timeout when uploading large-size model.
428+
429+ Parameters
430+ ----------
431+ timeout: int
432+ The timeout when uploading large-size model.
433+
434+ Returns
435+ -------
436+ ModelDeploymentRuntime
437+ The ModelDeploymentRuntime instance (self).
438+ """
439+ return self .set_spec (self .CONST_TIMEOUT , timeout )
440+
240441 def init (self ) -> "ModelDeploymentRuntime" :
241442 """Initializes a starter specification for the runtime.
242443
0 commit comments