@@ -89,100 +89,4 @@ jobs:
8989 run : |
9090 python Guardian_pipeline_github.py
9191
92- deploy-model :
93- runs-on : [self-hosted, Linux, X64, guardian, gpu]
94- needs : run-pipeline
95- if : success()
96- timeout-minutes : 30
97- steps :
98- - name : Check out code
99- uses : actions/checkout@v4
100-
101- - name : Set up Python
102- uses : actions/setup-python@v5
103- with :
104- python-version : ' 3.11'
105-
106- - name : Install dependencies
107- run : |
108- python -m pip install --upgrade pip
109- pip install clearml
110-
111- - name : Check deployment status
112- env :
113- CLEARML_API_ACCESS_KEY : ${{ secrets.CLEARML_API_ACCESS_KEY }}
114- CLEARML_API_SECRET_KEY : ${{ secrets.CLEARML_API_SECRET_KEY }}
115- CLEARML_API_HOST : ${{ secrets.CLEARML_API_HOST }}
116- run : |
117- echo "🚀 Checking model deployment status..."
118-
119- python3 << 'EOF'
120- from clearml import Model
121- import sys
122-
123- try:
124- print('🔍 Searching for deployed models...')
125-
126- # First check for any published models
127- all_models = Model.query_models(
128- project_name='Guardian_Training',
129- model_name='BiLSTM_ActionRecognition',
130- only_published=True,
131- max_results=5,
132- order_by=['-created']
133- )
134-
135- print(f'📋 Found {len(all_models)} published models')
136-
137- deployed_model = None
138- for model in all_models:
139- print(f' Model ID: {model.id}')
140- print(f' Created: {model.created}')
141- print(f' Tags: {model.tags}')
142-
143- # Check if this model has deployment tags
144- if model.tags and any(tag in ['deployed', 'production'] for tag in model.tags):
145- deployed_model = model
146- break
147-
148- if deployed_model:
149- print(f'✅ Found deployed model!')
150- print(f'🏷️ Model ID: {deployed_model.id}')
151- print(f'📅 Created: {deployed_model.created}')
152- print(f'🏷️ Tags: {deployed_model.tags}')
153-
154- # Try to get model metadata
155- try:
156- design = deployed_model.get_model_design()
157- if design and 'test_accuracy' in design:
158- accuracy = design['test_accuracy']
159- print(f'📊 Test Accuracy: {accuracy:.2f}%')
160- else:
161- print('📊 Test Accuracy: Not available in model metadata')
162- except Exception as e:
163- print(f'⚠️ Could not get model design: {e}')
164- else:
165- print('❌ No deployed models found')
166- if all_models:
167- print('⚠️ Found published models but none are marked as deployed')
168- latest = all_models[0]
169- print(f' Latest model: {latest.id}')
170- print(f' Created: {latest.created}')
171- else:
172- print('❌ No published models found at all')
173- sys.exit(1)
174-
175- except Exception as e:
176- print(f'❌ Error checking deployment: {e}')
177- import traceback
178- traceback.print_exc()
179- sys.exit(1)
180- EOF
181-
182- - name : Notify deployment success
183- if : success()
184- run : |
185- echo "🎉 Guardian AI Pipeline completed successfully!"
186- echo "✅ Model training, optimization, evaluation, and deployment finished"
187- echo "📈 Check ClearML dashboard for detailed results and metrics"
188-
92+
0 commit comments