graphcore-research / pyscf-ipu

PySCF on IPU
https://github.com/graphcore-research/pyscf-ipu#readme
Apache License 2.0
41 stars 3 forks source link

Refactor notebook #90

Closed awf closed 10 months ago

awf commented 10 months ago

The existing DFT notebook simply calls the density_functional_theory.py version using os.system. This change moves more of the python logic into the notebook, moving density_functional_theory.py to pyscf_ipu/dft.py.

AlexanderMath commented 10 months ago

Notes (second code block)

Code fails at tar -xvf ./data/gdb11.tgz --directory ./gdb/. The folder gdb/ doesn't exist and tar is not allowed to create (running locally on 3b76ef51c33362120d0ac26b488d04626e08fe60). The line below tries to load from /data/ , that is, sortgdb.sort_gdb looks at gdb_filename="./data/gdb11_size09.smi". Changing to tar -xvf ./data/gdb11.tgz --directory ./data/ seem to fix the issue. (when debugging using -nc with wget circumvents excessive re-downloading)

Let me know if for some reason I'm at the wrong commit/branch (local code looks identical to cell block in ReviewNB)

AlexanderMath commented 10 months ago

Managed to reproduce the jax.jit tracing causing time to increase from ~100ms to 5000ms.

AlexanderMath commented 10 months ago

Issue is resolved for me if I don't re-create dcargs for every conformer. @awf

if conformer_num == 0: dcargs = namedtuple('dcargs', dcargs_names)(*(args.__dict__[a] for a in dcargs_names))
awf commented 10 months ago

Notes (second code block)

Code fails at tar -xvf ./data/gdb11.tgz --directory ./gdb/. The folder gdb/ doesn't exist ...

Let me know if for some reason I'm at the wrong commit/branch (local code looks identical to cell block in ReviewNB)

Fixed, thanks.

awf commented 10 months ago

Issue is resolved for me if I don't re-create dcargs for every conformer. @awf

if conformer_num == 0: dcargs = namedtuple('dcargs', dcargs_names)(*(args.__dict__[a] for a in dcargs_names))

Thanks for the scoping, which led me to understand that it's not the re-creation of dcargs, but of its type, that is namedtuple('dcargs', dcargs_names)

review-notebook-app[bot] commented 10 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB