Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit f2c878e

Browse files
authored
Adding deprecation notice to Batcher. (#595)
1 parent 49e2c15 commit f2c878e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Batcher/Batcher.swift

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public func defaultCollate<S: _Collatable>(_ batch: [S]) -> S {
2727
}
2828

2929
// Main struct to collate the samples from a dataset into a batch
30+
@available(*, deprecated, message: """
31+
Batcher will be removed in S4TF v0.11. Please use the new Epochs API instead.
32+
""")
3033
public struct Batcher<C: Collection> where C.Index == Int {
3134
// Dataset to get the batches from
3235
public var dataset: C
@@ -78,6 +81,9 @@ public struct Batcher<C: Collection> where C.Index == Int {
7881
}
7982

8083
// Iterator through a Batcher
84+
@available(*, deprecated, message: """
85+
Batcher will be removed in S4TF v0.11. Please use the new Epochs API instead.
86+
""")
8187
public struct BatchIterator<C: Collection>: IteratorProtocol, Sequence where C.Index == Int{
8288
// Batcher to iterate through
8389
var b: Batcher<C>

0 commit comments

Comments
 (0)