foxai.cli package
Submodules
foxai.cli.config_model module
File contains definition of CLI program config data model.
- class foxai.cli.config_model.ConfigDataModel(method_config_list: List[MethodDataModel])[source]
Bases:
object
Config data model for CLI program.
- method_config_list: List[MethodDataModel]
- class foxai.cli.config_model.MethodDataModel(explainer_with_params: ExplainerWithParams, artifact_name: Optional[str] = None)[source]
Bases:
object
Method data model for CLI program.
- artifact_name: Optional[str] = None
- explainer_with_params: ExplainerWithParams
foxai.cli.experiment_update module
File contains CLI application for updating W&B experiment artifacts.
- foxai.cli.experiment_update.download_upload_metadata(api_run: Run) Dict[str, Any] [source]
Fetch uploaded data samples metadata from logs history.
- Parameters:
run_api – WandB Api object.
- Returns:
Metadata of upload data sample entry.
- foxai.cli.experiment_update.fetch_model_checkpoints(api: Api, model_artifact_root: str, project: str) List[str] [source]
Fetch all model checkpoints and return local paths to them.
- Parameters:
api – WandB Api object.
model_artifact_root – Path to local directory where model checkpoints will be saved.
project – Name of a project.
- Returns:
List of paths to saved downloaded model checkpoints.
- foxai.cli.experiment_update.get_labels(upload_data_metadata: Dict[str, Any]) List[int] [source]
Extract and convert ground truth labels from image captions.
- Parameters:
upload_data_metadata – Metadata of upload data sample entry.
- Returns:
List of labels.
- foxai.cli.experiment_update.load_config(config: DictConfig) ConfigDataModel [source]
Load and validate config with explainers to apply.
- Parameters:
config – DictConfig object loaded from yaml config file.
- Returns:
ConfigDataModel object.
- foxai.cli.experiment_update.load_images_to_tensors(filenames: List[str], artifacts_path: str) List[Tensor] [source]
Load images from local directory.
- Parameters:
filenames – List of filepaths to images from metadata.
artifacts_path – Root directory of downloaded images.
- Returns:
List of tensors representing images.