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

Google Colab giving version control error. #104

Closed
utkarshp1161 opened this issue Apr 1, 2024 · 9 comments
Closed

Google Colab giving version control error. #104

utkarshp1161 opened this issue Apr 1, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@utkarshp1161
Copy link

image

Gives above error if using:
pip install git+https://github.com/ziatdinovmax/gpax

below works:
pip install gpax

@ziatdinovmax
Copy link
Owner

cc: @matthewcarbone

@ziatdinovmax ziatdinovmax added the bug Something isn't working label Apr 1, 2024
@matthewcarbone
Copy link
Collaborator

@ziatdinovmax I think I can solve this with another try/except. Can you post the full error? I think I know what the issue is.

That said I think we should urge people not to install via git+https://github.com/ziatdinovmax/gpax. (I am very happy to see that my "novel" build procedure works though! 😁).

@utkarshp1161
Copy link
Author

I think problem is in (https://github.com/ziatdinovmax/gpax/blob/main/gpax/_version.py)

Except block with RuntimeError should fix this

/usr/local/lib/python3.10/dist-packages/gpax/init.py in
1 from . import acquisition, kernels, priors, utils
----> 2 from ._version import version
3 from .hypo import sample_next
4 from .models import (
5 BNN,

/usr/local/lib/python3.10/dist-packages/gpax/_version.py in
5 import dunamai as _dunamai
6
----> 7 version = _dunamai.Version.from_any_vcs().serialize()
8 del _dunamai

matthewcarbone added a commit that referenced this issue Apr 2, 2024
@matthewcarbone
Copy link
Collaborator

@utkarshp1161 apologies I didn't even realize in my initial response it wasn't Maxim who raised this issue or I would've responded to you! Anyway this should be fixed in #105.

@utkarshp1161
Copy link
Author

No problem. Thanks a lot. Our group uses gpax all the time in colab and they happen to build it from main branch in most of their notebooks.

@matthewcarbone
Copy link
Collaborator

matthewcarbone commented Apr 2, 2024

@utkarshp1161 Sounds good! Just a quick bit of feedback: I would strongly recommend against pip installing from main. Unless you know exactly what's on the main branch you should use pip install gpax. This downloads a tested distribution from PyPI and is generally going to be much more stable. As you can see bugs can get introduced in to the main branch, but deployments don't happen until everything passes the tests!

The great irony is that the PR's that introduced this new bug were meant to make this deployment procedure more robust 😁

@utkarshp1161
Copy link
Author

I see. Makes complete sense. I will pass it on to the group members.

@matthewcarbone matthewcarbone mentioned this issue Apr 2, 2024
@matthewcarbone
Copy link
Collaborator

@utkarshp1161 should also wait for @ziatdinovmax's opinion, as it's his code, but in terms of best development practices you can't go wrong with installing from PyPI 👍

I've opened a PR with updated installation instructions and we'll wait for Maxim to comment!

@ziatdinovmax
Copy link
Owner

ziatdinovmax commented Apr 2, 2024

@utkarshp1161 thanks for identifying this issue and thanks @matthewcarbone for promptly fixing it!
PS. Yes, it is better to install a stable version from PyPI. The installation from source was a leftover from the early days when there were only a few people using the code and I was integrating changes into master branch in real time based on their feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants