Skip to content

Commit

Permalink
Merge pull request #1 from polkadot21/48--update-installation-guidelines
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
polkadot21 authored May 3, 2024
2 parents 5724c2e + cd1caa3 commit a9f4320
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,29 @@ Kolmogorov-Arnold Networks (KANs) are promising alternatives of Multi-Layer Perc


## Installation
There are two ways to install pykan, through pypi or github.
Pykan can be installed via PyPI or directly from GitHub.

**Installation via github**
**Pre-requisites:**

```python
git clone https://github.com/KindXiaoming/pykan.git
cd pykan
pip install -e .
```
Python 3.9.7 or higher
pip
```

**Installation via pypi**
**Installation via github**

```python
pip install pykan
```
python -m venv pykan-env
source pykan-env/bin/activate # On Windows use `pykan-env\Scripts\activate`
pip install git+https://github.com/KindXiaoming/pykan.git
```

**Installation via PyPI:**
```
python -m venv pykan-env
source pykan-env/bin/activate # On Windows use `pykan-env\Scripts\activate`
pip install pykan
```
Requirements

```python
Expand All @@ -71,11 +78,21 @@ torch==2.2.2
tqdm==4.66.2
```

To install requirements:
After activating the virtual environment, you can install specific package requirements as follows:
```python
pip install -r requirements.txt
```

**Optional: Conda Environment Setup**
For those who prefer using Conda:
```
conda create --name pykan-env python=3.9.7
conda activate pykan-env
pip install git+https://github.com/KindXiaoming/pykan.git # For GitHub installation
# or
pip install pykan # For PyPI installation
```

## Computation requirements

Examples in [tutorials](tutorials) are runnable on a single CPU typically less than 10 minutes. All examples in the paper are runnable on a single CPU in less than one day. Training KANs for PDE is the most expensive and may take hours to days on a single CPU. We use CPUs to train our models because we carried out parameter sweeps (both for MLPs and KANs) to obtain Pareto Frontiers. There are thousands of small models which is why we use CPUs rather than GPUs. Admittedly, our problem scales are smaller than typical machine learning tasks, but are typical for science-related tasks. In case the scale of your task is large, it is advisable to use GPUs.
Expand Down

0 comments on commit a9f4320

Please sign in to comment.