diff --git a/README.md b/README.md index 08f3328cd..4c0154dbc 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,10 @@ cd spk_workdir Then, the training of a SchNet model with default settings for QM9 can be started by: ``` -spktrain experiment=qm9_energy +spktrain experiment=qm9_atomwise ``` -The script prints the defaults for the experiment config `qm9_energy`. +The script prints the defaults for the experiment config `qm9_atomwise`. The dataset will be downloaded automatically to `spk_workdir/data`, if it does not exist yet. Then, the training will be started. @@ -96,7 +96,7 @@ that can be changed. Nested parameters can be changed as follows: ``` -spktrain experiment=qm9_energy data_dir= data.batch_size=64 +spktrain experiment=qm9_atomwise data_dir= data.batch_size=64 ``` Hydra organizes parameters in config groups which allows hierarchical configurations consisting of multiple @@ -104,7 +104,7 @@ yaml files. This allows to easily change the whole dataset, model or representat For instance, changing from the default SchNet representation to PaiNN, use: ``` -spktrain experiment=qm9_energy data_dir= model/representation=painn +spktrain experiment=qm9_atomwise data_dir= model/representation=painn ``` It is a bit confusing at first when to use "." or "/". The slash is used, if you are loading a preconfigured config @@ -131,7 +131,7 @@ corresponds to the following part of the config: If you would want to additionally change some value of this group, you could use: ``` -spktrain experiment=qm9_energy data_dir= model/representation=painn model.representation.n_interactions=5 +spktrain experiment=qm9_atomwise data_dir= model/representation=painn model.representation.n_interactions=5 ``` For more details on config groups, have a look at the diff --git a/docs/getstarted.rst b/docs/getstarted.rst index 22e1c2643..e29bd428a 100644 --- a/docs/getstarted.rst +++ b/docs/getstarted.rst @@ -66,9 +66,9 @@ First, create a working directory, where all data and runs will be stored:: Then, the training of a SchNet model with default settings for QM9 can be started by:: - $ spktrain experiment=qm9_energy + $ spktrain experiment=qm9_atomwise -The script prints the defaults for the experiment config ``qm9_energy``. +The script prints the defaults for the experiment config ``qm9_atomwise``. The dataset will be downloaded automatically to ``spk_workdir/data``, if it does not exist yet. Then, the training will be started. @@ -82,13 +82,13 @@ If you call ``spktrain experiment=qm9 --help``, you can see the full config with that can be changed. Nested parameters can be changed as follows:: - $ spktrain experiment=qm9_energy data_dir= data.batch_size=64 + $ spktrain experiment=qm9_atomwise data_dir= data.batch_size=64 Hydra organizes parameters in config groups which allows hierarchical configurations consisting of multiple yaml files. This allows to easily change the whole dataset, model or representation. For instance, changing from the default SchNet representation to PaiNN, use:: - $ spktrain experiment=qm9_energy data_dir= model/representation=painn + $ spktrain experiment=qm9_atomwise data_dir= model/representation=painn It is a bit confusing at first when to use "." or "/". The slash is used, if you are loading a preconfigured config group, while the dot is used changing individual values. For example, the config group "model/representation" @@ -111,7 +111,7 @@ corresponds to the following part of the config: :: If you would want to additionally change some value of this group, you could use: :: - $ spktrain experiment=qm9_energy data_dir= model/representation=painn model.representation.n_interactions=5 + $ spktrain experiment=qm9_atomwise data_dir= model/representation=painn model.representation.n_interactions=5 For more details on config groups, have a look at the `Hydra docs `_. diff --git a/docs/userguide/configs.rst b/docs/userguide/configs.rst index 9d197d4a0..ac5324ca0 100644 --- a/docs/userguide/configs.rst +++ b/docs/userguide/configs.rst @@ -355,12 +355,12 @@ directly at the command line instead of creating a separate config file for each them. When changing a single value, such as the learning rate, you can use the following notation:: - $ spktrain experiment=qm9_energy globals.lr=1e-4 + $ spktrain experiment=qm9_atomwise globals.lr=1e-4 Alternatively, one can also change a whole config group. The syntax for this is slightly different:: - $ spktrain experiment=qm9_energy model/representation=schnet + $ spktrain experiment=qm9_atomwise model/representation=schnet The difference here is that ``schnet`` refers to a pre-defined subconfig, instead of a single value. The config would be changed by this as follows:: diff --git a/src/schnetpack/datasets/qm9.py b/src/schnetpack/datasets/qm9.py index 24a32fd1b..a36c31caf 100644 --- a/src/schnetpack/datasets/qm9.py +++ b/src/schnetpack/datasets/qm9.py @@ -232,9 +232,9 @@ def _download_data( property_list = [] - irange = np.arange(len(ordered_files), dtype=np.int) + irange = np.arange(len(ordered_files), dtype=int) if uncharacterized is not None: - irange = np.setdiff1d(irange, np.array(uncharacterized, dtype=np.int) - 1) + irange = np.setdiff1d(irange, np.array(uncharacterized, dtype=int) - 1) for i in tqdm(irange): xyzfile = os.path.join(raw_path, ordered_files[i]) diff --git a/src/schnetpack/datasets/rmd17.py b/src/schnetpack/datasets/rmd17.py index 596e45b37..3848a9573 100644 --- a/src/schnetpack/datasets/rmd17.py +++ b/src/schnetpack/datasets/rmd17.py @@ -241,7 +241,7 @@ def _download_data( os.path.join(raw_path, "rmd17", "splits", f"index_train_0{i}.csv") ) .flatten() - .astype(np.int) + .astype(int) .tolist() ) train_splits.append(train_split) @@ -250,7 +250,7 @@ def _download_data( os.path.join(raw_path, "rmd17", "splits", f"index_test_0{i}.csv") ) .flatten() - .astype(np.int) + .astype(int) .tolist() ) test_splits.append(test_split)