localfs -> LocalFS

This commit is contained in:
Xi Yan 2024-11-11 15:37:29 -05:00
parent 68a4e6d00e
commit aa66410f24
4 changed files with 9 additions and 9 deletions

View file

@ -4,15 +4,15 @@
# This source code is licensed under the terms described in the LICENSE file in # This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree. # the root directory of this source tree.
from .config import LocalfsDatasetIOConfig from .config import LocalFSDatasetIOConfig
async def get_provider_impl( async def get_provider_impl(
config: LocalfsDatasetIOConfig, config: LocalFSDatasetIOConfig,
_deps, _deps,
): ):
from .datasetio import LocalfsDatasetIOImpl from .datasetio import LocalFSDatasetIOImpl
impl = LocalfsDatasetIOImpl(config) impl = LocalFSDatasetIOImpl(config)
await impl.initialize() await impl.initialize()
return impl return impl

View file

@ -6,4 +6,4 @@
from llama_stack.apis.datasetio import * # noqa: F401, F403 from llama_stack.apis.datasetio import * # noqa: F401, F403
class LocalfsDatasetIOConfig(BaseModel): ... class LocalFSDatasetIOConfig(BaseModel): ...

View file

@ -15,7 +15,7 @@ from dataclasses import dataclass
from llama_stack.providers.datatypes import DatasetsProtocolPrivate from llama_stack.providers.datatypes import DatasetsProtocolPrivate
from llama_stack.providers.utils.datasetio.url_utils import get_dataframe_from_url from llama_stack.providers.utils.datasetio.url_utils import get_dataframe_from_url
from .config import LocalfsDatasetIOConfig from .config import LocalFSDatasetIOConfig
class BaseDataset(ABC): class BaseDataset(ABC):
@ -77,8 +77,8 @@ class PandasDataframeDataset(BaseDataset):
self.df = self._validate_dataset_schema(df) self.df = self._validate_dataset_schema(df)
class LocalfsDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate): class LocalFSDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate):
def __init__(self, config: LocalfsDatasetIOConfig) -> None: def __init__(self, config: LocalFSDatasetIOConfig) -> None:
self.config = config self.config = config
# local registry for keeping track of datasets within the provider # local registry for keeping track of datasets within the provider
self.dataset_infos = {} self.dataset_infos = {}

View file

@ -16,7 +16,7 @@ def available_providers() -> List[ProviderSpec]:
provider_type="localfs", provider_type="localfs",
pip_packages=["pandas"], pip_packages=["pandas"],
module="llama_stack.providers.inline.datasetio.localfs", module="llama_stack.providers.inline.datasetio.localfs",
config_class="llama_stack.providers.inline.datasetio.localfs.LocalfsDatasetIOConfig", config_class="llama_stack.providers.inline.datasetio.localfs.LocalFSDatasetIOConfig",
api_dependencies=[], api_dependencies=[],
), ),
remote_provider_spec( remote_provider_spec(