Open niklas-palm opened 2 months ago
A work-around is to uninstall everything and install pydantic==2.7.0 first, then sagemaker-core:
!pip uninstall pydantic sagemaker-core -y
!pip install --upgrade pip -q
!pip install pydantic==2.7.0
!pip install sagemaker-core
The issue is not resolved yet.
Getting same error when trying to create FeatureDefinition and in pyspark processing.
Code 1
from sagemaker_core.shapes import ProcessingInput,ProcessingResources,AppSpecification,ProcessingS3Input
from sagemaker_core.shapes import ProcessingResources,ProcessingClusterConfig
processing_input = ProcessingInput(input_name="code",s3_input = [ProcessingS3Input(
s3_uri="s3://sagemaker-us-east-1-774297356213/sm-spark-2024-08-30-05-25-18-294/input/code/",s3_data_type="S3Prefix")])
Code 2:
from sagemaker_core.shapes import FeatureDefinition
CustomerFeatureDefinitions = [FeatureDefinition(feature_name='customer_id',feature_type='Integral'),
FeatureDefinition(feature_name='city_code',feature_type='Integral'),
FeatureDefinition(feature_name='state_code',feature_type='Integral'),
FeatureDefinition(feature_name='country_code',feature_type='Integral'),
FeatureDefinition(feature_name='EventTime',feature_type='Fractional')]
Error:
TypeError: list_schema() got an unexpected keyword argument 'fail_fast'
Sagemaker core version: 1.0.2
Pydantic 2.7 seems to be required.
When using SageMaker distribution 1.9, I get the following error installing sagemaker-core
Creating a training job, I get:
TypeError: list_schema() got an unexpected keyword argument 'fail_fast'
It seems I must first uninstall pydantic, then re-install pydantic==2.7.0 and then sagemaker-core, to get it working.