Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Helicone Lock Manager fix
Browse files Browse the repository at this point in the history
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
  • Loading branch information
waynehamadi committed Aug 6, 2023
1 parent 5232522 commit fa63f63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion agbenchmark/generate_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import glob
import importlib
import os
import sys
import types
from collections import deque
Expand Down Expand Up @@ -58,7 +59,8 @@ def create_single_test(
def test_method(self, config: Dict[str, Any], request) -> None: # type: ignore
from helicone.lock import HeliconeLockManager

HeliconeLockManager.write_custom_property("challenge", self.data.name)
if os.environ.get("HELICONE_API_KEY"):
HeliconeLockManager.write_custom_property("challenge", self.data.name)

cutoff = self.data.cutoff or 60
self.setup_challenge(config, cutoff)
Expand Down
6 changes: 4 additions & 2 deletions agbenchmark/start_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

CURRENT_DIRECTORY = Path(__file__).resolve().parent
BENCHMARK_START_TIME = datetime.now().strftime("%Y-%m-%d-%H:%M")

HeliconeLockManager.write_custom_property("benchmark_start_time", BENCHMARK_START_TIME)
if os.environ.get("HELICONE_API_KEY"):
HeliconeLockManager.write_custom_property(
"benchmark_start_time", BENCHMARK_START_TIME
)

(
HOME_DIRECTORY,
Expand Down

0 comments on commit fa63f63

Please sign in to comment.