Skip to content

refactor: improve type-safe config and NER boundaries#596

Closed
binaryaaron wants to merge 7 commits into
mainfrom
binaryaaron/typing-extensions-enhancements
Closed

refactor: improve type-safe config and NER boundaries#596
binaryaaron wants to merge 7 commits into
mainfrom
binaryaaron/typing-extensions-enhancements

Conversation

@binaryaaron

Copy link
Copy Markdown
Collaborator

Summary

  • Add typed config/NER boundaries and reduce raw dict/model churn.
  • Update ty to 0.0.44 and fix the stricter diagnostics it catches.
  • Add regression coverage for JSON action state, NER payloads, and datetime distribution formatting.

Test plan

  • mise run check
  • uv run --frozen pytest tests/telemetry/test_telemetry.py tests/config/test_autoconfig.py tests/cli/test_datasets.py tests/evaluation/components/test_multi_modal_figures.py tests/evaluation/reports/test_multimodal_report.py tests/data_processing/test_distributions.py -q -n0 -m 'not slow and not requires_gpu'

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 499fbec5-de23-4ca1-a125-c53c481701bb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch binaryaaron/typing-extensions-enhancements

Comment @coderabbitai help to get the list of available commands.

Comment thread src/nemo_safe_synthesizer/sdk/config_builder.py Fixed
Comment thread src/nemo_safe_synthesizer/sdk/config_builder.py Fixed
Comment thread src/nemo_safe_synthesizer/sdk/config_builder.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/configurator/parameter.py Fixed
Comment thread src/nemo_safe_synthesizer/configurator/parameter.py Fixed
Comment thread src/nemo_safe_synthesizer/configurator/parameter.py Fixed
Comment thread src/nemo_safe_synthesizer/sdk/config_builder.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/model.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/ner.py Fixed
Comment thread src/nemo_safe_synthesizer/pii_replacer/ner/ner.py Fixed
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
Signed-off-by: Aaron Gonzales <aagonzales@nvidia.com>
@binaryaaron binaryaaron force-pushed the binaryaaron/typing-extensions-enhancements branch from 7d9e0b8 to f615b67 Compare June 24, 2026 15:20

def _resolve_config(self, values: ParamDict | NSSParameters | None, cls: type[ParamT], **kwargs) -> ParamT:
@overload
def _resolve_config(self, values: ParamT, cls: type[ParamT], **kwargs: object) -> ParamT: ...
def _resolve_config(self, values: ParamT, cls: type[ParamT], **kwargs: object) -> ParamT: ...

@overload
def _resolve_config(self, values: RawConfig, cls: type[ParamT], **kwargs: object) -> ParamT: ...
def _resolve_config(self, values: RawConfig, cls: type[ParamT], **kwargs: object) -> ParamT: ...

@overload
def _resolve_config(self, values: None, cls: type[ParamT], **kwargs: object) -> ParamT: ...
input_data: str | dict[str, Any] | list[str] | list[dict[str, Any]],
*,
timings_only: Literal[True],
) -> NERTimingsPayload: ...
input_data: str,
*,
timings_only: Literal[False] = False,
) -> NERPredictionRows: ...
input_data: list[str],
*,
timings_only: Literal[False] = False,
) -> list[list[NERRawPredictionPayload]]: ...
input_data: dict[str, Any] | list[dict[str, Any]],
*,
timings_only: Literal[False] = False,
) -> list[NERApiResponseRow]: ...
input_data: str | dict[str, Any] | list[str] | list[dict[str, Any]],
*,
timings_only: bool = False,
) -> NERModelPredictionResponse | NERTimingsPayload: ...
min_score: float = 0.0,
timings_only: Literal[True],
include_labels: Optional[set[str]] = None,
) -> Timings: ...
min_score: float = 0.0,
timings_only: Literal[False] = False,
include_labels: Optional[set[str]] = None,
) -> PipelineResult: ...
@binaryaaron

Copy link
Copy Markdown
Collaborator Author

Superseded by the stacked draft PRs #608, #609, #610, #611, #612, and #613.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant