blueoil icon indicating copy to clipboard operation
blueoil copied to clipboard

Support GCS I/O

Open hadusam opened this issue 4 years ago • 1 comments

In Blueoil, we can train with GCS input and save training results to GCS, but other operations (e.g. convert, evaluate...) are not supported with GCS input/output.

Issues

There are many files and operations that depend on input and output directly.

blueoil/cmd/*.py
blueoil/utils/config.py
blueoil/utiles/image.py
blueoil/utils/predict_output/writer.py
blueoil/converter/template.py
blueoil/converter/frontend/tensorflow.py
blueoil/converter/code_generation.py

and so on...

We can replace them to support GCS with tensorflow.io.gfile, but some operations need to rewrite several lines. So it is better to add utils of operations of I/O and manage them in a single module.

Targets

There are operations with files/directories directly.

os.path.exists
os.path.abspath
os.makedirs
shutil.copy
shutil.rmtree
open()
np.save()
PIL.Image.save()
PIL.Image.open()

Since it is difficult to manage all of these operations in individual files and manage them separately, it is better to provide a module that aggregates the operations that perform file I/O and change it to use this module for all except special cases.

hadusam avatar Sep 14 '20 01:09 hadusam

Tasks

  • [ ] Add blueoil.io module
  • [ ] Support GCS I/O in each operation
  • [ ] Add e2e test with GCS

Support GCS I/O in each operation

  • [ ] Init
  • [ ] Training
  • [ ] Convert
  • [ ] Evaluate
  • [ ] Predict ...

hadusam avatar Sep 14 '20 01:09 hadusam