Skip to content
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

Support multi-partitioning in AssetSlice #20353

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

schrockn
Copy link
Member

@schrockn schrockn commented Mar 8, 2024

Summary & Motivation

Support multi-partioning in AssetSlice.

The most notable business logic here is the treatment of the "latest" time window and time windows. Notably this code is aware of whether or not the underlying multi partition definition has a time-windowed partition. If so, methods like latest time window return the full set of partions resident in the other partition dimension affiliated with with the time.

How I Tested These Changes

BK

@schrockn
Copy link
Member Author

schrockn commented Mar 8, 2024


def _get_multi_dim_info(self) -> "MultiDimInfo":
check.inst(self._partitions_def, MultiPartitionsDefinition)
assert isinstance(self._partitions_def, MultiPartitionsDefinition) # appease pyright
Copy link
Collaborator

Choose a reason for hiding this comment

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

[1]

Copy link
Member Author

Choose a reason for hiding this comment

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

multi_dim_info = self._get_multi_dim_info()
last_tw = multi_dim_info.tw_partition_def.get_last_partition_window(
self._asset_graph_view.effective_dt
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is going to become a core part of the system, IMO we should put the necessary time window dimension accessors on MultiPartitionsDefinition instead of having this one-off MultiDimInfo class.

EDIT: Looks like you did actually add to MultiPartitionsDefinition?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just added some helper methods to MultiPartitionsDefinition. I think we should add to the core layer in a follow up, alongside an effort to represent multi-partioning in the underlying PartitionsSubset more efficiently.

@schrockn schrockn force-pushed the asset-graph-view-2 branch from fdc715f to 1077b0d Compare March 12, 2024 12:39
@schrockn schrockn force-pushed the asset-graph-view-3 branch 2 times, most recently from 7e8c5cb to 905ef8a Compare March 12, 2024 13:17
@schrockn schrockn requested a review from smackesey March 12, 2024 13:21
@schrockn schrockn force-pushed the asset-graph-view-2 branch from 9e70a03 to b0423d4 Compare March 13, 2024 15:12
@schrockn schrockn force-pushed the asset-graph-view-3 branch from 905ef8a to 39ac36c Compare March 13, 2024 15:12
@schrockn
Copy link
Member Author

schrockn commented Mar 13, 2024

Merge activity

  • Mar 13, 1:59 PM EDT: @schrockn started a stack merge that includes this pull request via Graphite.
  • Mar 13, 2:01 PM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 13, 2:02 PM EDT: @schrockn merged this pull request with Graphite.

Base automatically changed from asset-graph-view-2 to master March 13, 2024 18:00
@schrockn schrockn force-pushed the asset-graph-view-3 branch from 39ac36c to bbaf547 Compare March 13, 2024 18:00
@schrockn schrockn merged commit ca00077 into master Mar 13, 2024
1 check was pending
@schrockn schrockn deleted the asset-graph-view-3 branch March 13, 2024 18:02
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
## Summary & Motivation

Support multi-partioning in `AssetSlice`.

The most notable business logic here is the treatment of the "latest" time window and time windows. Notably this code is aware of whether or not the underlying multi partition definition has a time-windowed partition. If so, methods like latest time window return the full set of partions resident in the _other_ partition dimension affiliated with with the time.

## How I Tested These Changes

BK
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