Skip to content

Remove the use of eval in test code#15097

Merged
justinchuby merged 9 commits intomicrosoft:mainfrom
justinchuby:justinchu/remove-eval
Mar 20, 2023
Merged

Remove the use of eval in test code#15097
justinchuby merged 9 commits intomicrosoft:mainfrom
justinchuby:justinchu/remove-eval

Conversation

@justinchuby
Copy link
Copy Markdown
Contributor

Description

Remove the use of eval in test code so we don't (1) use eval and (2) create "unused" local vars that ruff will remove. Predecessor to #15085

WilBrady
WilBrady previously approved these changes Mar 17, 2023
Copy link
Copy Markdown
Contributor

@WilBrady WilBrady left a comment

Choose a reason for hiding this comment

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

Changes in ort_ops.py look fine to me as long as tests are passing. Thank you.

@justinchuby justinchuby changed the title Remove use of eval in test code Remove the use of eval in test code Mar 17, 2023
prediction.backward()


_ONE = torch.FloatTensor([1])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it possible to make the input local to the test and be passed in as an argument to the lambda?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address this in a follow up PR. Thanks.

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.

3 participants