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

Hotfix: Fix overwriting a variable in runner #60

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

jsjason
Copy link
Contributor

@jsjason jsjason commented Jul 17, 2019

The runner function in runner.py receives instance_idx as a function parameter, for creating Signal objects to pass over to the next step.

# pass a Signal object for accessing shared tensors
signal = Signal(instance_idx, shared_output_tensor_counter)

Unfortunately, the latest PR #58 added an error of overwriting that parameter with a variable (of the same name) that has a completely different purpose. This bug wasn't observed in that PR because the test case did not actually involve any runner step that handles both shared input and output tensors. Rather, I tripped over this when I was working on #44, which adds a final aggregator step and thus uncovers this hidden error.

I've solved this simply by giving the corresponding variable a different name.

@jsjason jsjason requested a review from yunseong July 17, 2019 08:36
Copy link
Contributor

@yunseong yunseong left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix

@yunseong yunseong merged commit a4dc526 into master Jul 17, 2019
@yunseong yunseong deleted the js-signal-hotfix branch July 17, 2019 08:57
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.

2 participants