How severe does this issue affect your experience of using Ray?
- High: It blocks me to complete my task.
I’m using Ray Serve to deploy my OCR model as a service. This is the relevant portion of my code:
fastapi_ocr_app = FastAPI()
@serve.deployment
@serve.ingress(fastapi_ocr_app)
class OCRIngress:
def __init__(self) -> None:
self.engine = OCREngine(x="a", y="b")
...
The __init__
function here takes a while to finish running since it may have to download some artifacts depending on what the values of x
and y
are. Now in my CI pipeline, I deploy this as a service with a docker compose up -d
command and then later down the line I run some integration tests to make sure everything is functional.
Now the problem is that I need a way to ensure that the __init__
function has actually finished running so that when I’m running my tests I don’t get false negatives due to the replica not having finished initializing.
Is there a way to check for this specific problem? To reiterate, I need a way of checking if the __init__
function of an ingress class has finished executing so that I can run tests safely without running into issues due to the class not having been properly initialized. I would also rather not do a sleep X
prior to the tests because the downloads are cached so the next runs of the same CI pipeline don’t actually need to wait anymore.
Thanks in advance for your help!