-
Notifications
You must be signed in to change notification settings - Fork 229
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
misc: Prevent builtins on transient functions #2506
base: master
Are you sure you want to change the base?
Conversation
@wraps(func) | ||
def wrapper(*args, **kwargs): | ||
for i in args: | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should only be an issue on Device platform, CPU transient do hold the data
@@ -131,3 +132,23 @@ def wrapper(*args, **kwargs): | |||
return func(*processed, argmap=argmap, **kwargs) | |||
|
|||
return wrapper | |||
|
|||
|
|||
def check_args(func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_builtins_args
@@ -518,3 +518,11 @@ def test_issue_1863(self): | |||
assert type(v1) is np.int32 | |||
assert type(v2) is np.float32 | |||
assert type(v3) is np.float64 | |||
|
|||
def test_is_transient(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark device
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2506 +/- ##
==========================================
- Coverage 87.29% 87.11% -0.18%
==========================================
Files 238 238
Lines 45609 45634 +25
Branches 4042 4043 +1
==========================================
- Hits 39814 39756 -58
- Misses 5112 5201 +89
+ Partials 683 677 -6 ☔ View full report in Codecov by Sentry. |
No description provided.