Skip to content

Commit

Permalink
Drop unexpected parameters directly on loading config (#11688)
Browse files Browse the repository at this point in the history
* Call drop_unexpected_params directly on loading config

Signed-off-by: Jan Lasek <[email protected]>

* Remove auxiliary script

Signed-off-by: Jan Lasek <[email protected]>

---------

Signed-off-by: Jan Lasek <[email protected]>
  • Loading branch information
janekl authored Jan 3, 2025
1 parent c35877c commit 0f08462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 95 deletions.
4 changes: 3 additions & 1 deletion nemo/lightning/io/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def analyze(config: fdl.Config, prefix: str):
for param in to_drop:
del config.__arguments__[param]
else:
logging.info(f"Skip analyzing {prefix} as it accepts arbitrary keyword arguments.")
logging.debug(f"Skip analyzing {prefix} as it accepts arbitrary keyword arguments.")

# Proceed recursively for all arguments
for key, value in config.__arguments__.items():
Expand Down Expand Up @@ -791,6 +791,8 @@ def load(path: Path, output_type: Type[CkptType] = Any, subpath: Optional[str] =
config = serialization.Deserialization(json_config).result
_artifact_transform_load(config, path)

drop_unexpected_params(config)

if not build:
return config

Expand Down
94 changes: 0 additions & 94 deletions scripts/llm/update_io_context.py

This file was deleted.

0 comments on commit 0f08462

Please sign in to comment.