← Về thư mục
verl/protocol.py
- pad_dataproto_to_divisor · function · L40-L57 — def pad_dataproto_to_divisor(data: 'DataProto', size_divisor: int)
- unpad_dataproto · function · L60-L63 — def unpad_dataproto(data: 'DataProto', pad_size)
- union_tensor_dict · function · L66-L77 — def union_tensor_dict(tensor_dict1: TensorDict, tensor_dict2: TensorDict) -> TensorDict
- union_numpy_dict · function · L80-L89 — def union_numpy_dict(tensor_dict1: dict[np.ndarray], tensor_dict2: dict[np.ndarray]) -> dict[np.ndarray]
- list_of_dict_to_dict_of_list · function · L92-L101 — def list_of_dict_to_dict_of_list(list_of_dict: list[dict])
- fold_batch_dim · function · L104-L121 — def fold_batch_dim(data: 'DataProto', new_batch_size)
- unfold_batch_dim · function · L124-L140 — def unfold_batch_dim(data: 'DataProto', batch_dims=2)
- collate_fn · function · L143-L153 — def collate_fn(x: list['DataProtoItem'])
- DataProtoItem · class · L157-L161 — class DataProtoItem: # TODO(zhangchi.usc1992) add consistency check
- DataProto · class · L165-L589 — class DataProto
- post_init · method · L176-L178 — def post_init(self): # perform necessary checking
- len · method · L180-L187 — def len(self)
- getitem · method · L189-L192 — def getitem(self, item)
- getstate · method · L194-L202 — def getstate(self)
- setstate · method · L204-L213 — def setstate(self, data)
- save_to_disk · method · L215-L217 — def save_to_disk(self, filepath)
- load_from_disk · method · L220-L223 — def load_from_disk(filepath) -> 'DataProto'
- print_size · method · L225-L240 — def print_size(self, prefix="")
- check_consistency · method · L242-L263 — def check_consistency(self)
- from_single_dict · method · L266-L278 — def from_single_dict(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
- from_dict · method · L281-L314 — def from_dict(cls, tensors: Dict[str, torch.Tensor], non_tensors=None, meta_info=None, num_batch_dims=1)
- to · method · L316-L328 — def to(self, device) -> 'DataProto'
- select · method · L330-L363 — def select(self, batch_keys=None, non_tensor_batch_keys=None, meta_info_keys=None, deepcopy=False) -> 'DataProto'
- pop · method · L365-L395 — def pop(self, batch_keys=None, non_tensor_batch_keys=None, meta_info_keys=None) -> 'DataProto'
- rename · method · L397-L421 — def rename(self, old_keys=None, new_keys=None) -> 'DataProto'
- validate_input · function · L402-L410 — def validate_input(keys)
- union · method · L423-L439 — def union(self, other: 'DataProto') -> 'DataProto'
- make_iterator · method · L441-L480 — def make_iterator(self, mini_batch_size, epochs, seed=None, dataloader_kwargs=None)
- get_data · function · L474-L478 — def get_data()
- chunk · method · L482-L512 — def chunk(self, chunks: int) -> List['DataProto']
- concat · method · L515-L537 — def concat(data: List['DataProto']) -> 'DataProto'
- reorder · method · L539-L545 — def reorder(self, indices)
- repeat · method · L547-L589 — def repeat(self, repeat_times=2, interleave=True)
- DataProtoFuture · class · L596-L639 — class DataProtoFuture
- concat · method · L613-L615 — def concat(data: List[ray.ObjectRef]) -> 'DataProtoFuture'
- chunk · method · L617-L630 — def chunk(self, chunks: int) -> List['DataProtoFuture']
- dispatch_fn · function · L623-L624 — def dispatch_fn(x, i, chunks)
- get · method · L632-L639 — def get(self)