From 600f23703da22a45b52c0a9df04eea5a8dd23b58 Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Mon, 11 Nov 2024 12:43:51 -0800 Subject: [PATCH] remove listing of providers's datasets --- .../providers/adapters/datasetio/huggingface/huggingface.py | 5 +---- llama_stack/providers/datatypes.py | 2 -- llama_stack/providers/inline/datasetio/localfs/datasetio.py | 5 +---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/llama_stack/providers/adapters/datasetio/huggingface/huggingface.py b/llama_stack/providers/adapters/datasetio/huggingface/huggingface.py index 598ca5cfd..7d367a810 100644 --- a/llama_stack/providers/adapters/datasetio/huggingface/huggingface.py +++ b/llama_stack/providers/adapters/datasetio/huggingface/huggingface.py @@ -3,7 +3,7 @@ # # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. -from typing import List, Optional +from typing import Optional from llama_stack.apis.datasetio import * # noqa: F403 @@ -45,9 +45,6 @@ class HuggingfaceDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate): ) -> None: self.dataset_infos[dataset_def.identifier] = dataset_def - async def list_datasets(self) -> List[DatasetDef]: - return list(self.dataset_infos.values()) - async def get_rows_paginated( self, dataset_id: str, diff --git a/llama_stack/providers/datatypes.py b/llama_stack/providers/datatypes.py index d9df6aac1..aeb0be742 100644 --- a/llama_stack/providers/datatypes.py +++ b/llama_stack/providers/datatypes.py @@ -57,8 +57,6 @@ class MemoryBanksProtocolPrivate(Protocol): class DatasetsProtocolPrivate(Protocol): - async def list_datasets(self) -> List[Dataset]: ... - async def register_dataset(self, dataset: Dataset) -> None: ... diff --git a/llama_stack/providers/inline/datasetio/localfs/datasetio.py b/llama_stack/providers/inline/datasetio/localfs/datasetio.py index 6e26b0e1a..f54905a6b 100644 --- a/llama_stack/providers/inline/datasetio/localfs/datasetio.py +++ b/llama_stack/providers/inline/datasetio/localfs/datasetio.py @@ -3,7 +3,7 @@ # # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. -from typing import List, Optional +from typing import Optional import pandas from llama_models.llama3.api.datatypes import * # noqa: F403 @@ -97,9 +97,6 @@ class LocalFSDatasetIOImpl(DatasetIO, DatasetsProtocolPrivate): dataset_impl=dataset_impl, ) - async def list_datasets(self) -> List[Dataset]: - return [i.dataset_def for i in self.dataset_infos.values()] - async def get_rows_paginated( self, dataset_id: str,