Skip to content

Commit f355a0d

Browse files
refactor: clean up check_deployments.py output
1 parent 3be2b01 commit f355a0d

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/backend/common/utils/check_deployments.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from v3.common.services.foundry_service import FoundryService
1212
except ImportError as e:
1313
print(f"❌ Import error: {e}")
14-
print("Make sure you're running this from the correct directory with the virtual environment activated.")
1514
sys.exit(1)
1615

1716
async def check_deployments():
@@ -20,39 +19,28 @@ async def check_deployments():
2019
foundry_service = FoundryService()
2120
deployments = await foundry_service.list_model_deployments()
2221

23-
print("\n📋 Raw deployments found:")
24-
for i, deployment in enumerate(deployments, 1):
25-
name = deployment.get('name', 'Unknown')
26-
status = deployment.get('status', 'Unknown')
27-
model_name = deployment.get('model', {}).get('name', 'Unknown')
28-
print(f" {i}. Name: {name}, Status: {status}, Model: {model_name}")
29-
30-
print(f"\n✅ Total deployments: {len(deployments)}")
31-
3222
# Filter successful deployments
3323
successful_deployments = [
3424
d for d in deployments
3525
if d.get('status') == 'Succeeded'
3626
]
3727

38-
print(f"✅ Successful deployments: {len(successful_deployments)}")
28+
print(f"✅ Total deployments: {len(deployments)} (Successful: {len(successful_deployments)})")
3929

4030
available_models = [
4131
d.get('name', '').lower()
4232
for d in successful_deployments
4333
]
4434

45-
print(f"\n🎯 Available model names (lowercase): {available_models}")
46-
4735
# Check what we're looking for
4836
required_models = ['gpt-4o', 'o3', 'gpt-4', 'gpt-35-turbo']
49-
print(f"\n🔍 Checking for required models: {required_models}")
5037

38+
print(f"\n🔍 Checking required models:")
5139
for model in required_models:
5240
if model.lower() in available_models:
5341
print(f'✅ {model} is available')
5442
else:
55-
print(f'❌ {model} is NOT found in available models')
43+
print(f'❌ {model} is NOT available')
5644

5745
except Exception as e:
5846
print(f'❌ Error: {e}')

0 commit comments

Comments
 (0)