Skip to content

Commit

Permalink
Merge branch 'master' into andrew/update-pyproj2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong authored Oct 1, 2024
2 parents fca94ee + 4ea695c commit 4cbafce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ test = [
# Integration Tests
"pytest-recording==0.13.1",
"vcrpy==6.0.1",
"semver==2.13.0", # Used for switching logic based on package versions (should be replaced with packaging!)

# serving tests
"flask",
Expand Down
4 changes: 2 additions & 2 deletions weave/integrations/litellm/litellm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import litellm
import pytest
import semver
from packaging.version import parse as version_parse

import weave

Expand All @@ -16,7 +16,7 @@
# We can handle this in non-streaming mode, but in streaming mode, we
# have no way of correctly capturing the output and not messing up the
# users' code (that i can see). In these cases, model cost is not captured.
USES_RAW_OPENAI_RESPONSE = semver.compare(version("litellm"), "1.42.11") > 0
USES_RAW_OPENAI_RESPONSE = version_parse(version("litellm")) > version_parse("1.42.11")


class Nearly:
Expand Down
2 changes: 1 addition & 1 deletion weave/trace/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _wandb_api_key_via_netrc_file(filepath: str) -> Optional[str]:
def weave_wandb_api_key() -> Optional[str]:
env_api_key = _wandb_api_key_via_env()
netrc_api_key = _wandb_api_key_via_netrc()
if env_api_key != netrc_api_key:
if env_api_key and netrc_api_key and env_api_key != netrc_api_key:
logger.warning(
"There are different credentials in the netrc file and the environment. Using the environment value."
)
Expand Down

0 comments on commit 4cbafce

Please sign in to comment.