geowatch.mlops.smart_result_parser module¶
This is a very task-specific file containing logic to parse fusion pipeline metrics for BAS and SC.
Used by ./aggregate_loader.py
- geowatch.mlops.smart_result_parser.parse_json_header(fpath)[source]¶
Ideally the information we need is in the first few bytes of the json file
- geowatch.mlops.smart_result_parser.parse_json_header_cached(fpath)¶
Ideally the information we need is in the first few bytes of the json file
- geowatch.mlops.smart_result_parser.trace_json_lineage(fpath)[source]¶
We will expect a json file to contain a top-level “info” section that indicates how it is derived.
fpath = ‘/home/joncrall/remote/toothbrush/data/dvc-repos/smart_expt_dvc/models/fusion/Aligned-Drop4-2022-08-08-TA1-S2-L8-ACC/pred/trk/Drop4_BAS_Retrain_V002_epoch=31-step=16384.pt.pt/Aligned-Drop4-2022-08-08-TA1-S2-L8-ACC_data.kwcoco/trk_pxl_b788335d/trk_poly_f2218f0b/tracks.kwcoco.json’
- geowatch.mlops.smart_result_parser.load_iarpa_evaluation(fpath)[source]¶
- Parameters:
fpath (PathLike | str) – path to the IARPA summary json file
- Returns:
- containing keys:
- metrics -
which just contains a flat Dict[str, float] metric dictionary
- iarpa_info -
which contains ALL of the information parsed out of the summary json file.
- Return type:
Dict
- geowatch.mlops.smart_result_parser.load_pxl_eval(fpath, expt_dvc_dpath=None, arg_prefix='', mode=0, with_param_types=True)[source]¶
- geowatch.mlops.smart_result_parser.resolve_cross_machine_path(path, dvc_dpath=None)[source]¶
HACK
Attempt to determine what the local path to a file/directry would be if it exists on this machine. This assumes the path is something that was checked into DVC.
- Parameters:
dvc_dpath – the preferred dvc dpath to associate the file with in case the older one points to multiple.
- geowatch.mlops.smart_result_parser.relevant_pred_pxl_config(pred_pxl_config, dvc_dpath=None, arg_prefix='')[source]¶