skip to Main Content

How to pass region to the SKLearnProcessor – botocore.exceptions.NoRegionError: You must specify a region – Amazon web services

I'm using the following code to do a sklearn transformation job in sagemaker: region = boto3.session.Session().region_name role = sagemaker.get_execution_role() sklearn_processor = SKLearnProcessor( framework_version="1.0-1", role=role, instance_type="ml.m5.xlarge", instance_count=1, # sagemaker_session = Session() ) out_path = os.path.join(bucket, prefix, f'test_transform/data.csv') sklearn_processor.run( code="preprocess.py", inputs =…

VIEW QUESTION
Back To Top
Search