-
Notifications
You must be signed in to change notification settings - Fork 25
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
Don't create LocalField when using InProcess #1243
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1243 +/- ##
==========================================
+ Coverage 87.23% 87.29% +0.05%
==========================================
Files 81 81
Lines 9223 9229 +6
==========================================
+ Hits 8046 8056 +10
+ Misses 1177 1173 -4 |
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
@@ -494,6 +494,12 @@ def _get_data(self, np_array=True): | |||
def _set_data(self, data): | |||
pass | |||
|
|||
def __enter__(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.
@ansys-akarcher is that needed to do with statement?
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.
@cbellot000
__enter__
and __exit__
are indeed required as now as_local_field() may be returning either a Field Object or a LocalField (which was defining __enter__
and __exit__
)
The Local field primary goal is to copy the data when a field is remote, and very costly to access, which is not the case when the DPF server is used InProcess.
For now I didn't find an impactful and minimal way to get faster on get_entity_data_* methods.