Skip to content
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

Update dependencies & changes #26

Merged
merged 8 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Check Changelog Update"

on:
pull_request:
branches: [ main ] # or the default branch of your repo

jobs:
check-changelog:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check for Changelog Updates
run: |
HEAD_CHANGELOG_HASH=$(git log -1 --format=format:%H -- docs/CHANGELOG.md)
git fetch origin ${{ github.base_ref }}
git checkout origin/${{ github.base_ref }}
BASE_CHANGELOG_HASH=$(git log -1 --format=format:%H -- docs/CHANGELOG.md)

if [ "$BASE_CHANGELOG_HASH" == "$HEAD_CHANGELOG_HASH" ]; then
echo "Changelog must be updated with every pull request."
exit 1
fi
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Deep survival analysis made easy

> :warning: :construction: **We are still working on the publication of this project and appreciate your patience until everything will be ready.** :construction: :warning:

![CodeQC](https://github.com/Novartis/torchsurv/actions/workflows/codeqc.yml/badge.svg?branch=main)
![Docs](https://github.com/Novartis/torchsurv/actions/workflows/docs.yml/badge.svg?branch=main)
[![PyPI - Version](https://img.shields.io/pypi/v/torchsurv)](https://pypi.org/project/torchsurv/)
[![arXiv](https://img.shields.io/badge/arXiv-2404.10761-f9f107.svg)](https://arxiv.org/abs/2404.10761)
[![Documentation](https://img.shields.io/badge/GithubPage-Sphinx-blue)](https://opensource.nibr.com/torchsurv/)
[![Downloads](https://static.pepy.tech/badge/torchsurv)](https://pepy.tech/project/torchsurv)


`TorchSurv` is a Python package that serves as a companion tool to perform deep survival modeling within the `PyTorch` environment. Unlike existing libraries that impose specific parametric forms on users, `TorchSurv` enables the use of custom `PyTorch`-based deep survival models. With its lightweight design, minimal input requirements, full `PyTorch` backend, and freedom from restrictive survival model parameterizations, `TorchSurv` facilitates efficient survival model implementation, particularly beneficial for high-dimensional input data scenarios.

## TL;DR
Expand Down Expand Up @@ -43,15 +40,15 @@ cindex.p_value(method="noether", alternative="two_sided")
cindex.compare(cindexB)
```

## Installation
## Installation and dependencies

First, install the package:

```bash
pip install torchsurv
```

or for local installation (from package root)
or for local installation (from package root / clone of this git repository):

```bash
pip install -e .
Expand All @@ -60,6 +57,21 @@ pip install -e .
If you use Conda, you can install requirements into a conda environment
using the `environment.yml` file included in the `dev` subfolder of the source repository.

Using the package has the following dependencies which will be installed automatically via pip:

* [torch](https://pytorch.org/): Consider pre-installing if you have specific system requirements (CPU / GPU / CUDA version).
* [scipy](https://scipy.org/): We use some statistical helper functions to calculate metrics.
* [torchmetrics](https://lightning.ai/docs/torchmetrics/stable/): We use some statistical helper functions to calculate metrics.

To run the tests and example notebooks, you need to install the following additional packages:

* [lifelines](https://lifelines.readthedocs.io/en/latest/)
* [scikit-survival](https://scikit-survival.readthedocs.io/en/stable/)
* [pytorch_lightning](https://lightning.ai/docs/pytorch/stable/) (and [lightning](https://lightning.ai/))

To build the documentation and for package development, please see [the development notes](https://opensource.nibr.com/torchsurv/devnotes.html) and
[dev/environment.yml](dev/environment.yml).

## Getting started

We recommend starting with the [introductory guide](https://opensource.nibr.com/torchsurv/notebooks/introduction.html), where you'll find an overview of the package's functionalities.
Expand Down Expand Up @@ -213,10 +225,10 @@ By contributing to this project, you agree to license your contributions under t

## Contacts

* Thibaud Coroller thibaud.coroller@novartis.com `(creator, maintainer)`
* Mélodie Monod melodie.monod@novartis.com `(creator, maintainer)`
* Peter Krusche peter.krusche@novartis.com `(author, maintainer)`
* Qian Cao qian.cao@fda.hhs.gov `(author, maintainer)`
* [Thibaud Coroller](mailto:thibaud.coroller@novartis.com?subject=TorchSurv) `(creator, maintainer)`
* [Mélodie Monod](mailto:melodie.monod@novartis.com?subject=TorchSurv) `(creator, maintainer)`
* [Peter Krusche](mailto:peter.krusche@novartis.com?subject=TorchSurv) `(author, maintainer)`
* [Qian Cao](mailto:qian.cao@fda.hhs.gov@novartis.com?subject=TorchSurv) `(author, maintainer)`

If you have any questions, suggestions, or feedback, feel free to reach out the developement team [us](https://opensource.nibr.com/torchsurv/AUTHORS.html).

Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change log
=========

Version 0.1.2
-------------

* Updated package documentation with publication links & badges (#9, #14, #16, #19, #21, #22, #24)
* Fixed and documented package dependencies (#1)

Version 0.1.1
-------------

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "torchsurv"
version = "0.1.1"
version = "0.1.2"
description = "Survival analysis made easy with pytorch"
authors = [
{name = "Thibaud Coroller", email = "thibaud.coroller@novartis.com"},
Expand All @@ -30,7 +30,6 @@ classifiers = [

dependencies = [
"torch",
"lightning",
"scipy",
"numpy",
"torchmetrics",
Expand Down
Loading