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

Fix a double set of preserve schema arg and uninitialized var #2632

Merged
merged 2 commits into from Jan 25, 2021

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Jan 23, 2021

  • when the user specifies the preserve operator argument it is set twice due to logic in ops.py. This PR makes sure it is set only once
  • 0 initializes next_seek_pos_ variable in the index_file_loader

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

Why we need this PR?

Pick one, remove the rest

  • It fixes a bug with double set of preserve schema arg and uninitialized var

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    makes sure preserve schema arg is set only once
    0 initializes next_seek_pos_ variable in the index_file_loader
  • Affected modules and functionalities:
    ops.py
    index_file_loader
  • Key points relevant for the review:
    NA
  • Validation and testing:
    test added
    valgrind run
  • Documentation (including examples):
    NA

JIRA TASK: [NA]

@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 23, 2021

!build

- when the user specifies the `preserve` operator argument it is
  set twice due to logic in ops.py. This PR makes sure it is set only once
- 0 initializes next_seek_pos_ variable in the index_file_loader

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2008098]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2008098]: BUILD PASSED

out = dali.fn.external_source(source=[[np.array([-0.5, 1.25])]], preserve = True)
res = dali.fn.resize(out, preserve = True)
pipe.set_outputs(out)
pipe.build()
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't run any iteration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It checks if build succeeds and args are properly consumed.

Co-authored-by: Joaquin Anton <j.anton.guirao@gmail.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 25, 2021

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2012390]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2012390]: BUILD PASSED

@JanuszL JanuszL merged commit 3a64294 into NVIDIA:master Jan 25, 2021
@JanuszL JanuszL deleted the fix_small_bugs branch January 25, 2021 22:26
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.

None yet

5 participants