我正试着在label studio上添加我的ML模型。我已经尝试过这些命令
cd label-studio
pip install -e .
cd label_studio/ml/examples
pip install -r requirements.txt
label-studio-ml init my_ml_backend --script label_studio/ml/examples/simple_text_classifier.py这些文件位于label_studio/ml/examples中:- requirements.txt
simple_text_classifier.py
dummy_model.py
pytorch_transfer_learning.py它给了我这个错误:
ModuleNotFoundError: No module named 'simple_text_classifier'如何在label studio上添加我的模型?
发布于 2020-12-31 18:35:10
可能有点晚了,但也许其他人发现了这个问题。是什么帮了我:在label_studio/ml/examples文件夹中,尝试
label-studio-ml init my_ml_backend --script simple_text_classifier.py(我只是从脚本中删除了parth的其余部分)如果您得到一个错误,告诉您添加--force,那么可以这样做(这将覆盖现有的my_ml_backend文件夹),或者简单地删除my_ml_backend文件夹并再次运行相同的命令。
在此之后,您可能会得到以下响应:
Congratulations! ML Backend has been successfully initialized in ./my_ml_backend
Now start it by using:
label-studio-ml start ./my_ml_backend发布于 2021-03-23 16:31:03
对我有效的快速解决方案是,我导航(cd)到包含simple_text_classifier.py的目录,即examples,然后从该目录执行命令:
label-studio-ml init my_ml_backend --script simple_text_classifier.py
https://stackoverflow.com/questions/64701989
复制相似问题