NVIDIA / DIGITS

Deep Learning GPU Training System
https://developer.nvidia.com/digits
BSD 3-Clause "New" or "Revised" License
4.12k stars 1.38k forks source link

Please add python 3 support #511

Open abdulmuneer opened 8 years ago

abdulmuneer commented 8 years ago

Hi, We are using DIGITS in our organization along with internally developed applications. The lack of support for Python3 for DIGITS is preventing us too from using it. Do you have any plan to port it to python 3?

lukeyeager commented 8 years ago

We don't have plans to do this anytime soon, no. However, you're the first to ask for it - we might consider it if enough people ask or upvote this request.

If you'd like to contribute small, incremental updates towards Python3 support like e7b3466dbf82dffad0ffb7d771ba589d7c255968 (from https://github.com/NVIDIA/DIGITS/pull/501), I'd be happy to review them.

abdulmuneer commented 8 years ago

Thank you. I will send PRs with incremental updates.

enedene commented 8 years ago

Well, we're also using python 3 and all libraries we use (numpy, scipy, scikit-learn, theano and many others) have python 3 support for some time now, we'd love it if Digits/Caffe went the same way.

I don't think that upvotes for this request actually represents the need.

Josca commented 7 years ago

I would like to have python3 support too.

jms90h5 commented 7 years ago

+1 more for Python 3 support

cmastudios commented 7 years ago

+1

achaiah commented 7 years ago

+1

Thanks for considering supporting Python 3. I'm sure you're aware that the original EOL for python 2 was set to 2015. It has been extended to 2020 but basically python 2 is dead. All major AI frameworks (including Caffe, TF, CNTK) support python 3 so it would be great to see DIGITS move in that direction as well. Limiting support to python 2 only muddles the python environments where we have to keep a special environment just for DIGITS while everything else runs on python 3.

alpop commented 7 years ago

+1

dapperfu commented 7 years ago

+1. I'm avoiding starting any projects in Python2 for the reasons listed above.

dapperfu commented 7 years ago

Update: My Python3 fork is unmaintained.

Original Post:

I spent the weekend hacking through more 2->3 migration stuff to the point where I'm happy tagging it as working.

I've tested it with the Dolphin & Seahorses Have Fun with Machine Learning classification example. Next free time sprint I will try to work through all the other examples.

If anyone is interested in using DIGITS on Python 3 it would be a big help if you could try to use your use cases to figure out where the pain points are and report any additional bugs.

Tested Environment:

I built OpenCV and Caffe for Python3, CUDA8, etc. For simplicity here are the binaries. Install opencv with dpkg and exatract caffe-distribute.

If you run into any problems or have any questions open an issue on my forked repo.

https://pythonclock.org/

MyAusweis commented 7 years ago

Dear Jef-rey

can i tried to use in windows 8.1 ? and i already to install all dependencies for this. using python 3.5.3, and i need to set to cpu only

here the result

C:\DIGITS>python -m digits

Traceback (most recent call last):

File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec)

File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals)
File "C:\DIGITS\digits__main.py", line 72, in main() File "C:\DIGITS\digits\main__.py", line 57, in main import digits.webapp File "C:\DIGITS\digits\webapp.py", line 48, in import digits.views # noqa File "C:\DIGITS\digits\views.py", line 648, in app.register_error_handler(code, handle_error)
File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\site-packages\flask\app.py", line 1170, in register_error_handler self._register_error_handler(None, code_or_exception, f) File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\site-packages\flask\app.py", line 64, in wrapper_func return f(self, *args, **kwargs) File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\site-packages\flask\app.py", line 1185, in _register_error_handler exc_class, code = self._get_exc_class_and_code(code_or_exception) File "C:\Users\MyPC\AppData\Local\Programs\Python\Python35\lib\site-packages\flask\app.py", line 1104, in _get_exc_class_and_code exc_class = default_exceptions[exc_class_or_code] KeyError: 402 C:\DIGITS>python -m digits-devserver C:\Users\MyPC\AppData\Local\Programs\Python\Python35\python.exe: No module named digits-devserver

using digits-devserver

C:\DIGITS>python digits-devserver

File "digits-devserver", line 6 python -m digits $@ ^ SyntaxError: invalid syntax

Thx

lukeyeager commented 7 years ago

^ That's not related to either Python3 or Windows. You're trying to run a bash script (see the first line) with Python. Don't do that. Just start the server with python -m digits like the script is trying to do.

dapperfu commented 7 years ago

https://pythonclock.org/

201power commented 6 years ago

does digits 6.0 support python3?

dapperfu commented 6 years ago

No. You can't even run setup.py because of the Python2-isms.

python setup.py install
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    execfile(os.path.join(LOCAL_DIR, 'digits', 'version.py'), {}, version_locals)
NameError: name 'execfile' is not defined

And requirements.txt has a Python2 only version of pydot selected.

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-cglb3f20/pydot/setup.py", line 6, in <module>
        import pydot
      File "/tmp/pip-install-cglb3f20/pydot/pydot.py", line 31
        except Exception, e:
                        ^
    SyntaxError: invalid syntax

And if you skip setup.py, fix the versions in requirements, it fails to start because of the print functions.

SyntaxError: Missing parentheses in call to 'print'

