question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

optimize='hyper-spinglass'

See original GitHub issue

In the following code: eq, shapes = oe.helpers.rand_equation(100, 3,d_min=2,d_max=2,seed=1) path, info = oe.contract_path(eq, *shapes, shapes=True, optimize='hyper-spinglass') I encountered “KeyError: “Path optimizer ‘auto-hq’ not found, valid options are {‘random-greedy’, ‘quickbb-2’, ‘flowcutter-60’, ‘branch-all’, ‘hyper-greedy’, ‘hyper-256’, ‘quickbb-10’, ‘flowcutter-10’, ‘hyper-betweenness’, ‘flowcutter-2’, ‘eager’, ‘greedy’, ‘auto’, ‘branch-1’, ‘dynamic-programming’, ‘quickbb-60’, ‘hyper’, ‘hyper-kahypar’, ‘branch-2’, ‘hyper-spinglass’, ‘dp’, ‘opportunistic’, ‘optimal’}.””

It seems that somehow in the core.py: ContractionTree.contract(), the optimize is still the default value ‘auto-hq’, instead of spinglass.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jcmgraycommented, Feb 16, 2020

Hi sorry by ‘develop’ version I meant the latest (currently unreleased) version on github. You can either clone it to you computer and install it locally:

$ git clone https://github.com/dgasmith/opt_einsum.git
$ pip install -U -e opt_einsum/

The -U means update and the -e means editable - you can make changes and pull commits and when you reimport opt_einsum the changes will immediately come into effect.

Or you install directly from the github repo:

$ pip install -U git+https://github.com/dgasmith/opt_einsum.git

(in which case the version of opt_einsum will be frozen at the latest commit.)

0reactions
panzhang83commented, Mar 8, 2020

Yes, installing the develop version of opt_einsum solved my problem. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found