Skip to content

Commit 0bb5d61

Browse files
committed
.
1 parent 56d016b commit 0bb5d61

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/lighteval/main_nanotron.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def nanotron(
4242
checkpoint_config_path: Annotated[
4343
str, Option(help="Path to the nanotron checkpoint YAML or python config file, potentially on s3.")
4444
],
45-
lighteval_config_path: Annotated[str, Option(help="Path to a YAML config to be used for the evaluation.")] = None,
45+
lighteval_config_path: Annotated[str, Option(help="Path to a YAML config to be used for the evaluation.")],
4646
cache_dir: Annotated[str, Option(help="Cache directory for datasets and models.")] = CACHE_DIR,
4747
):
4848
"""
@@ -74,23 +74,8 @@ def nanotron(
7474
skip_null_keys=True,
7575
)
7676

77-
# Create or use default lighteval config
78-
if lighteval_config_path is not None:
79-
lighteval_config: LightEvalConfig = get_config_from_file(lighteval_config_path, config_class=LightEvalConfig) # type: ignore
80-
else:
81-
# Create default config with minimal required parameters
82-
default_logging = LightEvalLoggingArgs(
83-
output_dir="./eval_results"
84-
)
85-
default_tasks = LightEvalTasksArgs(
86-
tasks="lighteval|agieval:aqua-rat|5|0"
87-
)
88-
default_parallelism = ParallelismArgs(dp=1, pp=1, tp=1)
89-
lighteval_config = LightEvalConfig(
90-
logging=default_logging,
91-
tasks=default_tasks,
92-
parallelism=default_parallelism
93-
)
77+
# Load lighteval config
78+
lighteval_config: LightEvalConfig = get_config_from_file(lighteval_config_path, config_class=LightEvalConfig) # type: ignore
9479

9580
nanotron_config = FullNanotronConfig(lighteval_config, model_config)
9681

0 commit comments

Comments
 (0)