mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-05-19 05:57:39 -04:00
tests: add dict protocol cases
Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
8
.github/workflows/auto-bot.yml
vendored
8
.github/workflows/auto-bot.yml
vendored
@@ -30,11 +30,3 @@ jobs:
|
||||
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'pre-commit-ci[bot]' }}
|
||||
steps:
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -224,3 +224,12 @@ def test_click_conversion(gen_settings: ModelSettings):
|
||||
filtered = {k for k, v in cl_.__openllm_hints__.items() if t.get_origin(v) is not t.Union}
|
||||
click_options_filtered = [i for i in wrapped.__click_params__ if i.name and not i.name.startswith("fake_")]
|
||||
assert len(filtered) == len(click_options_filtered)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model_name", openllm.CONFIG_MAPPING.keys())
|
||||
def test_configuration_dict_protocol(model_name: str):
|
||||
config = openllm.AutoConfig.for_model(model_name)
|
||||
assert isinstance(config.items(), list)
|
||||
assert isinstance(config.keys(), list)
|
||||
assert isinstance(config.values(), list)
|
||||
assert isinstance(dict(config), dict)
|
||||
|
||||
Reference in New Issue
Block a user