kwcoco.cli.coco_move_assets module¶
- class kwcoco.cli.coco_move_assets.CocoMoveAssetsCLI(*args, **kwargs)[source]¶
Bases:
DataConfig
Move assets and update corresponding kwcoco files as well
Note
The options: src and dst refer to folderes of asset, NOT kwcoco files. Think about this the same way you think about moving files. All kwcoco files that reference the moved assets need to be specified so they can have their paths updated. Unspecified kwcoco files may break.
This modifies the kwcoco files inplace.
This operation is not atomic and if it is interupted then your kwcoco bundle may be put into a bad state.
Valid options: []
- Parameters:
*args – positional arguments for this data config
**kwargs – keyword arguments for this data config
- default = {'coco_fpaths': <Value([])>, 'dst': <Value('destination asset file or folder')>, 'io_workers': <Value(0)>, 'src': <Value('source asset file or folder')>}¶
- class kwcoco.cli.coco_move_assets.CocoMoveAssetManager(coco_dsets)[source]¶
Bases:
object
- kwcoco.cli.coco_move_assets.main(cmdline=1, **kwargs)[source]¶
Example
>>> # xdoctest: +SKIP >>> cmdline = 0 >>> kwargs = dict( >>> coco_fpaths=['*_E.kwcoco.zip', '*_mae.kwcoco.zip'], >>> src='./_assets/teamfeats', >>> dst='./teamfeats/mae', >>> io_workers='avail', >>> )
>>> cmdline = 0 >>> kwargs = dict( >>> coco_fpaths=['*_M.kwcoco.zip', '*_rutgers_material_seg_v4.kwcoco.zip'], >>> src='./_teamfeats', >>> dst='./teamfeats/materials', >>> io_workers='avail', >>> ) >>> main(cmdline=cmdline, **kwargs)