NVIDIA / NVIDIA/NeMo-Retriever

[BUG]: Warnings about pydantic schemas when using library mode

Open
#326 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.