Skip to content

Commit

Permalink
Use f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulPPelaez committed Oct 27, 2023
1 parent 7ed2e91 commit f480e43
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions torchmdnet/datasets/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ def __init__(
print("Number of files: ", len(self.files["pos"]))
self.cached = False
total_data_size = self._initialize_index()
print("Combined dataset size {}".format(len(self.index)))
print(f"Combined dataset size {len(self.index))}")
# If the dataset is small enough, load it whole into CPU memory
data_size_limit = preload_memory_limit * 1024 * 1024
if total_data_size < data_size_limit:
self.cached = True
print(
"Preloading Custom dataset (of size {:.2f} MB)".format(
total_data_size / 1024**2
)
f"Preloading Custom dataset (of size {total_data_size / 1024**2:.2f} MB)"
)
self._preload_data()
else:
Expand Down

0 comments on commit f480e43

Please sign in to comment.