Adding "meta" to the dataset target in recipe


I need to add metadata to the dataset_target that is created in the textcat.manual recipe. Is there a way of passing data to the meta argument from db.add_dataset(name, meta={}) when the recipe is loaded?

I already have a custom DB connection and custom commands that use its methods, but I don't have access to db.add_dataset(name, meta) when I serve a (custom) recipe. It seems that this method is called when the recipe's loaded and the dataset is created at the Prodigy server?

I tried updating the metadata with an on_exit hook, by calling the controller and using the update method. The problem is that I need to include other data (eg. uuid, project, etc.) that is not in the DB nor the answers, and that is passed to the recipe but cannot be passed to the on_exit hook.

I solved this by applying an update_metadata() method as an on_exit hook, following this example Dataset management - #3 by gustav.

1 Like