Skip to content

Harden ModelConfig.provider before data-designer 0.7 #180

@lipikaramaswamy

Description

@lipikaramaswamy

Context

Follow-up from #178 (bump data-designer to >=0.6.1,<0.7).

DataDesigner 0.6.1 deprecates ModelConfig(provider=None) and will require an explicit provider in a future release (DD issue #589). The <0.7 cap on our dependency avoids a hard break for now, but we should clean this up before lifting that bound.

Production defaults are already correct: bundled src/anonymizer/config/default_model_configs/models.yaml sets provider: nvidia on every alias, and docs/concepts/models.md documents provider: for custom YAML.

Scope (hardening only)

1. Tests — silence deprecation noise and match future DD behavior

Add explicit provider= on hand-built ModelConfig(...) in tests (currently omit provider):

  • tests/conftest.pystub_detector_model_configs, stub_model_configs, stub_known_model_configs
  • tests/engine/test_ndd_adapter.py_model_config helper
  • tests/engine/test_model_loader.py — inline configs in TestValidateAliasReferencesHandlesValidatorPool

Use a consistent test value (e.g. provider="nvidia" or provider="stub").

2. Optional validation — fail fast on user YAML

Before DD 0.7, consider requiring provider on every entry loaded via parse_model_configs() / surfaced in Anonymizer.validate_config() with a clear error (not just a DD DeprecationWarning at runtime).

Out of scope

  • Changing bundled default models (already have provider)
  • Bumping data-designer to 0.7 (separate PR after this)
  • model_providers / endpoint wiring (already supported; docs exist)

Acceptance criteria

  • make test passes with no ModelConfig.provider=None is deprecated warnings from our fixtures
  • (Optional) User-facing config without provider is rejected with an actionable Anonymizer error
  • Brief note in PR that unblocks <0.7 that this issue was filed

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions