Skip to content

Commit 188cccf

Browse files
committed
switch to using structlog
1 parent 58bff9e commit 188cccf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • src/rail/estimation/algos

src/rail/estimation/algos/gpz.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def run(self):
135135
sz = np.expand_dims(training_data[self.config.redshift_col], -1)
136136
# need permutation mask to define training vs validation
137137
ngal = input_array.shape[0]
138-
print(f"ngal: {ngal}")
138+
self.log.info(f"ngal: {ngal}")
139139
ntrain = int(ngal * self.config.train_frac)
140140
randvec = np.random.permutation(ngal)
141141
train_mask = np.zeros(ngal, dtype=bool)
@@ -156,7 +156,7 @@ def run(self):
156156
seed=self.config.seed,
157157
)
158158

159-
print("training model...")
159+
self.log.info("training model...")
160160
model.train(
161161
input_array,
162162
sz,
@@ -207,7 +207,7 @@ def __init__(self, args, **kwargs):
207207
)
208208

209209
def _process_chunk(self, start, end, data, first):
210-
print(f"Process {self.rank} estimating GPz PZ PDF for rows {start:,} - {end:,}")
210+
self.log.info(f"Process {self.rank} estimating GPz PZ PDF for rows {start:,} - {end:,}")
211211
test_array = _prepare_data(
212212
data,
213213
self.config.bands,

0 commit comments

Comments
 (0)