Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/benchmark_llm/evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from prompt import DEFAULT_MODEL, run_prompt

from ragas import experiment

from ragas.dataset import Dataset
from ragas.metrics.discrete import discrete_metric
from ragas.metrics.result import MetricResult
Expand Down
73 changes: 73 additions & 0 deletions src/ragas/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,76 @@ class UploadException(RagasException):
def __init__(self, status_code: int, message: str):
self.status_code = status_code
super().__init__(message)


# Exceptions migrated from experimental module
class RagasError(Exception):
"""Base class for all Ragas-related exceptions."""

pass


class ValidationError(RagasError):
"""Raised when field validation fails."""

pass


class DuplicateError(RagasError):
"""Exception raised when a duplicate resource is created."""

pass


class NotFoundError(RagasError):
"""Exception raised when a resource is not found."""

pass


class ResourceNotFoundError(NotFoundError):
"""Exception raised when a resource doesn't exist."""

pass


class ProjectNotFoundError(ResourceNotFoundError):
"""Exception raised when a project doesn't exist."""

pass


class DatasetNotFoundError(ResourceNotFoundError):
"""Exception raised when a dataset doesn't exist."""

pass


class ExperimentNotFoundError(ResourceNotFoundError):
"""Exception raised when an experiment doesn't exist."""

pass


class DuplicateResourceError(RagasError):
"""Exception raised when multiple resources exist with the same identifier."""

pass


class DuplicateProjectError(DuplicateResourceError):
"""Exception raised when multiple projects exist with the same name."""

pass


class DuplicateDatasetError(DuplicateResourceError):
"""Exception raised when multiple datasets exist with the same name."""

pass


class DuplicateExperimentError(DuplicateResourceError):
"""Exception raised when multiple experiments exist with the same name."""

pass
88 changes: 0 additions & 88 deletions src/ragas/experimental/exceptions.py

This file was deleted.

Loading
Loading