-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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] Cache Dataset.schema #37103
[data] Cache Dataset.schema #37103
Conversation
if self._stages_after_snapshot: | ||
# TODO(swang): There are several other stage types that could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, was wondering if this should be a feature of the LogicalPlan API (cc @raulchen ).
@@ -241,6 +241,22 @@ def test_schema_lazy(ray_start_regular_shared): | |||
assert ds._plan.execute()._num_computed() == 0 | |||
|
|||
|
|||
def test_schema_cached(ray_start_regular_shared): | |||
def check_schema_cached(ds): | |||
schema = ds.schema() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check that repeated calls to schema()
are cached?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it is checked under this.
Cache the computed schema to avoid re-executing. Closes ray-project#37077.
Cache the computed schema to avoid re-executing. Closes ray-project#37077. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Why are these changes needed?
Cache the computed schema to avoid re-executing.
Related issue number
Closes #37077.
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.