Skip to content

Commit

Permalink
Unfinished sample pipeline for debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
dstnluong committed Jul 10, 2020
1 parent b3d302c commit a94f809
Showing 1 changed file with 15 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,34 @@

sagemaker_train_op = components.load_component_from_file(components_dir + '/train/component.yaml')

collection_config_1 = {
"collection_name_1" : {
"include_regex": ".*"
}
}
collection_config_2 = {
"collection_name_2" : {
"include_regex": ".*"
"gradients" : {
"save_interval": "500"
}
}

debugger_hook_config = {
"S3OutputPath":"s3://path/for/data/emission",
"S3OutputPath":"s3://dusluong-bucket0/emission",
"LocalPath":"/opt/ml/output/tensors",
"HookParameters": {
"save_interval": "10"
}
}

DebugRuleConfigurations=[
{
"RuleConfigurationName": "VGRule",
"InstanceType": "ml.t3.medium",
"VolumeSizeInGB": 30,
"RuleEvaluatorImage": "864354269164.dkr.ecr.us-east-1.amazonaws.com/sagemaker-debugger-rule-evaluator:latest",
"RuleParameters": {
"source_s3_uri": "s3://path/to/vanishing_gradient_rule.py",
"rule_to_invoke": "VanishingGradient",
"threshold": "20.0"
}
}
]
rule_1={
"RuleConfigurationName": "Amazon-VanishingGradient",
"RuleEvaluatorImage": "503895931360.dkr.ecr.us-east-1.amazonaws.com/sagemaker-debugger-rules:latest",
"RuleParameters": {
"rule_to_invoke": "VanishingGradient",
"threshold": "20.0"
}
}
DebugRuleConfigurations=[rule_1]

collection_list = {}


for collection in [collection_config_1, collection_config_2]:
for collection in [collection_config_2]:
for key, val in collection.items():
collection_list[key] = val

Expand All @@ -74,7 +65,7 @@
}

channelObj['ChannelName'] = 'train'
channelObj['DataSource']['S3DataSource']['S3Uri'] = 's3://kubeflow-pipeline-data/mnist_kmeans_example/data'
channelObj['DataSource']['S3DataSource']['S3Uri'] = 's3://dusluong-bucket0/mnist_kmeans_example/training-data'
channelObjList.append(copy.deepcopy(channelObj))


Expand All @@ -93,7 +84,7 @@ def training(
instance_count=1,
volume_size=50,
max_run_time=3600,
model_artifact_path='s3://kubeflow-pipeline-data/mnist_kmeans_example/data',
model_artifact_path='s3://dusluong-bucket0/mnist_kmeans_example/output/model',
output_encryption_key='',
network_isolation=True,
traffic_encryption=False,
Expand Down

0 comments on commit a94f809

Please sign in to comment.