Skip to content

Commit

Permalink
Refact: suppress external logger info messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohil8 committed May 21, 2024
1 parent 82a2856 commit 50661c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osl_dynamics/analysis/power.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ def parcel_vector_to_voxel_grid(mask_file, parcellation_file, vector):
Value at each voxel. Shape is (x, y, z), where :code:`x`,
:code:`y` and :code:`z` correspond to 3D voxel locations.
"""
# Suppress INFO messages from nibabel
logging.getLogger("nibabel.global").setLevel(logging.ERROR)

# Validation
mask_file = files.check_exists(mask_file, files.mask.directory)
parcellation_file = files.check_exists(
Expand Down
3 changes: 3 additions & 0 deletions osl_dynamics/models/hmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def fit(self, dataset, epochs=None, use_tqdm=False, verbose=1, **kwargs):
Dictionary with history of the loss and learning rates (:code:`lr`
and :code:`rho`).
"""
# Suppress INFO messages from numba
logging.getLogger("numba.core.transforms").setLevel(logging.ERROR)

if epochs is None:
epochs = self.config.n_epochs

Expand Down

0 comments on commit 50661c1

Please sign in to comment.