[BUG] Dataset downloader reports success and replaces data after a failed download

未关闭
#2,276 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@0z5a 已经在做这个了。

开始于 2026年11月4日。

  • #2277 来自 @0z5a —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash
领域
data, devops

调研方向

Start with datasets/get_test_data.sh and trace the download, extraction, and destination replacement steps for each selected dataset. Reproduce the failure using the temporary directory and fake wget command in the issue body, then check that failed downloads or extraction return a nonzero status and preserve existing data. Done means the same behavior holds for every selected dataset.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

datasets/get_test_data.sh can return exit status 0 after a download fails, while removing and recreating an existing destination directory. A developer can therefore lose the prior dataset and receive a success status even though the replacement was never downloaded or extracted.

Steps to reproduce

From a source checkout, this uses a temporary directory and a fake wget; it does not touch an existing dataset or make a network request:

task_dir=$(mktemp -d)
mkdir -p "$task_dir/bin" "$task_dir/work/cvrp"
cp datasets/get_test_data.sh "$task_dir/work/"
printf 'existing data\n' > "$task_dir/work/cvrp/sentinel"
printf '#!/bin/sh\nexit 8\n' > "$task_dir/bin/wget"
chmod +x "$task_dir/bin/wget"
(
  cd "$task_dir/work"
  env -u CUOPT_S3_URI -u CUOPT_AWS_ACCESS_KEY_ID -u CUOPT_AWS_SECRET_ACCESS_KEY \
    PATH="$task_dir/bin:$PATH" ./get_test_data.sh --cvrp
  printf 'exit status: %s\n' "$?"
  if test -f cvrp/sentinel; then echo 'original preserved'; else echo 'original removed'; fi
)

Observed: the script reports a failed download and missing archive, prints exit status: 0, and prints original removed.

Expected behavior

Report a nonzero status when a selected dataset cannot be downloaded or extracted, and preserve an existing destination unless a complete replacement is ready. The same distinction should hold for any selected dataset, not just CVRP.

Environment and scope

Reproduced on Linux against main at 52d14b4c97de5591a8054ef1971a92e10617aed7. The fake-download case exercises the HTTP fallback in a disposable directory. An isolated ordinary run also observed an HTTP 404 followed by status 0; the issue is the script's failure handling rather than the availability of any particular external URL.

主要语言
Cuda
星标
1.1k
派生
255
平均合并
1 天 11 小时
30 天内合并 PR
123

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/cuopt 的其他 Issue

查看 NVIDIA/cuopt 的全部 Issue

相似的 Issue

更多 Data Engineering Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。