-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(windows): beta support #3290
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3290 +/- ##
==========================================
+ Coverage 89.35% 90.28% +0.92%
==========================================
Files 151 151
Lines 11014 11047 +33
==========================================
+ Hits 9842 9974 +132
+ Misses 1172 1073 -99
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
@@ -7,19 +7,19 @@ executors: | |||
metas: | |||
workspace: $HW_WORKDIR | |||
py_modules: | |||
- my_executors.py | |||
- $APP_DIR/my_executors.py |
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.
This is done to solve the issue with yaml register_cls / pymodule imports in a spawned process. Should be reverted
abcf5bd
to
2f6b633
Compare
…nto feat-windows-beta
2f6b633
to
71d940d
Compare
7256b6c
to
52e276a
Compare
21cd98b
to
9f3edf3
Compare
5ae4313
to
21f8926
Compare
3fafb3b
to
c28432b
Compare
c28432b
to
5366867
Compare
jina/types/arrays/memmap.py
Outdated
@@ -17,6 +17,9 @@ | |||
|
|||
import numpy as np | |||
|
|||
from ... import __windows__ | |||
|
|||
__windows__ = True |
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.
@alaeddine-13 this is left from debugging?
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.
Oh sorry, will clean it
if __windows__: | ||
self._body.seek(self._start) |
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.
Should this be here?
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.
Yes, actually mmap seeks _body to 0 on windows
@@ -42,7 +44,7 @@ def _warning_on_one_line(message, category, filename, lineno, *args, **kwargs): | |||
|
|||
_set_start_method(_start_method.lower()) | |||
_warnings.warn(f'multiprocessing start method is set to `{_start_method.lower()}`') | |||
_os.unsetenv('JINA_MP_START_METHOD') | |||
_os.environ.pop('JINA_MP_START_METHOD') |
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.
but is this really the same as unsetenv
? isn't dict.pop
modify the dict object itself instead of really unset env vars?
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.
This seems to do the same thing as unsetenv
(tested on Ubuntu, python 3.7.11)
import os
import subprocess
echo = lambda x, y: print(x, '\t', subprocess.check_output([f'echo ${y}'], shell=True, universal_newlines=True).strip())
def _pop():
var_name = 'FOO_POP'
os.environ[var_name] = 'BAR'
echo('after set env: ', var_name)
os.environ.pop(var_name)
echo('after os.environ.pop: ', var_name)
def _unsetenv():
var_name = 'FOO_UNSET'
os.environ[var_name] = 'BAR'
echo('after set env: ', var_name)
os.unsetenv(var_name)
echo('after os.unsetenv: ', var_name)
def _del():
var_name = 'FOO_DEL'
os.environ[var_name] = 'BAR'
echo('after set env: ', var_name)
del os.environ[var_name]
echo('after del os.environ: ', var_name)
_pop()
_unsetenv()
_del()
after set env: BAR
after os.environ.pop:
after set env: BAR
after os.unsetenv:
after set env: BAR
after del os.environ:
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.
interesting! thanks for explaining it
@@ -1036,7 +1036,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): | |||
# unset all envs to avoid any side-effect | |||
if self.args.env: | |||
for k in self.args.env.keys(): | |||
os.unsetenv(k) | |||
os.environ.pop(k, None) |
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.
same here as above
Affects: | ||
- Either, change your code from using `from {user_module_name} import ...` | ||
- Either, change your code from using `from {user_module_name} import ...` |
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.
out of the scope of this PR, but im not really sure this warning is still valid @tadejsv
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.
some minor changes
📝 Docs are deployed on https://feat-windows-beta--jina-docs.netlify.app 🎉 |
Docs deployed at https://feat-windows-beta--jina-docs.netlify.app/