Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reproductionTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMAC
Reproductibilité des recherches dans SMAC
reproductionTool
Commits
fc5c2f43
Unverified
Commit
fc5c2f43
authored
3 years ago
by
AxelCarayon
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into gestionTags
parents
9dc99004
b0e29d2f
No related branches found
No related tags found
1 merge request
!12
lors d'un enregistrement, vérifie que la branche de départ a un tag. …
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
registerExperiment.py
+25
-3
25 additions, 3 deletions
registerExperiment.py
with
25 additions
and
3 deletions
registerExperiment.py
+
25
−
3
View file @
fc5c2f43
...
...
@@ -16,7 +16,7 @@ inputFiles = []
paramsFolder
=
None
commandsFile
=
None
commandsFile
=
"
commands.txt
"
experimentName
=
None
...
...
@@ -91,6 +91,24 @@ def askForCommandsFile() -> None:
if
not
fileExists
(
commandsFile
):
raise
Exception
(
f
"
{
commandsFile
}
file does not exist
"
)
def
captureExperiment
()
->
None
:
print
(
"
Capturing commands in terminal, when the experiment is done, type
\"
done
\"
"
)
inputs
=
[]
userInput
=
input
()
while
(
userInput
!=
"
done
"
):
inputs
.
append
(
userInput
)
process
=
subprocess
.
run
(
userInput
,
shell
=
True
)
process
.
check_returncode
()
userInput
=
input
()
print
(
f
"
Done recording the experiment, writing commands in a
{
commandsFile
}
file
"
)
registeringExperimentInputs
(
inputs
)
def
registeringExperimentInputs
(
inputs
)
->
None
:
with
open
(
commandsFile
,
"
w
"
)
as
file
:
for
input
in
inputs
:
file
.
write
(
input
+
"
\n
"
)
def
runExperiment
()
->
None
:
print
(
"
Trying to run experiment
"
)
file
=
open
(
commandsFile
,
"
r
"
)
...
...
@@ -162,8 +180,12 @@ def run(folder) -> None :
searchForInputFolder
()
searchForOutputFolder
()
searchForParamsFolder
()
askForCommandsFile
()
runExperiment
()
userInput
=
input
(
"
Do you have a pre-recorded commands file? (y/n)
"
)
if
userInput
==
"
y
"
:
askForCommandsFile
()
runExperiment
()
else
:
captureExperiment
()
scanInputFiles
()
scanOutputsGenerated
()
writeInYaml
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment