Skip to content

Commit

Permalink
Merge pull request #138 from microsoft/fix-devops-workflow
Browse files Browse the repository at this point in the history
Fixing archai/devops workflow
  • Loading branch information
luisffranca authored Jan 6, 2023
2 parents 176a233 + 81d398a commit 505406e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions devops/azure/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ def run_model(name, snpe_root, dataset, conn_string, use_device, benchmark_only,

if not converted and onnx_model_found:
model = convert(name, entity, long_name, onnx_model)
if model == 'error':
return
elif converted:
model_found, long_name, model = download_model(name, snpe_model_dir, conn_string, 'model.dlc')
if not model_found:
Expand Down Expand Up @@ -558,10 +560,11 @@ def find_work_prioritized(use_device, benchmark_only, subset_list, no_quantizati
log(f"# skipping {name} because something went wrong on previous step.")
continue
if not is_complete(entity, 'macs') or not is_true(entity, 'quantized'):
if not no_quantization:
continue
if quantizing:
log(f"skip {name} for now until other quantization finishes on our node")
if no_quantization:
log(f"No quantization work is done on this node. Skip {name} for now until other node works on it.")
else:
log(f"skip {name} for now until other quantization finishes on our node")
continue
priority = 20
elif use_device and (total_benchmark_runs < MAX_BENCHMARK_RUNS):
Expand Down
6 changes: 3 additions & 3 deletions devops/azure/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import platform
from azure.storage.blob import BlobClient, ContainerClient
from status import get_status, merge_status_entity, get_all_status_entities, get_utc_date
from status import get_status, update_status_entity, get_all_status_entities, get_utc_date
from reset import reset_metrics
from delete import delete_blobs

Expand Down Expand Up @@ -74,7 +74,7 @@ def upload(model, name, priority=None, benchmark_only=False, use_pillow=False):

e['status'] = 'uploading'
e['node'] = get_node_id() # lock the row until upload complete
merge_status_entity(e)
update_status_entity(e)
try:
upload_blob(name, model)
# remove any cached dlc files since they need to be redone now.
Expand All @@ -95,7 +95,7 @@ def upload(model, name, priority=None, benchmark_only=False, use_pillow=False):
if use_pillow:
e['use_pillow'] = 1 if use_pillow else 0

merge_status_entity(e)
update_status_entity(e)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion devops/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sphinx==4.5.0
scipy==1.5.4
matplotlib==3.3.4
scikit-image==0.19.3
scikit-image==0.17.2
pyyaml==6.0
numpy
onnx==1.11.0
Expand Down

0 comments on commit 505406e

Please sign in to comment.