Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Support GCS I/O #1205

Open
hadusam opened this issue Sep 14, 2020 · 1 comment
Open

Support GCS I/O #1205

hadusam opened this issue Sep 14, 2020 · 1 comment
Assignees

Comments

@hadusam
Copy link
Contributor

hadusam commented Sep 14, 2020

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
Copy link
Contributor Author

hadusam commented Sep 14, 2020

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
    ...

bo-mergebot bot pushed a commit that referenced this issue Sep 15, 2020
## What this patch does to fix the issue.
A part of #1205 

## Link to any relevant issues or pull requests.
@hadusam hadusam self-assigned this Sep 15, 2020
bo-mergebot bot pushed a commit that referenced this issue Sep 16, 2020
## What this patch does to fix the issue.
Related #1205 
* Enable to save pretrain_vars.txt to GCS
* Refactor to use file_io module

## Link to any relevant issues or pull requests.
bo-mergebot bot pushed a commit that referenced this issue Sep 24, 2020
## What this patch does to fix the issue.
A part of #1205 

## Link to any relevant issues or pull requests.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant