birdfsd_yolov5.publishing package
Submodules
birdfsd_yolov5.publishing.generate_release module
- class birdfsd_yolov5.publishing.generate_release.GenerateRelease(run_path: str, version: str, train_folder: str, val_folder: str, dataset_folder: str, repo: Optional[str] = None, overwrite: bool = False)[source]
Bases:
object- find_file(run, fname: str) Optional[Union[tuple, list]][source]
Finds a file in a run and uploads it to imgbb.
- Parameters
run – The W&B run to use for the release.
fname (str) – A string, the name of the file to be found.
- Returns
None
- generate() None[source]
This method generates the release.
The method does the following: 1. Creates a directory for the release 2. Gets the f1-score of the run 3. Gets some data assets from the run 4. Creates the release notes 5. Generates a command to create the release
- Returns
None
birdfsd_yolov5.publishing.sync_model module
- exception birdfsd_yolov5.publishing.sync_model.ModelVersionFormatError[source]
Bases:
ExceptionException raised when a model version is not in the correct format.
- class birdfsd_yolov5.publishing.sync_model.SyncModel(model_version: str, model_name: str, run_path: str, classes_file: str, weights_file: str, weights_enc: str, config_file: str, train_date: str)[source]
Bases:
object- add_new_version() dict[source]
updates the database with the latest version.
This method updates the database with the latest version of the model. It first gets the labels from the database, then adds the new version of the model to the model collection in the database.
- Returns
The model that was added to the database.
- Return type
dict
- check_version_number_format() str[source]
Check the format of the model version.
Notes
The version number should be in the format of ‘vX.Y.Z’ or ‘vX.Y.Z-alpha.N’.
- Returns
The match object if the version is valid, None otherwise.
- Return type
re.Match
- Raises
ModelVersionFormatError – If the version is not valid.