Skip to content

Commit

Permalink
Resolved type-checking error
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanmodi2810 committed Feb 26, 2024
1 parent dff51e4 commit 9d29245
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions llments/lm/empirical.py
Original file line number Diff line number Diff line change
@@ -34,11 +34,11 @@ def fit(self, target: LanguageModel, task_description: str | None = None):

def calculate_probability(self, x: str) -> float:
# Implementation logic
return 0.0
raise NotImplementedError("This is not implemented yet.")

def sample(self, condition: str | None = None, **kwargs) -> str:
def sample(self, condition: str | None, **kwargs) -> str:
# Implementation logic
return ""
raise NotImplementedError("This is not implemented yet.")


def load_from_text_file(text_file: str):
2 changes: 1 addition & 1 deletion llments/lm/lm.py
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ def calculate_probability(self, output: str) -> float:
...

@abc.abstractmethod
def sample(self, condition: str | None = None, **kwargs) -> str:
def sample(self, condition: str | None, **kwargs) -> str:
"""Sample an output given the language model.
Returns:

0 comments on commit 9d29245

Please sign in to comment.