Skip to content

Commit

Permalink
narrow down to just hybrid search dupe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vicilliar committed Sep 12, 2024
1 parent 3937213 commit ef70c31
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cloud-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref || github.ref }} # Checkout the current branch or PR head
fetch-depth: 0

- name: Set up Python 3.8
Expand Down
100 changes: 50 additions & 50 deletions tests/cloud_test_logic/cloud_test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,31 @@ class CloudTestIndex(str, Enum):
"numberOfShards": 2,
"numberOfReplicas": 1, # For hybrid duplicates test
},
CloudTestIndex.unstructured_image: {
"type": "unstructured",
"treatUrlsAndPointersAsImages": True,
"model": "open_clip/ViT-B-32/laion2b_s34b_b79k",

"inferenceType": "marqo.CPU.small",
"storageClass": "marqo.basic",
"numberOfShards": 1,
"numberOfReplicas": 0,
},
CloudTestIndex.unstructured_no_model: {
"type": "unstructured",
"treatUrlsAndPointersAsImages": False,

"inferenceType": "marqo.CPU.small",
"storageClass": "marqo.basic",
"numberOfShards": 1,
"numberOfReplicas": 0,

"model": "no_model",
"modelProperties": {
"type": "no_model",
"dimensions": 512
},
},
#CloudTestIndex.unstructured_image: {
# "type": "unstructured",
# "treatUrlsAndPointersAsImages": True,
# "model": "open_clip/ViT-B-32/laion2b_s34b_b79k",

# "inferenceType": "marqo.CPU.small",
# "storageClass": "marqo.basic",
# "numberOfShards": 1,
# "numberOfReplicas": 0,
#},
#CloudTestIndex.unstructured_no_model: {
# "type": "unstructured",
# "treatUrlsAndPointersAsImages": False,

# "inferenceType": "marqo.CPU.small",
# "storageClass": "marqo.basic",
# "numberOfShards": 1,
# "numberOfReplicas": 0,

# "model": "no_model",
# "modelProperties": {
# "type": "no_model",
# "dimensions": 512
# },
#},
CloudTestIndex.structured_text: {
"type": "structured",
"model": "hf/e5-base-v2",
Expand All @@ -86,29 +86,29 @@ class CloudTestIndex(str, Enum):
"numberOfShards": 2,
"numberOfReplicas": 1, # For hybrid duplicates test
},
CloudTestIndex.structured_image: {
"type": "structured",
"model": "open_clip/ViT-B-32/laion2b_s34b_b79k",

"inferenceType": "marqo.CPU.small",
"storageClass": "marqo.balanced",
"numberOfShards": 2,
"numberOfReplicas": 1, # For hybrid duplicates test

"allFields": [
{"name": "text_field_1", "type": "text", "features": ["lexical_search", "filter"]},
{"name": "text_field_2", "type": "text", "features": ["lexical_search", "filter"]},
{"name": "text_field_3", "type": "text", "features": ["filter"]},
{"name": "image_field_1", "type": "image_pointer"},
{"name": "array_field_1", "type": "array<text>", "features": ["filter"]},
{"name": "float_field_1", "type": "float", "features": ["filter", "score_modifier"]},
{"name": "int_field_1", "type": "int", "features": ["score_modifier"]},
{"name": "int_filter_field_1", "type": "int", "features": ["filter", "score_modifier"]},
{"name": "bool_field_1", "type": "bool", "features": ["filter"]},
],
"tensorFields": ["text_field_1", "text_field_2", "text_field_3", "image_field_1"],
"imagePreprocessing": {
"patchMethod": "simple",
}
}
#CloudTestIndex.structured_image: {
# "type": "structured",
# "model": "open_clip/ViT-B-32/laion2b_s34b_b79k",

# "inferenceType": "marqo.CPU.small",
# "storageClass": "marqo.balanced",
# "numberOfShards": 2,
# "numberOfReplicas": 1, # For hybrid duplicates test

# "allFields": [
# {"name": "text_field_1", "type": "text", "features": ["lexical_search", "filter"]},
# {"name": "text_field_2", "type": "text", "features": ["lexical_search", "filter"]},
# {"name": "text_field_3", "type": "text", "features": ["filter"]},
# {"name": "image_field_1", "type": "image_pointer"},
# {"name": "array_field_1", "type": "array<text>", "features": ["filter"]},
# {"name": "float_field_1", "type": "float", "features": ["filter", "score_modifier"]},
# {"name": "int_field_1", "type": "int", "features": ["score_modifier"]},
# {"name": "int_filter_field_1", "type": "int", "features": ["filter", "score_modifier"]},
# {"name": "bool_field_1", "type": "bool", "features": ["filter"]},
# ],
# "tensorFields": ["text_field_1", "text_field_2", "text_field_3", "image_field_1"],
# "imagePreprocessing": {
# "patchMethod": "simple",
# }
#}
}
2 changes: 1 addition & 1 deletion tests/cloud_test_logic/run_cloud_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def convert_string_to_boolean(string_value):
sys.exit(1)
print(f"All indices has been created, proceeding to run tests with pytest. Arguments: {sys.argv[1:]}")

pytest_args = ['tests/', '-m', 'not ignore_during_cloud_tests'] + sys.argv[1:]
pytest_args = ['tests/v2_tests/test_hybrid_search.py', '-m', 'not ignore_during_cloud_tests'] + sys.argv[1:]
print("running integration tests with args:", pytest_args)
pytest_exit_code = pytest.main(pytest_args)
if pytest_exit_code != 0:
Expand Down

0 comments on commit ef70c31

Please sign in to comment.