由于我的 AWS 账户的限制,我需要为 GroundTruth 标记作业手动创建标记作业 list 文件。然而, list 文件无法解析,即使该文件似乎符合 JSONL 标准 - https://jsonlines.org/
'The S3 Input location is verified as accessible by your IAM execution role. However, there was an issue parsing your input manifest file. Do the following: Check that your input manifest follows JSON Lines format. Update your input manifest file and try your request again.'
我正在使用以下 python 代码生成 JSONL 文件
items = [{"source-ref": "s3://bucket/file3.jpg"},
{"source-ref": "s3://bucket/file2.jpg"},
{"source-ref": "s3://bucket/file1.jpg"}]
import json
with open('labeling-job.jsonl', 'w', encoding='utf8') as outfile:
for entry in items:
json.dump(entry, outfile, ensure_ascii=False)
outfile.write('\r\n')
有人可以指出我在这里做错了什么吗?
最佳答案
回答我的问题比较晚。问题出在我帐户中的角色策略限制,与我上面的代码片段创建的 jsonl 无关。不用说,来自 AWS 的异常消息确实具有误导性,而且一点帮助也没有。
关于amazon-web-services - 无法解析自定义 AWS Ground Truth 标记作业 list JSONL 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67549598/