[ 
https://issues.apache.org/jira/browse/BEAM-7737?focusedWorklogId=276666&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-276666
 ]

ASF GitHub Bot logged work on BEAM-7737:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jul/19 12:21
            Start Date: 15/Jul/19 12:21
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #9066: [BEAM-7737] 
fix microbenchmark scripts
URL: https://github.com/apache/beam/pull/9066
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 276666)
            Time Spent: 10m
    Remaining Estimate: 0h

> Microbenchmark script do not work consistently 
> -----------------------------------------------
>
>                 Key: BEAM-7737
>                 URL: https://issues.apache.org/jira/browse/BEAM-7737
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-harness
>            Reporter: Rakesh Kumar
>            Assignee: Rakesh Kumar
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> microbenchmar scripts do not work consistently, at least run into problem for 
> me:
> {code}
> (beam) ➜  python git:(master) python -m 
> apache_beam.tools.distribution_counter_microbenchmark
> Traceback (most recent call last):
>   File 
> "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
>  line 174, in _run_module_as_main
>     "__main__", fname, loader, pkg_name)
>   File 
> "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py",
>  line 72, in _run_code
>     exec code in run_globals
>   File 
> "/Users/rkumar/personal/opensource/beam/sdks/python/apache_beam/tools/distribution_counter_microbenchmark.py",
>  line 69, in <module>
>     'apache_beam.transforms.cy_dataflow_distribution_counter')
>   File "apache_beam/tools/utils.py", line 41, in check_compiled
>     "Profiling uncompiled code.\n"
> RuntimeError: Profiling uncompiled code.
> To compile beam, run 'pip install Cython; python setup.py build_ext --inplace'
> {code}
> Tihs is because [this 
> line|https://github.com/apache/beam/blob/f7cbf88f550c8918b99a13af4182d6efa07cd2b5/sdks/python/apache_beam/tools/utils.py#L37]
>  of check_compiled method 
> doesn't work consistently. It every time just get the root module instead of 
> the submodule and fails to identify the the given moudle is compiled with 
> cython.
> Also it is not recommended to use {{__import__}} method because it is python 
> internal and it is meant to be used by the Python interpreter. 
> {{importlib.import_module}} is the recommended way of finding the module.
> Pull request: https://github.com/apache/beam/pull/9066



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to