Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Improve installation guidelines #51

Merged
merged 2 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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