Skip to content
Snippets Groups Projects
Commit 473af229 authored by Alán Muñoz's avatar Alán Muñoz
Browse files

bugfix positions where real ntps < ntps in meta

parent a4f2f48a
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,8 @@ class Pipeline(ProcessABC):
ext = Extractor.from_tiler(exparams, store=filename, tiler=tiler)
# RUN
tps = general_config["tps"]
# Adjust tps based on how many tps are available on the server
tps = min(general_config["tps"], image.data.shape[0])
frac_clogged_traps = 0
for i in tqdm(
range(process_from, tps), desc=image.name, initial=process_from
......@@ -359,6 +360,17 @@ class Pipeline(ProcessABC):
overwrite=swriter.datatypes.keys(),
)
meta.add_fields({"last_processed": i})
import pickle as pkl
with open(
Path(bwriter.file).parent / f"{i}_live_state.pkl", "wb"
) as f:
pkl.dump(runner.crawler.tracker_states, f)
with open(
Path(bwriter.file).parent / f"{i}_read_state.pkl", "wb"
) as f:
pkl.dump(StateReader(bwriter.file).get_formatted_states(), f)
# Run post processing
meta.add_fields({"end_status": "Success"})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment