Skip to content

Commit

Permalink
Update training.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed Nov 27, 2024
1 parent 581de82 commit 13291f1
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions deepmd/pt/train/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ def get_lr(lr_params):
self.validation_data,
self.valid_numb_batch,
) = get_data_loader(training_data, validation_data, training_params)
training_data.print_summary(
"training", to_numpy_array(self.training_dataloader.sampler.weights)
)
if validation_data is not None:
validation_data.print_summary(
"validation",
to_numpy_array(self.validation_dataloader.sampler.weights),
)
# training_data.print_summary(
# "training", to_numpy_array(self.training_dataloader.sampler.weights)
# )
# if validation_data is not None:
# validation_data.print_summary(
# "validation",
# to_numpy_array(self.validation_dataloader.sampler.weights),
# )
else:
(
self.training_dataloader,
Expand Down Expand Up @@ -351,20 +351,20 @@ def get_lr(lr_params):
training_params["data_dict"][model_key],
)

training_data[model_key].print_summary(
f"training in {model_key}",
to_numpy_array(self.training_dataloader[model_key].sampler.weights),
)
if (
validation_data is not None
and validation_data[model_key] is not None
):
validation_data[model_key].print_summary(
f"validation in {model_key}",
to_numpy_array(
self.validation_dataloader[model_key].sampler.weights
),
)
# training_data[model_key].print_summary(
# f"training in {model_key}",
# to_numpy_array(self.training_dataloader[model_key].sampler.weights),
# )
# if (
# validation_data is not None
# and validation_data[model_key] is not None
# ):
# validation_data[model_key].print_summary(
# f"validation in {model_key}",
# to_numpy_array(
# self.validation_dataloader[model_key].sampler.weights
# ),
# )

# Learning rate
self.warmup_steps = training_params.get("warmup_steps", 0)
Expand Down

0 comments on commit 13291f1

Please sign in to comment.