Skip to content

Commit 8322c30

Browse files
authored
Read inference_dir as None if it's false in the config (#383)
The run method of visualize was taking the `inference_dir` value directly from the config (it defaults to `False`) and passing that to instantiate the InferenceDataset. InferenceDataset expects a Path or str (or None) as the data types for `result_dir`. The change here will set `input_dir` to `None` if it is `false` in the config.
1 parent 66aab00 commit 8322c30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hyrax/verbs/visualize.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def run(
9595
# If no input directory is specified, read from config.
9696
if input_dir is None:
9797
logger.info("UMAP directory not specified at runtime. Reading from config values.")
98-
input_dir = self.config["results"]["inference_dir"]
98+
input_dir = (
99+
self.config["results"]["inference_dir"] if self.config["results"]["inference_dir"] else None
100+
)
99101

100102
# Get the umap data and put it in a kdtree for indexing.
101103
self.umap_results = InferenceDataSet(self.config, results_dir=input_dir, verb="umap")

0 commit comments

Comments
 (0)