|
24 | 24 |
|
25 | 25 | ---
|
26 | 26 |
|
27 |
| -Building upon [JAX](https://github.com/google/jax) and [Ray](https://github.com/ray-project/ray), EvoX offers a comprehensive suite of **50+ Evolutionary Algorithms (EAs)** and a wide range of **100+ Benchmark Problems/Environments**, all benefiting from distributed GPU-acceleration. It facilitates efficient exploration of complex optimization landscapes, effective tackling of black-box optimization challenges, and deep dives into neuroevolution with [Brax](https://github.com/google/brax). With a foundation in functional programming and hierarchical state management, EvoX offers a user-friendly and modular experience. For more details, please refer to our [Paper](https://arxiv.org/abs/2301.12457) and [Documentation](https://evox.readthedocs.io/en/latest/) / [文档](https://evox.readthedocs.io/zh/latest/). |
| 27 | +Building upon PyTorch, EvoX offers a comprehensive suite of **50+ Evolutionary Algorithms (EAs)** and a wide range of **100+ Benchmark Problems/Environments**, all benefiting from distributed GPU-acceleration. It facilitates efficient exploration of complex optimization landscapes, effective tackling of black-box optimization challenges, and deep dives into neuroevolution with [Brax](https://github.com/google/brax). With a foundation in functional programming and hierarchical state management, EvoX offers a user-friendly and modular experience. For more details, please refer to our [Paper](https://arxiv.org/abs/2301.12457) and [Documentation](https://evox.readthedocs.io/en/latest/) / [文档](https://evox.readthedocs.io/zh/latest/). |
28 | 28 |
|
29 | 29 | ## Key Features
|
30 | 30 |
|
@@ -63,107 +63,33 @@ For a comprehensive list and further details of all algorithms, please check the
|
63 | 63 |
|
64 | 64 | ### Benchmark Problems/Environments
|
65 | 65 |
|
66 |
| -| Category | Problems/Environments | |
67 |
| -| -------------- | ----------------------------------- | |
68 |
| -| Numerical | DTLZ, LSMOP, MaF, ZDT, CEC'22, ... | |
| 66 | +| Category | Problems/Environments | |
| 67 | +| ----------------- | ----------------------------------- | |
| 68 | +| Numerical | DTLZ, LSMOP, MaF, ZDT, CEC'22, ... | |
69 | 69 | | Neuroevolution/RL | Brax, Gym, TorchVision Dataset, ... |
|
70 | 70 |
|
71 | 71 | For a comprehensive list and further details of all benchmark problems/environments, please check the [API Documentation](https://evox.readthedocs.io/en/latest/api/problems/index.html).
|
72 | 72 |
|
73 | 73 |
|
74 | 74 | ## Setting Up EvoX
|
75 | 75 |
|
76 |
| - |
77 |
| -## Prerequisites |
78 |
| - |
79 |
| -- **Python**: Version 3.12 (or higher) |
80 |
| -- **CUDA**: Version 12.1 (or higher) |
81 |
| -- **PyTorch**: Version 2.5.0 (or higher recommended) |
82 |
| - |
83 | 76 | Install `evox` effortlessly via `pip`:
|
84 | 77 | ```bash
|
85 | 78 | pip install evox
|
86 | 79 | ```
|
87 | 80 |
|
88 |
| -**Note**: To setup EvoX with **GPU acceleration** capabilities, you will need to setup **JAX** first. For detials, please refer to our comprehensive [Installation Guide](https://evox.readthedocs.io/en/latest/guide/install/index.html). Additionally, you can watch our **instructional videos**: |
89 |
| - |
90 |
| -🎥 [EvoX Installation Guide (Linux)](https://youtu.be/fa2s1Jl-Fy0) |
91 |
| - |
92 |
| -🎥 [EvoX Installation Guide (Windows)](https://youtu.be/7f8Uz1rqvn8) |
93 |
| - |
94 |
| -🎥 [EvoX 安装指南 (Linux)](https://www.bilibili.com/video/BV1Zt421c7GN) |
95 |
| - |
96 |
| -🎥 [EvoX 安装指南 (Windows)](https://www.bilibili.com/video/BV1Bb421h7bG) |
97 |
| - |
98 |
| - |
99 |
| - |
100 |
| -## Quick Start |
101 |
| - |
102 |
| -Kickstart your journey with EvoX in just a few simple steps: |
103 |
| -1. **Import necessary modules**: |
104 |
| -```python |
105 |
| -import evox |
106 |
| -from evox import algorithms, problems, workflows |
107 |
| -``` |
108 |
| -2. **Configure an algorithm and define a problem**: |
109 |
| -```python |
110 |
| -pso = algorithms.PSO( |
111 |
| - lb=jnp.full(shape=(2,), fill_value=-32), |
112 |
| - ub=jnp.full(shape=(2,), fill_value=32), |
113 |
| - pop_size=100, |
114 |
| -) |
115 |
| -ackley = problems.numerical.Ackley() |
116 |
| -``` |
117 |
| -3. **Compose and initialize the workflow**: |
118 |
| -```python |
119 |
| -workflow = workflows.StdWorkflow(pso, ackley) |
120 |
| -key = jax.random.PRNGKey(42) |
121 |
| -state = workflow.init(key) |
122 |
| -``` |
123 |
| -4. **Run the workflow**: |
124 |
| -```python |
125 |
| -# Execute the workflow for 100 iterations |
126 |
| -for i in range(100): |
127 |
| - state = workflow.step(state) |
128 |
| -``` |
129 |
| - |
130 |
| -## Use-cases and Applications |
131 |
| - |
132 |
| -Try out ready-to-play examples in your browser with Colab: |
133 |
| - |
134 |
| -| Example | Link | |
135 |
| -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
136 |
| -| Basic Usage | [](https://colab.research.google.com/github/EMI-Group/evox/blob/main/docs/source/guide/basics/1-start.ipynb) | |
137 |
| -| Numerical Optimization | [](https://colab.research.google.com/github/EMI-Group/evox/blob/main/docs/source/example/pso_ackley.ipynb) | |
138 |
| -| Neuroevolution with Gym | [](https://colab.research.google.com/github/EMI-Group/evox/blob/main/docs/source/example/gym_classic_control.ipynb) | |
139 |
| -| Neuroevolution with Brax | [](https://colab.research.google.com/github/EMI-Group/evox/blob/main/docs/source/guide/basics/2-problems.ipynb) | |
140 |
| -| Custom Algorithm/Problem | [](https://colab.research.google.com/github/EMI-Group/evox/blob/main/docs/source/example/custom_algorithm_and_problem.ipynb) | |
141 |
| - |
142 |
| -For more use-cases and applications, pleae check out [Example Directory](https://evox.readthedocs.io/en/latest/example/index.html). |
143 |
| - |
144 |
| - |
145 |
| -## Unit Test Commands |
| 81 | +## Run Unit Test |
146 | 82 |
|
| 83 | +1. prepare the test environment by installing the required packages (e.g., `torch`) in your Python environment |
| 84 | +2. run the following command in the **root directory of the project**: `pip install -e .`, which will install the `evox` package in editable mode |
| 85 | +3. run unittest: |
147 | 86 | ```shell
|
148 |
| -python ./unit_test/algorithms/pso_variants/test_clpso.py |
149 |
| -python ./unit_test/algorithms/pso_variants/test_cso.py |
150 |
| -python ./unit_test/algorithms/pso_variants/test_dms_pso_el.py |
151 |
| -python ./unit_test/algorithms/pso_variants/test_fs_pso.py |
152 |
| -python ./unit_test/algorithms/pso_variants/test_pso.py |
153 |
| -python ./unit_test/algorithms/pso_variants/test_sl_pso_gs.py |
154 |
| -python ./unit_test/algorithms/pso_variants/test_sl_pso_us.py |
155 |
| - |
156 |
| -python ./unit_test/core/test_jit_util.py |
157 |
| -python ./unit_test/core/test_module.py |
158 |
| - |
159 |
| -python ./unit_test/problems/test_hpo_wrapper.py |
160 |
| -python ./unit_test/problems/test_supervised_learning.py |
161 |
| - |
162 |
| -python ./unit_test/utils/test_jit_fix.py |
163 |
| -python ./unit_test/utils/test_parameters_and_vector.py |
164 |
| -python ./unit_test/utils/test_while.py |
165 |
| - |
166 |
| -python ./unit_test/workflows/test_std_workflow.py |
| 87 | +# run all tests |
| 88 | +python -m unittest |
| 89 | +# run tests in [path], e.g. python -m unittest unit_test/core/test_jit_util.py |
| 90 | +python -m unittest [path-to-test-file] |
| 91 | +# run a specific test method or module, e.g. python -m unittest unit_test.core.test_jit_util.TestJitUtil.test_single_eval |
| 92 | +python -m unittest [path-to-method-or-module] |
167 | 93 | ```
|
168 | 94 |
|
169 | 95 | ## Community & Support
|
@@ -195,4 +121,4 @@ If you use EvoX in your research and want to cite it in your work, please use:
|
195 | 121 |
|
196 | 122 | ## Star History
|
197 | 123 |
|
198 |
| -[](https://star-history.com/#EMI-Group/evox&Date) |
| 124 | +[](https://star-history.com/#EMI-Group/evox&Date) |
0 commit comments