-
Notifications
You must be signed in to change notification settings - Fork 19
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
dask: Data memory/disk
#387
dask: Data memory/disk
#387
Conversation
See new docs in |
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.
Perhaps I am missing something here, but the deprecation doesn't seem to be manifesting for in_memory
, though it is working absolutely fine for the other methods and properties deprecated here, as indicated for one example below (and I have double checked the install of this branch
is OK to be sure)? E.g:
>>> d.to_disk()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/cf-python/cf/data/mixin/deprecations.py", line 436, in to_disk
_DEPRECATION_ERROR_METHOD(
File "/home/sadie/cf-python/cf/functions.py", line 3197, in _DEPRECATION_ERROR_METHOD
raise DeprecationError(
cf.functions.DeprecationError: Data method 'to_disk' has been deprecated at version TODODASK and is no longer available and will be removed at version 5.0.0.
>>>
>>> d.to_memory()
Traceback (most recent call last):
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 262, in _get_component
return self._components[component]
KeyError: 'array'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/cfdm/cfdm/decorators.py", line 44, in inplace_wrapper
processed_copy = operation_method(self, *args, **kwargs)
File "/home/sadie/cfdm/cfdm/data/data.py", line 2700, in to_memory
d._set_Array(self.source().to_memory())
File "/home/sadie/cfdm/cfdm/core/data/data.py", line 909, in source
return self._get_component("array", default=default)
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 267, in _get_component
return self._default(
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 144, in _default
raise default
ValueError: Data has no 'array' component
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Hi Sadie - look like the deprecation error wasn't working for any attributes . 99cffd4 should fix this: >>> cf.Data(9).in_memory
Traceback
...
DeprecationError: Data attribute 'in_memory' has been deprecated at version TODODASK and will be removed at version 5.0.0. |
Nice, and it indeed does. What about |
Ah. I see that that's inherited from |
I raised it since you have added such a method to |
Doh! 7aecaca |
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.
This fell off my radar after my latest feedback comment, apologies. Your new commit is fine, so all good to merge! Thanks.
No description provided.