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

Clean up llama_e2e test #49

Closed FanhaiLu1 closed 4 months ago

FanhaiLu1 commented 4 months ago

After this PR: Your code has been rated at 10.00/10

Before this PR: Your code has been rated at 5.85/10

***** Module tests.test_llama_e2e test_llama_e2e.py:400:0: C0301: Line too long (117/100) (line-too-long) test_llama_e2e.py:468:0: C0301: Line too long (117/100) (line-too-long) test_llama_e2e.py:31:0: C0115: Missing class docstring (missing-class-docstring) test_llama_e2e.py:33:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:55:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:61:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:57:4: W0612: Unused variable 'x' (unused-variable) test_llama_e2e.py:81:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:81:2: R0914: Too many local variables (30/15) (too-many-locals) test_llama_e2e.py:88:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:119:23: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:123:21: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:127:38: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:83:4: W0612: Unused variable 'x' (unused-variable) test_llama_e2e.py:112:8: W0612: Unused variable 'i' (unused-variable) test_llama_e2e.py:146:2: R0914: Too many local variables (27/15) (too-many-locals) test_llama_e2e.py:147:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:182:21: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:186:19: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:190:36: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:201:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:209:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:218:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:218:2: R0914: Too many local variables (28/15) (too-many-locals) test_llama_e2e.py:225:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:261:21: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:265:19: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:269:36: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:220:4: W0612: Unused variable 'x' (unused-variable) test_llama_e2e.py:284:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:284:2: R0914: Too many local variables (28/15) (too-many-locals) test_llama_e2e.py:291:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:327:21: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:331:19: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:335:36: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:286:4: W0612: Unused variable 'x' (unused-variable) test_llama_e2e.py:350:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:350:2: R0914: Too many local variables (25/15) (too-many-locals) test_llama_e2e.py:356:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:389:21: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:393:4: W4902: Using deprecated method assertEquals() (deprecated-method) test_llama_e2e.py:394:10: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) test_llama_e2e.py:401:19: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:405:36: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:409:6: W4902: Using deprecated method assertEquals() (deprecated-method) test_llama_e2e.py:380:4: W0612: Unused variable 'expected_output_tokens' (unused-variable) test_llama_e2e.py:405:20: W0612: Unused variable 'result_tokens' (unused-variable) test_llama_e2e.py:419:2: C0116: Missing function or method docstring (missing-function-docstring) test_llama_e2e.py:419:2: R0914: Too many local variables (25/15) (too-many-locals) test_llama_e2e.py:425:16: W0212: Access to a protected member _model_arg of a client class (protected-access) test_llama_e2e.py:458:21: E1102: engine.prefill is not callable (not-callable) test_llama_e2e.py:462:10: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) test_llama_e2e.py:469:19: E1102: engine.insert is not callable (not-callable) test_llama_e2e.py:473:36: E1102: engine.generate is not callable (not-callable) test_llama_e2e.py:449:4: W0612: Unused variable 'expected_output_tokens' (unused-variable) test_llama_e2e.py:473:20: W0612: Unused variable 'result_tokens' (unused-variable) test_llama_e2e.py:16:0: C0411: standard import "os" should be placed before third party import "torch" (wrong-import-order) test_llama_e2e.py:28:0: C0411: standard import "unittest" should be placed before third party imports "torch", "torch.utils._pytree", "torch_xla2" (...) "jetstream_pt.third_party.llama2.model_exportable", "jetstream_pt.third_party.llama2.generation_original.LlamaOriginal", "jetstream_pt.environment" (wrong-import-order)