My DIGITS5 Python3 branch above still works. I haven't played with machine vision in a while and don't currently have the motivation ($) to work on a Python3 DIGITS6 release.

I just tossed up a Bounty Source if it's something DIGITS users really want: https://www.bountysource.com/issues/57707267-digits6-update.

[And the reason I haven't submitted any pull requests of my Python 3 changes is because of the CLA]

xemose commented 6 years ago

Please add python3 support this has been open since 2016....

It's 2018 guys...

LeitchP commented 6 years ago

+1 - Tensoflow is only available on Python 3 for Windows. It took me ages just to get your out-dated DIGITS to work on Windows because your digits has such old requirements it's hard to cobble together and source the old libraries. After all of that I find that it won't run Tensorflow - so I feel that I wasted my time on your training (which was digits based), I've wasted my time installing DIGITS and for what? Like the last guy said, it's 2018 and the request has been there since 2016 - which seems like the last date that you seriously updated DIGITS anyway.

xemose commented 6 years ago

From the errors people are reporting, it seems the only real change needed to upgrade Digits for Python 3 is the syntax for print. Since in Python3 print is used as print('String') instead of print 'String'

tl;dr add parentheses to the inside of print statements?

Did anyone find any errors that's not related to syntax? I'm thinking of just running a script through Digits' source code to update the print statements.

dqthebt24 commented 6 years ago

+1 (like)

dapperfu commented 6 years ago

@xemose:

From the errors people are reporting

Look at my fork and Python3 version of DIGITS 5. There's a lot more "Python 2 isms" in there than just print. (Which is trivial to support both with __future__ module). The only reason 'print' is what is reported is that is what fails first.

I did the conversion in about a weekend. There are probably edge use cases that will fail. But I don't have the motivation to provide Nvidia free work on DIGITS 6. If they really see value in this project it should be trivial to get an Intern to work on it. But if NVidia doesn't care enough to do that at the minimum it's not worth my time to do it for them.

Alternatively, https://www.bountysource.com/issues/57707267-digits6-update

dapperfu commented 6 years ago

My digits3 fork is no longer maintained for reasons listed in later comment.

ysya commented 6 years ago

Also need python3 support please.

BrikerMan commented 5 years ago

Also need python3 support please.

LeitchP commented 5 years ago

So..... this is becoming a real problem. On one hand, this installs and runs really easily on Docker. On the other hand, getting the results to work with Python3 isn't always easy, especially since all your training is on Python 2.7. I'm just about to fork out big $$ on NVidia - why not update the tools that make using NVidia simple?

michaelholm-PN commented 5 years ago

Starting Jan 1., 2019, all new releases of numpy will only support python-3.

This is incompatible with Digits not supporting python-3.

If Digits doesn't support python-3, we'll have to stop using it soon.

Are you planning support for python-3?

andreyyruski commented 5 years ago

Jetson Nano doesn't have TensorFlow support for Python2.7. so it's impossible to run DIGITS with TensorFlow support on the Nano

richardcoder commented 5 years ago

Officially? Created a fork for DIGITS on Python3.

  • 506 open issues.
  • 26 Pull Requests.
  • You will need to send a signed copy of the Contributor License Agreement to digits@nvidia.com before your change can be accepted.

Developers absolutely welcome because NVIDIA did a great of obfuscation with the lack of documentation everywhere.

@jed-frey

Sorry to bother you, but I recently face the same problem to make DIGITS work with python3, however when I go to your link, I find the readme says that "it is no longer developed since there are other better options in 2019", may I ask what are the better options, you mean DIGITS provide support for python 3 or other applications? Thanks in advance.

dapperfu commented 4 years ago

@richardcoder, Sorry I didn't get back to you sooner. For some reason GitHub didn't show me the notification in this thread.

A bit of a backstory on the existence of DIGITS3. I started playing with machine learning back in 2017. I found DIGITS and immediately loved it. I got tinkering under the hood and just wanted to see how much it would take to convert to Python 3. A long the way I learned how to use Flask, blueprints, etc.

However all of my changes were a big tear up of the code, it wasn't mergeable. NVIDIA seemed to have no interest in doing any work internally to convert to Python3, so I lost interest. This seems to be a perpetual problem with large companies and open source. It's not an immediate profit line in a budget so it's not "worth" it.

Better options for a 1:1 copy of digits with a web gui, user accounts, etc. Nothing I know of (but that's not my use case.)

PyTorch, Tensorflow and other higher level libraries have gotten a lot better since 2017 so I've moved to them for my ML stuff.

I'd be happy to have a hackathon with Nvidia updating it to Python3 in a crash week for some free pizza or a TITAN card, but it doesn't seem like NVIDIA really cares much about this product anymore. For example it supports "Ubuntu 14.04, 16.04". Ubuntu's next LTS 2020 is coming. I've been on 18.04 for 16 months.

DIGITS seems to be on life support and NVIDIA pulled the rug out from under those that built their work around it.

Also, I don't want sign away my contributor rights to NVIDIA. 2¢

ai408 commented 4 years ago

+1 more for Python 3 support

spurani commented 4 years ago

#2210 I am having similar issue making Nvidia Digits work with python3 after I have installed caffe and tensorflow with python 3. Is anyone been able to successfully build, install and use Nvidia Digits with Caffe, tensorflow on python 3?