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

Instaling by pip #87

Closed
raminsalmas opened this issue Jun 24, 2022 · 6 comments · Fixed by #129
Closed

Instaling by pip #87

raminsalmas opened this issue Jun 24, 2022 · 6 comments · Fixed by #129

Comments

@raminsalmas
Copy link

raminsalmas commented Jun 24, 2022

Hi,

pip install https://github.com/autonlab/auton-survival.git - doesn't work for me.

Looking for your advice.

Thanks.

@chiragnagpal
Copy link
Collaborator

Hi Ramin

Given that the package is currently developed primarily by research students without much bandwidth for propoer maintenance, we decided to not support pip installation, atleast for now.. this might change in the future depending on if we get enough extra hands to help with that.

As of now, the best way to use auton-survival is to git clone the repo to your local machine and add the folder to your PYTHONPATH. this can be done somewhat easily by using sys

import sys
sys.path.append()

@AND2797
Copy link

AND2797 commented Aug 5, 2022

If this is something of interest, I'm happy to take a crack at it?

@ecotner
Copy link

ecotner commented Aug 24, 2022

I have been testing this package out recently and was able to install it with pip by creating a pyproject.toml in the repo root directory so it could be installed using setuptools:

[project]
name = "auton_survival"
version = "1.0.0"
description = "the auton-survival package"
license = {file = "LICENSE"}
readme = "README.md"
dependencies = [
    "torch>=1.0.0",
    "numpy>=1.16.5",
    "pandas>=1.0.0",
    "tqdm>=4.0.0",
    "scikit-learn>=0.18",
    "torchvision>=0.7.0",
    "scikit-survival>=0.15.0",
    "lifelines>=0.26.4",
]

[build-system]
requires = [
    "setuptools",
    "wheel",
]

[tool.setuptools]
packages = ["auton_survival"]

Had no trouble installing and using things after that with pip install -q -e ~/auton-survival. With this approach you guys could get rid of your requirements.txt and just stick the dependencies in this file too. Here's some of the relevant documentation if you're interested in learning more. Longer-term, I'd suggest you guys use a build tool like poetry which manages dependencies, installations, virtual environments, and can even push to PyPI (so people can do pip installs without cloning the repo).

IvanUniTO pushed a commit to IvanUniTO/auton-survival that referenced this issue Jul 12, 2023
Included @ecotner contribution from the discussion in
autonlab#87

This config is lean, less opininated and more conda friendly than the
poetry stuff.
@matteo4diani
Copy link
Contributor

matteo4diani commented Jul 18, 2023

@IvanUniTO citing from @ecotner 's comment:

Longer-term, I'd suggest you guys use a build tool like poetry which manages dependencies, installations, virtual environments, and can even push to PyPI (so people can do pip installs without cloning the repo).

You are not bound to use poetry to manage your dependencies/envs, it's just our (proposed) build back-end.
The final objective is to publish the package to PyPI and set up a robust CI-CD pipeline: poetry is the industry standard for this kind of job, other internal and external tools are sadly lagging behind in terms of features and documentation.

With the "poetry stuff" you can easily install via pip as a Version Control System dependency without having to git clone the repo every time, moreover the dependency will be updated automatically when you pip install --upgrade.

If you are interested in trying it out, conda can easily interface with pip and VCS dependencies, see this StackOverflow thread.

Also, since you are referencing changes made in a PR, it would be better to comment on the PR with your opinions and suggestions or open a discussion: #117 .

@IvanUniTO
Copy link

IvanUniTO commented Jul 18, 2023 via email

@matteo4diani
Copy link
Contributor

matteo4diani commented Jul 18, 2023

@IvanUniTO No bother at all! I just want to ensure that all voices are heard since this is a scientific tool and users may prefer a different approach VS traditional SWE projects, thus I invited you to speak out on the PR or here on this issue, and thanks for doing it btw.
I guess your stance on poetry proves my concern 😁

Regarding poetry breaking PEP standards, I see where you're coming from, and I strongly prefer the standards-oriented approach taken by PDM, although it isn't mature yet to support a small team that wants to delegate the hard stuff away.

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 a pull request may close this issue.

6 participants