Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix filename #138

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deckard/base/files/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def __init__(
self.data_type = data_type
self.model_type = model_type
self.attack_type = attack_type
self.directory = directory if directory is not None else Path.cwd()
self.directory = (
Path(directory).as_posix()
if Path(directory).is_absolute()
else Path(Path(), directory).as_posix()
)
self.name = name
self.stage = stage
self.files = files
Expand Down
6 changes: 3 additions & 3 deletions deckard/layers/optimise.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ def parse_stage(stage: str = None, params: dict = None, path=None) -> dict:
for stage in stages:
pipe = yaml.load(f, Loader=yaml.FullLoader)["stages"][stage]
if "deps" in pipe:
dep_list = [x.split(":")[0] for x in pipe["deps"]]
dep_list = [str(x).split(":")[0] for x in pipe["deps"]]
file_list.extend(dep_list)
if "outs" in pipe:
out_list = [x.split(":")[0] for x in pipe["outs"]]
out_list = [str(x).split(":")[0] for x in pipe["outs"]]
file_list.extend(out_list)
if "metrics" in pipe:
metric_list = [x.split(":")[0] for x in pipe["metrics"]]
metric_list = [str(x).split(":")[0] for x in pipe["metrics"]]
file_list.extend(metric_list)
file_string = str(file_list)
files = params["files"]
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions examples/power/conf/data/torch_cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _target_: deckard.base.data.Data
generate:
_target_: deckard.base.data.generator.DataGenerator
name: torch_cifar100
path: original_data/
sample:
_target_: deckard.base.data.sampler.SklearnDataSampler
random_state : 0
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-cpu/cifar10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar10.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar10.yaml"]
env:
- name: DECKARD_DEVICE
value: "cpu"
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-cpu/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar100.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar100.yaml"]
env:
- name: DECKARD_DEVICE
value: "cpu"
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-cpu/mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "mnist.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_mnist.yaml"]
env:
- name: DECKARD_DEVICE
value: "cpu"
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-a100/cifar10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar10.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar10.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-a100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-a100/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar100.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar100.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-a100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-a100/mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "mnist.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_mnist.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-a100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-p100/cifar10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar10.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar10.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-p100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-p100/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar100.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar100.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-p100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-p100/mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "mnist.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_mnist.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-p100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-v100/cifar10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar10.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar10.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-v100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-v100/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "cifar100.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_cifar100.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-v100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/deploy-nvidia-tesla-v100/mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
image: ghcr.io/simplymathematics/deckard:main
imagePullPolicy: Always
workingDir: /deckard/examples/power/
args: ["python", "-m", "deckard", "--config_file", "mnist.yaml"]
args: ["python", "-m", "deckard", "--config_file", "torch_mnist.yaml"]
env:
- name: DECKARD_DEVICE
value: nvidia-tesla-v100
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/files/cifar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ reports: reports
data_dir: data
model_dir: models
attack_dir: attacks
directory: /result/
directory: /result/cifar/
score_dict_file: score_dict.json
data_file : data
model_file : model
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/files/cifar100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ reports: reports
data_dir: data
model_dir: models
attack_dir: attacks
directory: /result/
directory: /result/cifar100/
score_dict_file: score_dict.json
data_file : data
model_file : model
Expand Down
2 changes: 1 addition & 1 deletion examples/power/conf/files/mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ reports: reports
data_dir: data
model_dir: models
attack_dir: attacks
directory: /result/
directory: /result/mnist/
score_dict_file: score_dict.json
data_file : data
model_file : model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ optimizers:
_target_ : deckard.base.experiment.Experiment
hydra:
run:
dir: ${files.directory}/${files.reports}/${stage}/logs
dir: ${files.directory}/${files.reports}/${stage}/logs/${data.generate.name}
sweep:
dir: ${files.directory}/${stage}/${model.init.name}
dir: ${files.directory}/${stage}/${data.generate.name}
subdir : ${hydra.sweeper.study_name}/${hydra.job.num}
sweeper:
study_name: ${model.init.name}
Expand All @@ -40,7 +40,7 @@ hydra:
consider_magic_clip: true
consider_endpoints: false
n_startup_trials: 10 # default: 10
n_startup_trials: 24 # default: 24
n_ei_candidates: 24 # default: 24
multivariate: true
warn_independent_sampling: true
n_trials : 100
Expand Down
Loading
Loading