Skip to content

Commit

Permalink
deploy: 7bf8dc1
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque committed Apr 24, 2024
1 parent bf54668 commit 329d07c
Show file tree
Hide file tree
Showing 29 changed files with 1,969 additions and 2,935 deletions.
16 changes: 8 additions & 8 deletions _downloads/5fdddbed2260616231dbf7b0d94bb665/train.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
2024-04-24 17:39:01 (INFO): Project root: /home/runner/work/ocp/ocp
2024-04-24 19:03:16 (INFO): Project root: /home/runner/work/ocp/ocp
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/torch/cuda/amp/grad_scaler.py:126: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.
warnings.warn(
2024-04-24 17:39:02 (INFO): amp: true
2024-04-24 19:03:18 (INFO): amp: true
cmd:
checkpoint_dir: fine-tuning/checkpoints/2024-04-24-17-38-08-ft-oxides
commit: 2eb8287
checkpoint_dir: fine-tuning/checkpoints/2024-04-24-19-03-28-ft-oxides
commit: 7bf8dc1
identifier: ft-oxides
logs_dir: fine-tuning/logs/tensorboard/2024-04-24-17-38-08-ft-oxides
logs_dir: fine-tuning/logs/tensorboard/2024-04-24-19-03-28-ft-oxides
print_every: 10
results_dir: fine-tuning/results/2024-04-24-17-38-08-ft-oxides
results_dir: fine-tuning/results/2024-04-24-19-03-28-ft-oxides
seed: 0
timestamp_id: 2024-04-24-17-38-08-ft-oxides
timestamp_id: 2024-04-24-19-03-28-ft-oxides
dataset:
a2g_args:
r_energy: true
Expand Down Expand Up @@ -138,7 +138,7 @@ val_dataset:
r_forces: true
src: val.db

2024-04-24 17:39:02 (INFO): Loading dataset: lmdb
2024-04-24 19:03:18 (INFO): Loading dataset: lmdb
Traceback (most recent call last):
File "/home/runner/work/ocp/ocp/main.py", line 89, in <module>
Runner()(config)
Expand Down
18 changes: 9 additions & 9 deletions _downloads/819e10305ddd6839cd7da05935b17060/mass-inference.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
2024-04-24 17:39:53 (INFO): Project root: /home/runner/work/ocp/ocp
2024-04-24 19:04:07 (INFO): Project root: /home/runner/work/ocp/ocp
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/torch/cuda/amp/grad_scaler.py:126: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.
warnings.warn(
2024-04-24 17:39:55 (INFO): amp: true
2024-04-24 19:04:09 (INFO): amp: true
cmd:
checkpoint_dir: ./checkpoints/2024-04-24-17-40-16
commit: 2eb8287
checkpoint_dir: ./checkpoints/2024-04-24-19-03-28
commit: 7bf8dc1
identifier: ''
logs_dir: ./logs/tensorboard/2024-04-24-17-40-16
logs_dir: ./logs/tensorboard/2024-04-24-19-03-28
print_every: 10
results_dir: ./results/2024-04-24-17-40-16
results_dir: ./results/2024-04-24-19-03-28
seed: 0
timestamp_id: 2024-04-24-17-40-16
timestamp_id: 2024-04-24-19-03-28
dataset:
a2g_args:
r_energy: false
Expand Down Expand Up @@ -117,7 +117,7 @@ test_dataset:
trainer: ocp
val_dataset: null

2024-04-24 17:39:55 (INFO): Loading dataset: lmdb
2024-04-24 19:04:09 (INFO): Loading dataset: lmdb
Traceback (most recent call last):
File "/home/runner/work/ocp/ocp/main.py", line 89, in <module>
Runner()(config)
Expand Down Expand Up @@ -145,4 +145,4 @@ Traceback (most recent call last):
return lmdb.open(
^^^^^^^^^^
lmdb.InvalidError: data.db: MDB_INVALID: File is not an LMDB file
Elapsed time = 4.1 seconds
Elapsed time = 4.2 seconds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 49 additions & 69 deletions _sources/core/install.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,53 @@
# Installation

## pip (fast, easy to get started)

Installing the OCP package and necessary dependencies is now as easy as:

### GPU enabled machines
```
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
pip install pyg_lib torch_scatter torch_sparse --no-index -f https://data.pyg.org/whl/torch-1.13.1+cu117.html
pip install -i https://test.pypi.org/simple/ ocp-models
```

Note the `--no-index` in the second line - it seems unnecessary, but is important to make sure the versions come from that file and not the main pip index!

### CPU-only install (slower training/inference!)
```
pip install torch==1.13.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu # install CPU torch
pip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-1.13.1+cpu.html
pip install -i https://test.pypi.org/simple/ ocp-models
```

## Conda (preferred for model training & development)

- We'll use `conda` to install dependencies and set up the environment.
We recommend using the [Python 3.9 Miniconda installer](https://docs.conda.io/en/latest/miniconda.html#linux-installers).
- After installing `conda`, install [`mamba`](https://mamba.readthedocs.io/en/latest/) to the base environment. `mamba` is a faster, drop-in replacement for `conda`:
```bash
conda install mamba -n base -c conda-forge
```
- Also install `conda-merge` to the base environment:
```bash
conda install conda-merge -n base -c conda-forge
```

Next, follow the instructions for [GPU](#gpu-machines) or [CPU](#cpu-only-machines) machines depending on your hardware to create a new environment named `ocp-models` and install dependencies.

### GPU machines

Instructions are for PyTorch 1.13.1, CUDA 11.6 specifically.

- First, check that CUDA is in your `PATH` and `LD_LIBRARY_PATH`, e.g.
```bash
$ echo $PATH | tr ':' '\n' | grep cuda
/public/apps/cuda/11.6/bin
$ echo $LD_LIBRARY_PATH | tr ':' '\n' | grep cuda
/public/apps/cuda/11.6/lib64
```
The exact paths may differ on your system.
- Then install the dependencies:
```bash
conda-merge env.common.yml env.gpu.yml > env.yml
mamba env create -f env.yml
```
Activate the conda environment with `conda activate ocp-models`.
- Install the `ocp` package with `pip install -e .`.
- Finally, install the pre-commit hooks:
```bash
pre-commit install
```

### CPU-only machines

Please skip the following if you completed the with-GPU installation from above.

## conda or better yet [mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) - easy

We do not have official conda recipes (yet!), so install with conda or mamba you will need to clone the
[ocp repo](https://github.com/Open-Catalyst-Project/ocp) and run the following from inside the repo directory to
create an environment with all dependencies.

1. Create an *ocp-models* environment
1. **GPU**

The default environment uses cuda 11.8, if you need a different version you will have to edit *pytorch-cuda* version
accordingly.
```bash
conda create -f env.gpu.yml
```

2. **CPU**
```bash
conda create -f env.cpu.yml
```

2. Activate the environment and install `ocpmodels`
```bash
conda activate ocp-models
pip install .
```

## PyPi - flexible
1. Install `pytorch` by selecting your installer, OS and CPU or CUDA version follow the official
[Pytorch docs](https://pytorch.org/get-started/locally/)

2. Install `torch_geometric` and the `torch_scatter`, `torch_sparse`, and `torch_cluster` optional dependencies
similarly by selecting the appropriate versions in the official
[PyG docs](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html)

3. Install `ocpmodels`
1. From test-PyPi (until we have our official release on PyPi soon!)
```bash
pip install -i https://test.pypi.org/simple/ ocp-models
```
2. Or by cloning the repo and then using pip
```bash
pip install .
```


## Dev install

If you plan to make contributions you will need to clone the repo and install `ocp-models` with dev dependencies,
```bash
conda-merge env.common.yml env.cpu.yml > env.yml
mamba env create -f env.yml
conda activate ocp-models
pip install -e .
pre-commit install
pip install -e .[dev]
```
8 changes: 4 additions & 4 deletions core/fine-tuning/fine-tuning-oxides.html
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ <h1>Fine tuning a model<a class="headerlink" href="#fine-tuning-a-model" title="
warnings.warn(
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Elapsed time 68.4 seconds.
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Elapsed time 68.5 seconds.
</pre></div>
</div>
<img alt="../../_images/92bd7f94dd548c8cfc2744eb5890cd23fada1ff98e8dc907657e2eb109af0402.png" src="../../_images/92bd7f94dd548c8cfc2744eb5890cd23fada1ff98e8dc907657e2eb109af0402.png" />
Expand Down Expand Up @@ -1138,7 +1138,7 @@ <h2>Running the training job<a class="headerlink" href="#running-the-training-jo
<span class="expanded">Hide code cell output</span>
</summary>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Elapsed time = 4.3 seconds
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Elapsed time = 4.2 seconds
</pre></div>
</div>
</div>
Expand All @@ -1154,7 +1154,7 @@ <h2>Running the training job<a class="headerlink" href="#running-the-training-jo
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&#39;fine-tuning/checkpoints/2024-04-24-17-38-08-ft-oxides&#39;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&#39;fine-tuning/checkpoints/2024-04-24-19-03-28-ft-oxides&#39;
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -1204,7 +1204,7 @@ <h2>Running the training job<a class="headerlink" href="#running-the-training-jo
<span class="g g-Whitespace"> </span><span class="mi">425</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">mode</span><span class="p">):</span>
<span class="ne">--&gt; </span><span class="mi">426</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">mode</span><span class="p">))</span>

<span class="ne">FileNotFoundError</span>: [Errno 2] No such file or directory: &#39;fine-tuning/checkpoints/2024-04-24-17-38-08-ft-oxides/checkpoint.pt&#39;
<span class="ne">FileNotFoundError</span>: [Errno 2] No such file or directory: &#39;fine-tuning/checkpoints/2024-04-24-19-03-28-ft-oxides/checkpoint.pt&#39;
</pre></div>
</div>
</div>
Expand Down
Loading

0 comments on commit 329d07c

Please sign in to comment.