NVIDIA / NVIDIA/NeMo-Retriever
[BUG]: Warnings about pydantic schemas when using library mode
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 3k
- Forks
- 349
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 116
Description
Version
main branch
Which installation method(s) does this occur on?
No response
Describe the bug.
On importing nv-ingest:
/raid/rgelhausen/miniforge3/envs/nvingest/lib/python3.10/site-packages/pydantic/_internal/_fields.py:132: UserWarning: Field "model_name" in ImageCaptionExtractionSchema has conflict with protected namespace "model_".
You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
warnings.warn(
/raid/rgelhausen/miniforge3/envs/nvingest/lib/python3.10/site-packages/pydantic/_internal/_fields.py:132: UserWarning: Field "model_name" in IngestTaskCaptionSchema has conflict with protected namespace "model_".
You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
warnings.warn(
/raid/rgelhausen/miniforge3/envs/nvingest/lib/python3.10/site-packages/pydantic/_internal/_fields.py:132: UserWarning: Field "model_name" in CaptionTaskSchema has conflict with protected namespace "model_".
You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
warnings.warn(
Minimum reproducible example
Relevant log output
Other/Misc.
No response
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 importing nv-ingest in the library mode described by the issue and inspect the definitions of ImageCaptionExtractionSchema, IngestTaskCaptionSchema, and CaptionTaskSchema. Confirm the three Pydantic protected-namespace warnings, then verify that importing nv-ingest completes without them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100