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
a47c191b
Commit
a47c191b
authored
3 years ago
by
AxelCarayon
Browse files
Options
Downloads
Patches
Plain Diff
Ajout de la possibilité d'ajouter un fichier d'instruction
parent
257d91ca
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!20
Amelioration execution
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
loadExperiment.py
+2
-3
2 additions, 3 deletions
loadExperiment.py
registerExperiment.py
+14
-4
14 additions, 4 deletions
registerExperiment.py
with
16 additions
and
7 deletions
loadExperiment.py
+
2
−
3
View file @
a47c191b
...
...
@@ -47,6 +47,7 @@ def getParameters() -> None :
inputFiles
=
parameters
.
get
(
'
inputs
'
)
beforeHash
=
parameters
.
get
(
'
checksums
'
)
def
runExperiment
()
->
None
:
file
=
open
(
commandsFile
,
"
r
"
)
for
line
in
file
.
read
().
splitlines
():
...
...
@@ -92,6 +93,4 @@ def run(repository, branch) -> None :
if
(
compareChecksums
())
:
print
(
"
The exepriment was reproduced with succes but some output files are differents.
"
)
else
:
print
(
"
The exepriment was reproduced with succes !
"
)
#TODO : laisser à l'utilisateur le temps de reproduire l'experience
\ No newline at end of file
print
(
"
The exepriment was reproduced with succes !
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
registerExperiment.py
+
14
−
4
View file @
a47c191b
...
...
@@ -17,7 +17,8 @@ inputFiles = []
paramsFolder
=
None
paramsFiles
=
[]
commandsFile
=
"
commands.txt
"
commandsFile
=
None
instructionFile
=
None
experimentName
=
None
...
...
@@ -111,11 +112,19 @@ def searchForParamsFolder() -> None:
def
askForCommandsFile
()
->
None
:
global
commandsFile
commandsFile
=
input
(
"
Enter the name of the commands file:
"
)
if
commandsFile
==
""
:
raise
Exception
(
"
No commands file given
"
)
if
not
fileExists
(
commandsFile
):
raise
Exception
(
f
"
{
commandsFile
}
file does not exist
"
)
def
askForInstructionFile
()
->
None
:
global
instructionFile
print
(
"
If you have an instruction file, enter its name, otherwise press enter
"
)
instructionFile
=
input
()
if
instructionFile
==
""
:
warnings
.
warn
(
"
No instruction file given, make sure you give instructions to reproduce the experiment along with it
"
)
else
:
if
not
fileExists
(
instructionFile
):
raise
Exception
(
f
"
{
instructionFile
}
file does not exist
"
)
def
registeringExperimentInputs
(
inputs
)
->
None
:
with
open
(
commandsFile
,
"
w
"
)
as
file
:
for
input
in
inputs
:
...
...
@@ -224,6 +233,7 @@ def run(folder) -> None :
askForCommandsFile
()
runExperiment
()
else
:
askForInstructionFile
()
done
=
""
while
(
done
!=
"
done
"
):
done
=
input
(
"
Run your experiment and then type
'
done
'
when you are done :
"
)
...
...
@@ -235,4 +245,4 @@ def run(folder) -> None :
scanParameters
()
checkGeneratedFiles
()
writeInYaml
()
pushBranch
()
#
pushBranch()
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