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

Update fix assert error messages in base_iterator.py #4726

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

machineko
Copy link
Contributor

Category:

Bug fix (non-breaking change which fixes an issue)

Description:

Function without return always return None so error have no information about missing metadata
before

assert np.all(np.equal([meta[name] for meta in input_meta], input_meta[0][name])), \
                       err_msg_gen(err_msg) # err_msg_gen returns None not formated string

AssertionError: None

after

AssertionError: Reader Operator should have the same size value in all the pipelines.

Tests:

  • N/A

Documentation

  • N/A

@machineko machineko force-pushed the machineko-fix-assert-error-msg branch from 305f6e8 to 167101d Compare March 20, 2023 12:15
@machineko machineko changed the title Update base_iterator.py Update fix assert error messages in base_iterator.py Mar 20, 2023
@JanuszL
Copy link
Contributor

JanuszL commented Mar 20, 2023

Hi @machineko,

Well spotted. Thank you for the fix.

@JanuszL
Copy link
Contributor

JanuszL commented Mar 20, 2023

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7646190]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7646190]: BUILD FAILED

@@ -215,7 +215,7 @@ def _extract_from_reader_and_validate(self):
readers_meta = [p.reader_meta(self._reader_name) for p in self._pipes]

def err_msg_gen(err_msg):
'Reader Operator should have the same {} in all the pipelines.'.format(err_msg)
return 'Reader Operator should have the same {} in all the pipelines.'.format(err_msg)
Copy link
Contributor

@JanuszL JanuszL Mar 20, 2023

Choose a reason for hiding this comment

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

Can you please check the linter complain?

#14 22.48 Performing Python linter check
#14 25.60 /opt/dali/dali/python/nvidia/dali/plugin/base_iterator.py:218:101: E501 line too long (102 > 100 characters)
#14 25.60 1     E501 line too long (102 > 100 characters)
#14 25.60 1```

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be fixed right now

@JanuszL
Copy link
Contributor

JanuszL commented Mar 20, 2023

!build

machineko and others added 2 commits March 20, 2023 14:12
Signed-off-by: machineko <machineko@protonmail.com>
Signed-off-by: machineko <machineko@protonmail.com>
@machineko machineko force-pushed the machineko-fix-assert-error-msg branch from 185e251 to 927516b Compare March 20, 2023 13:12
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7646361]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7646361]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7646361]: BUILD PASSED

@JanuszL JanuszL self-assigned this Mar 20, 2023
@JanuszL JanuszL merged commit 115cab9 into NVIDIA:main Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants