MCPcopy
hub / github.com/dlt-hub/dlt / load_trace

Function load_trace

dlt/pipeline/trace.py:338–351  ·  view source on GitHub ↗
(trace_dir: str, ignore_errors: bool = True)

Source from the content-addressed store, hash-verified

336
337
338def load_trace(trace_dir: str, ignore_errors: bool = True) -> PipelineTrace:
339 try:
340 with open(os.path.join(trace_dir, TRACE_FILE_NAME), mode="rb") as f:
341 return pickle.load(f) # type: ignore
342 except FileNotFoundError:
343 # file not found return no trace
344 pass
345 except Exception as ex:
346 # we do not guarantee traces backward compat
347 if not ignore_errors:
348 raise
349 logger.warning(f"Error when loading trace at {trace_dir}: %s" % ex)
350
351 return None
352
353
354def get_trace_file_path(pipelines_dir: str, pipeline_name: str) -> str:

Callers 7

last_traceMethod · 0.90
test_save_load_traceFunction · 0.90
test_load_none_traceFunction · 0.90

Calls 2

joinMethod · 0.80
loadMethod · 0.45