Skip to content

Commit 3a492fe

Browse files
committed
Parallelize downloads, skip HEAD requests for cached files, weight download progress by file size
1 parent 1789228 commit 3a492fe

File tree

4 files changed

+413
-209
lines changed

4 files changed

+413
-209
lines changed

Sources/Hub/Hub.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public extension Hub {
7777
}
7878

7979
/// The type of repository on the Hugging Face Hub.
80-
enum RepoType: String, Codable {
80+
enum RepoType: String, Codable, Sendable {
8181
/// Model repositories containing machine learning models.
8282
case models
8383
/// Dataset repositories containing training and evaluation data.
@@ -90,7 +90,7 @@ public extension Hub {
9090
///
9191
/// A repository is identified by its unique ID and type, allowing access to
9292
/// different kinds of resources hosted on the Hub platform.
93-
struct Repo: Codable {
93+
struct Repo: Codable, Sendable {
9494
/// The unique identifier for the repository (e.g., "microsoft/DialoGPT-medium").
9595
public let id: String
9696
/// The type of repository (models, datasets, or spaces).

0 commit comments

Comments
 (0)