Skip to content

Commit

Permalink
pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress committed Apr 23, 2024
1 parent 4987145 commit b9c3cbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ def make_dataclass_and_log_config(

dataclass_dict_config: DictConfig = om.structured(
dataclass_constructor(**unstructured_config))

# Convert DictConfig to dict for dataclass constructor so that child
# configs are not DictConfigs
dataclass_config: T = dataclass_constructor(
**to_dict_container(dataclass_dict_config))

Expand Down
4 changes: 2 additions & 2 deletions scripts/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def main(cfg: DictConfig) -> Trainer:
trace_handlers=profiler_trace_handlers,
schedule=profiler_schedule)

callback_configs = train_cfg.callbacks
callback_configs = train_cfg.callbacks or {}

# Callbacks
callbacks: List[Callback] = [
Expand All @@ -313,7 +313,7 @@ def main(cfg: DictConfig) -> Trainer:

use_async_eval = any(isinstance(c, AsyncEval) for c in callbacks)

algorithm_configs = train_cfg.algorithms
algorithm_configs = train_cfg.algorithms or {}

# Algorithms
algorithms = [
Expand Down

0 comments on commit b9c3cbf

Please sign in to comment.