Skip to content

Commit

Permalink
introduce cloud logging
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski committed Dec 7, 2024
1 parent 2b6476e commit 732d8b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions run_all_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,21 @@
from multiprocessing import Pool, Process
from typing import Any

import google.cloud.logging

import run_one_experiment
from data_prep import introspector
from experiment import benchmark as benchmarklib
from experiment import evaluator, oss_fuzz_checkout, textcov
from experiment.workdir import WorkDirs
from llm_toolkit import models, prompt_builder

try:
client = google.cloud.logging.Client()
client.setup_logging()
except google.auth.exceptions.DefaultCredentialsError:
pass

logger = logging.getLogger(__name__)

# WARN: Avoid large NUM_EXP for local experiments.
Expand Down Expand Up @@ -515,6 +523,9 @@ def main():

args = parse_args()
_setup_logging(args.log_level)
logging.info('Starting experiments on PR branch')
logging.warning('Warning from logging')
logging.error('Error from exp')
logger.info('Starting experiments on PR branch')

# Capture time at start
Expand Down

0 comments on commit 732d8b9

Please sign in to comment.