comp用来向类似s3的对象存储系统读写模型结果的一个小包。
s3like的Python项目详细描述
S3like
comp用来向类似s3的对象存储系统读写模型结果的一个小包。这意味着这个包与DigitalOceanSpaces和AWSS3兼容,因为DoSpaces使用与AWSS3相同的API。
设置:
pip install s3like exportOBJ_STORAGE_ACCESS=... exportOBJ_STORAGE_SECRET=... exportOBJ_STORAGE_ENDPOINT=... exportOBJ_STORAGE_EDGE=... exportOBJ_STORAGE_BUCKET=...
使用:
imports3like# run_model returns data that is compliant with the COMP outputs api.local_result,task_id=run_model(**kwargs)remote_result=s3like.write_to_s3like(task_id,local_result)round_trip=s3like.read_from_s3like(remote_result)assertlocal_result==round_trip
测试:
py.test -v