Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc change] address the error when the pred is 0 and we did not pass the eval data #230

Merged
merged 2 commits into from
Oct 21, 2024
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
8 changes: 8 additions & 0 deletions adalflow/adalflow/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
from .config import new_components_from_config, new_component
from .lazy_import import LazyImport, OptionalPackages, safe_import
from .setup_env import setup_env
from .data import DataLoader, Dataset, Subset
from .global_config import get_adalflow_default_root_path
from .cache import CachedEngine


__all__ = [
Expand All @@ -43,4 +46,9 @@
"write_list_to_jsonl",
"safe_import",
"setup_env",
"DataLoader",
"Dataset",
"Subset",
"get_adalflow_default_root_path",
"CachedEngine",
]
187 changes: 96 additions & 91 deletions adalflow/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/source/get_started/adalflow_in_15mins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Here’s the minimum code required to get started on evaluating the task pipelin
self, sample: Example, y_pred: adal.GeneratorOutput
) -> float:
y_label = -1
if y_pred and y_pred.data:
if (y_pred is not None and y_pred.data is not None): # if y_pred and y_pred.data: might introduce bug when the data is 0
y_label = y_pred.data
return self.eval_fn(y=y_label, y_gt=sample.answer)

Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorials/lightrag_design_philosophy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Design Philosophy
====================================

Right from the begining, `LightRAG` follows three fundamental principles.
Right from the begining, `AdalFlow` follows three fundamental principles.


Principle 1: Simplicity over Complexity
-----------------------------------------------------------------------
We put these three hard rules while designing LightRAG:
We put these three hard rules while designing AdalFlow:

- Every layer of abstraction needs to be adjusted and overall we do not allow more than 3 layers of abstraction.
- We minimize the lines of code instead of maximizing the lines of code.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/use_cases/question_answering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ Here’s the minimum code required to get started on evaluating the task pipelin

def prepare_eval(self, sample: Example, y_pred: adal.GeneratorOutput) -> float:
y_label = -1
if y_pred and y_pred.data:
if (y_pred is not None and y_pred.data is not None): # if y_pred and y_pred.data: might introduce bug when the data is 0
y_label = y_pred.data
return self.eval_fn, {"y": y_label, "y_gt": sample.answer}

Expand Down
2 changes: 1 addition & 1 deletion docs/source/use_cases/question_answering_word_sort.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Here’s the minimum code required to get started on evaluating the task pipelin
self, sample: Example, y_pred: adal.GeneratorOutput
) -> float:
y_label = -1
if y_pred and y_pred.data:
if (y_pred is not None and y_pred.data is not None): # if y_pred and y_pred.data: might introduce bug when the data is 0
y_label = y_pred.data
return self.eval_fn(y=y_label, y_gt=sample.answer)

Expand Down
Loading
Loading