Skip to content

Commit

Permalink
fixed a lint issues in train run_id args
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshrvel committed Jan 8, 2025
1 parent b5e6d46 commit 26b4930
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ragas/metrics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def _optimize_demonstration(
def train(
self,
path: t.Optional[str] = None,
run_id: str = None,
run_id: t.Optional[str] = None,
demonstration_config: t.Optional[DemonstrationConfig] = None,
instruction_config: t.Optional[InstructionConfig] = None,
callbacks: t.Optional[Callbacks] = None,
Expand All @@ -371,7 +371,7 @@ def train(
----------
path : str, optional
Path to local JSON training data file
run_id : str
run_id : str, optional
Direct run ID to fetch annotations
demonstration_config : DemonstrationConfig, optional
Configuration for demonstration optimization
Expand Down Expand Up @@ -408,7 +408,7 @@ def train(
if not path.endswith(".json"):
raise ValueError("Train data must be in json format")
dataset = MetricAnnotation.from_json(path, metric_name=self.name)
else:
if run_id is not None:
dataset = MetricAnnotation.from_app(
run_id=run_id,
metric_name=self.name,
Expand Down

0 comments on commit 26b4930

Please sign in to comment.