Skip to content

Commit

Permalink
chore: Remove unused codE
Browse files Browse the repository at this point in the history
  • Loading branch information
iusztinpaul committed Aug 7, 2024
1 parent 82fa3fa commit a34016a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions llm_engineering/application/dataset/generation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Generator

import tiktoken
from langchain_core.exceptions import OutputParserException
from langchain_core.language_models.fake import FakeListLLM
Expand Down Expand Up @@ -67,20 +65,6 @@ def get_prompts(cls, documents: list[CleanedDocument]) -> dict[DataCategory, lis

return grouped_prompts

@classmethod
def _batch_by_category(
cls, category: DataCategory, documents: list[CleanedDocument]
) -> Generator[list, None, None]:
match category:
case DataCategory.ARTICLES:
return splits.misc.batch(documents, size=1)
case DataCategory.POSTS:
return splits.misc.batch(documents, size=5)
case DataCategory.REPOSITORIES:
return splits.misc.batch(documents, size=1)
case _:
raise ValueError(f"Unsupported category: {category}")

@classmethod
def get_prompt(cls, document: CleanedDocument) -> GenerateDatasetSamplesPrompt:
data_category = document.get_category()
Expand Down

0 comments on commit a34016a

Please sign in to comment.