Skip to content

Commit 2bb839f

Browse files
author
Cheng Li
committed
remove ctx in download
1 parent 5ef676a commit 2bb839f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

vision/cifar10.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (d *CIFAR10) Download(ctx context.Context) error {
7474
}
7575
workingDir := d.workingDir()
7676
downloadedFileName := filepath.Join(workingDir, d.fileName)
77-
downloadedFileName, err := downloadmanager.DownloadFile(ctx, d.url, downloadedFileName)
77+
downloadedFileName, err := downloadmanager.DownloadFile(d.url, downloadedFileName, downloadmanager.Context(ctx))
7878
if err != nil {
7979
return err
8080
}

vision/cifar100.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (d *CIFAR100) Download(ctx context.Context) error {
8686
}
8787
workingDir := d.workingDir()
8888
downloadedFileName := filepath.Join(workingDir, d.fileName)
89-
downloadedFileName, err := downloadmanager.DownloadFile(ctx, d.url, downloadedFileName)
89+
downloadedFileName, err := downloadmanager.DownloadFile(d.url, downloadedFileName, downloadmanager.Context(ctx))
9090
if err != nil {
9191
return err
9292
}

vision/ilsvrc2012_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (d *ILSVRC2012Validation) Get(ctx context.Context, name string) (dldataset.
104104

105105
workingDir := d.workingDir()
106106
downloadedFileName := filepath.Join(workingDir, name)
107-
downloadedFileName, err := downloadmanager.DownloadFile(ctx, fileURL, downloadedFileName)
107+
downloadedFileName, err := downloadmanager.DownloadFile(fileURL, downloadedFileName, downloadmanager.Context(ctx))
108108
if err != nil {
109109
return nil, errors.Wrapf(err, "failed to download %v", fileURL)
110110
}

0 commit comments

Comments
 (0)