|
4 | 4 |
|
5 | 5 | import json
|
6 | 6 | import shlex
|
| 7 | +import threading |
7 | 8 | from datetime import datetime, timedelta
|
8 | 9 | from typing import Dict, List, Optional
|
9 | 10 |
|
|
53 | 54 | from ads.aqua.modeldeployment.config_loader import (
|
54 | 55 | AquaDeploymentConfig,
|
55 | 56 | ConfigurationItem,
|
56 |
| - ModelDeploymentConfigSummary |
| 57 | + ModelDeploymentConfigSummary, |
57 | 58 | )
|
58 | 59 | from ads.aqua.modeldeployment.constants import DEFAULT_POLL_INTERVAL, DEFAULT_WAIT_TIME
|
59 | 60 | from ads.aqua.modeldeployment.entities import (
|
|
64 | 65 | )
|
65 | 66 | from ads.aqua.modeldeployment.model_group_config import ModelGroupConfig
|
66 | 67 | from ads.aqua.modeldeployment.utils import MultiModelDeploymentConfigLoader
|
67 |
| -from ads.common.decorator.threaded import thread_pool |
68 | 68 | from ads.common.object_storage_details import ObjectStorageDetails
|
69 | 69 | from ads.common.utils import UNKNOWN, get_log_links
|
70 | 70 | from ads.common.work_request import DataScienceWorkRequest
|
@@ -730,13 +730,17 @@ def _create_deployment(
|
730 | 730 | f"Aqua model deployment {deployment_id} created for model {aqua_model_id}. Work request Id is {deployment.dsc_model_deployment.workflow_req_id}"
|
731 | 731 | )
|
732 | 732 |
|
733 |
| - thread_pool.submit( |
734 |
| - self.get_deployment_status, |
735 |
| - deployment_id, |
736 |
| - deployment.dsc_model_deployment.workflow_req_id, |
737 |
| - model_type, |
738 |
| - model_name, |
| 733 | + progress_thread = threading.Thread( |
| 734 | + target=self.get_deployment_status, |
| 735 | + args=( |
| 736 | + deployment_id, |
| 737 | + deployment.dsc_model_deployment.workflow_req_id, |
| 738 | + model_type, |
| 739 | + model_name, |
| 740 | + ), |
| 741 | + daemon=True, |
739 | 742 | )
|
| 743 | + progress_thread.start() |
740 | 744 |
|
741 | 745 | # we arbitrarily choose last 8 characters of OCID to identify MD in telemetry
|
742 | 746 | telemetry_kwargs = {"ocid": get_ocid_substring(deployment_id, key_len=8)}
|
|
0 commit comments