KOSASIH / Galactic-Chain

Unused variable found PYL-W0612
Anti-pattern
Major
4 months ago4 months old
118        :param b: Divisor
119        :return: Quotient of the two polynomials
120        """
121        q, r = qr(a.c, b.c)122        return np.poly1d(q)
123
124def main():
Unused variable 'result'
16
17    def test_measure_state(self):
18        qai = QuantumAI(4)
19        result = qai.measure_state()20        # Assert that the measurement is correct
21
22if __name__ == "__main__":
 5    def test_execute_circuit(self):
 6        qi = QiskitIntegration('qasm_simulator')
 7        circuit = QuantumCircuit(4)
 8        result = qi.execute_circuit(circuit) 9        # Assert that the circuit is executed correctly
10
11if __name__ == "__main__":
Unused variable 'preprocess'
21        # Implement a method to get the embedding of the multi-modal data
22        # For example, using a pre-trained model like CLIP
23        from clip import clip
24        model, preprocess = clip.load("ViT-B/32", device="cuda")25        image_embedding = model.encode_image(self.get_image().unsqueeze(0))
26        text_embedding = model.encode_text(self.get_text())
27        return torch.cat((image_embedding, text_embedding), dim=1)
Unused variable 'result'
35            tf.contrib.util.make_tensor_proto(self.model.input_data))
36
37        # Receive response
38        result = stub.Predict(request, 10.0)  # 10 secs timeout39
40        # Close the channel when done
41        channel.close()