feat: add pkl file validation

This commit is contained in:
Eduardo Chiarotti
2024-08-08 19:46:20 -03:00
parent aa8640c086
commit 9232ac3e3f

View File

@@ -16,6 +16,9 @@ def train_crew(n_iterations: int, filename: str) -> None:
if n_iterations <= 0:
raise ValueError("The number of iterations must be a positive integer.")
if filename.endswith(".pkl"):
raise ValueError("The filename must not end with .pkl")
result = subprocess.run(command, capture_output=False, text=True, check=True)
if result.stderr: