label-studio-ml-backend: Run directory undefined specified by model_version doesn't exist
I am trying to run custom model without using docker compose.
This is code that I am using to launch the server. But I get an error model_version doesn't exist.
app = init_app(
model_class=MyModel,
model_dir=os.environ.get("MODEL_DIR", os.path.dirname(__file__)),
redis_queue=os.environ.get("RQ_QUEUE_NAME", "default"),
redis_host=os.environ.get("REDIS_HOST", "localhost"),
redis_port=os.environ.get("REDIS_PORT", 6379),
)
if __name__ == "__main__":
app.run(host="localhost", port=9090)
Run directory undefined specified by model_version doesn't exist
Traceback (most recent call last):
File "/media/idk/idk1/label-studio-ml-backend/label_studio_ml/model.py", line 54, in get_result
job_result = self.get_result_from_job_id(model_version)
File "/media/idk/idk1/label-studio-ml-backend/label_studio_ml/model.py", line 107, in get_result_from_job_id
result = self._get_result_from_job_id(job_id)
File "/media/idk/idk1/label-studio-ml-backend/label_studio_ml/model.py", line 183, in _get_result_from_job_id
raise IOError(f'Run directory {job_dir} specified by model_version doesn\'t exist')
OSError: Run directory undefined specified by model_version doesn't exist
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (6 by maintainers)
Issue fixed, the problem was that when encountering an error in training, it wasn’t getting to the end of the fit function which returns None, and couldn’t create the job_result.json file…
Hello, I upgraded label studio to 1.4.1 and checkout to DEV-1693 but the error still persists…
upgrading label studio to 1.4.1 and a checkout of label studio ml backend to DEV-1693 solved the issue