Skip to content

Commit

Permalink
#296: set tqdm log minimum to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Aug 7, 2024
1 parent a8e196a commit d84f757
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions alphadia/fdrexperimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def fit(self, x: np.ndarray, y: np.ndarray):
y_test = torch.from_numpy(y_test).float().to(self.device)

batch_count = 0
for epoch in tqdm(range(self.epochs)):
for epoch in tqdm(range(self.epochs), mininterval=5):
train_loss_sum = 0.0
test_loss_sum = 0.0

Expand Down Expand Up @@ -1122,7 +1122,7 @@ def fit(self, x: np.ndarray, y: np.ndarray):

batch_count = 0

for epoch in tqdm(range(self.epochs)):
for epoch in tqdm(range(self.epochs), mininterval=5):
# shuffle batches
order = np.random.permutation(num_batches)
batch_start_list = batch_start_list[order]
Expand Down
3 changes: 2 additions & 1 deletion alphadia/outputaccumulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ def ms2_quality_control(
precursor_df["frag_stop_idx"],
strict=True,
)
)
),
mininterval=5,
):
# get XIC correlations and intensities for the precursor
fragment_correlation_view = fragment_correlation_df.iloc[start_idx:stop_idx]
Expand Down
2 changes: 1 addition & 1 deletion alphadia/transferlearning/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _order_intensities(
The reordered fragment intensity dataframe.
"""
reordered = unordered_frag_df.copy()
for i in tqdm(range(len(reordered_precursor_df))):
for i in tqdm(range(len(reordered_precursor_df)), mininterval=5):
new_start_idx = reordered_precursor_df.iloc[i]["frag_start_idx"]
new_end_idx = reordered_precursor_df.iloc[i]["frag_stop_idx"]

Expand Down

0 comments on commit d84f757

Please sign in to comment.