MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / dynamic_batch

Method dynamic_batch

mlx/data/Stream.cpp:75–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75Stream Stream::dynamic_batch(
76 int64_t buffer_size,
77 const std::string& key,
78 int64_t min_data_size,
79 int64_t max_data_size,
80 const std::unordered_map<std::string, double>& pad_values,
81 const std::unordered_map<std::string, int>& batch_dims,
82 bool shuffle,
83 bool drop_outliers,
84 int64_t max_skipped_samples,
85 int num_thread) const {
86 return Stream(std::make_shared<stream::DynamicBatch>(
87 self_,
88 buffer_size,
89 key,
90 min_data_size,
91 max_data_size,
92 pad_values,
93 batch_dims,
94 shuffle,
95 drop_outliers,
96 max_skipped_samples,
97 num_thread));
98}
99
100Stream Stream::partition(int64_t num_partitions, int64_t partition) const {
101 return Stream(

Callers

nothing calls this directly

Calls 1

StreamClass · 0.70

Tested by

no test coverage detected