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

[CHORE] Add error snafus for local executor #2660

Merged
merged 4 commits into from
Aug 17, 2024
Merged

Conversation

colin-ho
Copy link
Contributor

@colin-ho colin-ho commented Aug 14, 2024

Example:

df = daft.from_pydict({"a": ["foo", "bar", "baz"]})
df = df.select(df["a"].str.match("["))
df.show()
Error when running pipeline node ProjectOperator
Traceback (most recent call last):
  File "test.py", line 21, in <module>
    df.show()
  File "/Users/colinho/Desktop/Daft/daft/api_annotations.py", line 26, in _wrap
    return timed_method(*args, **kwargs)
  File "/Users/colinho/Desktop/Daft/daft/analytics.py", line 185, in tracked_method
    return method(*args, **kwargs)
  File "/Users/colinho/Desktop/Daft/daft/dataframe/dataframe.py", line 2278, in show
    dataframe_display = self._construct_show_display(n)
  File "/Users/colinho/Desktop/Daft/daft/dataframe/dataframe.py", line 2235, in _construct_show_display
    for table in get_context().runner().run_iter_tables(builder, results_buffer_size=1):
  File "/Users/colinho/Desktop/Daft/daft/runners/pyrunner.py", line 216, in run_iter_tables
    for result in self.run_iter(builder, results_buffer_size=results_buffer_size):
  File "/Users/colinho/Desktop/Daft/daft/runners/pyrunner.py", line 197, in run_iter
    results_gen = executor.run(
  File "/Users/colinho/Desktop/Daft/daft/execution/native_executor.py", line 33, in run
    PyMaterializedResult(MicroPartition._from_pymicropartition(part)) for part in self._executor.run(psets_mp)
daft.exceptions.DaftCoreException: DaftError::ValueError regex parse error:
    [
    ^
error: unclosed character class

@github-actions github-actions bot added the chore label Aug 14, 2024
Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 118 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@b15b0c7). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Files Patch % Lines
...c/daft-local-execution/src/sinks/streaming_sink.rs 0.00% 32 Missing ⚠️
...rc/daft-local-execution/src/sinks/blocking_sink.rs 0.00% 24 Missing ⚠️
src/daft-local-execution/src/sinks/hash_join.rs 0.00% 23 Missing ⚠️
src/daft-local-execution/src/lib.rs 0.00% 13 Missing ⚠️
...-execution/src/intermediate_ops/intermediate_op.rs 0.00% 11 Missing ⚠️
src/daft-local-execution/src/sources/in_memory.rs 0.00% 7 Missing ⚠️
src/daft-local-execution/src/pipeline.rs 0.00% 5 Missing ⚠️
src/daft-local-execution/src/run.rs 0.00% 2 Missing ⚠️
src/daft-local-execution/src/sources/source.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2660   +/-   ##
=======================================
  Coverage        ?   63.53%           
=======================================
  Files           ?      981           
  Lines           ?   111997           
  Branches        ?        0           
=======================================
  Hits            ?    71152           
  Misses          ?    40845           
  Partials        ?        0           
Files Coverage Δ
src/daft-local-execution/src/sources/scan_task.rs 0.00% <ø> (ø)
src/daft-local-execution/src/sources/source.rs 0.00% <0.00%> (ø)
src/daft-local-execution/src/run.rs 0.99% <0.00%> (ø)
src/daft-local-execution/src/pipeline.rs 0.00% <0.00%> (ø)
src/daft-local-execution/src/sources/in_memory.rs 0.00% <0.00%> (ø)
...-execution/src/intermediate_ops/intermediate_op.rs 0.00% <0.00%> (ø)
src/daft-local-execution/src/lib.rs 10.52% <0.00%> (ø)
src/daft-local-execution/src/sinks/hash_join.rs 0.00% <0.00%> (ø)
...rc/daft-local-execution/src/sinks/blocking_sink.rs 0.00% <0.00%> (ø)
...c/daft-local-execution/src/sinks/streaming_sink.rs 0.00% <0.00%> (ø)

Error::PipelineCreationError { .. } | Error::PipelineExecutionError { .. } => {
DaftError::InternalError(err.to_string())
}
_ => DaftError::External(err.into()),
Copy link
Member

Choose a reason for hiding this comment

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

We probably don't want to nest the execution error under DaftError::External otherwise the conversion of the DaftError to the correct PythonError won't happen.

For now, we can unnest the daft error, log where it came from and then return that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and updated PR description example. Assumed you meant not to nest DaftErrors under DaftError::InternalError, the Externals are for the tokio oneshot and join errors.

Copy link
Member

Choose a reason for hiding this comment

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

oh whoops, yeah looks good now!

@colin-ho colin-ho enabled auto-merge (squash) August 17, 2024 00:02
@colin-ho colin-ho merged commit 39cd0ad into main Aug 17, 2024
44 checks passed
@colin-ho colin-ho deleted the colin/swordfish-snafus branch August 17, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants