8000 be friendlier to windows users by joelgrus · Pull Request #1572 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

be friendlier to windows users #1572

Merged
merged 4 commits into from
Aug 7, 2018
Merged

Conversation

joelgrus
Copy link
Contributor
@joelgrus joelgrus commented Aug 3, 2018

these are small things that prevent allennlp from running on windows, this isn't all the way to getting it to work, but it's a step in that direction:

(1) jsonnet won't pip install on windows right now, so I disabled it in requirements.txt if the platform is windows
(2) accordingly, in params.py we wrap the import _jsonnet in a try-catch block, and if it can't be imported we stub in alternative functions that log a warning and assume the configuration is pure JSON
(3) the resource module doesn't exist on Windows, so in util.py we import it conditionally, and then we check that it's there before we use it
(4) on unix, urlparse.scheme is an empty string for a file, but on windows it isn't, so I just removed that check in cached_path, it should be fine to just check if the file exists whatever the scheme is

Copy link
Contributor
@DeNeutoy DeNeutoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, but on a higher level it seems a little pointless moving toward windows support unless we have a concrete way of checking we aren't breaking these sorts of things

@joelgrus
Copy link
Contributor Author
joelgrus commented Aug 6, 2018

I don't know that we'll ever officially support it, I just want to make it easier for the people who are clamoring for it

< B950 /batch-deferred-content>
@joelgrus
Copy link
Contributor Author
joelgrus commented Aug 6, 2018

but if I ever get it working end-to-end I'll look into a CI way of making sure it stays working

@joelgrus joelgrus merged commit bf760b0 into allenai:master Aug 7, 2018
gabrielStanovsky pushed a commit to gabrielStanovsky/allennlp that referenced this pull request Sep 7, 2018
* be friendlier to windows users

* conditional import for resource

* get things in the right order
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0