pankajkoti commented on code in PR #39365:
URL: https://github.com/apache/airflow/pull/39365#discussion_r1587388150
##########
tests/system/providers/pinecone/example_pinecone_cohere.py:
##########
@@ -37,15 +36,15 @@
start_date=datetime(2023, 1, 1),
catchup=False,
) as dag:
-
- @setup
- @task
- def create_index():
- from airflow.providers.pinecone.hooks.pinecone import PineconeHook
-
- hook = PineconeHook()
- hook.create_index(index_name=index_name, dimension=768)
- time.sleep(60)
+ create_index = CreatePodIndexOperator(
+ task_id="create_index",
+ index_name=index_name,
+ dimension=768,
+ replicas=1,
+ shards=1,
+ pods=1,
+ pod_type="p1.x1",
Review Comment:
are all of these required specs for creation of indexes? If they are not
specified do we get failures? If so, we should have default values for them in
the operator/hook initialisation.
##########
airflow/providers/pinecone/operators/pinecone.py:
##########
@@ -119,7 +119,7 @@ def __init__(
pod_type: str | None = None,
metadata_config: dict | None = None,
source_collection: str | None = None,
- metric: str | None = None,
+ metric: str | None = "cosine",
Review Comment:
```suggestion
metric: str = "cosine",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]