Skip to content

Commit

Permalink
Merge branch 'main' into ase_version_qe
Browse files Browse the repository at this point in the history
  • Loading branch information
gelzinyte committed Jul 29, 2024
2 parents f0e33d4 + 765cc84 commit 69bea74
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 33 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,12 @@ jobs:
git clone https://github.com/phonopy/phonopy
cd phonopy
python3 setup.py build
python3 -m pip install .
python3 -m pip install -e .
cd ..
git clone https://github.com/phonopy/phono3py
cd phono3py
python3 setup.py build
python3 setup.py install
python3 -m pip install -e .
cd ..
- name: Install Quippy from PyPI
Expand Down
51 changes: 34 additions & 17 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
env:
coverage-on-version: "3.9"
use-mpi: True
PIP_CONSTRAINT: pip_constraint.txt
defaults:
run:
shell: bash -l {0}
Expand All @@ -38,10 +39,13 @@ jobs:
python3 --version
- name: Install dependencies from pip
run: python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests
run: |
echo "numpy<2" >> $PIP_CONSTRAINT
python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests
- name: Install latest ASE from gitlab
- name: Install latest ASE from pypi
run: |
echo PIP_CONSTRAINT $PIP_CONSTRAINT
python3 -m pip install ase
echo -n "ASE VERSION "
python3 -c "import ase; print(ase.__file__, ase.__version__)"
Expand All @@ -62,27 +66,28 @@ jobs:
run: |
# find mklvars
for pkg in $( apt list --installed | fgrep "installed" | fgrep "mkl" | sed "s#/.*##" ); do
if dpkg -L $pkg | egrep -q 'vars.sh$'; then
mklvars=$( dpkg -L $pkg | egrep 'vars.sh$' )
if dpkg -L $pkg | egrep -q 'env/vars.sh$'; then
mklvars=$( dpkg -L $pkg | egrep 'env/vars.sh$' )
break
fi
done
if [ -z $mklvars ]; then
echo 'Failed to find *vars.sh in any pkg named *mkl*'
if [ $( echo $mklvars | wc -w ) != 1 ]; then
echo "wrong number of mkl setvars.sh '$mklvars'" 1>&2
exit 1
fi
source $mklvars intel64
export PIP_CONSTRAINT=$PWD/$PIP_CONSTRAINT
git clone https://github.com/phonopy/phonopy
cd phonopy
python3 setup.py build
python3 -m pip install .
echo python3 -m pip install -e . -vvv
python3 -m pip install -e . -vvv
cd ..
git clone https://github.com/phonopy/phono3py
cd phono3py
python3 setup.py build
python3 setup.py install
python3 -m pip install -e . -vvv
cd ..
- name: Install Quippy from PyPI
Expand All @@ -99,16 +104,32 @@ jobs:
run: |
echo "search for torch version"
set +o pipefail
torch_version=$( python3 -m pip install torch== 2>&1 | fgrep 'from versions' | sed -e 's/.* //' -e 's/)//' )
echo "found torch version $torch_version, installing cpu-only variant"
# search for available torch version with +cpu support
for torch_version_test in $( python3 -m pip install torch== 2>&1 | fgrep 'from versions' |
sed -e 's/.*from versions: //' -e 's/)//' -e 's/,[ ]*/\n/g' | tac ); do
set +e
python3 -m pip install --dry-run torch==${torch_version_test}+cpu \
-f https://download.pytorch.org/whl/torch_stable.html > /dev/null 2>&1
search_stat=$?
set -e
if [ $search_stat == 0 ]; then
torch_version=${torch_version_test}
break
fi
done
if [ -z $torch_version ]; then
echo "Failed to find any pytorch version with +cpu variant" 1>&2
exit 1
fi
echo "found torch version ${torch_version}+cpu, installing"
python3 -m pip install torch==${torch_version}+cpu -f https://download.pytorch.org/whl/torch_stable.html
echo "installing mace"
python3 -m pip install git+https://github.com/ACEsuit/mace.git@main
python3 -c "import mace; print(mace.__file__)"
- name: Julia and ace fit
run: |
python3 -m pip install pip install threadpoolctl
python3 -m pip install threadpoolctl
wget https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.1-linux-x86_64.tar.gz
tar xzf julia-1.8.1-linux-x86_64.tar.gz
# note that this hardwires a particular compatible ACE1pack version
Expand Down Expand Up @@ -215,10 +236,6 @@ jobs:
- name: Test with pytest - coverage
if: env.coverage-on-version == matrix.python-version
run: |
echo "BOB pre actual pytest"
which python3
python3 -m pip list | grep numpy
python3 -c "import numpy; print(numpy.__file__, numpy.__version__)"
rm -rf $HOME/pytest_cov
mkdir $HOME/pytest_cov
#
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ The main functions of Workflow is to efficiently parallelise operations over a s

