Skip to content

Commit 0aae85b

Browse files
committed
Made the test cases cover more ground
1 parent 13daad7 commit 0aae85b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/test_hparams.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test_hparams_log_dir = "test_hparams_logs/"
77
isdir(test_hparams_log_dir) && rm(test_hparams_log_dir, force=true, recursive=true)
88

99
# Create a new logger
10-
for (i, trial_id) in enumerate(["run1", "run2", "run3"])
10+
for (i, trial_id) in enumerate(["run$k" for k in 1:20])
1111
logger = TBLogger(test_hparams_log_dir*trial_id, tb_append)
1212

1313
# Add in the a dummy loss metric
@@ -18,13 +18,14 @@ test_hparams_log_dir = "test_hparams_logs/"
1818
end
1919

2020
# Setup example hyperparameters
21-
# hparams_config = Dict{String, Any}(
22-
# "alpha"=>0.5,
23-
# "id"=>Float64(i),
24-
# "is_testing"=>(i%2==0)
25-
# )
2621
hparams_config = Dict{String, Any}(
2722
"id"=>Float64(i),
23+
"alpha"=>0.5,
24+
"p1"=>rand(),
25+
"p2"=>sqrt(rand()),
26+
"p3"=>rand()^5,
27+
"optimisations"=>(i%2==0),
28+
"method"=>rand(("MC", "SGD"))
2829
)
2930
metrics = ["scalar/loss"]
3031

0 commit comments

Comments
 (0)