class_docstr: Base test class for ML engines
docstr: Wait for the predictor to be created, raising an exception if predictor creation fails or exceeds timeout
code: def wait_predictor(
      self, project: str, name: str, timeout: int = 100
  ) -> None:
      """Wait for the predictor to be created, raising an exception if predictor creation fails or exceeds timeout"""
      for attempt in range(timeout):
          ret = self.run_sql(
              f"select * from {project}.models where name='{name}'"
          )
          if not ret.empty:
              status = ret["STATUS"][0]
              if status == "complete":
                  return
              elif status == "error":
                  raise RuntimeError(
                      "Predictor failed", ret["ERROR"][0]
                  )
          time.sleep(0.5)
      raise RuntimeError("Predictor wasn't created")
  
file_path: mindsdb/tests/unit/ml_handlers/base_ml_test.py
imports: import os
  import time
  import pandas
  from mindsdb_sql import parse_sql
  from ..executor_test_base import BaseExecutorTest
label_desc: Use image node_id 1 for calling the BaseMLTest obj's underlying member method code with example usage: obj.wait_predictor(project, name, timeout) without return types