For examples and more information see [documentation](https://libatoms.github.io/workflow/)

`wfl` and its dependendensies may be installed via `pip install wfl`.
`wfl` and its dependencies may be installed via `pip install wfl`.

NOTE: (as of 14 June 2024) `wfl` is only tested against the latest ASE pip release, currently v3.23.0.
For the time being, v3.22.1 is the mininum version listed as a (pip) prerequisite of `wfl`, because
For the time being, v3.22.1 is the minimum version listed as a (pip) prerequisite of `wfl`, because
it at least mostly works, but it may not be fully compatible and is not actively tested.

# Recent changes
Expand Down Expand Up @@ -41,7 +41,7 @@ v0.2.0:

v0.1.0:

- make it possible to fire off several remote autoparallellized ops without waiting for their jobs to finish
- multi-pass calclation in `Vasp`, to allow for things like GGA followed by HSE
- make it possible to fire off several remote autoparallelized ops without waiting for their jobs to finish
- multi-pass calculation in `Vasp`, to allow for things like GGA followed by HSE
- MACE fitting, including remote jobs
- various bug fixes
13 changes: 6 additions & 7 deletions docs/source/examples.daisy_chain_mlip_fitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,13 @@
"\n",
"ref_errors = {\n",
" 'atomization_energy/atom': {\n",
" 'train': {'RMSE': 0.026086070005729697, 'MAE': 0.02188233965637977, 'count': 50},\n",
" '_ALL_': {'RMSE': 0.02631013293566519, 'MAE': 0.02217457525203221, 'count': 100},\n",
" 'test': {'RMSE': 0.026532303741682858, 'MAE': 0.02246681084768465, 'count': 50}},\n",
" 'train': {'RMSE': 0.020425437431681327, 'MAE': 0.016212666323964592, 'count': 50}, \n",
" '_ALL_': {'RMSE': 0.01965484792256244, 'MAE': 0.015378010911287552, 'count': 100}, \n",
" 'test': {'RMSE': 0.01885278757750655, 'MAE': 0.014543355498610513, 'count': 50}}, \n",
" 'forces/comp': {\n",
" 'train': {'RMSE': 0.6700484048236104, 'MAE': 0.48912067870708253, 'count': 5097},\n",
" '_ALL_': {'RMSE': 0.674843619212047, 'MAE': 0.49305958821652923, 'count': 10188},\n",
" 'test': {'RMSE': 0.6796105918104188, 'MAE': 0.49700313992928696, 'count': 5091}}\n",
"}\n",
" 'train': {'RMSE': 0.6318812940305143, 'MAE': 0.4633571169452562, 'count': 5133},\n",
" '_ALL_': {'RMSE': 0.6455044814693653, 'MAE': 0.4741960245074422, 'count': 10212}, \n",
" 'test': {'RMSE': 0.6589864341996843, 'MAE': 0.48515017148848205, 'count': 5079}}}\n",
"\n",
"print(errors)\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name = "wfl"
version = "0.3.0"
requires-python = ">=3.9"
dependencies = [ "click>=7.0", "numpy", "ase>=3.22.1", "pyyaml", "spglib",
dependencies = [ "click>=7.0", "numpy<2", "ase>=3.22.1", "pyyaml", "spglib",
"docstring_parser", "expyre-wfl", "universalSOAP" ]
readme = "README.md"
license = { file = "LICENSE" }
Expand Down

0 comments on commit 69bea74

Please sign in to comment.