diff --git a/ivy/functional/backends/tensorflow/activations.py b/ivy/functional/backends/tensorflow/activations.py index 97ca7dae08d06..a1ca5cff254a0 100644 --- a/ivy/functional/backends/tensorflow/activations.py +++ b/ivy/functional/backends/tensorflow/activations.py @@ -26,7 +26,7 @@ def gelu( ) -> Tensor: if x.dtype in [tf.complex64, tf.complex128]: return 0.5 * x * (1 + tf.math.tanh(0.7978845608 * (x + 0.044715 * x * x * x))) - + return tf.nn.gelu(x, approximate) diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py index 3dc9c2a5dc1f6..9c0c4601c3522 100644 --- a/ivy/functional/frontends/torch/pointwise_ops.py +++ b/ivy/functional/frontends/torch/pointwise_ops.py @@ -27,7 +27,6 @@ def acos(input, *, out=None): @with_unsupported_dtypes({"2.2 and below": ("float16",)}, "torch") @to_ivy_arrays_and_back def acosh(input, *, out=None): - return ivy.acosh(input, out=out) diff --git a/ivy/functional/ivy/layers.py b/ivy/functional/ivy/layers.py index a8b253cf4b1d1..d832aa88a4d30 100644 --- a/ivy/functional/ivy/layers.py +++ b/ivy/functional/ivy/layers.py @@ -216,7 +216,6 @@ def linear( ), ) - if ivy.exists(bias): # OBS x [1]*len(IBS) x OF bias_broadcast = ivy.reshape( diff --git a/scripts/run_tests_from_diff.py b/scripts/run_tests_from_diff.py index d665d46d87fc2..9c0b5ccb1db88 100644 --- a/scripts/run_tests_from_diff.py +++ b/scripts/run_tests_from_diff.py @@ -1,7 +1,6 @@ -""" -Script that attempts to find the test file(s) corresponding the all the changes made -in a commit (git diff stored in commit-diff.txt), and runs all the tests it finds -""" +"""Script that attempts to find the test file(s) corresponding the all the +changes made in a commit (git diff stored in commit-diff.txt), and runs all the +tests it finds.""" import os import re @@ -9,19 +8,19 @@ import sys -with open('commit-diff.txt', 'r') as f: +with open("commit-diff.txt", "r") as f: diff_lines = f.readlines() modified_files = set() for line in diff_lines: - if line.startswith('diff --git a/'): - file_path = line.split(' ')[2].strip().lstrip('a/') + if line.startswith("diff --git a/"): + file_path = line.split(" ")[2].strip().lstrip("a/") modified_files.add(file_path) - elif line.startswith('diff --git b/'): - file_path = line.split(' ')[2].strip().lstrip('b/') + elif line.startswith("diff --git b/"): + file_path = line.split(" ")[2].strip().lstrip("b/") modified_files.add(file_path) - elif line.startswith('diff --git '): - file_path = line.split(' ')[2].strip().lstrip('--git ') + elif line.startswith("diff --git "): + file_path = line.split(" ")[2].strip().lstrip("--git ") modified_files.add(file_path) nn = [ @@ -38,9 +37,9 @@ file_path = file_path.replace("/functional", "") if "/backends/" in file_path: - suffix = file_path.rsplit('/', 1)[1].replace(".py", "") + suffix = file_path.rsplit("/", 1)[1].replace(".py", "") file_path = re.sub(r"/backends/.*?/", "/", file_path) - file_path = file_path.rsplit('/', 1)[0] + file_path = file_path.rsplit("/", 1)[0] if suffix in nn: file_path += f"/nn/{suffix}.py" else: @@ -53,7 +52,7 @@ # if the test file doesn't exist, step up a directory and run those tests instead (if that exists) if not os.path.exists(file_path): - file_path = file_path.rsplit('/', 1)[0] + file_path = file_path.rsplit("/", 1)[0] if os.path.exists(file_path): test_paths.append(file_path)