Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
129a69d8
Commit
129a69d8
authored
Nov 25, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Joblib: Monkey-patch Parallel._print to verbose information on zope logs.
parent
2bb3cf1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
product/ERP5Type/ZopePatch.py
product/ERP5Type/ZopePatch.py
+1
-0
product/ERP5Type/patches/JoblibParallelPrint.py
product/ERP5Type/patches/JoblibParallelPrint.py
+19
-0
No files found.
product/ERP5Type/ZopePatch.py
View file @
129a69d8
...
...
@@ -87,6 +87,7 @@ from Products.ERP5Type.patches import CMFCoreUtils
from
Products.ERP5Type.patches
import
ZopePageTemplate
from
Products.ERP5Type.patches
import
ZSQLMethod
from
Products.ERP5Type.patches
import
MimetypesRegistry
from
Products.ERP5Type.patches
import
JoblibParallelPrint
# These symbols are required for backward compatibility
from
Products.ERP5Type.patches.PropertyManager
import
ERP5PropertyManager
...
...
product/ERP5Type/patches/JoblibParallelPrint.py
0 → 100644
View file @
129a69d8
ENABLE_PATCH
=
True
try
:
import
sklearn
#from sklearn.externals import joblib
#from sklearn.externals.joblib.parallel import Parallel
from
joblib.parallel
import
Parallel
except
ImportError
:
ENABLE_PATCH
=
False
if
ENABLE_PATCH
:
from
zLOG
import
LOG
,
WARNING
def
_print
(
self
,
msg
,
msg_args
):
msg
=
msg
%
msg_args
LOG
(
'Parallel._print'
,
WARNING
,
'[%s]: %s
\
n
'
%
(
self
,
msg
))
Parallel
.
_print
=
_print
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment