ECP-CANDLE / Benchmarks

ECP-CANDLE Benchmarks
MIT License
59 stars 83 forks source link

Error with running Uno code #113

Closed memani1 closed 1 year ago

memani1 commented 1 year ago

Hi,

I got the following error running the Uno code. This used to work earlier though, I believe changes in Benchmarks/common/candle/init.py resulted in this error.

Traceback (most recent call last):
  File "uno_baseline_keras2.py", line 8, in <module>
    import candle
  File "/lus/theta-fs0/projects/datascience/memani/uno-121422/Benchmarks-master/common/candle/__init__.py", line 175, in <module>
    raise Exception("No backend has been specified.")
jmohdyusof commented 1 year ago

What branches of Benchmarks and candle_lib are you using? This error should only occur if neither Tensorflow or PyTorch is present in the environment

memani1 commented 1 year ago

This is with master branch.

jmohdyusof commented 1 year ago

I do not see this issue. What version of keras/tensorflow is in your environment? Also the latest master should not be importing from common/candle it should be using the new candle_lib package

memani1 commented 1 year ago

TF2.9.1, keras 2.9.0. The uno_baseline_keras2.py imports from candle, right? Is there a way to use the candle_lib package?

jmohdyusof commented 1 year ago

If you download candle_lib and 'pip install -e .' within your environment then 'import candle' will use that. I do not know how 'import candle' is working in your environment unless you have manually added common/candle to your python path. In either case, the init.py is checking for tensorflow.keras, so possibly keras.2.9.0 (which should be part of tensorflow) is the issue (although tf2.9.1 should include tensorflow.keras also?) https://github.com/ECP-CANDLE/candle_lib

memani1 commented 1 year ago

Installing candle_lib and setting data path helped. Thank you!

jmohdyusof commented 1 year ago

So this works now? I am still not sure how the code was finding candle previously, but happy if it is working now. Please close the issue if it is resolved for you.