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

Enable string conversion for Scalar objects that contain a schema #2468

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

redartera
Copy link
Contributor

Why are the changes needed?

If attempting to create a string representation of a literal whose scalar contains a schema (e.g. pandera DataFrames), an "Unknown scalar type" ValueError is raised.

It is often nice to just print out the outputs of a workflow execution, but that's currently not possible if a pandera-typed DataFrame is one of them.

What changes were proposed in this pull request?

We simply return the schema's URI, similarly to how structured_dataset is handled.

How was this patch tested?

I expanded on the existing unit test

Copy link

welcome bot commented Jun 7, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

@redartera Thanks. Could you use the structured dataset? We have deprecated it for a while.

@pingsutw pingsutw merged commit 7ddfb9b into flyteorg:master Jun 8, 2024
46 checks passed
Copy link

welcome bot commented Jun 8, 2024

Congrats on merging your first pull request! 🎉

@redartera
Copy link
Contributor Author

@redartera Thanks. Could you use the structured dataset? We have deprecated it for a while.

@pingsutw I don't use FlyteSchema but rather just pd.DataFrame with pandera.

Looking at the flyteplugins-pandera code here - it creates a Schema FlyteIDL object which is why I needed to make this change

bgedik pushed a commit to bgedik/flytekit that referenced this pull request Jul 3, 2024
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
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.

2 participants