Skip to content

Commit

Permalink
Update registry syntax for v1
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Oct 10, 2024
1 parent 53f6d98 commit 6ac0e2b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ceci/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,14 +528,16 @@ def data_registry_lookup(self, info): #pragma: no cover
results = registry.Query.find_datasets(["dataset.dataset_id"], [filter])

# Check that we find exactly one dataset matching the query
results = list(results)
if len(results) == 0:
if not results:
raise ValueError(f"Could not find any dataset matching {info} in registry")
elif len(results) > 1:

results = results['dataset.dataset_id']

if len(results) > 1:
raise ValueError(f"Found multiple datasets matching {info} in registry")

# Get the absolute path
return registry.Query.get_dataset_absolute_path(results[0].dataset_id)
return registry.Query.get_dataset_absolute_path(results[0])


def process_overall_inputs(self, inputs):
Expand Down

0 comments on commit 6ac0e2b

Please sign in to comment.