Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 8, 2024
1 parent e37edc0 commit bab0783
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 3 additions & 2 deletions deepmd/pt/utils/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ class DpLoaderSet(Dataset):
sys_path
Path to the data system
batch_size
Max frame count in a batch.
Max frame count in a batch.
type_map
Gives the name of different atom types
seed
seed
Random seed for dataloader
shuffle
If the data are shuffled (Only effective in serial mode. Always shuffle in distributed data parallelism)
"""

def __init__(
self,
systems,
Expand Down
10 changes: 2 additions & 8 deletions deepmd/pt/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@


class DeepmdDataSetForLoader(Dataset):
def __init__(
self,
system: str,
type_map: str
):
def __init__(self, system: str, type_map: str):

Check warning on line 19 in deepmd/pt/utils/dataset.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/utils/dataset.py#L19

Added line #L19 was not covered by tests
"""Construct DeePMD-style dataset containing frames cross different systems.
Args:
Expand All @@ -29,9 +25,7 @@ def __init__(
"""
self.system = system
self._type_map = type_map
self._data_system = DeepmdData(
sys_path=system,type_map=self._type_map
)
self._data_system = DeepmdData(sys_path=system, type_map=self._type_map)

Check warning on line 28 in deepmd/pt/utils/dataset.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/utils/dataset.py#L28

Added line #L28 was not covered by tests
self.mixed_type = self._data_system.mixed_type
self._ntypes = self._data_system.get_ntypes()
self._natoms = self._data_system.get_natoms()
Expand Down

0 comments on commit bab0783

Please sign in to comment.