class_docstr: TaskHooks can handle some tasks during the spectific event.
class_docstr_tok: ["TaskHooks","can","handle","some","tasks","during","the","spectific","event","."]
code: def __init__(self):
      self._registered_hooks = {
          "build_env_start_event": OrderedDict(),
          "build_env_end_event": OrderedDict(),
          "finetune_start_event": OrderedDict(),
          "finetune_end_event": OrderedDict(),
          "predict_start_event": OrderedDict(),
          "predict_end_event": OrderedDict(),
          "eval_start_event": OrderedDict(),
          "eval_end_event": OrderedDict(),
          "log_interval_event": OrderedDict(),
          "save_ckpt_interval_event": OrderedDict(),
          "eval_interval_event": OrderedDict(),
          "run_step_event": OrderedDict(),
      }
      self._hook_params_num = {
          "build_env_start_event": 1,
          "build_env_end_event": 1,
          "finetune_start_event": 1,
          "finetune_end_event": 2,
          "predict_start_event": 1,
          "predict_end_event": 2,
          "eval_start_event": 1,
          "eval_end_event": 2,
          "log_interval_event": 2,
          "save_ckpt_interval_event": 1,
          "eval_interval_event": 1,
          "run_step_event": 2,
      }
  
file_path: PaddleHub/paddlehub/compat/task/hook.py
imports: import inspect
  from collections import OrderedDict
  from typing import Callable
label_desc: Use image node_id 1 to create a new TaskHooks object from inherited base classes: object with example: obj = TaskHooks()