From 256381510b29ee850ff975895f9fb0a8be6cda3e Mon Sep 17 00:00:00 2001 From: XU-Boqing Date: Sat, 11 Jan 2025 21:34:56 +0800 Subject: [PATCH] Fix the spelling mistakes of docs. --- docs/source/_static/modulebase.svg | 2 +- docs/source/example/Brax.ipynb | 2 +- docs/source/example/custom_algo_prob.ipynb | 4 ++-- docs/source/guide/developer/1-modulebase.md | 4 ++-- docs/source/guide/developer/3-custom-alg-pro.md | 16 ++++++++-------- docs/source/guide/user/1-start.ipynb | 10 +++++----- docs/source/guide/user/2-problems.ipynb | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/source/_static/modulebase.svg b/docs/source/_static/modulebase.svg index 1a0ed050a..e3678d51c 100644 --- a/docs/source/_static/modulebase.svg +++ b/docs/source/_static/modulebase.svg @@ -1,4 +1,4 @@ -

ModuleBase



ModuleBase...

Algorithm



Algorithm...

Problem



Problem...

Monitor



Monitor...

Workflow



Workflow...

Custom Module



Custom Module...

torch.nn.Module



torch.nn.Module...
Text is not SVG - cannot display
\ No newline at end of file +

ModuleBase



ModuleBase...

Algorithm



Algorithm...

Problem



Problem...

Monitor



Monitor...

Workflow



Workflow...

torch.nn.Module



torch.nn.Module...

<Custom Module>



