Skip to content

Commit

Permalink
Update training.py (#228)
Browse files Browse the repository at this point in the history
* Update training.py

add _add_tags method

* fix
  • Loading branch information
wiederm authored Aug 13, 2024
1 parent 951a53b commit abf8076
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions modelforge/train/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,35 @@ def _replace_placeholder_in_experimental_name(self, experiment_name: str) -> str
)
return experiment_name

def _add_tags(self, tags: List[str]) -> List[str]:
"""
Add tags to the wandb tags.
Parameters
----------
tags : List[str]
List of tags to add to the experiment.
Returns
-------
List[str]
List of tags for the experiment.
"""

# add version
import modelforge

tags.append(str(modelforge.__version__))
# add dataset
tags.append(self.dataset_parameter.dataset_name)
# add potential name
tags.append(self.potential_parameter.potential_name)
# add information about what is included in the loss
str_loss_property = "-".join(self.training_parameter.loss_parameter.loss_property)
tags.append(f"loss-{str_loss_property}")

return tags


from typing import List, Optional, Union

Expand Down

0 comments on commit abf8076

Please sign in to comment.