label-studio-ml-backend
label-studio-ml-backend copied to clipboard
NameError: name '_update_fn' is not defined when using the SAM
Hi,
I installed the ml-backend according to the official steps:
git clone https://github.com/HumanSignal/label-studio-ml-backend.git
cd label-studio-ml-backend/
pip install -e .
Then I installed SAM and started label-studio-ml:
pip install -r label_studio_ml/examples/segment_anything_model/requirements.txt
label-studio-ml start label_studio_ml/examples/segment_anything_model
It resulted in a success that shows it was running on http://127.0.0.1:8080
But when I started the label studio, and config the SAM model:
I get this error: label-studio-ml-backend/label_studio_ml/model.py", line 112, in fit if _update_fn: NameError: name '_update_fn' is not defined
Could you help with this issue?
I understand the suggested approach is to install by Docker, but as I'm working with a Redhat linux, it needs sudo to run podman which I do not have. Anyway, the previous step seems very likely to work, the SAM is connected correctly:
But whenever I click the items in 'ML-Assisted Labeling' or 'Save' during the configuration of ML-backend, I would get the previous error in the terminal:
And the SAM auto annotation could not give out any result as well.
I've encountered the same issue. Have you managed to resolve it?
Not yet.
Has anyone resolved this?
same error
same error
收到您的邮件,谢谢!
Same error here.
Hope this will be resolved.
收到您的邮件,谢谢!
Same error here, as well.
收到您的邮件,谢谢!
Same error when attempting to follow instructions for using tesseract backend.
A workaround that worked for me is to add a dummy fit method to the SamMLBackend
class in segment_anything_model/model.py
def fit(self, event, data, **additional_params):
pass