roboflow / roboflow/roboflow-python
Prompt in search() and search_all() ignored, returns all images in dataset instead
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 629
- Forks
- 140
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
rf = roboflow.Roboflow(api_key=API_KEY)
workspace = rf.workspace(WORKSPACE)
project = workspace.project(PROJECT_ID)
filename = "vlcsnap-2024-08-28-19h46m52s829.png"
results = []
for result in project.search_all(prompt=f'filename:"{filename}"'):
results.extend(result)
print(len(results))
Running the code above returns every single image in the dataset, instead of just the one with the specific filename. Using the same query in the web UI returns the correct image:
loading Roboflow workspace...
loading Roboflow project...
5887
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 locating the Python implementations of project.search() and project.search_all() and trace how the prompt argument is passed into the request. Reproduce the issue with the filename query shown, then verify that the result is limited to the matching image rather than the full dataset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100