4
4
5
5
import os
6
6
import re
7
+ import sys
7
8
from shutil import rmtree
8
9
from zipfile import ZipFile
9
10
from argparse import ArgumentParser , ArgumentDefaultsHelpFormatter
@@ -45,7 +46,7 @@ def download(self):
45
46
46
47
# skip download if local file is found
47
48
if self .exists (fname .strip ('.zip' )) and not self .force :
48
- print ("[skipping %s]" % fname )
49
+ print ("[skipping %s]" % fname , file = sys . stderr )
49
50
return
50
51
51
52
if self .exists (fname .strip ('.zip' )) and self .force :
@@ -58,7 +59,7 @@ def download(self):
58
59
f .write (data )
59
60
t .update (len (data ))
60
61
61
- print ("[downloaded %s]" % fname )
62
+ print ("[downloaded %s]" % fname , file = sys . stderr )
62
63
63
64
# unzip .zip files
64
65
if fname .endswith ('.zip' ):
@@ -68,7 +69,7 @@ def download(self):
68
69
69
70
# convert chunkify training files to bonito
70
71
if fname .endswith ('.hdf5' ):
71
- print ("[converting %s]" % fname )
72
+ print ("[converting %s]" % fname , file = sys . stderr )
72
73
args = cargparser ().parse_args ([
73
74
self .location (fname ),
74
75
self .location (fname ).strip ('.hdf5' )
@@ -107,15 +108,15 @@ def main(args):
107
108
if args .models or args .all :
108
109
109
110
if args .show :
110
- print ("[available models]" )
111
+ print ("[available models]" , file = sys . stderr )
111
112
for model in models :
112
- print (f" - { model } " )
113
+ print (f" - { model } " , file = sys . stderr )
113
114
else :
114
- print ("[downloading models]" )
115
+ print ("[downloading models]" , file = sys . stderr )
115
116
for model in models .values ():
116
117
File (__models__ , model , args .force ).download ()
117
118
if args .training or args .all :
118
- print ("[downloading training data]" )
119
+ print ("[downloading training data]" , file = sys . stderr )
119
120
for train in training :
120
121
File (__data__ , train , args .force ).download ()
121
122
0 commit comments