Skip to content

Commit

Permalink
refactor: consistent usage of progress_subscriber name
Browse files Browse the repository at this point in the history
  • Loading branch information
le1nux committed Sep 16, 2024
1 parent f7923f7 commit 17b7a0c
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/modalities/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ def run(self, components: TrainingComponentsInstantiationModel):
os.makedirs(experiment_path, exist_ok=True)
shutil.copy(self.config_path, experiment_path / self.config_path.name)

evaluation_result_publisher, process_publisher = self.get_logging_publishers(
progress_subscriber=components.batch_progress_subscriber,
evaluation_result_publisher, progress_publisher = self.get_logging_publishers(
progress_subscriber=components.progress_subscriber,
results_subscriber=components.evaluation_subscriber,
global_rank=components.settings.cuda_env.global_rank,
local_rank=components.settings.cuda_env.local_rank,
Expand All @@ -303,7 +303,7 @@ def run(self, components: TrainingComponentsInstantiationModel):
)
trainer = Trainer(
global_rank=components.settings.cuda_env.global_rank,
progress_publisher=process_publisher,
progress_publisher=progress_publisher,
num_target_steps=components.settings.training_target.num_target_steps,
num_target_tokens=components.settings.training_target.num_target_tokens,
num_seen_train_steps=components.settings.training_progress.num_seen_steps,
Expand All @@ -316,7 +316,7 @@ def run(self, components: TrainingComponentsInstantiationModel):

# Evaluator
evaluator = Evaluator(
progress_publisher=process_publisher,
progress_publisher=progress_publisher,
evaluation_result_publisher=evaluation_result_publisher,
)

Expand Down
2 changes: 1 addition & 1 deletion src/modalities/config/instantiation_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _check_last_step_checkpointed(self) -> "TrainingComponentsInstantiationModel
train_dataset: PydanticDatasetIFType
train_dataloader: PydanticLLMDataLoaderIFType
eval_dataloaders: List[PydanticLLMDataLoaderIFType]
batch_progress_subscriber: PydanticMessageSubscriberIFType
progress_subscriber: PydanticMessageSubscriberIFType
evaluation_subscriber: PydanticMessageSubscriberIFType
checkpoint_saving: PydanticCheckpointSavingIFType
gradient_clipper: PydanticGradientClipperIFType
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end_tests/gpt2_train_num_steps_8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end_tests/gpt2_warm_start_from_step_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_yaml_configs/config_lorem_ipsum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ gradient_clipper:
pass_type: BY_REFERENCE
norm_type: P2_NORM

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/getting_started/example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/library_usage/config_lorem_ipsum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: dummy
config: {}
Expand Down
2 changes: 1 addition & 1 deletion tutorials/warmstart/configs/pre_training_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down
2 changes: 1 addition & 1 deletion tutorials/warmstart/configs/warmstart_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ gradient_clipper:
norm_type: P2_NORM
max_norm: 1.0

batch_progress_subscriber:
progress_subscriber:
component_key: progress_subscriber
variant_key: rich
config:
Expand Down

0 comments on commit 17b7a0c

Please sign in to comment.