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

Multiprocess fix + Add new working env #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions fhnw/nlp/utils/colab.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ def runs_on_colab():
"""

return 'google.colab' in str(get_ipython())


def runs_on_azure():
"""Determines if the working environment is azure ml
"""

return 'azureuser' in str(get_ipython().home_dir) # True

3 changes: 2 additions & 1 deletion fhnw/nlp/utils/defaults.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class NLPUtilsDefaults():

def __init__(self):
import multiprocess as mp
#import multiprocess as mp
import billiard as mp # Fix: AssertionError: daemonic processes are not allowed to have children

self.lock = mp.Manager().Lock()
self.stemmer = None
Expand Down