Skip to content

Commit 16e227d

Browse files
Handle input specification in multiply specifications
1 parent d7107b7 commit 16e227d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

models/rfd3/src/rfd3/engine.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,12 @@ def _multiply_specifications(
391391
design_specifications = {}
392392
for prefix, example_spec in inputs.items():
393393
# Record task name in the specification
394-
if "extra" not in example_spec:
395-
example_spec["extra"] = {}
396-
example_spec["extra"]["task_name"] = prefix
394+
if isinstance(example_spec, DesignInputSpecification):
395+
example_spec.extra['task_name'] = prefix
396+
else:
397+
if "extra" not in example_spec:
398+
example_spec["extra"] = {}
399+
example_spec["extra"]["task_name"] = prefix
397400

398401
# ... Create n_batches for example
399402
for batch_id in range((n_batches) if exists(n_batches) else 1):
@@ -409,7 +412,7 @@ def _multiply_specifications(
409412
f"Skipping design specification for example {example_id} | Already exists."
410413
)
411414
continue
412-
design_specifications[example_id] = example_spec
415+
design_specifications[example_id] = copy.deepcopy(example_spec)
413416
return design_specifications
414417

415418

0 commit comments

Comments
 (0)