Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 279b279

Browse files
authored
feat: create_score add warn when passing genration_id (#139)
1 parent 7909f43 commit 279b279

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ipython_config.py
9191
# pyenv
9292
# For a library or package, you might want to ignore these files since the code is
9393
# intended to run in multiple environments; otherwise, check them in:
94-
# .python-version
94+
.python-version
9595

9696
# pipenv
9797
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.

literalai/api/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ def create_score(
583583
Returns:
584584
The created Score object.
585585
"""
586+
if generation_id:
587+
logger.warning(
588+
"generation_id is deprecated and will be removed in a future version, please use step_id instead"
589+
)
586590
check_scores_finite([{"name": name, "value": value}])
587591

588592
return self.gql_helper(
@@ -1832,6 +1836,10 @@ async def create_score(
18321836
Returns:
18331837
The result of the GraphQL helper function for creating a score.
18341838
"""
1839+
if generation_id:
1840+
logger.warning(
1841+
"generation_id is deprecated and will be removed in a future version, please use step_id instead"
1842+
)
18351843
check_scores_finite([{"name": name, "value": value}])
18361844

18371845
return await self.gql_helper(

0 commit comments

Comments
 (0)