class_docstr: Test class for Anyscale Endpoints Integration Testing.
  It follows tests for OpenAI's handler closely as the Anyscale handler inherits from it.
  Notably, no assertions are done on the as the 7B model is not very good at this task.
class_docstr_tok: ["Test","class","for","Anyscale","Endpoints","Integration","Testing",".","It","follows","tests","for","OpenAI","'s","handler","closely","as","the","Anyscale","handler","inherits","from","it",".","Notably",",","no","assertions","are","done","on","the","as","the","7B","model","is","not","very","good","at","this","task","."]
docstr: Wait for the predictor to be created,
  raising an exception if predictor creation fails or exceeds timeout
docstr_tok: ["Wait","for","the","predictor","to","be","created",",","raising","an","exception","if","predictor","creation","fails","or","exceeds","timeout"]
code: def wait_predictor(self, project, name, timeout=100):
      """
      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")
  
imports: import os
  import time
  import pytest
  import contextlib
  import pandas
  from unittest.mock import patch
  from mindsdb_sql import parse_sql
  from mindsdb.integrations.handlers.anyscale_endpoints_handler.anyscale_endpoints_handler import AnyscaleEndpointsHandler
  from ..executor_test_base import BaseExecutorTest
label_desc: Use image node_id 3 for calling the TestAnyscaleEndpoints obj's underlying member method code with example usage: obj.wait_predictor(project, name, timeout) without return types