Skip to content

[Data/AIR] Move TensorExtension to ray.air for use in other packages - #25517

Merged
amogkam merged 6 commits into
ray-project:masterfrom
amogkam:move-tensor-extensions
Jun 7, 2022
Merged

amogkam merged 6 commits into
ray-project:masterfrom
amogkam:move-tensor-extensions

Conversation

@amogkam

@amogkam amogkam commented Jun 6, 2022 •

Copy link
Copy Markdown
Contributor

Moves Tensor extensions to ray.air to facilitate their use in other Ray libraries (AIR, Serve).

Why are these changes needed?

Related issue number

Checks

@ericl

ericl commented Jun 6, 2022

Copy link
Copy Markdown
Contributor

Can we move this to ray.air instead of ray.util? The reason is util can be agnostic of ML libraries.

@amogkam

amogkam commented Jun 6, 2022 •

Copy link
Copy Markdown
Contributor Author

Sure I can make the change. My initial understanding was that these extensions are useful for general data related things, not specifically for ML use cases.

@simon-mo

simon-mo commented Jun 6, 2022

Copy link
Copy Markdown
Contributor

How do we deal with conditional import/dependency here? Is pyarrow and pandas a core dep for Ray AIR? In the context of Serve, should we depend on all Ray AIR dependencies as well?

@clarkzinzow

Copy link
Copy Markdown
Contributor

@simon-mo As long as consumers of the tensor extension type dynamically import it as-needed, those consumers (Datasets, AIR, Serve) can still have Pandas/Arrow as an optional dependency.

@amogkam amogkam changed the title [Data] Move TensorExtension to ray.util for use in other packages [Data/AIR] Move TensorExtension to ray.util for use in other packages Jun 6, 2022
@ericl

ericl commented Jun 7, 2022

Copy link
Copy Markdown
Contributor

I just merged a PR moving air.utils to air.util, could you make that change here too?

@amogkam

amogkam commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

Updated @ericl

@ericl ericl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you grep the docs and other code for references to this? Those + tests should be fixed.

It might be better to just not move it actually, what's the original motivation? It's fine to have a dependency on dataset package.

@amogkam

amogkam commented Jun 7, 2022 •

Copy link
Copy Markdown
Contributor Author

Can you grep the docs and other code for references to this? Those + tests should be fixed.

ray.data.extensions still exists. https://github.com/ray-project/ray/pull/25517/files#diff-418ecc75472ef2aed6607a873808729dad45f19408591b35e849d124e6abc041R1-R8. All the tests are still passing and the datasets docs are rendering correctly.

It's fine to have a dependency on dataset package.

Serve & standalone predictors will be using this too. We don't want a dataset dependency for those right? cc @simon-mo. With the final package structure any common ml utils will be in ray.air.

@amogkam amogkam changed the title [Data/AIR] Move TensorExtension to ray.util for use in other packages [Data/AIR] Move TensorExtension to ray.air for use in other packages Jun 7, 2022
@clarkzinzow

Copy link
Copy Markdown
Contributor

AIR ingest doc code and Datasets tests are failing, it looks like there's still one or more spots where we need to change ray.air.utils -> ray.air.util.
https://buildkite.com/ray-project/ray-builders-pr/builds/34587#01813d23-e7cb-4810-b948-539c01d00600
https://buildkite.com/ray-project/ray-builders-pr/builds/34587#01813d23-e7c5-46db-a0e5-22d584ea27ad

@amogkam
amogkam merged commit e0a63f7 into ray-project:master Jun 7, 2022
@amogkam
amogkam deleted the move-tensor-extensions branch June 7, 2022 21:53
sumanthratna pushed a commit to sumanthratna/ray that referenced this pull request Jun 8, 2022
…ges (ray-project#25517)

Moves Tensor extensions to ray.air to facilitate their use in other Ray libraries (AIR, Serve).
amogkam added a commit that referenced this pull request Jun 9, 2022
Implements conversion utilities and a default predict implementation for Predictor.

Depends on #25517
bushshrub pushed a commit to bushshrub/ray that referenced this pull request Jun 10, 2022
Implements conversion utilities and a default predict implementation for Predictor.

Depends on ray-project#25517
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.

4 participants