Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeichmann committed Sep 25, 2023
1 parent f923c22 commit 21123ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions langfuse/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def get_dataset(self, name: str):
self.log.debug(f"Getting datasets {name}")
dataset = self.client.datasets.get(dataset_name=name)

items = [FunctionalDatasetItem(**i.dict()) for i in dataset.items]
items = [DatasetItemClient(i) for i in dataset.items]

body = dataset.dict()
del body["items"]

return FunctionalDataset(**body, items=items)
return DatasetClient(**body, items=items)
except Exception as e:
self.log.exception(e)
raise e
Expand Down Expand Up @@ -523,7 +523,7 @@ def getNewHandler(self):
return CallbackHandler(statefulTraceClient=self)


class FunctionalDatasetItem(DatasetItem):
class DatasetItemClient(DatasetItem):
def link(self, observation: StatefulClient, run_name: str):
# flush the queue before creating the dataset run item
# to ensure that all events are persistet.
Expand All @@ -535,6 +535,6 @@ def link(self, observation: StatefulClient, run_name: str):
)


class FunctionalDataset(Dataset):
items: typing.List[FunctionalDatasetItem]
class DatasetClient(Dataset):
items: typing.List[DatasetItemClient]
__fields__ = {name: field for name, field in Dataset.__fields__.items()}

0 comments on commit 21123ca

Please sign in to comment.