File tree Expand file tree Collapse file tree
Sources/MLXInferenceCore/ALM Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 uses : actions/cache@v4
2727 with :
2828 path : .build
29- key : ${{ runner.os }}-spm-SwiftLM-v2 -${{ hashFiles('Package.resolved') }}
29+ key : ${{ runner.os }}-spm-SwiftLM-v3 -${{ hashFiles('Package.resolved') }}
3030 restore-keys : |
31- ${{ runner.os }}-spm-SwiftLM-v2 -
31+ ${{ runner.os }}-spm-SwiftLM-v3 -
3232
3333 - name : Clear stale module cache
3434 run : find .build -type d -name ModuleCache -exec rm -rf {} + 2>/dev/null || true
Original file line number Diff line number Diff line change 11import Foundation
22import MLX
33
4- public class ALMTypeRegistry {
4+ public actor ALMTypeRegistry {
55 public static let shared = ALMTypeRegistry ( )
66
7- private var creators : [ String : ( ) -> Any ] = [ : ]
7+ private var creators : [ String : @ Sendable ( ) -> Any ] = [ : ]
88
99 private init ( ) {
1010 // Feature 8: Register Whisper
1111 register ( creator: { WhisperModelCreator ( ) } , for: " whisper " )
1212 }
1313
14- public func register( creator: @escaping ( ) -> ( Any ) , for key: String ) {
14+ public func register( creator: @escaping @ Sendable ( ) -> ( Any ) , for key: String ) {
1515 creators [ key] = creator
1616 }
1717
18- public func creator( for key: String ) -> ( ( ) -> Any ) ? {
18+ public func creator( for key: String ) -> ( @ Sendable ( ) -> Any ) ? {
1919 return creators [ key]
2020 }
2121}
You can’t perform that action at this time.
0 commit comments