Skip to content

Commit

Permalink
Reduce Ray logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
m-samland committed Apr 22, 2024
1 parent 02a6a95 commit 22c0fb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/trap/reduction_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
MPIA Heidelberg
"""

import logging
import os

os.environ["RAY_LOG_TO_STDERR"] = "1"
Expand Down Expand Up @@ -1813,7 +1814,10 @@ def run_complete_reduction(
and not reduction_parameters.reduce_single_position
):
ray.shutdown()
ray.init(num_cpus=min(reduction_parameters.ncpus, multiprocessing.cpu_count()), log_to_driver=False)
ray.init(
num_cpus=min(reduction_parameters.ncpus, multiprocessing.cpu_count()),
log_to_driver=False,
logging_level=logging.ERROR)

# Loop over reductions for different numbers of components
for comp_index, ncomp in enumerate(number_of_components):
Expand Down

0 comments on commit 22c0fb8

Please sign in to comment.