sparks-baird / matbench-genmetrics

Generative materials benchmarking metrics, inspired by guacamol and CDVAE.
https://matbench-genmetrics.readthedocs.io/
MIT License
34 stars 2 forks source link

[JOSS review] Initial comments #80

Closed ml-evs closed 6 months ago

ml-evs commented 1 year ago

Hi @sgbaird, just going to use this issue to track anything I spot on my first playaround with this:

sgbaird commented 10 months ago

Hi Matt, I addressed all points (can you verify the Dockerfile works now?) except for the "slow march of time" performance assessment which @hasan-sayeed will be taking point on. Can you let me know if these are adequate?

ml-evs commented 9 months ago

Hi @sgbaird, thanks for the work implementing these changes. I can confirm the docker build works at my end, though when I run the example with the built image (after tweaking the import as per https://github.com/sparks-baird/matbench-genmetrics/issues/81, I get the infamous yaml error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/matbench_genmetrics/core/metrics.py", line 16, in <module>
    from matbench_genmetrics.core.utils.featurize import (
  File "/usr/local/lib/python3.10/site-packages/matbench_genmetrics/core/utils/featurize.py", line 13, in <module>
    from matbench_genmetrics.core.utils.match import get_tqdm
  File "/usr/local/lib/python3.10/site-packages/matbench_genmetrics/core/utils/match.py", line 73, in <module>
    CrystalNNFP = CrystalNNFingerprint.from_preset("ops")
  File "/usr/local/lib/python3.10/site-packages/matminer/featurizers/site/fingerprint.py", line 388, in from_preset
    cn_target_motif_op = load_cn_target_motif_op()
  File "/usr/local/lib/python3.10/site-packages/matminer/featurizers/site/fingerprint.py", line 887, in load_cn_target_motif_op
    return yaml.safe_load(f)
  File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1105, in safe_load
    error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
  File "/usr/local/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
    raise AttributeError(s, name=None)
AttributeError:
"safe_load()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.load(...)

instead of file "/usr/local/lib/python3.10/site-packages/matminer/featurizers/site/fingerprint.py", line 887

        return yaml.safe_load(f)

and it seems like an incompatible yaml version is installed (relative to the upper pin of 0.18 in the setup.cfg):

root ➜ / $ pip freeze | grep yaml
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8

I guess this is because the PyPI version does not have that pin yet? I would probably suggest that this docker build isn't that useful if it just mimics a user running pip install themselves (all that is being held constant is the Python version in that case), but that's not the end of the world. Feel free to close this if you are happy -- we can track the more general issue (better motivating examples) in the main JOSS thread.