mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
# What does this PR do? - Configured ruff linter to automatically fix import sorting issues. - Set --exit-non-zero-on-fix to ensure non-zero exit code when fixes are applied. - Enabled the 'I' selection to focus on import-related linting rules. - Ran the linter, and formatted all codebase imports accordingly. - Removed the black dep from the "dev" group since we use ruff Signed-off-by: Sébastien Han <seb@redhat.com> [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) [//]: # (- [ ] Added a Changelog entry if the change is significant) Signed-off-by: Sébastien Han <seb@redhat.com>
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
import pytest
|
|
|
|
from ..conftest import get_provider_fixture_overrides
|
|
from ..datasetio.fixtures import DATASETIO_FIXTURES
|
|
from .fixtures import POST_TRAINING_FIXTURES
|
|
|
|
DEFAULT_PROVIDER_COMBINATIONS = [
|
|
pytest.param(
|
|
{
|
|
"post_training": "torchtune",
|
|
"datasetio": "huggingface",
|
|
},
|
|
id="torchtune_post_training_huggingface_datasetio",
|
|
marks=pytest.mark.torchtune_post_training_huggingface_datasetio,
|
|
),
|
|
]
|
|
|
|
|
|
def pytest_configure(config):
|
|
combined_fixtures = "torchtune_post_training_huggingface_datasetio"
|
|
config.addinivalue_line(
|
|
"markers",
|
|
f"{combined_fixtures}: marks tests as {combined_fixtures} specific",
|
|
)
|
|
|
|
|
|
def pytest_generate_tests(metafunc):
|
|
if "post_training_stack" in metafunc.fixturenames:
|
|
available_fixtures = {
|
|
"eval": POST_TRAINING_FIXTURES,
|
|
"datasetio": DATASETIO_FIXTURES,
|
|
}
|
|
combinations = (
|
|
get_provider_fixture_overrides(metafunc.config, available_fixtures) or DEFAULT_PROVIDER_COMBINATIONS
|
|
)
|
|
metafunc.parametrize("post_training_stack", combinations, indirect=True)
|