Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 compatibility issue #5453

Closed
wants to merge 2 commits into from
Closed

Conversation

ryanwcyin
Copy link

Fixed python3 compatibility issue #4780

Fixed python3 compatibility issue tensorflow#4780
@@ -410,8 +411,9 @@ def tpu_scaffold():
eval_dict)

# Eval metrics on a single example.
category_index_values = category_index.values() if sys.version_info[0] < 3 elses list(category_index.values())

Choose a reason for hiding this comment

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

Currently throws a syntax error:

Change elses to else

`elses` -> `else`
@ryanwcyin
Copy link
Author

@rob-white Thanks for the reminder! the typo is fixed:)

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

5 similar comments
@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2018

Two other Python 3 issues in object_detection...

flake8 testing of https://github.com/tensorflow/models on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py:157:55: E999 SyntaxError: invalid syntax
    print '--annotation_type expected value is 1 or 2.'
                                                      ^
./research/object_detection/utils/object_detection_evaluation.py:307:27: F821 undefined name 'unicode'
          category_name = unicode(category_name, 'utf-8')
                          ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
89

@jaeyounkim
Copy link
Collaborator

Fixed

@jaeyounkim jaeyounkim closed this Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants