Skip to content

Commit 776db1f

Browse files
jayesh-tannaJayesh Tanna
andauthored
skip sleep timer in recording mode (#44446)
Co-authored-by: Jayesh Tanna <[email protected]>
1 parent d1897a7 commit 776db1f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

sdk/ai/azure-ai-projects/tests/finetuning/test_finetuning.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
GLOBAL_STANDARD_TRAINING_TYPE,
1818
DEVELOPER_TIER_TRAINING_TYPE,
1919
)
20-
from devtools_testutils import (
21-
recorded_by_proxy,
22-
RecordedTransport,
23-
is_live
24-
)
20+
from devtools_testutils import recorded_by_proxy, RecordedTransport, is_live
2521
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
2622
from azure.mgmt.cognitiveservices.models import Deployment, DeploymentProperties, DeploymentModel, Sku
2723

@@ -340,10 +336,10 @@ def _test_deploy_and_infer_helper(
340336
deployment_name=deployment_name,
341337
deployment=deployment_config,
342338
)
343-
344-
while deployment_operation.status() not in ["Succeeded", "Failed"]:
345-
time.sleep(30)
346-
print(f"[{test_prefix}] Deployment status: {deployment_operation.status()}")
339+
if is_live():
340+
while deployment_operation.status() not in ["Succeeded", "Failed"]:
341+
time.sleep(30)
342+
print(f"[{test_prefix}] Deployment status: {deployment_operation.status()}")
347343

348344
print(f"[{test_prefix}] Deployment completed successfully")
349345
if is_live():

0 commit comments

Comments
 (0)