Skip to content

Commit

Permalink
SN1-212: Moving from github to huggingface-github dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Hollyqui committed Sep 3, 2024
1 parent d816bc3 commit 002e2af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prompting/tasks/programming_task.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from typing import ClassVar
from prompting.datasets.github import GithubDatasetEntry, MIN_INPUT_LINES, OUTPUT_LINES
from prompting.datasets.huggingface_github import (
HuggingFaceGithubDatasetEntry,
MIN_INPUT_LINES,
OUTPUT_LINES,
)
from prompting.tasks.base_task import BaseTextTask
from prompting.rewards.reward import BaseRewardConfig, WeightedRewardModel
from prompting.rewards.rouge import RougeRewardModel
Expand Down Expand Up @@ -36,7 +40,7 @@ class ProgrammingTask(BaseTextTask):
query: str | None = None
reference: str | None = None

def make_query(self, dataset_entry: GithubDatasetEntry):
def make_query(self, dataset_entry: HuggingFaceGithubDatasetEntry):
modified_code = model_manager.generate(
[CODE_MODIFICATION_PROMPT.format(file_content=dataset_entry.file_content)]
)[0]
Expand Down

0 comments on commit 002e2af

Please sign in to comment.