将作业输出数据作为Floydhub中另一个作业的输入数据挂载

问题描述 投票:0回答:1

我正在尝试按照文档hereherehere为Floydhub使用作业的输出作为另一个作业的输入数据。第一和第二项工作与2个不同的项目有关。

它无法找到我的文件。

No such file or directory: '/output/lemmatized_json.json'

项目1:

该项目在脚本结束时输出数据。

import os
if not os.path.exists('output'):
    os.makedirs('output')

with open('output/lemmatized_json.json', 'w') as out_file:
    json.dump(data, out_file)    

然后它在/files内部为该项目提供,

enter image description here

/output目录中。

enter image description here

项目2:

现在我运行第二个项目,我想访问以前保存的数据。

我用这个项目运行。

floyd run --cpu2 --env default \
--data me/projects/lemmatize-json-positions/6/:model \
--message 'train embedding' 'python train_embedding.py'

并尝试使用以下代码访问其中的数据。

file = open('/output/lemmatized_json.json') 

但是我得到了上面的错误qazxsw poi。

而且我不确定我错过了什么。

python floydhub
1个回答
0
投票

我只需要,

No such file or directory: 'No such file or directory: '/output/lemmatized_json.json'
© www.soinside.com 2019 - 2024. All rights reserved.