Skip to content

asv ImportError #19518

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

Closed
jdoepfert opened this issue Feb 2, 2018 · 5 comments · Fixed by #19236
Closed

asv ImportError #19518

jdoepfert opened this issue Feb 2, 2018 · 5 comments · Fixed by #19236
Labels
Performance Memory or execution speed performance
Milestone

Comments

@jdoepfert
Copy link
Contributor

jdoepfert commented Feb 2, 2018

Code Sample, a copy-pastable example if possible

Clone and build pandas-dev, then from pandas/asv_bench do

asv continuous -f 1.1  upstream/master

Problem description

This yields an ImportError on my machine:

File "/pandas/asv_bench/benchmarks/gil.py", line 3, in <module>
from pandas import (DataFrame, Series, rolling_median, rolling_mean,
ImportError: cannot import name 'rolling_median'

Full stacktrace:

$ asv continuous -f 1.1  upstream/master 
· Creating environments
· Discovering benchmarks
·· Uninstalling from conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt.
·· Building 3597de0a for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt.....................................................................
·· Installing into conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt..
·· Error running /Users/joerg/Documents/Github/pandas/asv_bench/env/83b3be1235aa7b08e8a17448e2f70790/bin/python /Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py discover /Users/joerg/Documents/Github/pandas/asv_bench/benchmarks /var/folders/27/qrg706z54l76vk7t__l43h140000gn/T/tmp6ldll0ln
             STDOUT -------->

             STDERR -------->
             Traceback (most recent call last):
               File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py", line 867, in <module>
                 commands[mode](args)
               File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py", line 812, in main_discover
                 list_benchmarks(benchmark_dir, fp)
               File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py", line 797, in list_benchmarks
                 for benchmark in disc_benchmarks(root):
               File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py", line 696, in disc_benchmarks
                 for module in disc_files(root, os.path.basename(root) + '.'):
               File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py", line 648, in disc_files
                 module = import_module(package + filename)
               File "/Users/joerg/Documents/Github/pandas/asv_bench/env/83b3be1235aa7b08e8a17448e2f70790/lib/python3.6/importlib/__init__.py", line 126, in import_module
                 return _bootstrap._gcd_import(name[level:], package, level)
               File "<frozen importlib._bootstrap>", line 994, in _gcd_import
               File "<frozen importlib._bootstrap>", line 971, in _find_and_load
               File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
               File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
               File "<frozen importlib._bootstrap_external>", line 678, in exec_module
               File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
               File "/Users/joerg/Documents/Github/pandas/asv_bench/benchmarks/gil.py", line 3, in <module>
                 from pandas import (DataFrame, Series, rolling_median, rolling_mean,
             ImportError: cannot import name 'rolling_median'
Traceback (most recent call last):
  File "/Users/joerg/anaconda3/bin/asv", line 11, in <module>
    load_entry_point('asv==0.3.dev1214+4112e36d', 'console_scripts', 'asv')()
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/main.py", line 38, in main
    result = args.func(args)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/commands/__init__.py", line 48, in run_from_args
    return cls.run_from_conf_args(conf, args)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/commands/continuous.py", line 61, in run_from_conf_args
    quick=args.quick, **kwargs
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/commands/continuous.py", line 86, in run
    _returns=run_objs, _machine_file=_machine_file)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/commands/run.py", line 192, in run
    commit_hashes, regex=bench)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmarks.py", line 369, in discover
    benchmarks = cls._disc_benchmarks(conf, repo, environments, commit_hash)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmarks.py", line 417, in _disc_benchmarks
    dots=False)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/plugins/conda.py", line 169, in run
    return self.run_executable('python', args, **kwargs)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/plugins/conda.py", line 175, in run_executable
    return super(Conda, self).run_executable(executable, args, **kwargs)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/environment.py", line 573, in run_executable
    return util.check_output([exe] + args, **kwargs)
  File "/Users/joerg/anaconda3/lib/python3.5/site-packages/asv/util.py", line 590, in check_output
    raise ProcessError(args, retcode, stdout, stderr)
asv.util.ProcessError: Command '/Users/joerg/Documents/Github/pandas/asv_bench/env/83b3be1235aa7b08e8a17448e2f70790/bin/python /Users/joerg/anaconda3/lib/python3.5/site-packages/asv/benchmark.py discover /Users/joerg/Documents/Github/pandas/asv_bench/benchmarks /var/folders/27/qrg706z54l76vk7t__l43h140000gn/T/tmp6ldll0ln' returned non-zero exit status 1
@TomAugspurger
Copy link
Contributor

Those methods have been removed. Maybe try clearing out cached environments in the env folder?

@jdoepfert
Copy link
Contributor Author

@TomAugspurger thx for the hint. I tried rm -r env/ and then again asv continuous -f 1.1 upstream/master, and get the same error unfortunately..

@mroeschke
Copy link
Member

This commit, 3597de0, that removed these methods recently didn't clean them from the asvs, so the asvs will fail on master.

I cleaned these up in my PR, #19236, so it should be fixed soon.

@jorisvandenbossche
Copy link
Member

The methods were removed yesterday, we still have to clean-up the benchmarks

@jorisvandenbossche
Copy link
Member

As @mroeschke said!

@jreback jreback added this to the 0.23.0 milestone Feb 8, 2018
@jreback jreback added the Performance Memory or execution speed performance label Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants