internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: graphql-python/graphene-django

Issue:
Upgrade graphiql to fix autocomplete bug

* **What is the current behavior?**
It looks like graphene uses [1.0.3 ](https://github.com/graphql-python/graphene-django/blob/c049ab7470d947594e9e947a8dbde3f76fb07951/graphene_django/views.py#L70)of graphiql. Autocomplete isn't working for me for on Graphene interfaces. This is described in [this](https://github.com/graphql/graphiql/issues/1691) graphiql issue


* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** 
Create an interface field in graphene and try to use autocomplete in graphiql

* **What is the expected behavior?**
From the issue above, it looks like it's fixed in graphiql 1.0.6, so perhaps it should be upgraded?

Would this be a straightforward fix?




Discussion:

Resolving patch:
diff --git a/graphene_django/views.py b/graphene_django/views.py
--- a/graphene_django/views.py
+++ b/graphene_django/views.py
@@ -58,23 +58,23 @@ class GraphQLView(View):
     graphiql_template = "graphene/graphiql.html"
 
     # Polyfill for window.fetch.
-    whatwg_fetch_version = "3.2.0"
-    whatwg_fetch_sri = "sha256-l6HCB9TT2v89oWbDdo2Z3j+PSVypKNLA/nqfzSbM8mo="
+    whatwg_fetch_version = "3.6.2"
+    whatwg_fetch_sri = "sha256-+pQdxwAcHJdQ3e/9S4RK6g8ZkwdMgFQuHvLuN5uyk5c="
 
     # React and ReactDOM.
-    react_version = "16.13.1"
-    react_sri = "sha256-yUhvEmYVhZ/GGshIQKArLvySDSh6cdmdcIx0spR3UP4="
-    react_dom_sri = "sha256-vFt3l+illeNlwThbDUdoPTqF81M8WNSZZZt3HEjsbSU="
+    react_version = "17.0.2"
+    react_sri = "sha256-Ipu/TQ50iCCVZBUsZyNJfxrDk0E2yhaEIz0vqI+kFG8="
+    react_dom_sri = "sha256-nbMykgB6tsOFJ7OdVmPpdqMFVk4ZsqWocT6issAPUF0="
 
     # The GraphiQL React app.
-    graphiql_version = "1.0.3"
-    graphiql_sri = "sha256-VR4buIDY9ZXSyCNFHFNik6uSe0MhigCzgN4u7moCOTk="
-    graphiql_css_sri = "sha256-LwqxjyZgqXDYbpxQJ5zLQeNcf7WVNSJ+r8yp2rnWE/E="
+    graphiql_version = "1.4.1"  # "1.0.3"
+    graphiql_sri = "sha256-JUMkXBQWZMfJ7fGEsTXalxVA10lzKOS9loXdLjwZKi4="  # "sha256-VR4buIDY9ZXSyCNFHFNik6uSe0MhigCzgN4u7moCOTk="
+    graphiql_css_sri = "sha256-Md3vdR7PDzWyo/aGfsFVF4tvS5/eAUWuIsg9QHUusCY="  # "sha256-LwqxjyZgqXDYbpxQJ5zLQeNcf7WVNSJ+r8yp2rnWE/E="
 
     # The websocket transport library for subscriptions.
-    subscriptions_transport_ws_version = "0.9.17"
+    subscriptions_transport_ws_version = "0.9.18"
     subscriptions_transport_ws_sri = (
-        "sha256-kCDzver8iRaIQ/SVlfrIwxaBQ/avXf9GQFJRLlErBnk="
+        "sha256-i0hAXd4PdJ/cHX3/8tIy/Q/qKiWr5WSTxMFuL9tACkw="
     )
 
     schema = None


Test patch:
Repository: graphql-python/graphene-django

Issue:
Upgrade graphiql to fix autocomplete bug

* **What is the current behavior?**
It looks like graphene uses [1.0.3 ](https://github.com/graphql-python/graphene-django/blob/c049ab7470d947594e9e947a8dbde3f76fb07951/graphene_django/views.py#L70)of graphiql. Autocomplete isn't working for me for on Graphene interfaces. This is described in [this](https://github.com/graphql/graphiql/issues/1691) graphiql issue


* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** 
Create an interface field in graphene and try to use autocomplete in graphiql

* **What is the expected behavior?**
From the issue above, it looks like it's fixed in graphiql 1.0.6, so perhaps it should be upgraded?

Would this be a straightforward fix?




Discussion:

Resolving patch:
diff --git a/graphene_django/views.py b/graphene_django/views.py
--- a/graphene_django/views.py
+++ b/graphene_django/views.py
@@ -59,23 +59,23 @@ class GraphQLView(View):
     graphiql_template = "graphene/graphiql.html"
 
     # Polyfill for window.fetch.
-    whatwg_fetch_version = "3.2.0"
-    whatwg_fetch_sri = "sha256-l6HCB9TT2v89oWbDdo2Z3j+PSVypKNLA/nqfzSbM8mo="
+    whatwg_fetch_version = "3.6.2"
+    whatwg_fetch_sri = "sha256-+pQdxwAcHJdQ3e/9S4RK6g8ZkwdMgFQuHvLuN5uyk5c="
 
     # React and ReactDOM.
-    react_version = "16.13.1"
-    react_sri = "sha256-yUhvEmYVhZ/GGshIQKArLvySDSh6cdmdcIx0spR3UP4="
-    react_dom_sri = "sha256-vFt3l+illeNlwThbDUdoPTqF81M8WNSZZZt3HEjsbSU="
+    react_version = "17.0.2"
+    react_sri = "sha256-Ipu/TQ50iCCVZBUsZyNJfxrDk0E2yhaEIz0vqI+kFG8="
+    react_dom_sri = "sha256-nbMykgB6tsOFJ7OdVmPpdqMFVk4ZsqWocT6issAPUF0="
 
     # The GraphiQL React app.
-    graphiql_version = "1.0.3"
-    graphiql_sri = "sha256-VR4buIDY9ZXSyCNFHFNik6uSe0MhigCzgN4u7moCOTk="
-    graphiql_css_sri = "sha256-LwqxjyZgqXDYbpxQJ5zLQeNcf7WVNSJ+r8yp2rnWE/E="
+    graphiql_version = "1.4.1"
+    graphiql_sri = "sha256-JUMkXBQWZMfJ7fGEsTXalxVA10lzKOS9loXdLjwZKi4="
+    graphiql_css_sri = "sha256-Md3vdR7PDzWyo/aGfsFVF4tvS5/eAUWuIsg9QHUusCY="
 
     # The websocket transport library for subscriptions.
-    subscriptions_transport_ws_version = "0.9.17"
+    subscriptions_transport_ws_version = "0.9.18"
     subscriptions_transport_ws_sri = (
-        "sha256-kCDzver8iRaIQ/SVlfrIwxaBQ/avXf9GQFJRLlErBnk="
+        "sha256-i0hAXd4PdJ/cHX3/8tIy/Q/qKiWr5WSTxMFuL9tACkw="
     )
 
     schema = None


Test patch:
Repository: graphql-python/graphene-django

Issue:
Fix graphiql explorer styles by including official CSS, and update local example app for testing
Resolves https://github.com/graphql-python/graphene-django/issues/1417

(For the graphiql explorer styles recently added in https://github.com/graphql-python/graphene-django/pull/1397)

Followed the official graphiql-plugin-explorer example here
https://github.com/graphql/graphiql/blob/619864691941c46cc0b0848e8713028e20212c36/packages/graphiql-plugin-explorer/examples/index.html#L26-L29

Note the scrollbar that shows up in the "after" image below. Tested this locally with the cookbook-plain app, and was able to scroll to see the full content even on a short window. Also tested this with a larger app with many query definitions, and it worked there as well.

| Before | After |
|--------|--------|
|  ![Screenshot 2023-06-01 at 10 33 38 AM](https://github.com/graphql-python/graphene-django/assets/1647130/a1707813-1952-4f69-b755-48aa51219bf6) | ![Screenshot 2023-06-01 at 10 33 50 AM](https://github.com/graphql-python/graphene-django/assets/1647130/d477b3ba-1af7-4faa-9dd8-46096516846d) |



Discussion:
Yeah I also just thought that's the way it looked haha, didn't realize there was a separate CSS file until seeing that issue filed! Thanks for the review!
I took the chance to update GraphiQL and graphql-ws version as well. Note that graphql-ws hash does not change (coz changes from 5.12.1 -> 5.13.1 are server and type related, so I guess that's why the CDN file didn't change).
👋 
Thanks for the fix. Any idea when this will make it to a public release?
> 👋 Thanks for the fix. Any idea when this will make it to a public release?

its available in 3.1.2 now.

Resolving patch:
diff --git a/graphene_django/views.py b/graphene_django/views.py
--- a/graphene_django/views.py
+++ b/graphene_django/views.py
@@ -167,6 +167,7 @@ def dispatch(self, request, *args, **kwargs):
                     subscriptions_transport_ws_sri=self.subscriptions_transport_ws_sri,
                     graphiql_plugin_explorer_version=self.graphiql_plugin_explorer_version,
                     graphiql_plugin_explorer_sri=self.graphiql_plugin_explorer_sri,
+                    graphiql_plugin_explorer_css_sri=self.graphiql_plugin_explorer_css_sri,
                     # The SUBSCRIPTION_PATH setting.
                     subscription_path=self.subscription_path,
                     # GraphiQL headers tab,


Test patch:
Repository: graphql-python/graphene-django

Issue:
GraphQLTestCase does not send headers using Django 4.2
* **What is the current behavior?**

Trying to send headers using GraphQLTestCase doesn't work. This is my test:

```
class TestCase(GraphQLTestCase):
    def test(self):
        response = self.query(
            '''
            query {
                puzzles {
                    id
                    title
                }
            }
            ''',
            headers={
                'Some-Header': 'test,
            },
        )

        self.assertResponseNoErrors(valid_response)
```

and if I try to log those headers in my code I get `None`. However if I follow the code to `graphene_django/utils/testing.py` and change line 58 from:

```
resp = client.post(
            graphql_url, json.dumps(body), content_type="application/json", **headers
        )
```

to 

```
resp = client.post(
            graphql_url, json.dumps(body), content_type="application/json", headers=headers
        )
```

Then it works fine.


* **Please tell us about your environment:**

  - Version: 
 
python = "^3.11"
django = "^4.2.1"
graphene-django = "^3.1.1"
 
  - Platform: Ubuntu



Discussion:
Yup looks like this was changed in Django 4.2 https://docs.djangoproject.com/en/4.2/topics/testing/tools/. Thanks for reporting.

Resolving patch:
diff --git a/graphene_django/utils/utils.py b/graphene_django/utils/utils.py
--- a/graphene_django/utils/utils.py
+++ b/graphene_django/utils/utils.py
@@ -1,5 +1,6 @@
 import inspect
 
+import django
 from django.db import connection, models, transaction
 from django.db.models.manager import Manager
 from django.utils.encoding import force_str
@@ -145,3 +146,8 @@ def bypass_get_queryset(resolver):
     """
     resolver._bypass_get_queryset = True
     return resolver
+
+
+_DJANGO_VERSION_AT_LEAST_4_2 = django.VERSION[0] > 4 or (
+    django.VERSION[0] >= 4 and django.VERSION[1] >= 2
+)


Test patch:
diff --git a/graphene_django/utils/testing.py b/graphene_django/utils/testing.py
--- a/graphene_django/utils/testing.py
+++ b/graphene_django/utils/testing.py
@@ -4,6 +4,7 @@
 from django.test import Client, TestCase, TransactionTestCase
 
 from graphene_django.settings import graphene_settings
+from graphene_django.utils.utils import _DJANGO_VERSION_AT_LEAST_4_2
 
 DEFAULT_GRAPHQL_URL = "/graphql"
 
@@ -55,8 +56,14 @@ def graphql_query(
         else:
             body["variables"] = {"input": input_data}
     if headers:
+        header_params = (
+            {"headers": headers} if _DJANGO_VERSION_AT_LEAST_4_2 else headers
+        )
         resp = client.post(
-            graphql_url, json.dumps(body), content_type="application/json", **headers
+            graphql_url,
+            json.dumps(body),
+            content_type="application/json",
+            **header_params
         )
     else:
         resp = client.post(
Repository: rwth-i6/returnn

Issue:
Cleanup AllophoneStateIdxParserLayer
I think this layer is not used by anyone.
It should also be obsolete as it should be possible to reimplement this using other base layers.

Remove?



Discussion:
I implemented this layer myself for some old experiments.
Maybe @curufinwe or @Marvin84 are still using it?

Resolving patch:
diff --git a/returnn/tf/layers/basic.py b/returnn/tf/layers/basic.py
--- a/returnn/tf/layers/basic.py
+++ b/returnn/tf/layers/basic.py
@@ -7637,56 +7637,6 @@ def __init__(self, meta_loss_scale=1.0, **kwargs):
     self.output.size_placeholder = self.input_data.size_placeholder.copy()
 
 
-class AllophoneStateIdxParserLayer(LayerBase):
-  """
-  This is very much Sprint/RASR specific.
-  We get allophone state indices and return (center, left_1, right_1, ..., state, boundary).
-  The index is defined by NoTyingDense (ClassicStateTying.cc).
-  In the Sprint config, this is via option --*.state-tying.type=no-tying-dense.
-  """
-  layer_class = "allophone_state_idx_parser"
-  NumBoundaryClasses = 4  # 0: none, 1: start (@i), 2: end (@f), 3: start+end (@i@f)
-
-  def __init__(self, num_phone_classes, num_states=3, context_len=1, **kwargs):
-    """
-    :param list[LayerBase] sources:
-    :param int num_phone_classes: number of phonemes + 1, with special 0 phone == no context
-    :param int num_states: number of HMM states
-    :param int context_len: left/right context len
-    """
-    super(AllophoneStateIdxParserLayer, self).__init__(**kwargs)
-    result = [None] * self.output.dim  # type: typing.List[typing.Optional[tf.Tensor]]
-    code = self.sources[0].output.placeholder
-    result[-1] = code % self.NumBoundaryClasses  # boundary
-    code //= self.NumBoundaryClasses
-    result[-2] = code % num_states  # state
-    code //= num_states
-    for i in range(2 * context_len + 1):
-      result[2 * context_len - i] = code % num_phone_classes  # phone idx
-      code //= num_phone_classes
-    self.output.placeholder = tf.stack(result, axis=self.output.batch_ndim - 1)
-    self.output.size_placeholder = self.sources[0].output.size_placeholder.copy()
-
-  @classmethod
-  def get_out_data_from_opts(cls, name, sources, context_len=1, n_out=NotSpecified, **kwargs):
-    """
-    :param str name:
-    :param list[LayerBase] sources:
-    :param int context_len:
-    :param int|None|NotSpecified n_out:
-    :rtype: Data
-    """
-    assert len(sources) == 1, "%s: We expect exactly one source layer." % name
-    dim = 3 + context_len * 2  # (center, left_1, right_1, ..., state, boundary)
-    if n_out is not NotSpecified:
-      assert dim == n_out
-    return Data(
-      name="%s_output" % name,
-      shape=sources[0].output.shape + (dim,),
-      dtype="int32", sparse=False, dim=dim,
-      batch_dim_axis=sources[0].output.batch_dim_axis)
-
-
 class FramewiseStatisticsLayer(LayerBase):
   """
   Collects various statistics (such as FER, etc) on the sources.


Test patch:
Repository: rwth-i6/returnn

Issue:
`ConvLayer` `auto_use_channel_first` default should be `True`, and `PoolLayer` `use_channel_first` should be converted to `auto_use_channel_first` with the same logic
It's `False` for historical reasons, because it was not well tested and other layers behaved a bit buggy. But this should not be the case anymore.

So I would just change it, as it is anyway expected according to the [RETURNN principles](https://github.com/rwth-i6/returnn/wiki/RETURNN-principles).


Discussion:

Resolving patch:
diff --git a/returnn/tf/layers/basic.py b/returnn/tf/layers/basic.py
--- a/returnn/tf/layers/basic.py
+++ b/returnn/tf/layers/basic.py
@@ -4286,7 +4286,7 @@ def __init__(self, filter_size, padding, strides=1, dilation_rate=1, groups=1,
                input_expand_dims=0, input_add_feature_dim=False, input_split_feature_dim=None,
                in_dim=None, in_spatial_dims=None,
                n_out=None, out_dim=None, out_spatial_dims=None,
-               auto_use_channel_first=False,
+               auto_use_channel_first=True,
                with_bias=NotSpecified,
                activation=None,
                forward_weights_init="glorot_uniform", bias_init=0.0,
@@ -4616,7 +4616,7 @@ def get_out_data_from_opts(
         input_expand_dims=0, input_add_feature_dim=False, input_split_feature_dim=None,
         in_dim=None, in_spatial_dims=None,
         n_out=None, out_dim=None, out_spatial_dims=None,
-        auto_use_channel_first=False,
+        auto_use_channel_first=True,
         **kwargs):
     """
     :param str name:
@@ -4736,7 +4736,7 @@ class PoolLayer(_ConcatInputLayer):
   def __init__(self, mode, pool_size, padding="VALID", dilation_rate=1, strides=None,
                in_dim=None, in_spatial_dims=None,
                out_dim=None, out_spatial_dims=None,
-               use_channel_first=False,
+               use_channel_first=True,
                **kwargs):
     """
     :param str mode: "max" or "avg"
@@ -4828,7 +4828,7 @@ def get_out_data_from_opts(cls, name, sources, network,
                              pool_size, strides=None, dilation_rate=1, padding="VALID",
                              in_dim=None, in_spatial_dims=None,
                              out_dim=None, out_spatial_dims=None,
-                             use_channel_first=False,
+                             use_channel_first=True,
                              **kwargs):
     """
     :param str name:


Test patch:
Repository: rwth-i6/returnn

Issue:
SliceNdLayer should have out_spatial_dim option as well
`size` is not enough. If `size` is `None` or `size` is some other layer, we get a new spatial dim. And then this is a typical case from #597.


Discussion:

Resolving patch:
diff --git a/returnn/tf/layers/basic.py b/returnn/tf/layers/basic.py
--- a/returnn/tf/layers/basic.py
+++ b/returnn/tf/layers/basic.py
@@ -993,14 +993,16 @@ class SliceNdLayer(_ConcatInputLayer):
   layer_class = "slice_nd"
   recurrent = True
 
-  def __init__(self, start, size, min_size=None, **kwargs):
+  def __init__(self, start, size, min_size=None, out_spatial_dim=None, **kwargs):
     """
     :param LayerBase start: (B,...)
     :param int|LayerBase|Dim|None size:
       We assume that this is >=0. If this might not be the case, use ``min_size=0``.
       If None, it uses the max possible size, and it becomes a dynamic axis.
     :param int|None min_size: if size is None, but we want to have a min-size
+    :param Dim|None out_spatial_dim:
     """
+    out_spatial_dim  # noqa  # via get_out_data_from_opts
     super(SliceNdLayer, self).__init__(**kwargs)
     from returnn.tf.util.basic import where_bc
     from returnn.tf.util.data import Data
@@ -1120,12 +1122,13 @@ def get_dep_layers(self):
     return dep_layers
 
   @classmethod
-  def get_out_data_from_opts(cls, name, sources=(), start=None, size=None, **kwargs):
+  def get_out_data_from_opts(cls, name, sources=(), start=None, size=None, out_spatial_dim=None, **kwargs):
     """
     :param str name:
     :param list[LayerBase] sources:
     :param LayerBase|None start:
     :param int|LayerBase|Dim|None size:
+    :param Dim|None out_spatial_dim:
     :rtype: Data
     """
     from ..util.data import Dim
@@ -1135,15 +1138,22 @@ def get_out_data_from_opts(cls, name, sources=(), start=None, size=None, **kwarg
     if isinstance(size, LayerBase):
       size = None
     if isinstance(size, Dim):
-      tag = size
+      if out_spatial_dim:
+        assert size == out_spatial_dim
+      else:
+        out_spatial_dim = size
     else:
       # size might be None here in which case we set the dyn_size in __init__
       assert size is None or isinstance(size, int)
-      tag = Dim(
-        kind=Dim.Types.Spatial,
-        description="sliced-time:%s" % name,
-        dimension=size)
-    gather_positions_data = gather_positions_data.copy_add_dim_by_tag(tag, unbroadcast=True, axis=start_data.batch_ndim)
+      if out_spatial_dim:
+        assert out_spatial_dim.dimension == size
+      else:
+        out_spatial_dim = Dim(
+          kind=Dim.Types.Spatial,
+          description="sliced-time:%s" % name,
+          dimension=size)
+    gather_positions_data = gather_positions_data.copy_add_dim_by_tag(
+      out_spatial_dim, unbroadcast=True, axis=start_data.batch_ndim)
     position = InternalLayer(
       network=sources[0].network,
       name="%s_internal" % gather_positions_data.name,


Test patch:
Repository: rwth-i6/returnn

Issue:
GatingLayer should support out_dim
Another case for #597.



Discussion:

Resolving patch:
diff --git a/returnn/tf/layers/basic.py b/returnn/tf/layers/basic.py
--- a/returnn/tf/layers/basic.py
+++ b/returnn/tf/layers/basic.py
@@ -2469,8 +2469,13 @@ class GatingLayer(_ConcatInputLayer):
   """
   layer_class = "gating"
 
-  def __init__(self, activation, gate_activation="sigmoid", **kwargs):
-    super(GatingLayer, self).__init__(**kwargs)
+  def __init__(self, activation, gate_activation="sigmoid", out_dim=None, **kwargs):
+    """
+    :param str activation:
+    :param str gate_activation:
+    :param Dim|None out_dim:
+    """
+    super(GatingLayer, self).__init__(out_dim=out_dim, **kwargs)
     from returnn.tf.util.basic import get_activation_function
     act_func = get_activation_function(activation)
     gate_act_func = get_activation_function(gate_activation)
@@ -2484,25 +2489,29 @@ def __init__(self, activation, gate_activation="sigmoid", **kwargs):
     self.output.size_placeholder = self.input_data.size_placeholder.copy()
 
   @classmethod
-  def get_out_data_from_opts(cls, name, sources, n_out=NotSpecified, **kwargs):
+  def get_out_data_from_opts(cls, name, sources, n_out=NotSpecified, out_dim=None, **kwargs):
     """
     :param str name:
     :param list[LayerBase] sources:
     :param int|None|NotSpecified n_out:
+    :param Dim|None out_dim:
     :rtype: Data
     """
     input_data = get_concat_sources_data_template(sources)
     assert not input_data.sparse
     assert input_data.dim % 2 == 0
     dim = input_data.dim // 2
-    new_dim_tag = FeatureDim("%s:gating" % name, dimension=dim)
+    if out_dim:
+      assert out_dim.dimension == dim
+    else:
+      out_dim = FeatureDim("%s:gating" % name, dimension=dim)
     if n_out is not NotSpecified:
       assert n_out == dim
     return Data(
       name="%s_output" % name,
       dtype=input_data.dtype,
       dim_tags=[
-        new_dim_tag if i == input_data.feature_dim_axis else d
+        out_dim if i == input_data.feature_dim_axis else d
         for (i, d) in enumerate(input_data.dim_tags)],
       sparse=False,
       time_dim_axis=input_data.time_dim_axis,


Test patch:
Repository: rwth-i6/returnn

Issue:
MathNormLayer axis arg in addition to axes
More consistent. Like `ReduceLayer`. Like #831.

Related: #597


Discussion:

Resolving patch:
diff --git a/returnn/tf/layers/basic.py b/returnn/tf/layers/basic.py
--- a/returnn/tf/layers/basic.py
+++ b/returnn/tf/layers/basic.py
@@ -868,26 +868,34 @@ class MathNormLayer(_ConcatInputLayer):
   """
   layer_class = "math_norm"
 
-  def __init__(self, p, axes, keep_dims=False, **kwargs):
+  def __init__(self, p, axis=NotSpecified, axes=NotSpecified, keep_dims=False, **kwargs):
     """
     :param int|float p:
-    :param str|list[str] axes:
+    :param Dim|str|list[Dim|str] axis:
+    :param Dim|str|list[Dim|str] axes:
     :param bool keep_dims:
     """
+    if axis is not NotSpecified:
+      assert axes is NotSpecified
+      axes = axis
     super(MathNormLayer, self).__init__(**kwargs)
     x = self.input_data.copy()
     x.placeholder = tf.abs(x.placeholder) ** p
     self.output.placeholder = ReduceLayer.reduce(x, mode="sum", axes=axes, keep_dims=keep_dims) ** (1. / p)
 
   @classmethod
-  def get_out_data_from_opts(cls, name, sources, axes, keep_dims=False, **kwargs):
+  def get_out_data_from_opts(cls, name, sources, axis=NotSpecified, axes=NotSpecified, keep_dims=False, **kwargs):
     """
     :param str name:
     :param list[LayerBase] sources:
-    :param str|list[str] axes:
+    :param Dim|str|list[Dim|str] axis:
+    :param Dim|str|list[Dim|str] axes:
     :param bool keep_dims:
     :rtype: Data
     """
+    if axis is not NotSpecified:
+      assert axes is NotSpecified
+      axes = axis
     return ReduceLayer.get_out_data_from_opts(name=name, sources=sources, axes=axes, keep_dims=keep_dims)
 
 


Test patch: