class_docstr: Hook to convert a task model into torch script.
  
  Saves the torch scripts in torchscript_folder.
class_docstr_tok: ["Hook","to","convert","a","task","model","into","torch","script",".","Saves","the","torch","scripts","in","torchscript_folder","."]
code: def on_start(self, task) -> None:
      if not is_primary():
          return
      if not PathManager.exists(self.torchscript_folder):
          err_msg = "Torchscript folder '{}' does not exist.".format(
              self.torchscript_folder
          )
          raise FileNotFoundError(err_msg)
  
file_path: ClassyVision/classy_vision/hooks/torchscript_hook.py
imports: import logging
  import torch
  from classy_vision.generic.distributed_util import is_primary
  from classy_vision.generic.util import eval_model, get_model_dummy_input
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
  from fvcore.common.file_io import PathManager
label_desc: Use image node_id 5 for calling the TorchscriptHook obj's underlying member method code with example usage: obj.on_start(task) without return types