Interface for DPPY interoperability#788
Conversation
… -> __partitioned__
Codecov Report
@@ Coverage Diff @@
## main #788 +/- ##
=======================================
Coverage 91.80% 91.80%
=======================================
Files 72 72
Lines 10445 10519 +74
=======================================
+ Hits 9589 9657 +68
- Misses 856 862 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
rerun tests |
|
Cool, this looks good. The latest spec asks for a 'get' field in the outer I added your code (slightly modified) to my controller/worker wrapper prototype (#823). It has similar restrictions but allows calling |
|
Im not seeing the changes that you made when you moved the create partition interface function over. as for the |
|
Yes, except of course that its The idea here is that - in particular for frameworks like ray and dask - 'data' might (should) not be raw data but a handle/future. Having a unified way of converting the handle into raw data without explicitly understanding/using the ray/dask/... make this more useful. |
|
ive implemented that now. i tested it with a small example: x = ht.arange(8* 3* 2).reshape((8, 3, 2)).resplit(0)
print(x.__partitioned__['get']((0, 0, 0))) |
heat/core/dndarray.py
Outdated
| } | ||
|
|
||
| def _partition_getter(key): | ||
| return partition_dict["partitions"][key]["data"] |
There was a problem hiding this comment.
The idea was to accept whatever is located in partition_dict["partitions"][key]["data"].
A user would use it like this pdict['get'](pdict['partitions"][key]["data"].
There was a problem hiding this comment.
here, it's really lambda x: x
There was a problem hiding this comment.
ah! i was thinking one level of abstraction more than that.
There was a problem hiding this comment.
now this is what the snippet would look like:
x = ht.arange(8* 3* 2).reshape((8, 3, 2)).resplit(0)
print(x.__partitioned__['get'](x.__partitioned__['partitions'][(0,0,0)]['data']))|
So far this is addressing the producer side. We'd also need the consumer side. |
adding from_partitioned; aligning __partitioned__ with current spec
…, added factory function for building a dndarry from a partition dictionary
|
@fschlimb I have added a bit more functionality to |
|
FYI: A new discussion was initiated with the data-API consortium: data-apis/consortium-feedback#7 |
heat/core/factories.py
Outdated
| ) | ||
| for x in parts.values() | ||
| } | ||
| if split is not None and \ |
There was a problem hiding this comment.
Is this assertion not true?
👇 Click on the image for a new way to code review
Legend |
|
@fschlimb @coquelin77 thanks again for all this work. What are the next steps here? |
|
I guess there are 2 options:
|
ClaudiaComito
left a comment
There was a problem hiding this comment.
Made a small change here to ensure self.__partitions_dict__ is None after the latest dndarray changes. I'm going to approve and merge, @coquelin77 @fschlimb apologies for the delay.
@fschlimb just out of curiosity, with the changes introduced here would it be possible to run these benchmarks with Heat as a backend, or is there more work required there?

Description
implement the
__partitioned__attribute to the DNDarray for compatibility with daal4py (IntelPython/DPPY-Spec#3). At the moment, this is not used by heat internally. However, There are some ideas about how this could be done in the future.Issue/s resolved: #772
Changes proposed:
__partitioned__attribute to DNDarrayType of change
Due Diligence
Does this change modify the behaviour of other functions? If so, which?
no