Repository navigation
Fix medical diagnosis data setup paths #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| { | ||
| "python-envs.defaultEnvManager": "ms-python.python:conda", | ||
| "python-envs.defaultPackageManager": "ms-python.python:conda", | ||
| "python-envs.pythonProjects": [] | ||
| } | ||
| "python-envs.pythonProjects": [ | ||
| { | ||
| "path": ".", | ||
| "envManager": "ms-python.python:conda", | ||
| "packageManager": "ms-python.python:conda" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ set -e | |||||||||||||||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||||||||||||||
| PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" | ||||||||||||||||
| DATA_DIR="$SCRIPT_DIR/data/processed" | ||||||||||||||||
| PYTHON_BIN="${PYTHON_BIN:-python}" | ||||||||||||||||
|
||||||||||||||||
|
|
||||||||||||||||
|
||||||||||||||||
| # 确保后续 Python 脚本中的相对路径始终相对于当前应用目录解析 | |
| cd "$SCRIPT_DIR" || { | |
| echo "❌ 无法切换到脚本目录: $SCRIPT_DIR" | |
| exit 1 | |
| } |
Copilot
AI
Apr 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The post-setup usage hint suggests running a pytest test file directly (python apps/tests/medical_diagnosis/test_diagnosis.py ...). That file calls pytest.skip(...) and relies on pytest markers, which can behave unexpectedly when executed as a standalone script. Consider updating the message to a python -m pytest ... invocation (and/or keep the example entrypoint python examples/run_medical_diagnosis.py --interactive).
| echo " python apps/tests/medical_diagnosis/test_diagnosis.py --mode single" | |
| echo " python examples/run_medical_diagnosis.py --interactive" | |
| echo " $PYTHON_BIN -m pytest apps/tests/medical_diagnosis/test_diagnosis.py" | |
| echo " $PYTHON_BIN examples/run_medical_diagnosis.py --interactive" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepare_dataset() now loads from
APP_DIR/data/medical/.../cache, but there’s no explicit existence check beforeload_from_disk(...). When the dataset isn’t present (or was downloaded to a different working directory), this will raise a stack trace that’s not very actionable. Consider checkingdataset_path.exists()and raising a FileNotFoundError with a message pointing to the expected location and the setup script to run.