-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize enum types into enums subpackage
- Loading branch information
Showing
15 changed files
with
182 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from .clouds import CloudProvider, AwsRegion, GcpRegion, AzureRegion | ||
from .deletion_protection import DeletionProtection | ||
from .metric import Metric | ||
from .pod_index_environment import PodIndexEnvironment | ||
from .pod_type import PodType | ||
from .vector_type import VectorType | ||
|
||
__all__ = [ | ||
"CloudProvider", | ||
"AwsRegion", | ||
"GcpRegion", | ||
"AzureRegion", | ||
"DeletionProtection", | ||
"Metric", | ||
"PodIndexEnvironment", | ||
"PodType", | ||
"VectorType", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from enum import Enum | ||
|
||
|
||
class CloudProvider(Enum): | ||
AWS = "aws" | ||
GCP = "gcp" | ||
AZURE = "azure" | ||
|
||
|
||
class AwsRegion(Enum): | ||
US_EAST_1 = "us-east-1" | ||
US_WEST_2 = "us-west-2" | ||
EU_WEST_1 = "eu-west-1" | ||
|
||
|
||
class GcpRegion(Enum): | ||
US_CENTRAL1 = "us-central1" | ||
EUROPE_WEST4 = "europe-west4" | ||
|
||
|
||
class AzureRegion(Enum): | ||
EAST_US = "eastus2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from enum import Enum | ||
|
||
|
||
class DeletionProtection(Enum): | ||
ENABLED = "enabled" | ||
DISABLED = "disabled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from enum import Enum | ||
|
||
|
||
class Metric(Enum): | ||
""" | ||
The metric specifies how Pinecone should calculate the distance between vectors when querying an index. | ||
""" | ||
|
||
COSINE = "cosine" | ||
EUCLIDEAN = "euclidean" | ||
DOTPRODUCT = "dotproduct" |
25 changes: 4 additions & 21 deletions
25
pinecone/models/clouds.py → pinecone/enums/pod_index_environment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from enum import Enum | ||
|
||
|
||
class PodType(Enum): | ||
""" | ||
PodType represents the available pod types for a pod index. | ||
""" | ||
|
||
P1_X1 = "p1.x1" | ||
P1_X2 = "p1.x2" | ||
P1_X4 = "p1.x4" | ||
P1_X8 = "p1.x8" | ||
S1_X1 = "s1.x1" | ||
S1_X2 = "s1.x2" | ||
S1_X4 = "s1.x4" | ||
S1_X8 = "s1.x8" | ||
P2_X1 = "p2.x1" | ||
P2_X2 = "p2.x2" | ||
P2_X4 = "p2.x4" | ||
P2_X8 = "p2.x8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from enum import Enum | ||
|
||
|
||
class VectorType(Enum): | ||
""" | ||
VectorType is used to specifiy the type of vector you will store in the index. | ||
Dense vectors are used to store dense embeddings, which are vectors with non-zero values in most of the dimensions. | ||
Sparse vectors are used to store sparse embeddings, which allow vectors with zero values in most of the dimensions to be represented concisely. | ||
""" | ||
|
||
DENSE = "dense" | ||
SPARSE = "sparse" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
tests/integration/control/serverless/test_configure_index_deletion_protection.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.