-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Windows Compatibility #199
Conversation
@crohkohl: Travis tests failed because docs were not updated. If you wish to update docs and pass the test you may do: pip install git+https://github.com/lukeyeager/flask-autodoc.git |
I am all new to using github and python. Thanks for the doc-tip! |
Hi @crohkohl, I would be happy to merge some simple changes which make it easier for you to use DIGITS on Windows. Can you separate the changes for fixing file serving out from the Windows compatibility changes? That will make this easier to review. And it would be great if you could squash your Windows compatibility fixes into a single commit. These instructions may be helpful: And I'll need you to send us a signed copy of the CLA before we can merge any changes. |
Hi @lukeyeager , thanks for that tip, that squashing is good to know. I separated the image serving fix into #202 and just squashed the windows-related changes. Once a pre-compiled _caffe.pyd is available for windows (took some time, still working on perfecting it) running DIGITS on windows should hopefully be no big deal. The CLA is sent. |
@crohkohl great, thanks! Can you remove the file serving commit from this branch and rebase on top of the And sorry about all the documentation tests failing. I'm seriously considering giving up on all that nifty autodoc stuff. |
I think you need to |
okay, I fetched all, merged everything and removed that commit. We should be all set now. |
only in case of binary files. On linux there is no difference. But in windows writing a text file is different from a binary file. |
I pulled your LevelDB-related change out into a separate pull request: #203. |
that is a good idea |
Okay, I think I managed to adapt most of the code. With the latest commit I managed to perform:
Here some remarks:
|
Ok, it looks like you have a lot of different things going on in this PR. Safe changes
>>> os.path.abspath('.')
'/home/lyeager'
>>> ntpath.abspath('.')
'\\home\\lyeager'
>>> posixpath.abspath('.')
'/home/lyeager' Needs some more discussion
Merging/rebasingNow that I've merged #203, you should be able to rebase on the master branch and remove your LevelDB-related changes. You seem to be having a little trouble with # checkout your development branch
# assumes master is tracking crohkol/master
git checkout master
# get the latest changes from NVIDIA/DIGITS
git fetch --all
# move your changes on top of the master branch of NVIDIA/DIGITS
# assumes nvidia is your name for the NVIDIA/DIGITS fork
# you'll probably have to deal with some merge conflicts - follow the advice git gives you
git rebase -i nvidia/master
# push your changes back to this branch
# assumes crohkohl is your name for the crohkohl/DIGITS fork
git push crohkohl/master This is a helpful comment about rebasing:
|
7aad31c
to
7bef237
Compare
@lukeyeager I never used git so extensively ... but I think I am understanding the rebase strategy now - it is much cleaner! Safe Changes
Those modules return all the same: >>> os.path.abspath('.')
'E:\\deep-learning\\DIGITS\\digits\\utils'
>>> ntpath.abspath('.')
'E:\\deep-learning\\DIGITS\\digits\\utils'
>>> posixpath.abspath('.')
'E:\\deep-learning\\DIGITS\\digits\\utils' Needs some more discussionConvert filesystem paths to URL paths in task.py
You are right, I would propose to only change them were necessary. The testing was a good idea! I had to change a few more things. I added them to the commit. Here is the test output. A few tests fail due to permission issues in cudart localization
I implemented a more generic version that loops through the version numbers from top to bottom Changes to nonblocking_readlines()
fcntl is used on unix to prevent blocking the thread when waiting for a response from the subprocess. |
Thanks for the fixes, this is getting close to merge-able. Still an issueFailing testsThose all look like they could be related to the Path substitution in task.pyYou haven't removed the path substitution from cudart localizationOk, I guess that works. Can you can clean it up a little bit by only checking for those things if Resolvedposixpath not workingWeird. Whatever, the Changes to nonblocking_readlines()Cool, thanks for the explanation! |
Failing testsWith the latest changes all tests pass. Here is the output for your reference. I had to modify some of the test scripts due to problems with Path substitution in task.pySorry, I overlooked this. I added it in cudart localizationModified it according to your suggestions |
@@ -187,6 +189,9 @@ def get_version(executable): | |||
elif platform.system() == 'Darwin': | |||
# XXX: guess and let the user figure out errors later | |||
return (0,11,0) | |||
elif platform.system() == 'Windows': | |||
# XXX: guess and let the user figure out errors later | |||
return (0,12,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we guess v0.11
for Windows too?
I'm working on a patch for Caffe that exposes the version number as caffe.__version__
, but until then I think we should just assume the worst.
okay, I addressed all of your comments in the last commit. I rebased and squashed everything into a single commit again. |
Awesome, just two more things:
Sorry for all the nitpicking! It takes a while to review things when you put several different changes in a single PR. This is also taking longer because I can't actually test for any of these cases you're trying to fix. |
20acce0
to
2ef3a3c
Compare
- binary files need to be opened with 'rb' or 'wb' flag - leveldb package is not available for windows - display warning instead of crashing - adapted find_executable with fallback for windows ".exe" extension and let the version check pass - normalization of path separators to linux style - turn off fcntl on windows - Making tests pass and support of file upload - portable cudart localization - Make tests pass + refactoring of existing modifications
That's no problem at all. I also want to do it right.
On windows all tests are passing. |
LGTM, thanks! |
That's great, thanks! |
Thanks for this guys! One last thing, it would be nice that the |
@danst18, Windows support isn't really a priority for us. But if you find a way to rewrite the |
@danst18 The major problem right now is that gunicorn does not run on windows. But they have been working on it, see e.g. benoitc/gunicorn#524. |
Windows Compatibility
Hi all. I've been able to compile Nvidia's Caffe fork in Windows (see for details: willyd/caffe-builder#6), and now I'm doing some tests with Digits using it. I've been able to create the MNIST dataset, but when training the LeNet model I get the following error message:
I'm not a Python expert so I don't know what to do next. Why could I be getting this error? |
The last comment I see was dated Sept9, 2015. Possibly dumb question... is NVidia's DIGITS available for Windows 7? |
It is not supported. But if you can get
|
@houghdsla I finally was able to run Digits on Windows 10 (check the last comment here: willyd/caffe-builder#6) |
On my machine the image serving, e.g. of the mean.jpg does not work.
The browser (tested IE and Chrome) cannot interpret the image probably due to the missing content type. The send_file function takes care of that all.