Commit da6153af authored by Yannick DAYER's avatar Yannick DAYER
Browse files

[py] Apply changes to annotate_samples command

parent 7c54afe1
Pipeline #44927 failed with stage
in 2 minutes and 6 seconds
......@@ -175,11 +175,16 @@ def annotate_samples(
"""
log_parameters(logger, ignore=("samples",))
# Wrapping that will save each sample at {output_dir}/{sample.key}.json
annotator = SaveAnnotationsWrapper(
annotator,
annotations_dir=output_dir,
overwrite=force,
# Allows passing of Sample objects as parameters
annotator = wrap(["sample"], annotator)
# Will save the annotations in the `data` fields to a json file
annotator = wrap(
bases=["checkpoint"],
estimator=annotator,
features_dir=output_dir,
save_func=save_annotations_to_json,
extension=".json",
)
# Allows reception of Dask Bags
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment