Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Registry #130

Merged
merged 15 commits into from
Aug 31, 2023
Merged

Config Registry #130

merged 15 commits into from
Aug 31, 2023

Conversation

renezurbruegg
Copy link
Collaborator

@renezurbruegg renezurbruegg commented Aug 23, 2023

This pull request aims to close #128 and create a simpler way to resolve config files.

It allows the user to specify a config in the CLI using different ways:

  1. Provide the path to the config file:
    - vis4d [train|test] --config /absolute/path/to/file<.py|.yaml>
    - vis4d [train|test] --config relative/path/to/file<.py|.yaml>

    Per default, the framework will try to match these files to an existing config file at the specified absolute or relative location.
    If the file does not exist, it will try to resolve the relative path in the vis4d zoo folder.
    If the file is still not found, a "did you mean,..." message will be displayed with the closest matching configs, if any exist.

  2. Provide the short name of a zoo config:
    The existing configs in the zoo folder can be easily accessed by providing the model name. E.g.
    - vis4d [train|test] --config faster_rcnn_r50_1x_bdd100k

    If the file does not exist, a did you mean message will be created:
    Example:
    vis4d train--config faster_rcnn_50r_x_bdd100k

     ` faster_rcnn_r_x_bdd100k` does not exist. 
    Did you mean: 
      faster_rcnn_r50_1x_bdd100k
      faster_rcnn_r50_3x_bdd100k
    

@renezurbruegg
Copy link
Collaborator Author

renezurbruegg commented Aug 23, 2023

  • Add decorator to easy add custom config
  • Documentation

@renezurbruegg
Copy link
Collaborator Author

renezurbruegg commented Aug 30, 2023

Additional Functionalities:
List all available configs:
$ vis4d-zoo list

bdd100k
 ├─ faster_rcnn_r50_1x_bdd100k
 ├─ faster_rcnn_r50_3x_bdd100k
 ├─ mask_rcnn_r50_1x_bdd100k
 ├─ mask_rcnn_r50_3x_bdd100k
 ├─ mask_rcnn_r50_5x_bdd100k
 ├─ semantic_fpn_r50_40k_bdd100k
 ├─ semantic_fpn_r50_80k_bdd100k
 └─ semantic_fpn_r101_80k_bdd100k
cc_3dt
 ├─ cc_3dt_frcnn_r50_fpn_kf3d_12e_nusc
 ├─ cc_3dt_frcnn_r101_fpn_kf3d_24e_nusc
 ├─ cc_3dt_frcnn_r101_fpn_velo_lstm_24e_nusc
 └─ cc_3dt_nusc_vis
bevformer
 ├─ bevformer_base
 ├─ bevformer_tiny
 └─ bevformer_vis
faster_rcnn
 └─ faster_rcnn_coco
fcn_resnet
 └─ fcn_resnet_coco
mask_rcnn
 └─ mask_rcnn_coco
qdtrack
 ├─ qdtrack_bdd100k
 └─ qdtrack_yolox_bdd100k
retinanet
 └─ retinanet_coco
shift
 ├─ faster_rcnn_r50_6e_shift_all_domains
 ├─ faster_rcnn_r50_12e_shift
 ├─ faster_rcnn_r50_36e_shift
 ├─ mask_rcnn_r50_6e_shift_all_domains
 ├─ mask_rcnn_r50_12e_shift
 ├─ mask_rcnn_r50_36e_shift
 ├─ semantic_fpn_r50_40k_shift_all_domains
 ├─ semantic_fpn_r50_40k_shift
 ├─ semantic_fpn_r50_160k_shift_all_domains
 └─ semantic_fpn_r50_160k_shift
vit
 ├─ vit_small_imagenet
 └─ vit_tiny_imagenet
yolox
 ├─ yolox_s_300e_coco
 └─ yolox_tiny_300e_coco 

Register a custom config:

 @register_config("my_model", "model_2ep_bdd100k")
 def my_config_function():
      .... do stuff
      
config = get_config_by_name("model_2ep_bdd100k")

@renezurbruegg renezurbruegg marked this pull request as ready for review August 30, 2023 08:32
@renezurbruegg renezurbruegg merged commit 76859d4 into main Aug 31, 2023
2 checks passed
@renezurbruegg renezurbruegg deleted the feature/config_registry branch August 31, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create config registry
2 participants