AllenCellModeling / cyto-dl

https://allencellmodeling.github.io/cyto-dl/
12 stars 5 forks source link

Switch to monai stable releases, if feasible #425

Open pgarrison opened 5 days ago

pgarrison commented 5 days ago

Background

Currently cyto-dl depends on monai-weekly>=1.2.dev2308 (Feb 2023) via pyproject.toml and monai-weekly==1.4.dev2411 (March 2024) via requirements/linux/requirements.txt. monai-weekly is the unstable release channel for monai. monai includes pre-releases and stable releases. The latest stable release is version 1.3.2 (June 2024), and the latest pre-release is 1.4.0.rc7 (Sept 2024).

Issue

A project like cyto-dl might want to use monai-weekly to get access to some brand new feature that has not yet made it into a stable release. However, using the unstable monai-weekly channel creates dependency management challenges. In particular, it is very challenging to work backwards from a monai-weekly version number (e.g., 1.2.dev2308) to a commit in the monai git repo.

I ran into this issue because I am trying to get code written for two different versions of cyto-dl to be compatible with each other on a single version of cyto-dl. They use different versions of monai-weekly, but it's hard to tell what changed between those versions of monai-weekly. If cyto-dl used the stable release channel, it would be easier to compare monai releases (both via release notes and git history). Secondarily, cyto-dl users would be less likely to use unsupported features of monai.

Resolution

I see two good options for moving from monai-weekly to monai.

  1. If the pyproject.toml is correct and any version since 1.2.dev2308 is compatible with cyto-dl, then we can switch to monai>=1.3.2.
  2. If cyto-dl has come to rely on newer monai features (because version 1.4.dev2411 is pinned), then we can switch to monai>=1.4.0.rc7.
pgarrison commented 5 days ago

Resolving this may require resolving #424 first

benjijamorris commented 4 days ago

Good idea. I think we can just make that switch, I don't think we're relying on any recent monai changes. However moving forward, I think this arose because pdm prefers the weekly release (because it's more recent?). I see the --pre flag in pdm to allow prereleases but I don't think we have that enabled. Do you know if there's a way to filter package to just patches/minor versions?