Skip to content

Return the downloaded path from the deepcell-types download helpers - #10

Merged
xuefei-wang merged 1 commit into
mainfrom
fix/return-downloaded-path
Jul 30, 2026
Merged

Return the downloaded path from the deepcell-types download helpers#10
xuefei-wang merged 1 commit into
mainfrom
fix/return-downloaded-path

Conversation

@xuefei-wang

Copy link
Copy Markdown
Contributor

Follow-up to #8.

download_deepcell_types_baseline (added in #8) returns the list of local paths, but download_deepcell_types_model / download_deepcell_types_data discard fetch_data's return value, so a caller has no supported way to locate the file it just downloaded.

This matters for the deepcell-types side (vanvalenlab/deepcell-types#47): its public download_model() / download_training_data() are documented to return a pathlib.Path. Without a return value the adapter has to guess the filename by globbing ~/.deepcell/models, which breaks for version keys that differ from the asset filename — 2026-06-23-ptft maps to deepcell-types_2026-06-23_resmlp_ptft.pt, so a deepcell-types_2026-06-23-ptft_*.pt glob finds nothing.

Scoped to the two deepcell-types helpers, matching the shape download_deepcell_types_baseline already has. Returning a path where None was returned before is backwards compatible; cellsam / torch-mesmer are left alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sy8eiMVmmQHXRAccKwzAyz

`download_deepcell_types_baseline` (added in this PR) returns the list of
local paths, but `download_deepcell_types_model` / `_data` dropped
`fetch_data`'s return value, so callers had no supported way to locate the
file they just downloaded.

deepcell-types' public `download_model()` / `download_training_data()` are
documented to return a `pathlib.Path`; without this they must guess the
filename by globbing `~/.deepcell`, which does not work for version keys
that differ from the asset filename (e.g. `2026-06-23-ptft` ->
`deepcell-types_2026-06-23_resmlp_ptft.pt`).

Returning a value where `None` was returned before is backwards compatible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sy8eiMVmmQHXRAccKwzAyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant