CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.35k stars 557 forks source link

successor library for autograd? #1615

Open CamDavidsonPilon opened 4 months ago

CamDavidsonPilon commented 4 months ago

HIPS/autograd entered into unmaintained status, so we should plan to move away from it.

  1. Fork it and maintain it ourselves.
  2. Choose a different library like JAX, tinygrad, any other options?
  3. vendor it and keep only the parts of autograd we need.

1. Fork it and maintain it ourselves

This is probably the least attractive option. I'm not an expert in autodiff, or the implementation in autograd, and I don't want to support or be responsible for other libraries using autograd. Pass.

The only benefit is that users don't need to update their code from import autograd.numpy as anp to import x.numpy as xnp.

2. Choose a different library like JAX, tinygrad etc.

3. vendor it and keep only the parts of autograd we need.

This is close to 1., but we don't need to support a community, just our own need. This is probably strictly better than 1. However, some notes:

imessien commented 3 months ago

Tinygrad is great!

Zethson commented 3 months ago

These are quite big dependencies. If you only need a small part and can vendor it, I'd advocate for it

Zethson commented 3 months ago

Different option: Make Jax an optional dependency and require it when accessing certain lifelines functionality where it would be required.

fkiraly commented 3 months ago

Different option: Make Jax an optional dependency and require it when accessing certain lifelines functionality where it would be required.

In sktime and skpro we manage dependencies on the level of estimators, so adopting the patterns therein would allow solving the issue along the lines of @Zethson. Happy to help if we go down that route, as I am familiar with dependency isolation per estimator.

There seems to be a substantial footprint - I would suggest making a battle plan:

fkiraly commented 3 months ago

My preference would be option 2, jax.

I also wonder why there is a discontinuity in the package history, the two packages share some authors. Any gossip about jax/autograd relation?

CamDavidsonPilon commented 1 month ago

So things are happening with autograd, and some new maintainers have stepped up. I will keep any eye on their progress.

CamDavidsonPilon commented 1 month ago

Well that was a lucky break: https://github.com/HIPS/autograd/releases/tag/v1.7.0

I'll test and update this shortly.

AGCaesar commented 2 days ago

I had the same problem with numpy 2.0, my python-autograd was just updated to 1.7 and I rebuild lifelines and everything works great again :)