amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

[Bug Report]Issue related to Pipeline, unable to create the pipeline

Open pc0303 opened this issue 2 years ago • 4 comments

Link to the notebook https://github.com/aws/amazon-sagemaker-examples/blob/main/end_to_end/nlp_mlops_company_sentiment/nlp_company_earnings_analysis_pipeline.ipynb

Describe the bug Unable to create and start the pipeline, when runing pipeline.upsert(role_arn=role) , reported KeyError: 'HFSECFinBertDeployModel' , then I tried the following code to Examine the JSON pipeline definition to ensure that it's well-formed:

 import json
 json.loads(pipeline.definition())

the result appears same key error.

pls help.

pc0303 avatar Jun 17 '22 09:06 pc0303

I am having the same error.

usik avatar Jun 22 '22 05:06 usik

i am having the same error

DearAmber avatar Sep 08 '22 07:09 DearAmber

Hello, is there any update on this one?

DearAmber avatar Sep 10 '22 10:09 DearAmber

Solved it.

I made the following changes: 1, Change the deploy_condition_step to the following deploy_condition_step = ConditionStep( name="HFSECFinBertDeployConditionCheck", conditions=[ sentiment_condition_eq, summary_condition_eq, ], # the equal to conditions defined above if_steps=[ summarize_step_2, sentiment_step_2 ], # if the condition evaluates to true then run the summarization step else_steps=[], # there are no else steps so we will keep it empty )

2, change the condition_step to the following: condition_step = ConditionStep( name="HFSECFinBertConditionCheck", conditions=[condition_eq], # the parameter is Y if_steps=[ create_sentiment_model_step, register_sentiment_model_step, sentiment_deploy_step, create_summary_model_step, register_summary_model_step, summary_deploy_step, ], # if the condition evaluates to true then create model, register, and deploy else_steps=[summarize_step_1,sentiment_step_1], depends_on=["HFSECFinBertCreateDataset"], )

3, change the final pipeline to the following: pipeline_name = "FinbertSECDeploymentPipeline" pipeline = Pipeline( name=pipeline_name, parameters=[ processing_instance_type, processing_instance_count, model_register_deploy, inference_ticker_cik, inference_input_data, ], steps=[ create_dataset_step, condition_step, deploy_condition_step, ], )

After that it should run like a flow!

DearAmber avatar Sep 13 '22 05:09 DearAmber