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

tf_upgrade_v2 for dataset #894

Merged
merged 4 commits into from
Mar 5, 2020
Merged

Conversation

ytfksw
Copy link
Contributor

@ytfksw ytfksw commented Mar 4, 2020

What this patch does to fix the issue.

I converted only the blueoil/datasets with the command line tool tf_upgrade_v2 to run on tensorflow2.

There is a code ("metaclass = ABCMeta", "yield from") that tf_upgrade_v2 cannot support, so I change it once, convert it, and restore it again.

Here's what I did:

  1. install newest tenosrflow (tensorflow-gpu==1.5.2)
  2. Change once to convert tf_upgrade_v2 8c6db67
  3. Run the upgrade script tf_upgrade_v2 8e31b9c
  4. Undo changes in 2 1eedf62
  5. Check the upgrade report for warnings and errors
  6. Run test (make test)

The only change this time is also to replace the operator with compat.v1.

Link to any relevant issues or pull requests.

@blueoil-butler blueoil-butler bot added the CI: auto-run Run CI automatically label Mar 4, 2020
@ytfksw ytfksw changed the title Convert tf2 dataset tf_upgrade_v2 for dataset Mar 4, 2020
@ytfksw
Copy link
Contributor Author

ytfksw commented Mar 4, 2020

This is the whole log file.

TensorFlow 2.0 Upgrade Script
-----------------------------
Converted 24 files
Detected 0 issues that require attention
--------------------------------------------------------------------------------
================================================================================
Detailed log follows:

================================================================================
================================================================================
Input tree: 'datasets'
================================================================================
--------------------------------------------------------------------------------
Processing file 'datasets/mnist.py'
 outputting to 'datasets/mnist.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/pascalvoc_2007_2012.py'
 outputting to 'datasets/pascalvoc_2007_2012.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/caltech101.py'
 outputting to 'datasets/caltech101.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/div2k.py'
 outputting to 'datasets/div2k.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/image_folder.py'
 outputting to 'datasets/image_folder.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/__init__.py'
 outputting to 'datasets/__init__.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/pascalvoc_2007.py'
 outputting to 'datasets/pascalvoc_2007.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/mscoco_2017.py'
 outputting to 'datasets/mscoco_2017.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/tfds.py'
 outputting to 'datasets/tfds.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/camvid.py'
 outputting to 'datasets/camvid.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/delta_mark.py'
 outputting to 'datasets/delta_mark.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/ilsvrc_2012.py'
 outputting to 'datasets/ilsvrc_2012.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/ytfaces.py'
 outputting to 'datasets/ytfaces.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/base.py'
 outputting to 'datasets/base.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/widerface.py'
 outputting to 'datasets/widerface.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/pascalvoc_2012.py'
 outputting to 'datasets/pascalvoc_2012.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/cifar10.py'
 outputting to 'datasets/cifar10.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/mscoco.py'
 outputting to 'datasets/mscoco.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/open_images_v4.py'
 outputting to 'datasets/open_images_v4.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/pascalvoc_base.py'
 outputting to 'datasets/pascalvoc_base.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/cityscapes.py'
 outputting to 'datasets/cityscapes.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/cifar100.py'
 outputting to 'datasets/cifar100.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/dataset_iterator.py'
 outputting to 'datasets/dataset_iterator.py'
--------------------------------------------------------------------------------

215:19: INFO: Renamed 'tf.data.make_initializable_iterator' to 'tf.compat.v1.data.make_initializable_iterator'
220:29: INFO: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
221:28: INFO: Renamed 'tf.GPUOptions' to 'tf.compat.v1.GPUOptions'
227:29: INFO: Renamed 'tf.ConfigProto' to 'tf.compat.v1.ConfigProto'
228:23: INFO: Renamed 'tf.Session' to 'tf.compat.v1.Session'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Processing file 'datasets/bdd100k.py'
 outputting to 'datasets/bdd100k.py'
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

@ytfksw ytfksw marked this pull request as ready for review March 4, 2020 08:56
@bo-code-review-bot
Copy link

This PR needs Approvals as follows.

  • Ownership Approval for / from iizukak, tkng, ruimashita
  • Readability Approval for Python from tkng, tsawada

Please choose reviewers and requet reviews!

Click to see how to approve each reviews

You can approve this PR by triggered comments as follows.

  • Approve all reviews requested to you (readability and ownership) and LGTM review
    Approval, LGTM

  • Approve all ownership reviews
    Ownership Approval or OA

  • Approve all readability reviews
    Readability Approval or RA

  • Approve specified review targets

    • Example of Ownership Reviewer of /: Ownership Approval for / or OA for /
    • Example of Readability Reviewer of Python: Readability Approval for Python or RA for Python
  • Approve LGTM review
    LGTM

See all trigger comments

Please replace [Target] to review target

  • Ownership Approval
    • Ownership Approval for [Target]
    • OA for [Target]
    • Ownership Approval
    • OA
    • Approval
  • Readability Approval
    • Readability Approval for [Target]
    • RA for [Target]
    • [Target] Readability Approval
    • [Target] RA
    • Readability Approval
    • RA
    • Approval
  • LGTM
    • LGTM
    • lgtm

Copy link
Member

@iizukak iizukak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OA

@iizukak iizukak requested a review from tsawada March 5, 2020 01:41
Copy link
Contributor

@tsawada tsawada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readability Approval

@iizukak
Copy link
Member

iizukak commented Mar 5, 2020

/ready

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented Mar 5, 2020

⏳Merge job is queued...

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented Mar 5, 2020

😥Status check failed. Please fix problems and send /ready again.

@ytfksw
Copy link
Contributor Author

ytfksw commented Mar 5, 2020

/ready

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented Mar 5, 2020

⏳Merge job is queued...

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented Mar 5, 2020

😥Status check failed. Please fix problems and send /ready again.

@primenumber primenumber added CI: test-blueoil Run blueoil test once CI: test-dlk Run dlk test once labels Mar 5, 2020
@blueoil-butler blueoil-butler bot removed CI: test-blueoil Run blueoil test once CI: test-dlk Run dlk test once labels Mar 5, 2020
@tfujiwar
Copy link
Contributor

tfujiwar commented Mar 5, 2020

/ready

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented Mar 5, 2020

⏳Merge job is queued...

@bo-mergebot bo-mergebot bot merged commit f1e07c8 into blue-oil:master Mar 5, 2020
@ytfksw ytfksw self-assigned this Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI: auto-run Run CI automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants