From cd1caa3d57ebc95fba6c182b5652029ccf770672 Mon Sep 17 00:00:00 2001 From: Polkadot 21 <54846499+polkadot21@users.noreply.github.com> Date: Fri, 3 May 2024 17:47:32 +0200 Subject: [PATCH] Update README.md update installation guidelines --- README.md | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a4b1a789..f34f2059 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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.