From e41f427e4dd9f39715b8eee107d859a85f635954 Mon Sep 17 00:00:00 2001 From: Linneeeeeeee Date: Thu, 16 May 2024 01:47:40 +0000 Subject: [PATCH] Dev --- state_machine/S3ObjectCreatedImages.json | 100 ++++++++++++++++++++++- 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/state_machine/S3ObjectCreatedImages.json b/state_machine/S3ObjectCreatedImages.json index e8833f8..ccfb0ca 100644 --- a/state_machine/S3ObjectCreatedImages.json +++ b/state_machine/S3ObjectCreatedImages.json @@ -976,11 +976,107 @@ "States": { "PassDetectModerationLabels": { "Type": "Pass", - "End": true + "End": true, + "Parameters": { + "moderation_model_version.$": "$.ModerationModelVersion", + "project_version.$": "$.ProjectVersion" + } + } + } + }, + { + "StartAt": "MapDetectModerationLabelsContentTypes", + "States": { + "MapDetectModerationLabelsContentTypes": { + "Type": "Map", + "ItemProcessor": { + "ProcessorConfig": { + "Mode": "INLINE" + }, + "StartAt": "PassDetectModerationLabelsContentTypes", + "States": { + "PassDetectModerationLabelsContentTypes": { + "Type": "Pass", + "End": true + } + } + }, + "End": true, + "ItemsPath": "$.ContentTypes", + "ItemSelector": { + "confidence.$": "$$.Map.Item.Value.Confidence", + "name.$": "$$.Map.Item.Value.Name" + } + } + } + }, + { + "StartAt": "ParallelDetectModerationLabelsHumanLoopActivationOutput", + "States": { + "ParallelDetectModerationLabelsHumanLoopActivationOutput": { + "Type": "Parallel", + "End": true, + "Branches": [ + { + "StartAt": "PassDetectModerationLabelsHumanLoopActivationOutput", + "States": { + "PassDetectModerationLabelsHumanLoopActivationOutput": { + "Type": "Pass", + "End": true, + "Parameters": { + "human_loop_activation_conditions_evaluation_results.$": "$.HumanLoopActivationConditionsEvaluationResults", + "human_loop_activation_reasons.$": "$.HumanLoopActivationReasons", + "human_loop_arn.$": "$.HumanLoopArn" + } + } + } + } + ], + "InputPath": "$.HumanLoopActivationOutput", + "ResultSelector": { + "human_loop_activation_conditions_evaluation_results.$": "$[0].human_loop_activation_conditions_evaluation_results", + "human_loop_activation_reasons.$": "$[0].human_loop_activation_reasons", + "human_loop_arn.$": "$[0].human_loop_arn" + } + } + } + }, + { + "StartAt": "MapDetectModerationLabelsModerationLabels", + "States": { + "MapDetectModerationLabelsModerationLabels": { + "Type": "Map", + "ItemProcessor": { + "ProcessorConfig": { + "Mode": "INLINE" + }, + "StartAt": "PassDetectModerationLabelsModerationLabels", + "States": { + "PassDetectModerationLabelsModerationLabels": { + "Type": "Pass", + "End": true + } + } + }, + "End": true, + "ItemsPath": "$.ModerationLabels", + "ItemSelector": { + "confidence.$": "$$.Map.Item.Value.Confidence", + "name": "$$.Map.Item.Value.Name", + "parent_name": "$$.Map.Item.Value.ParentName", + "taxonomy_level": "$$.Map.Item.Value.TaxonomyLevel" + } } } } - ] + ], + "ResultSelector": { + "content_types.$": "$[1]", + "human_loop_activation_output.$": "$[2]", + "moderation_labels.$": "$[3]", + "moderation_model_version.$": "$[0].moderation_model_version", + "project_version.$": "$[0].project_version" + } } } },