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

Method DynamicBatch

mlx/data/stream/DynamicBatch.cpp:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace stream {
12
13DynamicBatch::DynamicBatch(
14 std::shared_ptr<Stream> stream,
15 int64_t buffer_size,
16 const std::string& key,
17 int64_t min_data_size,
18 int64_t max_data_size,
19 const std::unordered_map<std::string, double>& pad_values,
20 const std::unordered_map<std::string, int>& batch_dims,
21 bool shuffle,
22 bool drop_outliers,
23 int64_t max_skipped_samples,
24 int num_thread)
25 : Buffered(stream, buffer_size, num_thread),
26 key_(key),
27 min_data_size_(min_data_size),
28 max_data_size_(max_data_size),
29 pad_values_(pad_values),
30 batch_dims_(batch_dims),
31 shuffle_(shuffle),
32 drop_outliers_(drop_outliers),
33 max_skipped_samples_(max_skipped_samples) {};
34
35std::shared_ptr<buffer::Buffer> DynamicBatch::on_refill(
36 const std::shared_ptr<buffer::Buffer>& buffer) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected