Skip to content

Commit

Permalink
🐞 Fix category check for folder dataset in anomalib CLI (#567)
Browse files Browse the repository at this point in the history
* Fix category check

* Fix config file
  • Loading branch information
samet-akcay authored Sep 20, 2022
1 parent a055416 commit 4860abc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anomalib/utils/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __set_default_root_dir(self) -> None:
root_dir = config.trainer.default_root_dir if config.trainer.default_root_dir else "./results"
model_name = config.model.class_path.split(".")[-1].lower()
data_name = config.data.class_path.split(".")[-1].lower()
category = config.data.init_args.category if config.data.init_args.keys() else ""
category = config.data.init_args.category if "category" in config.data.init_args else ""
time_stamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
default_root_dir = os.path.join(root_dir, model_name, data_name, category, time_stamp)

Expand Down
2 changes: 1 addition & 1 deletion configs/model/fastflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ model:
hidden_ratio: 1.0 # options: [1.0, 1.0, 0.16, 0.16] - for each supported backbone

optimizer:
class_path: torch.optim._multi_tensor.Adam
class_path: torch.optim._multi_tensor.adam.Adam
init_args:
lr: 0.001
weight_decay: 0.00001
Expand Down

0 comments on commit 4860abc

Please sign in to comment.