This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws stepfunctions start-execution \ | |
- state-machine-arn {CrossValidatorStateMachineArn} \ | |
- input file://my_input.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
bucket, prefix = 'my_bucket', 'datasets/dogs_vs_cats' | |
paginator = boto3.client('s3').get_paginator('list_objects') | |
with open('manifest.jsonl', 'w') as f: | |
for page in paginator.paginate(Bucket=bucket, Prefix=prefix): | |
for obj in page['Contents']: | |
lbl = 0 if 'dog.' in obj['Key'] else 1 | |
f.write('{{"source-ref":"s3://{}/{}", "class":"{}"}}\n'\ | |
.format(bucket, obj['Key'], lbl)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat train.csv | sed 's/ /_/g' | sed 's/,/ /g' | awk '{print $1}' | grep "$1" | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
panorama-cli add-panorama-package --type camera --name camera_input | |
panorama-cli add-panorama-package --type data_sink --name display_output | |
panorama-cli create-package --type Container --name application_logic | |
panorama-cli create-package --type Model --name yolox_s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "code_node", | |
"interface": "123456789012::application_logic.interface" | |
}, | |
{ | |
"name": "model_node", | |
"interface": "123456789012::yolox_s.interface" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "detection_threshold", | |
"interface": "float32", | |
"value": 20.0, | |
"overridable": true, | |
"decorator": { | |
"title": "Threshold", | |
"description": "The minimum confidence percentage for a positive classification." | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"edges": [ | |
{ | |
"producer": "camera_node.video_out", | |
"consumer": "code_node.video_in" | |
}, | |
{ | |
"producer": "code_node.video_out", | |
"consumer": "display_node.video_in" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --output text --query 'Account') | |
panorama-cli add-raw-model \ | |
--model-asset-name yolox_s_asset \ | |
--model-local-path [model_archive_path]/yolox_s_torchscript.tar.gz \ | |
--descriptor-path packages/${AWS_ACCOUNT_ID}-yolox_s-1.0/descriptor.json \ | |
--packages-path packages/${AWS_ACCOUNT_ID}-yolox_s-1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "model_node", | |
"interface": "<AWS_ACCOUNT_ID>::yolox_s.interface", | |
"overridable": false, | |
"launch": "onAppStart" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodePackage": { | |
... | |
"interfaces": [ | |
{ | |
"name": "interface", | |
"category": "ml_model", | |
"asset": "yolox_s_asset", | |
... | |
} |