diff --git a/README.md b/README.md
index 2d91ddc..4fc79b7 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@
- **Docs**: https://docs.torchmeter.top ([Backup link](https://torchmeter.github.io/latest) π)
-- **Intro**: Provides comprehensive measurement of Pytorch model's `Parameters`, `FLOPs/MACs`, `Memory-Cost`, `Inference-Time` and `Throughput` with highly customizable result display β¨
+- **Intro**: Provides comprehensive measurement of Pytorch model's `Parameters`, `FLOPs/MACs`, `Memory-Cost`, `Inference-Time` and `Throughput` with **highly customizable result display** β¨
## π. π»πΎππ½ππΎππ½ππ
@@ -381,7 +381,7 @@ Before jumping in, let's ensure smooth collaboration by reviewing our π [**co
- `TorchMeter` is an open-source project shared by developers worldwide. We're committed to fostering a **friendly, safe, and inclusive** environment for all participants.
-- The provisions stipulated in our [Code - of - Conduct file](CODE_OF_CONDUCT.md) are applicable to all community platforms, which include, but are not limited to, GitHub repositories, community forums, and similar ones.
+- The provisions stipulated in our [Code-of-Conduct file](CODE_OF_CONDUCT.md) are applicable to all community platforms, which include, but are not limited to, GitHub repositories, community forums, and similar ones.
## β±. πΏπΎπΈππππ
diff --git a/docs/src/en/cheatsheet.md b/docs/src/en/cheatsheet.md
index 8db3481..a12689f 100644
--- a/docs/src/en/cheatsheet.md
+++ b/docs/src/en/cheatsheet.md
@@ -29,7 +29,9 @@ hide:
As the name implies, it is the hierarchical index of a operation tree.
-Actually, the level index of a tree node equals to `len(tree_node.node_id.split('.'))`
+Figuratively, within the model operation tree, ^^each guide line represents a level^^. The level index value commences from **0** and increments from left to right.
+
+Additionally, the level index at which a tree node is mounted is equal to `len(tree_node.node_id.split('.'))`. For instance, the node `(1.1.6.2) 1 BatchNorm2d` below is mounted at level 4.
```title="" linenums="0"
AnyNet
@@ -54,7 +56,7 @@ AnyNet
β β β β
-0 1 2 3
+0 1 2 3 (level index, each pointing to a guide line)
```
### **:material-numeric-3-box: How to use the tree level index?**
@@ -62,11 +64,11 @@ AnyNet
A valid level index empowers you to customize the operation tree with meticulous precision.
`torchmeter` regards the following value as a valid tree level index:
-1. A non-negative integer (e.g. `0`, `1`, `2`, ...): The configurations under a specific index apply only to the corresponding level.
-2. `default`: The configurations under this index will be applied to all undefined levels.
-3. `all`: The configurations under this index will be applied to all levels.
+1. **A non-negative integer (e.g. `0`, `1`, `2`, ...)**: The configurations under a specific index apply only to the corresponding level.
+2. **`default`**: The configurations under this index will be applied to all undefined levels.
+3. **`all`**: The configurations under this index will be applied to all levels.
-Please refer to [Customize the Hierarchical Display](demo.ipynb##fb1-customize-the-hierarchical-display){ .md-button } for specific usage scenarios.
+Please refer to [Customize the Hierarchical Display](https://docs.torchmeter.top/latest/demo/#fb1-customize-the-hierarchical-display){ .md-button } for specific usage scenarios.
---
@@ -202,7 +204,7 @@ All the attributes that are available, as defined below, are intended to:
| `operation` | `torch.nn.Module` | The underlying pytorch module |
| `type` | `str` | The operation type. If the operation is a pytorch module, use the name of its class |
| `name` | `str` | The module name defined in the underlying pytorch model |
-| `node_id` | `str` | A globally unique module identifier, formatted as `.`. The index commences from `1`, cause the root is denoted as `0` |
+| `node_id` | `str` | A globally unique module identifier, formatted as `.`. The index commences from `1`, cause the root is denoted as `0` |
| `is_leaf` | `bool` | Whether the node is a leaf node (no child nodes) |
| `module_repr` | `str` | The text representation of the current operation. For non-leaf nodes, it's the ndoe type. Conversely, it is the return of `__repr__()` method |
| `parent` | `torchmeter.engine.OperationNode` | The parent node of this node. Each node has only one parent |
@@ -238,7 +240,7 @@ There are four types of units in `torchmeter`, listed as follows:
!!! note ""
- The `raw-data` tag in the subsequent content indicates that the unit marked with this tag is used in the `raw data` mode
+ The `raw-data` tag in the subsequent content indicates that the unit marked with this tag is used in the [`raw data` mode :material-link-variant:](https://docs.torchmeter.top/latest/demo/#i1-raw-data-mode)
=== ":material-counter: Counting Units"
@@ -284,7 +286,7 @@ There are four types of units in `torchmeter`, listed as follows:
| unit | explanation | tag | example |
|:------:|:----------------:|:----------:|:------------------------------------------------------- |
| `IPS` | Input Per Second | `raw-data` | `5 IPS`: process `5` inputs per second |
- | `KIPS` | $10^3$ IPS | | `5 KIPS`: process `5,000` inputs per second |
- | `MIPS` | $10^6$ IPS | | `5 MIPS`: process `5,000,000` inputs per second |
- | `GIPS` | $10^9$ IPS | | `5 GIPS`: process `5,000,000,000` inputs per second |
- | `TIPS` | $10^{12}$ IPS | | `5 TIPS`: process `5,000,000,000,000` inputs per second |
+ | `KIPS` | $10^3$ `IPS` | | `5 KIPS`: process `5,000` inputs per second |
+ | `MIPS` | $10^6$ `IPS` | | `5 MIPS`: process `5,000,000` inputs per second |
+ | `GIPS` | $10^9$ `IPS` | | `5 GIPS`: process `5,000,000,000` inputs per second |
+ | `TIPS` | $10^{12}$ `IPS` | | `5 TIPS`: process `5,000,000,000,000` inputs per second |
diff --git a/docs/src/en/contribute/conventions.md b/docs/src/en/contribute/conventions.md
index da4b4a6..19eb2f6 100644
--- a/docs/src/en/contribute/conventions.md
+++ b/docs/src/en/contribute/conventions.md
@@ -310,17 +310,19 @@ Clear commit message helps us:
### **Structure**
-```title="" linenums="0"
-[optional scope][optional !]:
+```bash title="" linenums="0"
+[optional scope][optional !]: # (1)
```
+1. Note: there is **one space** between the `:` and the subjectβοΈ
+
??? abstract "Type Prefixes"
> Most are the same as [Commit Message Type Prefixes :material-link-variant:](#Structure_1){ data-preview }, cause the PR will finally be merged as a commit.
!!! danger "Limitations"
- Type prefix **must be one** in the following table, otherwise the PR will be rejected!
+ Type prefix **must be one** in the following table, otherwise the PR will be **rejected**!
| PR Type | When to Use | Example |
|:----------:|:---------------------------:|:--------------------------:|
@@ -359,12 +361,12 @@ Clear commit message helps us:
# π Avoid
fix( ): Memory leak
- fix( core): memory leak
+ fix( core): Memory leak
```
??? warning "Exclamation Mark (`!`, Optional)"
- A `!` indicates a breaking change, which means that the PR will {++bring a major version bump++}. Therefore, please use it with caution. The PRs denoted by `!` will undergo a more rigorous review procedure.
+ A `!` indicates a **breaking change**, which means that the PR will {++bring a major version bump++}. Therefore, please use it ^^with caution^^. The PRs denoted by `!` will ^^undergo a more rigorous review procedure^^.
??? abstract "Subject"
@@ -378,10 +380,10 @@ Clear commit message helps us:
```title="" linenums="0"
# π Good
- fix: memory leak described in #456
+ fix: Memory leak described in #456
# π Avoid
- fix: #456 memory leak
+ fix: #456 Memory leak
```
---
diff --git a/docs/src/en/contribute/discussions.md b/docs/src/en/contribute/discussions.md
index 283fb8d..a8b1916 100644
--- a/docs/src/en/contribute/discussions.md
+++ b/docs/src/en/contribute/discussions.md
@@ -7,7 +7,7 @@ title: Discussions
???+ note
- 
+ { loading=lazy }
[Access to `Discussions` :material-link-variant:](https://github.com/TorchMeter/torchmeter/discussions)
diff --git a/docs/src/en/contribute/issues.md b/docs/src/en/contribute/issues.md
index 54e42bf..58bf0fe 100644
--- a/docs/src/en/contribute/issues.md
+++ b/docs/src/en/contribute/issues.md
@@ -7,7 +7,7 @@ title: Issues
???+ note
- 
+ { loading=lazy }
[Access to `Issues` :material-link-variant:](https://github.com/TorchMeter/torchmeter/issues)
@@ -39,7 +39,7 @@ title: Issues
??? example "Illustration of filing an issue"
- 
+ { loading=lazy }
- Further reading: [How maintainers manage issues :material-link-variant:](../others/management.md#Issue-Management){ data-preview }
diff --git a/docs/src/en/contribute/prs.md b/docs/src/en/contribute/prs.md
index 273b656..a6174db 100644
--- a/docs/src/en/contribute/prs.md
+++ b/docs/src/en/contribute/prs.md
@@ -7,7 +7,7 @@ title: Pull Requests (PRs)
???+ note
- 
+ { loading=lazy }
[Access to `Pull Requests(PRs)` :material-link-variant:](https://github.com/TorchMeter/torchmeter/pulls)
@@ -129,7 +129,7 @@ A successful installation will display the `Git` version (e.g., `git version 2.4
??? example "Illustration of forking torchmeter"
- 
+ { loading=lazy }
---
diff --git a/docs/src/en/contribute/welcome_contributors.md b/docs/src/en/contribute/welcome_contributors.md
index 4e15a3e..cd32b6b 100644
--- a/docs/src/en/contribute/welcome_contributors.md
+++ b/docs/src/en/contribute/welcome_contributors.md
@@ -17,4 +17,6 @@ Whether you're:
Your input is pretty valuable to our community!
-Before jumping in, let's ensure smooth collaboration by reviewing these guidelines first. They'll help us keep things organized and make your contribution process as efficient as possible!
\ No newline at end of file
+Before jumping in, let's ensure smooth collaboration by reviewing these guidelines first π.
+
+They'll help us keep things organized and make your contribution process as efficient as possible!
\ No newline at end of file
diff --git a/docs/src/en/index.md b/docs/src/en/index.md
index 42c4d0e..d590a28 100644
--- a/docs/src/en/index.md
+++ b/docs/src/en/index.md
@@ -133,7 +133,7 @@ hide:
2. Install locally:
```bash title="" linenums="0"
- pip install torchmeter-x.x.x.whl # (1)
+ pip install torchmeter-x.x.x-py3-none-any.whl # (1)
```
1. πββοΈ Replace `x.x.x` with actual version
@@ -342,7 +342,7 @@ Thanks again !
- `TorchMeter` is an open-source project built by developers worldwide. We're committed to fostering a **friendly, safe, and inclusive** environment for all participants.
-- This code applies to all community spaces including but not limited to GitHub repositories, community forums, etc.
+- The provisions stipulated in our [Code-of-Conduct file :material-link-variant:](https://github.com/TorchMeter/torchmeter/blob/master/CODE_OF_CONDUCT.md) are applicable to all community platforms, which include, but are not limited to, `GitHub` repositories, community forums, and similar ones.
## β±. πΏπΎπΈππππ
diff --git a/docs/src/en/others/management.md b/docs/src/en/others/management.md
index 6127994..a5ffa63 100644
--- a/docs/src/en/others/management.md
+++ b/docs/src/en/others/management.md
@@ -18,7 +18,7 @@ To streamline collaboration and enable rapid iteration, `torchmeter` employs a s
| Branch Name | Name | Purpose | Maintainer | Contributor Permissions |
|:-----------:|:-------------:|:------------:|:-----------------:|:-- -------:|
| `master` | Primary Development Branch | Receives latest stable code, accepts new features, optimizations, and general bug fixes | All (with review) | **Allowed** to submit PRs |
- | `vA.B.x` | Version Maintenance Branch | **Only accepts** bug fixes for this version, **no new features** | Core Team | **Forbidden** to submit PRs directly |
+ | `vA.B.x` | Version Maintenance Branch | **Only accepts** bug fixes for a minor version, **no new features** | Core Team | **Forbidden** to submit PRs directly |
#### **:material-numeric-1-box: Master Branch**
@@ -39,7 +39,7 @@ To streamline collaboration and enable rapid iteration, `torchmeter` employs a s
- **Purpose**: Exclusive bugfix channel for specific releases
- **Lifecycle**:
1. Created when incrementing major/minor versions
- 2. Archived when superseded by newer version branch (e.g., `v1.3.x`).
+ 2. Archived when superseded by newer version branch (e.g., a new branch named `v1.3.x` will supersede `v1.2.x`).
- **Branch Protection Rules**: Inherits `master` branch's rules
[^1]: It should be noted that the `PATCH` number is represented by the letter `x`, which refers to a series of revisions to be updated in the future.
diff --git a/examples/demo.ipynb b/examples/demo.ipynb
index 2909354..db48362 100644
--- a/examples/demo.ipynb
+++ b/examples/demo.ipynb
@@ -2537,9 +2537,9 @@
"source": [
"#### F.b.1 Customize the Hierarchical Display\n",
"\n",
- "> All customization fields can be found in the [`Default Configuration` section in `Cheatsheet` tab](cheatsheet.md##Default-Configuration).\n",
+ "> All customization fields can be found in the [`Default Configuration` section in `Cheatsheet` tab](https://docs.torchmeter.top/latest/cheatsheet/#Default-Configuration).\n",
"\n",
- "You can customize the display of a tree level by designating the configurations through the level index, which can be found [here](./cheatsheet.md#Tree-Level-Index).\n"
+ "You can customize the display of a tree level by designating the configurations through the level index, which can be found [here](https://docs.torchmeter.top/latest/cheatsheet/#Tree-Level-Index).\n"
]
},
{
@@ -2857,7 +2857,7 @@
"source": [
"##### F.b.2.2 Customize the style\n",
"\n",
- "> All customization fields can be found in the [`Customization` tab](cheatsheet.md)."
+ "> All customization fields can be found in the [`Cheatsheet` tab](https://docs.torchmeter.top/latest/cheatsheet/)."
]
},
{
@@ -3182,7 +3182,7 @@
"source": [
"###### F.b.2.3.2 Dynamic Text based on Tree Node Attributes\n",
"\n",
- "A tree node represents an operation in the model, the attributes of which can be found in [`Tree Node Attributes` section in `Cheatsheet` tab](cheatsheet.md#Tree-Node-Attributes)."
+ "A tree node represents an operation in the model, the attributes of which can be found in [`Tree Node Attributes` section](https://docs.torchmeter.top/latest/cheatsheet/#Tree-Node-Attributes)."
]
},
{
@@ -3315,7 +3315,7 @@
"source": [
"#### F.c.1 Customize the Column/Overall Style\n",
"\n",
- "> All customization fields can be found in the [`Default Configuration` section in `Cheatsheet` tab](cheatsheet.md##Default-Configuration)."
+ "> All customization fields can be found in the [`Default Configuration` section](https://docs.torchmeter.top/latest/cheatsheet/#Default-Configuration)."
]
},
{
@@ -5987,7 +5987,7 @@
"### H.e Restore Configuration\n",
"\n",
"> Mess up the configurations? Don't worry, we can restore them to the value in loaded file. \n",
- "> If the config object is not created by loading a `yaml` file, will use the default value in [`Default Configuration`](cheatsheet.md##Default-Configuration) we've prepared for you."
+ "> If the config object is not created by loading a `yaml` file, will use the default value in [`Default Configuration`](https://docs.torchmeter.top/latest/cheatsheet/#Default-Configuration) we've prepared for you."
]
},
{
@@ -6189,12 +6189,12 @@
"### I.1 Raw Data Mode\n",
"\n",
"> When this mode is enabled, the statistic data will be represented in the unit at the time of statistics. \n",
- "> For details, see [`Unit Explanation`](cheatsheet.md#Unit-Explanation)."
+ "> For details, see [`Unit Explanation`](https://docs.torchmeter.top/latest/cheatsheet/#Unit-Explanation)."
]
},
{
"cell_type": "code",
- "execution_count": 105,
+ "execution_count": null,
"metadata": {},
"outputs": [
{
@@ -6426,6 +6426,7 @@
"# --------------------------------------------------------------------------------\n",
"# model: Instance of `torchmeter.Meter` which acts like a decorator of your model\n",
"\n",
+ "# you can compare the result with that in `E.c.1` section\n",
"tb, data = model.profile(\"param\", no_tree=True, raw_data=True)"
]
},