Skip to content

Commit

Permalink
Better logging power example (#167)
Browse files Browse the repository at this point in the history
* better logging for the power example

* better optuna loggin

* make tpe sampler use 1 job explicitly

* update learning reate

* log interval for learning rate

* fixed random seed bug

* make all range calls intervals in power

* fix database overwriting each other in power example
  • Loading branch information
simplymathematics authored Dec 1, 2023
1 parent d61215e commit dd341c7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/power/conf/torch_cifar10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hydra:
dir: ${files.directory}/logs/
subdir : ${hydra.sweeper.study_name}/${hydra.job.num}
sweeper:
study_name: ${device_id}_${stage}
study_name: ${stage}
sampler:
_target_: optuna.samplers.TPESampler
consider_prior: true
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/torch_cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hydra:
dir: ${files.directory}/logs/
subdir : ${hydra.sweeper.study_name}/${hydra.job.num}
sweeper:
study_name: ${device_id}_${stage}
study_name: ${stage}
sampler:
_target_: optuna.samplers.TPESampler
consider_prior: true
Expand Down
5 changes: 3 additions & 2 deletions examples/power/conf/torch_mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ hydra:
run:
dir: ${files.directory}/${files.reports}/logs/${stage}/
sweep:
dir: ${files.directory}/logs/
dir: ${files.directory}/logs/${hydra.sweeper.storage}
subdir : ${hydra.sweeper.study_name}/${hydra.job.num}
sweeper:
study_name: ${device_id}_${stage}
study_name: ${stage}
storage: sqlite:///model.db
sampler:
_target_: optuna.samplers.TPESampler
consider_prior: true
Expand Down
2 changes: 1 addition & 1 deletion examples/power/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ stages:
- ${files.directory}/${files.reports}/attack/${files.name}/${files.score_dict_file}:
cache: false
attacks:
cmd: python -m deckard.layers.optimise --multirun ++attack.attack_size=100 stage=attack ++hydra.sweeper.storage=sqlite:///${files.directory}/${data.generate.name}.db --config-name ${data.generate.name}.yaml
cmd: python -m deckard.layers.optimise --multirun ++attack.attack_size=100 stage=attack ++hydra.sweeper.storage=sqlite:///${files.directory}/${device_id}.db --config-name ${data.generate.name}.yaml
deps:
- ${files.directory}/${files.reports}/attack/${files.name}/${files.score_dict_file} # This is here just to ensure it runs after the attack stage
outs:
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/cifar100/conf/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hydra:
direction: ${direction}
study_name: control
storage: sqlite:///model.db
n_jobs: 8
n_jobs: 4
n_trials : 32
params:
++data.sample.random_state: choice(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
Expand Down

0 comments on commit dd341c7

Please sign in to comment.