-
Notifications
You must be signed in to change notification settings - Fork 646
Open
Labels
area/healthInvolves general matters of project configuration, health, maintenance, and similar concernsInvolves general matters of project configuration, health, maintenance, and similar concernsarea/pythonInvolves Python codeInvolves Python code
Description
Several files in the benchmark/ directory contain formatting errors.
These errors cause CI failures when related files are changed, which can impact other PRs.
Therefore, I believe they need to be fixed.
The following is an example of output when running Pylint.
pylint benchmarks/
************* Module benchmarks.scripts.benchmark_op_gradients
benchmarks/scripts/benchmark_op_gradients.py:113:0: C0301: Line too long (82/80) (line-too-long)
benchmarks/scripts/benchmark_op_gradients.py:26:0: E0401: Unable to import 'benchmark_util' (import-error)
benchmarks/scripts/benchmark_op_gradients.py:27:0: E0401: Unable to import 'flags' (import-error)
benchmarks/scripts/benchmark_op_gradients.py:61:4: C0103: Method name "testBenchmarkGradient" doesn't conform to '[a-z_][a-z0-9_]{2,60}$' pattern ('[a-z_][a-z0-9_]{2,60}$' pattern) (invalid-name)
benchmarks/scripts/benchmark_op_gradients.py:96:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
benchmarks/scripts/benchmark_op_gradients.py:26:0: C0411: third party import "benchmark_util" should be placed before first party import "tensorflow_quantum.core.ops.tfq_simulate_ops" (wrong-import-order)
benchmarks/scripts/benchmark_op_gradients.py:27:0: C0411: third party import "flags" should be placed before first party import "tensorflow_quantum.core.ops.tfq_simulate_ops" (wrong-import-order)
benchmarks/scripts/benchmark_op_gradients.py:29:0: C0412: Imports from package tensorflow_quantum are not grouped (ungrouped-imports)
************* Module benchmarks.scripts.flags
benchmarks/scripts/flags.py:87:0: C0103: Function name "TEST_FLAGS" doesn't conform to '[a-z_][a-z0-9_]{2,65}$' pattern ('[a-z_][a-z0-9_]{2,65}$' pattern) (invalid-name)
************* Module benchmarks.scripts.benchmark_util_test
benchmarks/scripts/benchmark_util_test.py:21:0: E0401: Unable to import 'test_log_pb2' (import-error)
benchmarks/scripts/benchmark_util_test.py:22:0: E0401: Unable to import 'benchmark_util' (import-error)
************* Module benchmarks.scripts.benchmark_clifford_circuit
benchmarks/scripts/benchmark_clifford_circuit.py:26:0: E0401: Unable to import 'models.random_clifford_circuit' (import-error)
benchmarks/scripts/benchmark_clifford_circuit.py:27:0: E0401: Unable to import 'flags' (import-error)
benchmarks/scripts/benchmark_clifford_circuit.py:28:0: E0401: Unable to import 'benchmark_util' (import-error)
benchmarks/scripts/benchmark_clifford_circuit.py:45:4: C0103: Method name "testBenchmarkCliffordCircuitEager" doesn't conform to '[a-z_][a-z0-9_]{2,60}$' pattern ('[a-z_][a-z0-9_]{2,60}$' pattern) (invalid-name)
benchmarks/scripts/benchmark_clifford_circuit.py:80:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
benchmarks/scripts/benchmark_clifford_circuit.py:26:0: C0411: third party import "models.random_clifford_circuit.random_clifford_circuit" should be placed before first party imports "tensorflow_quantum.core.ops.tfq_simulate_ops", "tensorflow_quantum.core.serialize.serializer.serialize_circuit" (wrong-import-order)
benchmarks/scripts/benchmark_clifford_circuit.py:27:0: C0411: third party import "flags" should be placed before first party imports "tensorflow_quantum.core.ops.tfq_simulate_ops", "tensorflow_quantum.core.serialize.serializer.serialize_circuit" (wrong-import-order)
benchmarks/scripts/benchmark_clifford_circuit.py:28:0: C0411: third party import "benchmark_util" should be placed before first party imports "tensorflow_quantum.core.ops.tfq_simulate_ops", "tensorflow_quantum.core.serialize.serializer.serialize_circuit" (wrong-import-order)
************* Module benchmarks.scripts.benchmark_random_circuit
benchmarks/scripts/benchmark_random_circuit.py:109:0: C0301: Line too long (83/80) (line-too-long)
benchmarks/scripts/benchmark_random_circuit.py:26:0: E0401: Unable to import 'flags' (import-error)
benchmarks/scripts/benchmark_random_circuit.py:27:0: E0401: Unable to import 'benchmark_util' (import-error)
benchmarks/scripts/benchmark_random_circuit.py:52:4: C0103: Method name "testBenchmarkRandomCircuit" doesn't conform to '[a-z_][a-z0-9_]{2,60}$' pattern ('[a-z_][a-z0-9_]{2,60}$' pattern) (invalid-name)
benchmarks/scripts/benchmark_random_circuit.py:80:4: C0103: Method name "testRandomCircuitParams" doesn't conform to '[a-z_][a-z0-9_]{2,60}$' pattern ('[a-z_][a-z0-9_]{2,60}$' pattern) (invalid-name)
benchmarks/scripts/benchmark_random_circuit.py:98:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
benchmarks/scripts/benchmark_random_circuit.py:26:0: C0411: third party import "flags" should be placed before first party imports "tensorflow_quantum.core.ops.tfq_simulate_ops", "tensorflow_quantum.core.serialize.serializer.serialize_circuit" (wrong-import-order)
benchmarks/scripts/benchmark_random_circuit.py:27:0: C0411: third party import "benchmark_util" should be placed before first party imports "tensorflow_quantum.core.ops.tfq_simulate_ops", "tensorflow_quantum.core.serialize.serializer.serialize_circuit" (wrong-import-order)
************* Module benchmarks.scripts.benchmark_util
benchmarks/scripts/benchmark_util.py:17:0: E0401: Unable to import 'test_log_pb2' (import-error)
benchmarks/scripts/benchmark_util.py:20:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module benchmarks.scripts.models.random_clifford_circuit
benchmarks/scripts/models/random_clifford_circuit.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module benchmarks.scripts.models.random_clifford_circuit_test
benchmarks/scripts/models/random_clifford_circuit_test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
benchmarks/scripts/models/random_clifford_circuit_test.py:21:0: E0401: Unable to import 'random_clifford_circuit' (import-error)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/healthInvolves general matters of project configuration, health, maintenance, and similar concernsInvolves general matters of project configuration, health, maintenance, and similar concernsarea/pythonInvolves Python codeInvolves Python code