deepmd.pt.utils.dataloader
Module Contents
Classes
A dataset for storing DataLoaders to multiple Systems. | |
A class that represents a thread of control. | |
Functions
| |
| |
|
Attributes
- class deepmd.pt.utils.dataloader.DpLoaderSet(systems, batch_size, type_map, seed=10, shuffle=True)[source]
Bases:
torch.utils.data.Dataset
A dataset for storing DataLoaders to multiple Systems.
- Parameters:
- sys_path
Path to the data system
- batch_size
Max frame count in a batch.
- type_map
Gives the name of different atom types
- seed
Random seed for dataloader
- shuffle
If the data are shuffled (Only effective in serial mode. Always shuffle in distributed data parallelism)
- add_data_requirement(data_requirement: List[deepmd.utils.data.DataRequirementItem])[source]
Add data requirement for each system in multiple systems.
- class deepmd.pt.utils.dataloader.BackgroundConsumer(queue, source, max_len)[source]
Bases:
threading.Thread
A class that represents a thread of control.
This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.
- run()[source]
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.