Skip to content

Commit

Permalink
chore: add env variable for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Qazalbash committed Sep 27, 2024
1 parent a674f85 commit 78a3555
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/flowMC/utils/debug.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Copyright (c) 2022 Kaze Wong & contributor


import os

import jax.debug

DEBUG_VERBOSE = False


def enable_debug_verbose() -> None:
def enable_debug_verbose(verbose=True) -> None:
r"""Enables verbose in debugging mode."""
if not verbose:
verbose = os.getenv("FLOWMC_DEBUG_VERBOSE", 0)
global DEBUG_VERBOSE
DEBUG_VERBOSE = True
DEBUG_VERBOSE = bool(verbose)


def get_mode() -> bool:
Expand Down

0 comments on commit 78a3555

Please sign in to comment.