Skip to content

Commit

Permalink
Merge pull request #1228 from openvinotoolkit/ns/CVS-89912-fix
Browse files Browse the repository at this point in the history
[CVS-89912] Fixed config path computation
  • Loading branch information
goodsong81 authored Aug 26, 2022
2 parents 3dd9207 + 46edd50 commit 3140397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion external/anomaly/tasks/nncf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ def load_model(self, ote_model: Optional[ModelEntity]) -> AnomalyModule:
classification or segmentation model with/without weights.
"""
# replaces the templates dir with configs and removes task type
anomaly_dir = self.base_dir.partition("/templates/")[0]
nncf_config_path = os.path.join(
self.base_dir.partition("templates")[0], "configs", self.base_dir.split("/")[-1], "compression_config.json"
anomaly_dir, "configs", self.base_dir.split("/")[-1], "compression_config.json"
)

with open(nncf_config_path, encoding="utf8") as nncf_config_file:
Expand Down

0 comments on commit 3140397

Please sign in to comment.