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

DoFn state support #27

Merged
merged 1 commit into from
Jun 22, 2022
Merged

DoFn state support #27

merged 1 commit into from
Jun 22, 2022

Conversation

iasoon
Copy link
Member

@iasoon iasoon commented Jun 15, 2022

Fixes the state handler to enable stateful DoFns
closes #12

@iasoon
Copy link
Member Author

iasoon commented Jun 15, 2022

r: @pabloem

@iasoon iasoon force-pushed the dofn-state-support branch from ba8f230 to 615e351 Compare June 16, 2022 16:47
@pabloem
Copy link
Collaborator

pabloem commented Jun 21, 2022

LGTM! thanks @iasoon

T = TypeVar("T")


class RayFuture(sdk_worker._Future[T]):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we need this wrapper object no matter what because Beam / SdkWorker expect this interface right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think that's right. One thing that's a bit unfortunate about this adapter is that the SdkWorker waits for a series of these futures in sequence, which ray can do natively (with ray.get(list_of_futures)). I'm not sure whether it will actually matter in this case, though.

@pdames pdames merged commit 45cf717 into ray-project:master Jun 22, 2022
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.

Add support for State in ParDo / DoFn operations
3 participants