使用FSx作为数据源的Amazon SageMaker SDK中directory_path应该设置什么值?

0

【以下的问题经过翻译处理】 Amazon SageMaker SDK中的FileSystemInput的directory_path参数应该设置为什么值?

以下是有关我的Amazon FSx for Lustre文件系统的一些信息:

  • 我的FSx ID是fs-0684xxxxxxxxxxx
  • 我的FSx挂载名称为lhskdbmv
  • FSx映射到一个Amazon S3存储桶,其中包含文件(其key中没有额外的前缀)。

我们的测试的过程和结果如下:

尝试1:

fs = FileSystemInput(
    file_system_id='fs-0684xxxxxxxxxxx',
    file_system_type='FSxLustre',
    directory_path='lhskdbmv',
    file_system_access_mode='ro')

结果:

estimator.fit(fs)返回ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: FileSystem DirectoryPath 'lhskdbmv' for channel 'training' is not absolute or normalized. Please ensure you don't have a trailing "/", and/or "..", ".", "//" in the path.

尝试2:

fs = FileSystemInput(
    file_system_id='fs-0684xxxxxxxxxxx',
    file_system_type='FSxLustre',
    directory_path='/',
    file_system_access_mode='ro')

结果:

ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: The directory path for FSx Lustre file system fs-068406952bf758bac is invalid. The directory path must begin with mount name of the file system.

尝试3:

fs = FileSystemInput(
    file_system_id='fs-0684xxxxxxxxxxx',
    file_system_type='FSxLustre',
    directory_path='fsx',
    file_system_access_mode='ro')

结果:

ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: FileSystem DirectoryPath 'fsx' for channel 'training' is not absolute or normalized. Please ensure you don't have a trailing "/", and/or "..", ".", "//" in the path.

profile picture
专家
已提问 8 个月前50 查看次数
1 回答
0

【以下的回答经过翻译处理】 directory_path参数必须指向/mountname/path/to/specific/folder/in-file-system中的特定文件夹的路径。mountname的值会在CreateFileSystem API操作响应中返回。它也会在describe-file-systems AWS命令行接口(AWS CLI)命令和DescribeFileSystems API操作的响应中返回。

对于你的使用情况,响应可能类似于以下内容: mountName = lhskdbmv

profile picture
专家
已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则