-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2950 from janhq/dev
Release/0.4.14 to main
- Loading branch information
Showing
18 changed files
with
369 additions
and
58 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
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 |
---|---|---|
@@ -1,6 +1,40 @@ | ||
import json | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--endpoint", action="store", default="all", help="my option: endpoints" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line( | ||
"markers", "endpoint(endpoint): this mark select the test based on endpoint" | ||
) | ||
|
||
|
||
def pytest_runtest_setup(item): | ||
getoption = item.config.getoption("--endpoint").split(",") | ||
if getoption not in (["all"], [''], [""]): | ||
endpoint_names = [mark.args[0] for mark in item.iter_markers(name="endpoint")] | ||
if not endpoint_names or not set(getoption).intersection(set(endpoint_names)): | ||
pytest.skip("Test skipped because endpoint is {!r}".format(endpoint_names)) | ||
|
||
|
||
def pytest_collection_modifyitems(items): | ||
# load the JSON file | ||
with open("tests/endpoints_mapping.json", "r") as json_file: | ||
endpoints_file_mapping = json.load(json_file) | ||
|
||
# create a dictionary to map filenames to endpoints | ||
filename_to_endpoint = {} | ||
for endpoint, files in endpoints_file_mapping.items(): | ||
for filename in files: | ||
filename_to_endpoint[filename] = endpoint | ||
|
||
# add the markers based on the JSON file | ||
for item in items: | ||
# add the name of the file (without extension) as a marker | ||
filename = item.nodeid.split("::")[0].split("/")[-1].replace(".py", "") | ||
marker = pytest.mark.file(filename) | ||
item.add_marker(marker) | ||
# map the name of the file to endpoint, else use default value | ||
filename = item.fspath.basename | ||
marker = filename_to_endpoint.get(filename, filename) | ||
item.add_marker(pytest.mark.endpoint(marker, filename=filename)) |
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,75 @@ | ||
{ | ||
"/embeddings": [ | ||
"test_embedding.py" | ||
], | ||
"/audio/translations": [ | ||
"test_translations.py" | ||
], | ||
"/audio/transcriptions": [ | ||
"test_transcriptions.py" | ||
], | ||
"/moderations": [ | ||
"test_moderations.py" | ||
], | ||
"/images/generations": [ | ||
"test_images.py" | ||
], | ||
"/batches": [ | ||
"test_batches.py" | ||
], | ||
"/vector_stores": [ | ||
"test_vector_stores.py" | ||
], | ||
"/fine_tuning/jobs": [ | ||
"test_jobs.py", | ||
"test_checkpoints.py" | ||
], | ||
"/assistants": [ | ||
"test_assistants.py" | ||
], | ||
"/threads/{thread_id}/runs": [ | ||
"test_runs.py" | ||
], | ||
"/threads/{thread_id}/runs/{run_id}/steps": [ | ||
"test_steps.py" | ||
], | ||
"/vector_stores/{vector_store_id}/file_batches": [ | ||
"test_file_batches.py" | ||
], | ||
"/messages": [ | ||
"test_messages.py" | ||
], | ||
"/vector_stores/{vector_store_id}/files": [ | ||
"test_files.py" | ||
], | ||
"/chat/completions": [ | ||
"test_completions.py" | ||
], | ||
"/threads": [ | ||
"test_threads.py" | ||
], | ||
"/audio/speech": [ | ||
"test_speech.py" | ||
], | ||
"/models": [ | ||
"test_models.py" | ||
], | ||
"native_client_sdk_only": [ | ||
"test_streaming.py" | ||
], | ||
"utils": [ | ||
"test_response.py", | ||
"test_client.py", | ||
"test_extract_files.py", | ||
"test_typing.py", | ||
"test_legacy_response.py", | ||
"test_module_client.py", | ||
"test_old_api.py", | ||
"test_proxy.py", | ||
"test_qs.py", | ||
"test_required_args.py", | ||
"test_transform.py", | ||
"test_azure.py", | ||
"test_deepcopy.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 |
---|---|---|
@@ -1 +1 @@ | ||
0.4.7 | ||
0.4.9 |
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
35 changes: 35 additions & 0 deletions
35
extensions/inference-nitro-extension/resources/models/aya-23-35b/model.json
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,35 @@ | ||
{ | ||
"sources": [ | ||
{ | ||
"filename": "aya-23-35B-Q4_K_M.gguf", | ||
"url": "https://huggingface.co/bartowski/aya-23-35B-GGUF/resolve/main/aya-23-35B-Q4_K_M.gguf" | ||
} | ||
], | ||
"id": "aya-23-35b", | ||
"object": "model", | ||
"name": "Aya 23 35B Q4", | ||
"version": "1.0", | ||
"description": "Aya 23 can talk upto 23 languages fluently.", | ||
"format": "gguf", | ||
"settings": { | ||
"ctx_len": 8192, | ||
"prompt_template": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system_prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>", | ||
"llama_model_path": "aya-23-35B-Q4_K_M.gguf", | ||
"ngl": 40 | ||
}, | ||
"parameters": { | ||
"temperature": 0.7, | ||
"top_p": 0.95, | ||
"stream": true, | ||
"max_tokens": 8192, | ||
"frequency_penalty": 0, | ||
"presence_penalty": 0, | ||
"stop": ["<|END_OF_TURN_TOKEN|>"] | ||
}, | ||
"metadata": { | ||
"author": "CohereForAI", | ||
"tags": ["34B", "Finetuned"], | ||
"size": 21556982144 | ||
}, | ||
"engine": "nitro" | ||
} |
35 changes: 35 additions & 0 deletions
35
extensions/inference-nitro-extension/resources/models/aya-23-8b/model.json
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,35 @@ | ||
{ | ||
"sources": [ | ||
{ | ||
"filename": "aya-23-8B-Q4_K_M.gguf", | ||
"url": "https://huggingface.co/bartowski/aya-23-8B-GGUF/resolve/main/aya-23-8B-Q4_K_M.gguf" | ||
} | ||
], | ||
"id": "aya-23-8b", | ||
"object": "model", | ||
"name": "Aya 23 8B Q4", | ||
"version": "1.0", | ||
"description": "Aya 23 can talk upto 23 languages fluently.", | ||
"format": "gguf", | ||
"settings": { | ||
"ctx_len": 8192, | ||
"prompt_template": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system_prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>", | ||
"llama_model_path": "aya-23-8B-Q4_K_M.gguf", | ||
"ngl": 32 | ||
}, | ||
"parameters": { | ||
"temperature": 0.7, | ||
"top_p": 0.95, | ||
"stream": true, | ||
"max_tokens": 8192, | ||
"frequency_penalty": 0, | ||
"presence_penalty": 0, | ||
"stop": ["<|END_OF_TURN_TOKEN|>"] | ||
}, | ||
"metadata": { | ||
"author": "CohereForAI", | ||
"tags": ["7B", "Finetuned","Featured"], | ||
"size": 5056982144 | ||
}, | ||
"engine": "nitro" | ||
} |
Oops, something went wrong.