in comprehend_groundtruth_integration/src/comprehend_customer_scripts/GroundTruth/DocumentClassifier/groundtruth_format_conversion_handler.py [0:0]
def validate_s3_input(self, args):
dataset_output_S3Uri = args.dataset_output_S3Uri
dataset_url = urlparse(dataset_output_S3Uri)
dataset_scheme = dataset_url.scheme
self.dataset_filename = dataset_url.path.split("/")[-1]
print(self.dataset_filename)
if dataset_scheme != "s3" or self.dataset_filename.split(".")[-1] != "csv":
raise Exception("Either of the output S3 lo cation provided is incorrect!")