class_docstr: Class that defines the methods necessary to hook into process.
class_docstr_tok: ["Class","that","defines","the","methods","necessary","to","hook","into","process","."]
code: def on_train_init(
      self,
      base_config,
      experiment_directory,
      experiment_name,
      model_name,
      output_directory,
      resume_directory,
  ):
      logger.info("aim.on_train_init() called...")
  
      try:
          query = f'run.name == "{model_name}"'
          if self.repo is None:
              aim_repo = aim.Repo.default_repo()
          else:
              aim_repo = aim.Repo.from_path(self.repo)
          runs_generator = aim_repo.query_runs(query)
          run = next(runs_generator.iter_runs())
          run_hash = run.run.hash
          self.aim_run = aim.Run(
              run_hash=run_hash,
              repo=self.repo,
              experiment=experiment_name,
          )
      except Exception:
          self.aim_run = aim.Run(
              repo=self.repo, experiment=experiment_name
          )
          self.aim_run.name = model_name
  
      self.aim_run["base_config"] = self.normalize_config(base_config)
  
      params = dict(name=model_name, dir=experiment_directory)
      self.aim_run["params"] = params
  
file_path: ludwig/ludwig/contribs/aim.py
imports: import json
  import logging
  from ludwig.api_annotations import PublicAPI
  from ludwig.callbacks import Callback
  from ludwig.utils.data_utils import NumpyEncoder
  from ludwig.utils.package_utils import LazyLoader
label_desc: Use image node_id 2 for calling the AimCallback obj's underlying member method code with example usage: obj.on_train_init(base_config, experiment_directory, experiment_name, model_name, output_directory, resume_directory) without return types