fix(cli): separate usage from deployment telemetry - #247
Conversation
Signed-off-by: lipikaramaswamy <lramaswamy@nvidia.com>
Greptile SummaryThe PR separates Anonymizer’s CLI/SDK usage classification from the shared NeMo deployment classification, preventing Data Designer import-time validation failures while preserving explicit deployment overrides.
Confidence Score: 5/5The PR appears safe to merge, with the changed environment-variable separation and precedence behavior covered by focused regression tests. The CLI and SDK no longer place usage-only values into the shared deployment variable, explicit shared overrides remain effective, invalid telemetry values retain the existing safe fallback, and no concrete blocking or non-blocking defect remains. Important Files Changed
Reviews (1): Last reviewed commit: "fix(cli): separate usage from deployment..." | Re-trigger Greptile |
| # Track whether Anonymizer is used through the CLI or SDK separately from the | ||
| # shared NeMo deployment type. Data Designer validates NEMO_DEPLOYMENT_TYPE | ||
| # against deployment-level values such as "library" and "api" at import time. | ||
| os.environ.setdefault("ANONYMIZER_USAGE_TYPE", "cli") |
There was a problem hiding this comment.
comment: If we need to unblock, then sure. But this is more bifurcation and different patterns across the SDG libraries. For things like env vars about telemetry that really have no reason to be different in my opinion.
Summary
NEMO_DEPLOYMENT_TYPEenvironment variablenvidia-internalanonymizer --helpconsole entry pointRoot cause and user impact
Anonymizer set
NEMO_DEPLOYMENT_TYPE=clibefore importing Data Designer. Data Designer 0.8 validates that shared variable at import time and only accepts deployment-level values such aslibrary,api,nvidia-internal, andundefined. As a result, a fresh installation could fail before any CLI command—includinganonymizer --help—started.This change introduces
ANONYMIZER_USAGE_TYPEfor the Anonymizer-specificcli/sdkdistinction and leavesNEMO_DEPLOYMENT_TYPEavailable for shared deployment classification.Validation
make checkContributor checklist