<Custom Module>...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/source/example/Brax.ipynb b/docs/source/example/Brax.ipynb index 3504880ad..a80686a5b 100644 --- a/docs/source/example/Brax.ipynb +++ b/docs/source/example/Brax.ipynb @@ -304,7 +304,7 @@ "# Set the maximum number of generations\n", "max_generation = 3\n", "\n", - "# Run the worflow\n", + "# Run the workflow\n", "for index in range(max_generation):\n", " print(f\"In generation {index}:\")\n", " t = time.time()\n", diff --git a/docs/source/example/custom_algo_prob.ipynb b/docs/source/example/custom_algo_prob.ipynb index 9190aeb1c..82a58898c 100644 --- a/docs/source/example/custom_algo_prob.ipynb +++ b/docs/source/example/custom_algo_prob.ipynb @@ -84,7 +84,7 @@ " # Compute fitness\n", " fitness = self.evaluate(self.population)\n", "\n", - " # Update the lbest and the gbest\n", + " # Update the local best fitness and the global best fitness\n", " compare = self.local_best_fitness - fitness\n", " self.local_best_location = torch.where(\n", " compare[:, None] > 0, self.population, self.local_best_location\n", @@ -104,7 +104,7 @@ " + self.phi_g * rg * (self.global_best_location - self.population)\n", " )\n", "\n", - " # Udpdate the population\n", + " # Update the population\n", " population = self.population + velocity\n", " self.population = clamp(population, self.lb, self.ub)\n", " self.velocity = clamp(velocity, self.lb, self.ub)\n", diff --git a/docs/source/guide/developer/1-modulebase.md b/docs/source/guide/developer/1-modulebase.md index d88baf2f3..57ee79619 100644 --- a/docs/source/guide/developer/1-modulebase.md +++ b/docs/source/guide/developer/1-modulebase.md @@ -2,11 +2,11 @@ A **module** is a fundamental concept in programming that refers to a self-contained unit of code designed to perform a specific task or a set of related tasks. -This notebook will introduce the basic module in Evox: {doc}`ModuleBase `. +This notebook will introduce the basic module in EvoX: {doc}`ModuleBase `. ## Introduction of Module -Review the basic running process in EvoX we have mentioned in the {doc}`Quick Start ` of the {doc}`User Guide `: +in the {doc}`Quick Start ` of the {doc}`User Guide `, we have mentioned the basic running process in EvoX:
Initiate an algorithm and a problem -- Set an monitor -- Initiate a workflow -- Run the workflow
diff --git a/docs/source/guide/developer/3-custom-alg-pro.md b/docs/source/guide/developer/3-custom-alg-pro.md index 6085ebe94..90029d685 100644 --- a/docs/source/guide/developer/3-custom-alg-pro.md +++ b/docs/source/guide/developer/3-custom-alg-pro.md @@ -65,7 +65,7 @@ Here we give an example of **implementing a PSO algorithm that solves the Sphere Here is a pseudo-code: ```text -Set hyperparameters +Set hyper-parameters Generate the initial population Do @@ -73,7 +73,7 @@ Do Update the lbest and the gbest Update the velocity - Udpdate the population + Update the population Until stopping criterion ``` @@ -81,24 +81,24 @@ Until stopping criterion And here is what each part of the algorithm and the problem corresponds to in EvoX. ```python -Set hyperparameters # Algortihm.__init__ +Set hyper-parameters # Algorithm.__init__ -Generate the initial population # Algortihm.setup +Generate the initial population # Algorithm.setup Do # Problem.evaluate (not part of the algorithm) Compute fitness - # Algortihm.step + # Algorithm.step Update the lbest and the gbest Update the velocity - Udpdate the population + Update the population Until stopping criterion ``` ### Algorithm example: PSO algorithm -Particle Swarm Optimization (PSO) is a population-based metaheuristic algorithm inspired by the social behavior of birds and fish. It is widely used for solving continuous and discrete optimization problems. +Particle Swarm Optimization (PSO) is a population-based meta-heuristic algorithm inspired by the social behavior of birds and fish. It is widely used for solving continuous and discrete optimization problems. **Here is an implementation example of PSO algorithm in EvoX:** @@ -172,7 +172,7 @@ class PSO(Algorithm): + self.phi_g * rg * (self.global_best_location - self.population) ) - # Udpdate the population + # Update the population population = self.population + velocity self.population = clamp(population, self.lb, self.ub) self.velocity = clamp(velocity, self.lb, self.ub) diff --git a/docs/source/guide/user/1-start.ipynb b/docs/source/guide/user/1-start.ipynb index 4f8fcc765..9b5d82875 100644 --- a/docs/source/guide/user/1-start.ipynb +++ b/docs/source/guide/user/1-start.ipynb @@ -17,7 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# install evox, skip it if you have already installed evox\n", + "# install EvoX, skip it if you have already installed EvoX\n", "from importlib.util import find_spec\n", "\n", "if find_spec(\"evox\") is None:\n", @@ -46,7 +46,7 @@ "source": [ "## The basic running process in EvoX\n", "\n", - "As a distributed GPU-accelerated framework for scalable evolutionary computation, EvoX can be uesd to do many kinds computations, so we say \"EvoX is all you need\". Though many kinds of computaions are different more or less, in EvoX we standard the basic running process:\n", + "As a distributed GPU-accelerated framework for scalable evolutionary computation, EvoX can be used to do many kinds computations, so we say \"EvoX is all you need\". Though many kinds of computations are different more or less, in EvoX we standard the basic running process:\n", "\n", "
\n", " Initiate an algorithm and a problem -- Set an monitor -- Initiate a workflow -- Run the workflow\n", @@ -86,13 +86,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Notice that the algorithm and problem themselves do not contain the monitoring of the steps, so we will not get any feed back only denpending on them. It turns out that we still need a **monitor**.\n", + "Notice that the algorithm and problem themselves do not contain the monitoring of the steps, so we will not get any feed back only depending on them. It turns out that we still need a **monitor**.\n", "\n", "## Set an monitor\n", "\n", "{doc}`Monitor ` is a standard class in EvoX to monitor the intermediate values inside a optimization process. Information like fitness or population can be easily obtained by the monitor.\n", "\n", - "Doing is better than saying, so let us create a “Evalution monitor”:" + "Doing is better than saying, so let us create a “Evaluation monitor”:" ] }, { @@ -111,7 +111,7 @@ "source": [ "## Initiate an workflow\n", "\n", - "A **workflow** outlines the series of steps required to accomplish a task or project. In EvoX, a workflow represents the overall process of evolutionary computation, putting the algorithm, problem, monitor together.\n", + "A **workflow** outlines the series of steps required to accomplish a task or project. In EvoX, a workflow represents the overall process of evolutionary computation, putting the algorithm, problem and monitor together.\n", "\n", "If we want to run the algorithm to solve the problem with a monitor, we need to create a workflow of the {doc}`Workflow ` class." ] diff --git a/docs/source/guide/user/2-problems.ipynb b/docs/source/guide/user/2-problems.ipynb index db4a2affd..88e59afad 100644 --- a/docs/source/guide/user/2-problems.ipynb +++ b/docs/source/guide/user/2-problems.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "outputs": [], "source": [ - "# install evox, skip it if you have already installed evox\n", + "# install EvoX, skip it if you have already installed EvoX\n", "from importlib.util import find_spec\n", "\n", "if find_spec(\"evox\") is None:\n", @@ -444,7 +444,7 @@ "# Set the maximum number of generations\n", "max_generation = 3\n", "\n", - "# Run the worflow\n", + "# Run the workflow\n", "for index in range(max_generation):\n", " print(f\"In generation {index}:\")\n", " t = time.time()\n",