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] Fix doc for read_json #41240

Merged
merged 4 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/ray/data/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,11 @@ def read_json(
... "s3:https://anonymous@ray-example-data/log.json",
... read_options=pajson.ReadOptions(block_size=block_size)
... )
Dataset(num_blocks=8, num_rows=1, schema={timestamp: timestamp[s], size: int64})
c21 marked this conversation as resolved.
Show resolved Hide resolved
Dataset(
num_blocks=...,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this does not work. sometimes it is in one line, and sometimes in multiple lines.

rather than printing the entire Dataset out, maybe just print out the num_rows and schema? and assert num_blocks?

or is there some way to force the environment to treat num_blocks to be a constant, and not dependent on environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah noticed that, will skip doc test in this case. In the future, we would always print out Dataset in multiple lines.

num_rows=1,
schema={timestamp: timestamp[s], size: int64}
)

Args:
paths: A single file or directory, or a list of file or directory paths.
Expand Down
Loading