google / jetstream-pytorch

PyTorch/XLA integration with JetStream (https://github.com/google/JetStream) for LLM inference"
Apache License 2.0
33 stars 14 forks source link

Cleanup cache_manager #41

Closed FanhaiLu1 closed 4 months ago

FanhaiLu1 commented 4 months ago

After this PR:

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Before this PR:

Your code has been rated at 6.53/10

***** Module jetstream_pt.cache_manager cache_manager.py:1:0: C0114: Missing module docstring (missing-module-docstring) cache_manager.py:21:0: C0115: Missing class docstring (missing-class-docstring) cache_manager.py:21:0: R0903: Too few public methods (1/2) (too-few-public-methods) cache_manager.py:35:0: C0115: Missing class docstring (missing-class-docstring) cache_manager.py:46:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) cache_manager.py:55:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:59:0: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:59:0: C0103: Function name "KVCachePrefill_flatten" doesn't conform to snake_case naming style (invalid-name) cache_manager.py:66:0: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:66:0: C0103: Function name "KVCachePrefill_unflatten" doesn't conform to snake_case naming style (invalid-name) cache_manager.py:80:0: C0115: Missing class docstring (missing-class-docstring) cache_manager.py:95:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:97:4: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:97:25: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:98:4: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:98:25: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:101:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:102:11: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:102:31: W0212: Access to a protected member _elem of a client class (protected-access) cache_manager.py:105:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:110:4: W0612: Unused variable 'pos' (unused-variable) cache_manager.py:114:0: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:114:0: C0103: Function name "KVCacheGenerate_flatten" doesn't conform to snake_case naming style (invalid-name) cache_manager.py:121:0: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:121:0: C0103: Function name "KVCacheGenerate_unflatten" doesn't conform to snake_case naming style (invalid-name) cache_manager.py:133:0: C0115: Missing class docstring (missing-class-docstring) cache_manager.py:135:2: R0913: Too many arguments (7/5) (too-many-arguments) cache_manager.py:142:6: W0613: Unused argument 'sharding' (unused-argument) cache_manager.py:151:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:154:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:158:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:158:32: W0613: Unused argument 'bf16_enable' (unused-argument) cache_manager.py:170:2: C0116: Missing function or method docstring (missing-function-docstring) cache_manager.py:176:2: C0116: Missing function or method docstring (missing-function-docstring)