llama-stack/llama_stack/distribution
Dinesh Yeduguru e90ea1ab1e
make distribution registry thread safe and other fixes (#449)
This PR makes the following changes:
1) Fixes the get_all and initialize impl to actually read the values
returned from the range call to kvstore and not keys.
2) The start_key and end_key are fixed to correct perform the range
query after the key format changes
3) Made the cache registry thread safe since there are multiple
initializes called for each routing table.

Tests:
* Start stack
* Register dataset
* Kill stack
* Bring stack up
* dataset list
```
 llama-stack-client datasets list
+--------------+---------------+---------------------------------------------------------------------------------+---------+
| identifier   | provider_id   | metadata                                                                        | type    |
+==============+===============+=================================================================================+=========+
| alpaca       | huggingface-0 | {}                                                                              | dataset |
+--------------+---------------+---------------------------------------------------------------------------------+---------+
| mmlu         | huggingface-0 | {'path': 'llama-stack/evals', 'name': 'evals__mmlu__details', 'split': 'train'} | dataset |
+--------------+---------------+---------------------------------------------------------------------------------+---------+
```

Co-authored-by: Dinesh Yeduguru <dineshyv@fb.com>
2024-11-13 15:12:34 -08:00
..
routers make distribution registry thread safe and other fixes (#449) 2024-11-13 15:12:34 -08:00
server allow seeing warnings with traces optionally 2024-11-13 12:27:19 -08:00
store make distribution registry thread safe and other fixes (#449) 2024-11-13 15:12:34 -08:00
utils Replace colon in path so it doesn't cause issue on Windows 2024-11-11 17:33:53 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
build.py Fix bug in llama stack build; SERVER_DEPENDENCIES were dropped 2024-11-11 20:12:13 -08:00
build_conda_env.sh fix prompt guard (#177) 2024-10-03 11:07:53 -07:00
build_container.sh Change order of building the Docker 2024-11-12 13:09:04 -08:00
client.py Kill "remote" providers and fix testing with a remote stack properly (#435) 2024-11-12 21:51:29 -08:00
common.sh API Updates (#73) 2024-09-17 19:51:35 -07:00
configure.py Kill --name from llama stack build (#340) 2024-10-28 23:07:32 -07:00
configure_container.sh docker: Check for selinux before using --security-opt (#167) 2024-10-02 10:37:41 -07:00
datatypes.py Enable sane naming of registered objects with defaults (#429) 2024-11-12 11:18:05 -08:00
distribution.py Kill "remote" providers and fix testing with a remote stack properly (#435) 2024-11-12 21:51:29 -08:00
inspect.py Remove "routing_table" and "routing_key" concepts for the user (#201) 2024-10-10 10:24:13 -07:00
request_headers.py provider_id => provider_type, adapter_id => adapter_type 2024-10-02 14:05:59 -07:00
resolver.py Kill "remote" providers and fix testing with a remote stack properly (#435) 2024-11-12 21:51:29 -08:00
stack.py Kill "remote" providers and fix testing with a remote stack properly (#435) 2024-11-12 21:51:29 -08:00
start_conda_env.sh API Updates (#73) 2024-09-17 19:51:35 -07:00
start_container.sh Use tags for docker images instead of changing image name 2024-11-12 12:42:30 -08:00