generated from dataforgoodfr/d4g-project-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
063f858
commit d7c2bd7
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from client_wrapper import OpenAI | ||
from .client_wrapper import OpenAI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pytest | ||
|
||
from genai_impact.compute_impacts import compute_llm_impact | ||
|
||
|
||
@pytest.mark.parametrize('model_size,output_tokens', [ | ||
(130, 1000), | ||
(7, 150) | ||
]) | ||
def test_compute_impacts_is_positive(model_size: float, output_tokens: int) -> None: | ||
impacts = compute_llm_impact(model_size, output_tokens) | ||
assert impacts.energy >= 0 |