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

Fix test_invalid_ge_schema_batchrequest_pandas_config #3145

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion flytekit/core/type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,6 @@ async def _literal_map_to_kwargs(
raise TypeTransformerFailedError(
f"Error converting input '{k}' at position {i}:\n"
f"Literal value: {lm.literals[k]}\n"
f"Literal type: {literal_types}\n"
Copy link
Member Author

Choose a reason for hiding this comment

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

We can remove it since it's None in most cases, and the Python type should be sufficient

f"Expected Python type: {python_interface_inputs[k]}\n"
f"Exception: {e}"
)
Expand Down
6 changes: 4 additions & 2 deletions plugins/flytekit-greatexpectations/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import pandas as pd
import pytest

from flytekit.core.type_engine import TypeTransformerFailedError
from flytekitplugins.great_expectations import BatchRequestConfig, GreatExpectationsFlyteConfig, GreatExpectationsType
from great_expectations.exceptions import InvalidBatchRequestError, ValidationError

Expand Down Expand Up @@ -58,7 +60,7 @@ def invalid_wf(dataset: str = "yellow_tripdata_sample_2019-02.csv") -> int:
valid_result = valid_wf()
assert valid_result == 9999

with pytest.raises(ValidationError):
with pytest.raises(TypeTransformerFailedError):
invalid_wf()


Expand Down Expand Up @@ -144,7 +146,7 @@ def my_wf():
my_task(directory="my_assets")

# Capture IndexError
with pytest.raises(InvalidBatchRequestError):
with pytest.raises(TypeTransformerFailedError):
my_wf()


Expand Down
2 changes: 1 addition & 1 deletion tests/flytekit/integration/remote/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ def test_attr_access_sd():
remote = FlyteRemote(Config.auto(config_file=CONFIG), PROJECT, DOMAIN)
execution = remote.fetch_execution(name=execution_id)
execution = remote.wait(execution=execution, timeout=datetime.timedelta(minutes=5))
print("Execution Error:", execution.error)
assert execution.error is None, f"Execution failed with error: {execution.error}"
assert execution.closure.phase == WorkflowExecutionPhase.SUCCEEDED, f"Execution failed with phase: {execution.closure.phase}"

# Delete the remote file to free the space
Expand Down
Loading