geowatch.cli.experimental.fixup_predict_kwcoco_metadata module¶
- class geowatch.cli.experimental.fixup_predict_kwcoco_metadata.FixupPredictKwcocoMetadata(*args, **kwargs)[source]¶
Bases:
DataConfig
Update pre-0.15.1 kwcoco predictions to properly store train-time params.
The kwcoco info section of kwcoco files produced by geowatch.fusion.predict only contained the “data” section of the fit configuration. This script is able to fix one or more of those old predicted files as long as the path to the model is available. Warnings that direct users to this help document will typically give example usage that fixes one file, but multiple files can be fixed at once by specifying a glob pattern. The following example illustrates this.
CommandLine
# Say you have an old mlops directory of results DVC_EXPT_DPATH=$(geowatch_dvc --tags='phase3_expt' --hardware=auto) MLOPS_DPATH=$DVC_EXPT_DPATH/_preeval20_bas_grid # Construct a glob pattern that matches the kwcoco files that need to # be fixed, and pass it to this script. python -m geowatch.cli.experimental.fixup_predict_kwcoco_metadata \ --coco_fpaths "$MLOPS_DPATH/pred/flat/bas_pxl/*/pred.kwcoco.zip"
Note
This modifies input files INPLACE!
Valid options: []
- Parameters:
*args – positional arguments for this data config
**kwargs – keyword arguments for this data config
- classmethod main(cmdline=1, **kwargs)[source]¶
Example
>>> # xdoctest: +SKIP >>> from fixup_bad_fit_config import * # NOQA >>> cmdline = 0 >>> kwargs = dict() >>> cls = FixupBadFitConfigCLI >>> cls.main(cmdline=cmdline, **kwargs)
- default = {'coco_fpaths': <Value(None)>, 'workers': <Value(8)>}¶
- geowatch.cli.experimental.fixup_predict_kwcoco_metadata.fixup_pxl_pred_node_dpath(coco_fpath)[source]¶
- geowatch.cli.experimental.fixup_predict_kwcoco_metadata.main(cmdline=1, **kwargs)¶
Example
>>> # xdoctest: +SKIP >>> from fixup_bad_fit_config import * # NOQA >>> cmdline = 0 >>> kwargs = dict() >>> cls = FixupBadFitConfigCLI >>> cls.main(cmdline=cmdline, **kwargs)