autonlab / auton-survival

Auton Survival - an open source package for Regression, Counterfactual Estimation, Evaluation and Phenotyping with Censored Time-to-Events
http://autonlab.github.io/auton-survival
MIT License
315 stars 74 forks source link

AttributeError: module 'auton_survival' has no attribute 'plot_kaplanmeier' #126

Open sbpatel2009 opened 1 year ago

sbpatel2009 commented 1 year ago

Here is the code (directly from the notebooks:

# Plot the phenogroup specific Kaplan-Meier survival estimate.
auton_survival.reporting.plot_kaplanmeier(outcomes, groups=phenotypes)

Here is the error message:


> ---------------------------------------------------------------------------
> AttributeError                            Traceback (most recent call last)
> [~\AppData\Local\Temp\ipykernel_20180\1703960961.py](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/Snehal%20Patel/OneDrive%20-%20SimBioSys/Hack-a-thon/Hack-a-thon%202023/Code_and_Data/~/AppData/Local/Temp/ipykernel_20180/1703960961.py) in 
>       1 # Plot the phenogroup specific Kaplan-Meier survival estimate.
> ----> 2 auton_survival.reporting.plot_kaplanmeier(outcomes, groups=phenotypes)
> 
> AttributeError: module 'auton_survival' has no attribute 'reporting'

I tried importing the function first, but I get the same error:

from auton_survival.reporting import plot_kaplanmeier

> ---------------------------------------------------------------------------
> ModuleNotFoundError                       Traceback (most recent call last)
> [~\AppData\Local\Temp\ipykernel_20180\4279169460.py](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/Snehal%20Patel/OneDrive%20-%20SimBioSys/Hack-a-thon/Hack-a-thon%202023/Code_and_Data/~/AppData/Local/Temp/ipykernel_20180/4279169460.py) in 
> ----> 1 from auton_survival.reporting import plot_kaplanmeier
> 
> ModuleNotFoundError: No module named 'auton_survival.reporting'
chiragnagpal commented 1 year ago

hmm are you using pip install to install the package? We don't support pip yet have you tried cloning the package and using directly?

sbpatel2009 commented 1 year ago

Got it. I did use pip, so I'll try cloning directly, as you suggested. Thanks for propt reply!

matteo4diani commented 10 months ago

hmm are you using pip install to install the package? We don't support pip yet have you tried cloning the package and using directly?

Just a heads up: we now support pip installs via pip install auton-survival https://pypi.org/project/auton-survival/

sbpatel2009 commented 10 months ago

Thanks for the heads up! Really great to have the ability to pip install :)

On Thu, Nov 9, 2023 at 9:44 AM Matteo Fordiani @.***> wrote:

hmm are you using pip install to install the package? We don't support pip yet have you tried cloning the package and using directly?

Just a heads up: we now support pip installs via pip install auton-survival https://pypi.org/project/auton-survival/

— Reply to this email directly, view it on GitHub https://github.com/autonlab/auton-survival/issues/126#issuecomment-1804077418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAPI634NNASRZO3S7HNWWDYDT26VAVCNFSM6AAAAAA3KLHQL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGA3TONBRHA . You are receiving this because you authored the thread.Message ID: @.***>