Skip to content

Attribute Error on asv bechmarking #1703

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

Open
Lakshyadevelops opened this issue Mar 22, 2023 · 2 comments
Open

Attribute Error on asv bechmarking #1703

Lakshyadevelops opened this issue Mar 22, 2023 · 2 comments

Comments

@Lakshyadevelops
Copy link
Contributor

Lakshyadevelops commented Mar 22, 2023

Attribute Error on asv benchmarking. Iine 16 in module benchmarks/solarposition.py

To Reproduce
Steps to reproduce the behavior:

  1. conda create new environment using ci/requirements-py3.7-min.yml
  2. install pvlib,asv
  3. cd pvlib-python/benchmarks
  4. asv quickstart (recognizes existing template) (optional)
  5. asv run

Expected behavior
benchmark should run

Screenshots
image

Versions:

  • pvlib.__version__: 0.9.5
  • pandas.__version__: 1.5.3
  • python:" 3.9.13 but fails in asv condapyenv for all py 3.7-3.10

Additional context

Since I was using version 0.9.5>= 0.6.1 I could comment out the the function and asv benchmarks run without problem.
image

@kandersolar
Copy link
Member

It shouldn't be trying to evaluate the second branch (the one with get) unless you're using a very old pvlib, or there is some issue with determining the version string. I suggest modifying that benchmark file to report the pvlib version it is using so you can inspect it.

FWIW when I am running benchmarks myself, I have gotten into the habit of using asv run --python=same so it uses my currently activated environment instead of the ones that asv manages. That makes it a little easier to know exactly what's going on.

conda create new environment using ci/requirements-py3.7-min.yml

FYI we do not use the environments in the ci folder for benchmarking purposes. It might work, but it's not tested or supported.

@Lakshyadevelops
Copy link
Contributor Author

Lakshyadevelops commented Mar 22, 2023

shouldn't the environment made by asv used for standardized benchmarking? ci environment is my working environment not benchmarking environment.

running source code with asv run does not succeed in building environment because of scipy version. I am opening a PR for it.

image
#1704

I also noticed you support 3.7-3.10 & 3.11 without numba but asv only used 3.7-3.8 for benchmarking.
Would it be interesting to benchmark from 3.9-3.11. Specially 3.11 with it's new improvements as numba release candidate is coming next week?
@kanderso-nrel
PS-any way to determine pvlib version in asv environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants