We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5b500e commit 2869780Copy full SHA for 2869780
src/boostedhh/submit_utils.py
@@ -250,14 +250,14 @@ def submit(
250
def replace_batch_size(file_path: Path, new_batch_size: int):
251
"""Replacing batch size in given file"""
252
import re
253
-
+
254
# Read the file
255
- with file_path.open('r') as file:
+ with file_path.open("r") as file:
256
content = file.read()
257
258
# Replace using regex
259
- updated_content = re.sub(r'--batch-size \d+', f'--batch-size {new_batch_size}', content)
260
+ updated_content = re.sub(r"--batch-size \d+", f"--batch-size {new_batch_size}", content)
261
# Write back to the file
262
- with open(file_path, 'w') as file:
263
- file.write(updated_content)
+ with file_path.open("w") as file:
+ file.write(updated_content)
0 commit comments