roboflow / roboflow/roboflow-python
version.model returns NoneType, failing all model inference calls in production
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 629
- Forks
- 140
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
Problem
version.model returns NoneType, failing all model inference calls in production
Reproduce steps
Take any public project that has a model:
https://universe.roboflow.com/batuhan-yilmaz-mnu8w/segmentationexample/model/5
Run python inference code:
!pip install roboflow -U # <---- version 1.1.36
from roboflow import Roboflow
rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("segmentationexample")
model = project.version(5).model
model.predict() # <--- AttributeError: 'NoneType' object has no attribute 'predict'
type(model) # <--- NoneType
Expected behavior
Current workaround is to downgrade roboflow to version 1.1.33
!pip install roboflow==1.1.33
from roboflow import Roboflow
rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("segmentationexample")
model = project.version(5).model
type(model) # <--- roboflow.models.semantic_segmentation.SemanticSegmentationModel
Potential root cause:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the project.version(5).model example in the issue, then inspect pull request #276 for the potential root cause. The work is done when version.model returns the appropriate model object instead of NoneType and the documented model.predict() call succeeds on the example project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100