Skip to main content
Version: 0.3

clika_resume

clika_resume(

) ‑> str

Resumes a Compression Job from Given path. This can be used to fine-tune the model using more Data or just resume a run that had to be stopped. This can be used to finetune on more Data or just resume a run that had to be stopped.

Parameters:

  • clika_state_path (Union[str, Path]) - Path to the CLIKA state directory or file
  • init_training_dataset_fn (Callable[[], Any]) - Pointer to a function that initializes the Dataloaders
  • init_evaluation_dataset_fn (Optional[Callable[[], Any]]) - Pointer to a function that initializes the Dataloaders
  • optimizer (torch.optim.Optimizer) - Optimizer object. In PyTorch it's an object from: torch.optim... When Resuming, 'optimizer' can be set to None unless it is a custom Optimizer.
  • training_losses (Dict[str, Callable]) - Dictionary mapping between a Name to a Loss Object used for Training. Can be a function that accepts (preds, target) or a Metric that implements an interface like torchmetrics.
  • training_metrics (Dict[str, Callable]) - Dictionary mapping between a Name to a Metric Object used for Training. Can be a function that accepts (preds, target) or a Metric that implements an interface like torchmetrics.
  • evaluation_losses (Dict[str, Callable]) - Dictionary mapping between a Name to a Loss Object used for Evaluation. Can be a function that accepts (preds, target) or a Metric that implements an interface like torchmetrics.
  • evaluation_metrics (Dict[str, Callable]) - Dictionary mapping between a Name to a Metric Object used for Evaluation. Can be a function that accepts (preds, target) or a Metric that implements an interface like torchmetrics.
  • callbacks (List[BaseCallback]) - Callbacks that will be called during compression to update the status of it.
  • multi_gpu (bool) - whether or not to do Multi-GPU compression
  • new_settings (Settings) - object to use for the Compression Run. TrainingSettings and DeploymentSettings will be updated with this.
  • resume_start_epoch (Optional[int]) - Will override the Epoch present in the CLIKA State directory at Path.
  • kwargs (Optional[dict]) - Unsupported for now.

Returns:

  • str: Path to latest CLIKA State path