无法使用我创建的 s3 存储桶中的 sagemaker_session.upload_data 上传数据,它存储在默认的 s3 存储桶中

Unable to upload data using sagemaker_session.upload_data in s3 bucket that I created, it is getting stored in default s3 bucket

所以我正在尝试 iris 来熟悉 was sagemaker 我正在学习 link. I have created a bucket named "tf-practise-iris-data" and gave the IAM role of Sagemaker access to the s3 bucket as mentioned in the tutorial. I also tried creating a new bucket with a different name thinking there might be some problem with a bucket but still it is having the same issue, this is the snippet of my code 中的简单教程。而且我已经关闭了阻止来自存储桶的所有 public 访问,但仍然没有。

解决了!!!!!!!!!!!!!

prefix = "checking-with-new-bucket"
training_input_path = sagemaker_session.upload_data('train.csv', bucket = 'checking-with-new-bucket',key_prefix = prefix + "/training")
training_input_path

输出为

's3://checking-with-new-bucket/checking-with-new-bucket/training/train.csv'