Skip to content
Snippets Groups Projects
Commit 51ff18ed authored by AxelCarayon's avatar AxelCarayon
Browse files

Permet à l'utilisateur de choisir un fichier d'outputs (ou aucun)

parent 38a3c7da
No related branches found
No related tags found
1 merge request!15Permet à l'utilisateur de choisir un fichier d'outputs (ou aucun)
...@@ -4,6 +4,7 @@ import subprocess ...@@ -4,6 +4,7 @@ import subprocess
import yaml import yaml
import hashlib import hashlib
import collections import collections
import warnings
EXPERIMENT_RESUME = "experimentResume.yaml" EXPERIMENT_RESUME = "experimentResume.yaml"
...@@ -79,12 +80,16 @@ def searchForInputFolder() -> None: ...@@ -79,12 +80,16 @@ def searchForInputFolder() -> None:
def searchForOutputFolder() -> None: def searchForOutputFolder() -> None:
global outputFolder global outputFolder
print("Searching for output folder...") answer = input("Where are the outputs generated ? Give the path from the root of the repository : ")
if folderExists("outputs"): if answer == "":
outputFolder = "outputs/" warnings.warn("No output folder given, no output files will be registered")
print(f"{path}{outputFolder} found !")
else: else:
raise Exception(f"{path}/outputs folder does not exist") if not folderExists(answer):
raise Exception(f"{answer} folder does not exist")
else:
if not answer.endswith("/"):
answer+="/"
outputFolder = answer
def searchForParamsFolder() -> None: def searchForParamsFolder() -> None:
global paramsFolder global paramsFolder
...@@ -203,7 +208,8 @@ def run(folder) -> None : ...@@ -203,7 +208,8 @@ def run(folder) -> None :
else: else:
captureExperiment() captureExperiment()
scanInputFiles() scanInputFiles()
scanOutputsGenerated() if outputFolder != None :
scanOutputsGenerated()
checkGeneratedFiles() checkGeneratedFiles()
writeInYaml() writeInYaml()
pushBranch() #pushBranch()
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment