Skip to content

Commit

Permalink
add field 'recipe_metadata' already at loading stage, to prepare for …
Browse files Browse the repository at this point in the history
…the actual meta_data/.. in the sequel

Signed-off-by: dafnapension <[email protected]>
  • Loading branch information
dafnapension committed Nov 29, 2024
1 parent bb392bc commit acdc7ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/unitxt/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def add_data_classification(self, multi_stream: MultiStream) -> MultiStream:
)

operator = Set(
fields={"data_classification_policy": self.data_classification_policy}
fields={
"data_classification_policy": self.data_classification_policy,
"recipe_metadata": {},
}
)
return operator(multi_stream)

Expand Down
1 change: 0 additions & 1 deletion src/unitxt/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def process(
self.apply(template, demo_instance)
for demo_instance in instance[self.demos_field]
]
dict_set(instance, "recipe_metadata", {})
dict_set(instance, "recipe_metadata/template", template)
return self.apply(template, instance, stream_name)

Expand Down
4 changes: 2 additions & 2 deletions utils/.secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"filename": "src/unitxt/loaders.py",
"hashed_secret": "840268f77a57d5553add023cfa8a4d1535f49742",
"is_verified": false,
"line_number": 483,
"line_number": 486,
"is_secret": false
}
],
Expand Down Expand Up @@ -184,5 +184,5 @@
}
]
},
"generated_at": "2024-11-25T11:33:41Z"
"generated_at": "2024-11-29T18:34:15Z"
}

0 comments on commit acdc7ac

Please sign in to comment.