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

[Data] Add read_avro #43663

Merged
merged 25 commits into from
Mar 26, 2024
Merged

Conversation

hebiao064
Copy link
Contributor

@hebiao064 hebiao064 commented Mar 4, 2024

Why are these changes needed?

Avro is a widely used data serialization system that integrates well with many big data processing environments. By supporting Avro data storage format for IO operations in Ray, we can enhance Ray's interoperability with the data ecosystem, making it easier for users to work with Avro files directly in their Ray applications. This addition aims to provide a seamless experience for users dealing with Avro formatted data for analytics, machine learning, and other data-intensive tasks.

Related issue number

To Close #43548

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Testing

python /Users/bhe/oss/ray/python/ray/data/tests/test_avro.py
Test session starts (platform: darwin, Python 3.9.18, pytest 7.0.1, pytest-sugar 0.9.5)
cachedir: .pytest_cache
rootdir: /Users/bhe/oss/ray, configfile: pytest.ini
plugins: asyncio-0.16.0, docker-tools-3.1.3, sphinx-0.5.1.dev0, forked-1.4.0, sugar-0.9.5, timeout-2.1.0, shutil-1.7.0, rerunfailures-11.1.2, virtualenv-1.7.0, anyio-3.7.1, lazy-fixture-0.6.3, httpserver-1.0.6
timeout: 180.0s
timeout method: signal
timeout func_only: False
collecting ... 
 python/ray/data/tests/test_avro.py::test_read_basic_avro_file ✓                        50% █████     
 python/ray/data/tests/test_avro.py::test_empty_avro_files ✓                           100% ██████████

Results (7.51s):
       2 passed

@hebiao064 hebiao064 changed the title Add AvroDatasource for Ray Data [data] Add AvroDatasource for Ray Data Mar 4, 2024
Biao He(bhe) and others added 2 commits March 11, 2024 23:54
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Copy link
Member

@bveeramani bveeramani left a comment

Choose a reason for hiding this comment

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

Thanks!

Looks like the tests aren't currently run in CI. Could you update the BUILD file like how we've done for test_text?

ray/python/ray/data/BUILD

Lines 300 to 306 in d40ef0c

py_test(
name = "test_text",
size = "small",
srcs = ["tests/test_text.py"],
tags = ["team:data", "exclusive"],
deps = ["//:ray_lib", ":conftest"],
)

Also, could you update input_output.rst?

Text
----
.. autosummary::
:nosignatures:
:toctree: doc/
read_text

python/ray/data/datasource/__init__.py Outdated Show resolved Hide resolved
python/ray/data/datasource/avro_datasource.py Outdated Show resolved Hide resolved
python/ray/data/read_api.py Outdated Show resolved Hide resolved
python/ray/data/read_api.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_avro.py Outdated Show resolved Hide resolved
python/ray/data/read_api.py Show resolved Hide resolved
python/ray/data/datasource/avro_datasource.py Outdated Show resolved Hide resolved
python/ray/data/datasource/avro_datasource.py Outdated Show resolved Hide resolved
python/ray/data/datasource/avro_datasource.py Show resolved Hide resolved
python/ray/data/tests/test_avro.py Outdated Show resolved Hide resolved
@bveeramani bveeramani self-assigned this Mar 12, 2024
hebiao064 and others added 7 commits March 12, 2024 13:15
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
@hebiao064
Copy link
Contributor Author

/rerun-check buildkite/premerge

hebiao064 and others added 8 commits March 13, 2024 23:11
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
@bveeramani bveeramani changed the title [data] Add AvroDatasource for Ray Data [Data] Add read_avro Mar 25, 2024
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Copy link
Contributor

@c21 c21 left a comment

Choose a reason for hiding this comment

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

LGTM w/ one minor nit.

python/ray/data/read_api.py Outdated Show resolved Hide resolved
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
…into pr/43663

Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
@bveeramani bveeramani merged commit 1c7cb7f into ray-project:master Mar 26, 2024
5 checks passed
stephanie-wang pushed a commit to stephanie-wang/ray that referenced this pull request Mar 27, 2024
Avro is a widely used data serialization system that integrates well with many big data processing environments. By supporting Avro data storage format for IO operations in Ray, we can enhance Ray's interoperability with the data ecosystem, making it easier for users to work with Avro files directly in their Ray applications. This addition aims to provide a seamless experience for users dealing with Avro formatted data for analytics, machine learning, and other data-intensive tasks.

---------

Signed-off-by: Stefan He <hebiaobuaa@gmail.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Co-authored-by: Biao He(bhe) <bhe@linkedin.com>
Co-authored-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: Balaji Veeramani <balaji@anyscale.com>
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.

[Data] Avro Support for Ray Data
4 participants