Skip to content

Commit

Permalink
split: further split trace and legacy env
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Aug 27, 2024
1 parent 11003d5 commit 34958ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions weave/trace/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@

def get_weave_parallelism() -> int:
return int(os.getenv(WEAVE_PARALLELISM, "20"))


def wandb_production() -> bool:
return os.getenv("WEAVE_ENV") == "wandb_production"
2 changes: 1 addition & 1 deletion weave/trace/op_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from typing import Any, Callable, Optional, Union, get_args, get_origin

from weave.legacy.weave import artifact_fs, context_state, errors, storage
from weave.trace import env as environment
from weave.trace.ipython import (
ClassNotFoundError,
get_class_source,
Expand All @@ -22,7 +23,6 @@
from weave.trace.op import Op
from weave.trace.refs import ObjectRef

from ..legacy.weave import environment
from . import serializer

WEAVE_OP_PATTERN = re.compile(r"@weave\.op(\(\))?")
Expand Down

0 comments on commit 34958ba

Please sign in to comment.