Skip to content

Commit 5f62aa5

Browse files
committed
fix RULES.md
1 parent d7d2c7f commit 5f62aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RULES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ Some are applicable for different technologies.
7676
| GCI97 | Optimize square computation (scalar vs vectorized method) | In Python, if you want to square x, you can do x*x or x**2. | ||||||||
7777
| GCI98 | Avoid raising Runtime Exceptions when a check is possible | You should not catch RuntimeException. They produce large objects and represent a problem in the program that should be fixed, not handled. | [Unchecked Exceptions The Controversy](https://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html) (9.3. Les classes Exception, RunTimeException et Error)[https://www.jmdoudoux.fr/java/dej/chap-exceptions.htm#exceptions-3] | 🚧 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 |
7878
| GCI99 | Data : Avoid CSV Format | The Parquet format is faster to write to, lighter in weight and faster to read data from. It is suitable for use cases where there would be a lot of data I/O, especially with Cloud storage. | | 🚀 | 🚀 | 🚀 || 🚀 | 🚀 | 🚀 |
79-
| GCI100 | AIWrap PyTorch Inference in `torch.no_grad()` | Using a PyTorch model in evaluation mode without wrapping inference in `torch.no_grad()` leads to unnecessary gradient tracking | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
79+
| GCI100 | AI : Wrap PyTorch Inference in `torch.no_grad()` | Using a PyTorch model in evaluation mode without wrapping inference in `torch.no_grad()` leads to unnecessary gradient tracking | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
8080
| GCI101 | AI : Avoid Bias in Conv Layers Before Batch Norm | Disable bias in convolutional layers when it's followed by a batch norm layer | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
8181
| GCI102 | AI : Use pinned memory on DataLoader when using GPU | This rule applies to PyTorch data loading, where the use of pinned memory can significantly optimize data transfer between CPU and GPU. | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
8282
| GCI103 | Don't use .items() to iterate over a dictionary when only keys or values are needed | Avoid using `.items()` if you only use the key or the value, as this creates an unnecessary tuple, leading to increased memory allocation and slower execution. | ||||||||
8383
| GCI104 | Data / AI : PyTorch - Create tensors directly from Torch | In PyTorch, prefer creating tensors directly using `torch.rand`, `torch.tensor`, or other Torch methods instead of converting from NumPy arrays. Avoid using `torch.tensor(np.random.rand(...))` or similar patterns when the same result can be achieved directly with PyTorch. | | 🚫 | 🚫 | 🚫 | 🚀 | 🚫 | 🚫 | 🚫 |
8484
| GCI105 | Python String Concatenation | Python String Concatenation - Use Join Instead or f-Strings instead of += | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
8585
| GCI106 | Avoid Square Root Operations In Loop | Using scalar `math.sqrt` (or `numpy.sqrt` on individual values) inside loops leads to inefficient code | | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 |
8686
| GCI107 | Data : Avoid Iterative Matrix Operations | Use vectorization by the usage of the built-in functions of TensorFlow, NumPy or Pandas | | 🚫 | 🚫 | 🚫 | 🚧 | 🚫 | 🚫 | 🚫 |
87-
| GCI108 | Prefer Append Left | When you want to insert an element at the beginning of a list, it's better to use a deques or a double linkedlist. | |||| 🚧 ||||
87+
| GCI108 | Prefer Append Left | When you want to insert an element at the beginning of a list, it's better to use a deques or a double linkedlist. | |||| 🚀 ||||
8888
| GCI203 | Detect unoptimized file formats | When it is possible, to use svg format image over other image format | | 🚧 | 🚀 | 🚀 || 🚀 | 🚀 | 🚫 |
8989
| GCI404 | Avoid list comprehension in iterations | Use generator comprehension instead of list comprehension in for loop declaration | | 🚫 | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 |
9090
| GCI522 | Sobriety: Brightness Override | To avoid draining the battery, iOS and Android devices adapt the brightness of the screen depending on the environment light. | | 🚫 | 🚫 || 🚫 | 🚫 | 🚫 | 🚫 |

0 commit comments

Comments
 (0)