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 the argument type of input_vectors in pinecone upsert #39688

Merged
merged 2 commits into from
May 17, 2024

Conversation

sunank200
Copy link
Collaborator

@sunank200 sunank200 commented May 17, 2024

The example_pinecone_cohere DAG of the system test is broken after PR #37307 is merged.

The upstream pinecone-client>=3.0.0 accepts vector as Union[List[Vector], List[tuple], List[dict]] as per https://github.com/pinecone-io/pinecone-python-client/blob/main/pinecone/data/index.py#L100. But the previous implementation only accepted list[tuples] and list[Any] which is wrong. Hence the dag is breaking as the previous client accepted list[list[float]] as well. I have added a transformation method to fix this.

I have tested this DAG with the change.
Screenshot 2024-05-17 at 9 10 51 PM


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@utkarsharma2 utkarsharma2 merged commit 9ff2455 into apache:main May 17, 2024
41 checks passed
@utkarsharma2 utkarsharma2 deleted the fix_pinecone_system_test branch May 17, 2024 17:04
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
* Fix the argument type of input_vectors

* Fix typing and docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants