Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BayesianOptimization
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
Model registry
Operate
Environments
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
shamith2
BayesianOptimization
Commits
8af4463a
Unverified
Commit
8af4463a
authored
5 years ago
by
Shamith Achanta
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update run_BO.py
parent
27f86b98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HyperSphere/BO/run_BO.py
+3
-3
3 additions, 3 deletions
HyperSphere/BO/run_BO.py
with
3 additions
and
3 deletions
HyperSphere/BO/run_BO.py
+
3
−
3
View file @
8af4463a
...
@@ -5,10 +5,10 @@ import sys
...
@@ -5,10 +5,10 @@ import sys
import
time
import
time
from
datetime
import
datetime
from
datetime
import
datetime
sys
.
path
.
append
(
r
'
/home/shamith/
'
)
sys
.
path
.
append
(
r
'
/home/shamith/
'
)
# change path to where target.py is located
from
target
import
*
from
target
import
*
EXPERIMENT_DIR
=
'
/home/shamith/
HyperSphere
/HyperSphere/experiments/
'
# change
(d) directory
EXPERIMENT_DIR
=
'
/home/shamith/
BayesianOptimization
/HyperSphere/experiments/
'
# change
path to where experiments dir is to be located
import
torch
import
torch
from
torch.autograd
import
Variable
from
torch.autograd
import
Variable
...
@@ -75,7 +75,7 @@ def BO(geometry=None, n_eval=200, path=None, func=None, ndim=None, boundary=Fals
...
@@ -75,7 +75,7 @@ def BO(geometry=None, n_eval=200, path=None, func=None, ndim=None, boundary=Fals
bnd
=
(
-
1
,
1
)
bnd
=
(
-
1
,
1
)
if
not
os
.
path
.
isdir
(
EXPERIMENT_DIR
):
if
not
os
.
path
.
isdir
(
EXPERIMENT_DIR
):
raise
ValueError
(
'
In file :
'
+
os
.
path
.
realpath
(
__file__
)
+
'
\n
EXPERIMENT_DIR variable is not properly assigned. Please check it.
'
)
os
.
mkdir
(
EXPERIMENT_DIR
)
dir_list
=
[
elm
for
elm
in
os
.
listdir
(
EXPERIMENT_DIR
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
EXPERIMENT_DIR
,
elm
))]
dir_list
=
[
elm
for
elm
in
os
.
listdir
(
EXPERIMENT_DIR
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
EXPERIMENT_DIR
,
elm
))]
folder_name
=
func
.
__name__
+
'
_D
'
+
str
(
ndim
)
+
'
_
'
+
exp_conf_str
+
'
_
'
+
datetime
.
now
().
strftime
(
'
%Y%m%d-%H:%M:%S:%f
'
)
folder_name
=
func
.
__name__
+
'
_D
'
+
str
(
ndim
)
+
'
_
'
+
exp_conf_str
+
'
_
'
+
datetime
.
now
().
strftime
(
'
%Y%m%d-%H:%M:%S:%f
'
)
os
.
makedirs
(
os
.
path
.
join
(
EXPERIMENT_DIR
,
folder_name
))
os
.
makedirs
(
os
.
path
.
join
(
EXPERIMENT_DIR
,
folder_name
))
...
...
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