File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
patterns/pattern-3/src/classification_function Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 1- 0.4.0-rc7
1+ 0.4.0-rc8
Original file line number Diff line number Diff line change @@ -115,18 +115,15 @@ def handler(event, context):
115115 total_pages = len (document .pages )
116116 metrics .put_metric ("ClassificationRequestsTotal" , total_pages )
117117
118- # Load configuration and update with SageMaker endpoint name
118+ # Load configuration - SageMaker endpoint is read from environment variable
119119 config = get_config (as_model = True )
120- config_with_endpoint = config .to_dict (
121- sagemaker_endpoint_name = os .environ ["SAGEMAKER_ENDPOINT_NAME" ]
122- )
123120
124121 # Initialize classification service with SageMaker backend and DynamoDB caching
125122 cache_table = os .environ .get ("TRACKING_TABLE" )
126123 service = classification .ClassificationService (
127124 region = region ,
128125 max_workers = MAX_WORKERS ,
129- config = config_with_endpoint ,
126+ config = config ,
130127 backend = "sagemaker" ,
131128 cache_table = cache_table ,
132129 )
You can’t perform that action at this time.
0 commit comments