Skip to content

Commit fd114c3

Browse files
committed
chore: address more CR
Signed-off-by: mkornfield <mkornfield@nvidia.com>
1 parent 8dd1dcd commit fd114c3

4 files changed

Lines changed: 29 additions & 10 deletions

File tree

.github/dco.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/tutorials/differential-privacy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
" .with_data_source(df) # .with_replace_pii(enable=False) to disable PII replacement\n",
160160
" .with_differential_privacy(dp_enabled=True, delta=recommended_delta)\n",
161161
" .with_train(batch_size=16) # Override the default batch size of 1, which is designed for non-DP training\n",
162-
" .with_generate(structured_generation={"enabled": True}) # Improves the percentage of valid records when DP is enabled\n",
162+
" .with_generate(structured_generation={'enabled': True}) # Improves the percentage of valid records when DP is enabled\n",
163163
")\n",
164164
"builder.run()\n",
165165
"results = builder.results"

docs/user-guide/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Generation stopped prematurely because the average fraction of invalid records w
379379
```
380380

381381
: Too many invalid records across `generation.patience` consecutive batches.
382-
Consider retraining with more records, adjusting `training.number_of_input_records_to_sample`, or setting `generation.structured_generation.enabled=true`.
382+
Consider retraining with more records, adjusting `training.num_input_records_to_sample`, or setting `generation.structured_generation.enabled=true`.
383383

384384
For context-length errors during data assembly (`"The number of tokens in an
385385
example exceeds the available context length"`), see

tests/configurator/test_pydantic_click_options.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,31 @@ def cmd(**kwargs):
494494
assert captured["generation"]["structured_generation"]["backend"] == "outlines"
495495

496496

497-
def test_structured_generation_legacy_option_end_to_end_via_click_runner():
497+
@pytest.mark.parametrize(
498+
("option", "legacy_key", "value", "expected"),
499+
[
500+
("--generation__use_structured_generation", "use_structured_generation", "true", True),
501+
("--generation__structured_generation_backend", "structured_generation_backend", "outlines", "outlines"),
502+
(
503+
"--generation__structured_generation_schema_method",
504+
"structured_generation_schema_method",
505+
"json_schema",
506+
"json_schema",
507+
),
508+
(
509+
"--generation__structured_generation_use_single_sequence",
510+
"structured_generation_use_single_sequence",
511+
"true",
512+
True,
513+
),
514+
],
515+
)
516+
def test_structured_generation_legacy_options_end_to_end_via_click_runner(
517+
option: str,
518+
legacy_key: str,
519+
value: str,
520+
expected: object,
521+
):
498522
"""Legacy flat structured-generation CLI aliases remain accepted during migration."""
499523
captured: dict = {}
500524

@@ -503,6 +527,6 @@ def test_structured_generation_legacy_option_end_to_end_via_click_runner():
503527
def cmd(**kwargs):
504528
captured.update(parse_overrides(kwargs))
505529

506-
result = CliRunner().invoke(cmd, ["--generation__structured_generation_backend", "outlines"])
530+
result = CliRunner().invoke(cmd, [option, value])
507531
assert result.exit_code == 0, result.output
508-
assert captured["generation"]["structured_generation_backend"] == "outlines"
532+
assert captured["generation"][legacy_key] == expected

0 commit comments

Comments
 (0)