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

BUG: Module not added to package; not importable #29

Merged
merged 3 commits into from Apr 15, 2020
Merged

BUG: Module not added to package; not importable #29

merged 3 commits into from Apr 15, 2020

Conversation

scottclowe
Copy link
Contributor

ranger currently cannot be used from a pip install because the ranger module was not added to the package. The package is entirely empty, resulting in the following error:

$ pip install git+https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer.git@73811db2eb55e1e3e3b736177cafaebe4807d669
[...]
Installing collected packages: ranger
Successfully installed ranger-0.0.1
$ python
>>> import ranger
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ranger'
>>> from ranger import Ranger
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ranger'
>>> import ranger.ranger
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ranger'

This is resolved by using setuptools.findpackages to add the ranger module to the package.

I also added the README.md contents as long_description in setup.py, and incremented the version number to 0.1.dev0. Using dev or dev0 as the patch number indicates that the version is unstable, i.e. there is a one-to-many mapping from the version number, 0.1.dev0, to the state of the codebase in the repository.

I can split this out into multiple PRs if you'd prefer.

@lessw2020 lessw2020 merged commit ea591d7 into lessw2020:master Apr 15, 2020
@lessw2020
Copy link
Owner

Awesome, thanks a bunch @scottclowe - much appreciated.
I haven't been using pip as I just upload ranger.py directly but I'll start using on new servers to try and keep pip up to date.
Thanks again!

@scottclowe
Copy link
Contributor Author

Thanks for the quick response and merging this in.

It would be great if you could release ranger on pip. I realise that @mpariente has put it up there, as they mention in #25. But it isn't their package so they aren't keeping it up to date (i.e. it doesn't have the new Gradient Centralization feature). I'm sure if you ask them, @mpariente will let you take over the pytorch-ranger package identifier on PyPI.

@mpariente
Copy link
Contributor

Hi to both of you
Obviously, I'd let @lessw2020 the pytorch-ranger if he wants to upload the package to PyPI, without any problem.

@lessw2020
Copy link
Owner

Hi @scottclowe and @mpariente - thanks to both of you.
I'm happy to upload to the pypi - if it's possible for both @mpariente and I to have access to it that's probably ideal.
For now @mpariente could you upload the latest ranger so that people can use the gc (gradient centralization) addition? Or if it's faster give me access and I can upload/update later today?
Thanks much!

@mpariente
Copy link
Contributor

Hey @lessw2020, can you create an account on pypi please? Or give me your username if you already have one, lessw2020 didn't work.
I'll add you as the owner of the project, it'll be easier

@lessw2020
Copy link
Owner

Hi @mpariente -thanks for the update. I've made a new account on pypi, same user name - lessw2020

@mpariente
Copy link
Contributor

I added you as the owner, sorry for the delay !
The new version needs to be above 0.1.1.
torch_optimizer depends on pytorch_ranger now, could we add typing in your repo (as done in my fork) so that pytorch_ranger still meets the requirements of torch_optimizer?

Have a nice day !

@mpariente
Copy link
Contributor

Hey @lessw2020 !
Any updates on you releasing new versions of the package?

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 this pull request may close these issues.

None yet

3 participants