Skip to content

Commit 098248b

Browse files
committed
Tweak another error message
Signed-off-by: Mike Knepper <mknepper@nvidia.com>
1 parent 657f31f commit 098248b

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

packages/data_designer_nemo/src/data_designer_nemo/seed.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
"referencing fileset paths). Upload your data to the Files service, adjust your config, and try again."
2323
)
2424
_DATAFRAME_SEED_TYPE = "df"
25-
_DATAFRAME_SEED_TYPE_MESSAGE = (
26-
"Dataframe seed sources (seed_type=df) are not supported on the NeMo Platform. TODO: more detail here!"
25+
LOCAL_DATAFRAME_SEED_ERROR_MESSAGE = (
26+
"Dataframe seed sources are not supported on the NeMo Platform. "
27+
"Save your data to a file or directory and update your config before trying again. "
28+
"If you intend to run this same workload remotely, upload the file or directory to the Files service."
2729
)
2830

2931

@@ -156,7 +158,7 @@ def _validate_seed_type_for_execution_context(seed_type: str, *, is_local: bool)
156158
"""Raises if a seed source type is unsupported in this execution context."""
157159
if is_local:
158160
if seed_type == _DATAFRAME_SEED_TYPE:
159-
raise NDDInvalidConfigError(_DATAFRAME_SEED_TYPE_MESSAGE)
161+
raise NDDInvalidConfigError(LOCAL_DATAFRAME_SEED_ERROR_MESSAGE)
160162
return
161163

162164
if seed_type not in _SUPPORTED_SEED_TYPES:

plugins/nemo-data-designer/tests/integration/test_preview_local_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pytest
99
from data_designer.cli.utils.sample_records_pager import PAGER_FILENAME
1010
from data_designer.config.analysis.dataset_profiler import DatasetProfilerResults
11+
from data_designer_nemo.seed import LOCAL_DATAFRAME_SEED_ERROR_MESSAGE
1112

1213
pytestmark = pytest.mark.integration
1314

@@ -113,7 +114,7 @@ def load_config_builder() -> dd.DataDesignerConfigBuilder:
113114
# errors into ``ValueError`` so Pydantic wraps them properly; this test
114115
# asserts the resulting user-visible message.
115116
assert result.exit_code != 0
116-
assert "Dataframe seed sources (seed_type=df) are not supported on the NeMo Platform" in result.output
117+
assert LOCAL_DATAFRAME_SEED_ERROR_MESSAGE in result.output
117118
assert "Field required" not in result.output
118119
assert "No such file" not in result.output
119120

@@ -152,8 +153,7 @@ def load_config_builder() -> dd.DataDesignerConfigBuilder:
152153
# ``CreateRenderer.on_error`` runs the message through Rich, which line-wraps
153154
# to the terminal width, so we assert on fragments rather than the full
154155
# ``"Dataframe seed sources (seed_type=df) are not supported..."`` substring.
155-
assert "Dataframe seed sources" in result.output
156-
assert "seed_type=df" in result.output
156+
assert LOCAL_DATAFRAME_SEED_ERROR_MESSAGE in result.output.replace("\n", "")
157157
assert "Field required" not in result.output
158158

159159

0 commit comments

Comments
 (0)