little-pizza-78379
02/22/2023, 3:15 AMfrom metaflow import Run
run = Run('DatabaseAndS3Test/229')
print(run.tags)
mycode = Run('DatabaseAndS3Test/229').code
print(mycode.path)
run.code.extract(path='~/_nasHome/tools/restore')
This code gives me an error
AttributeError: ‘MetaflowCode’ object has no attribute ‘extract’
Any ideas on what am I doing wrong?victorious-lawyer-58417
02/22/2023, 5:35 AMtarball
run.code.tarball.extract(path='~/_nasHome/tools/restore')victorious-lawyer-58417
02/22/2023, 5:36 AMlittle-pizza-78379
02/22/2023, 5:21 PMfrom metaflow import Run
run = Run('DatabaseAndS3Test/229')
print(run.tags)
mycode = Run('DatabaseAndS3Test/229').code
print(mycode.path)
mycode.tarball.extractall(path='~/_nasHome/tools/restore/file.tar.gz')
Output looks like this
frozenset({'python_version:3.10.8', 'metaflow_version:2.7.20', 'user:ff_alex', 'Testing-Metaflow', 'runtime:dev'})
<s3://metaflow/metaflow/DatabaseAndS3Test/data/7a/7a7fcdd5893651e5ba5e375b0a8e06474f6ad7b3>
When I browse to the bucket I do see the file as expected.
We store data on minio, is that normal that path states s3?victorious-lawyer-58417
02/22/2023, 6:23 PMmycode.tarball.extractall the path attribute refers to the directory where you want to unpack the files. Hence you don't need to specify file.tar.gz there.
Try e.g. mycode.tarball.extractall(path='/tmp/mycode_test/') and then see the files at /tmp/mycode_test/ - if there's no error, the files should appear therelittle-pizza-78379
02/22/2023, 10:05 PM