internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ManimCommunity/manim

Issue:
The documentation for the `--resolution` flag in the cli is wrong
The current documentation of the `--resolution` flag says the format is `(W,H)` which is confusing because the passed value needs to be of the form `"W,H"`so the documentation should be updatet accordingly such that it reflects the usage `-r "W,H"` best with an example of `-r "1920,1080"`


Discussion:

Resolving patch:
diff --git a/manim/cli/render/render_options.py b/manim/cli/render/render_options.py
--- a/manim/cli/render/render_options.py
+++ b/manim/cli/render/render_options.py
@@ -83,7 +83,7 @@ def validate_resolution(ctx, param, value):
         "--resolution",
         callback=validate_resolution,
         default=None,
-        help="Resolution in (W,H) for when 16:9 aspect ratio isn't possible.",
+        help='Resolution in "W,H" for when 16:9 aspect ratio isn\'t possible.',
     ),
     option(
         "--fps",


Test patch:
Repository: ManimCommunity/manim

Issue:
Error message redirecting to missing documentation
Hi. I am working with manim for the first time and I encountered this:
```
Manim Community v0.17.2

sh: 1: dvisvgm: not found
<traceback>
ValueError: Your installation does not support converting .dvi files to SVG. Consider updating dvisvgm to at least version 2.4. If this does not solve the problem, please
refer to our troubleshooting guide at: https://docs.manim.community/en/stable/installation/troubleshooting.html
```
I tried to follow this link but it's 404. I did some investigation through git and the commit 48747a74d932cc36394c1b7a69994b51855be359 removed this page.

References to this dead page can be found in https://github.com/ManimCommunity/manim/blob/main/.github/ISSUE_TEMPLATE/installation_issue.md?plain=1#L14 and https://github.com/ManimCommunity/manim/blob/main/manim/utils/tex_file_writing.py#L247

I am new to manim so I don't feel confident making a PR to fix this. There could be more 404 links present, I'm only reporting the one I came across.


Discussion:
Thanks for spotting this!

- The link in `tex_file_writing` should be replaced with https://docs.manim.community/en/stable/faq/general.html#my-installation-does-not-support-converting-pdf-to-svg-help,
- and the link in `installation_issue.md` should be referred to as the installation FAQ and linked to https://docs.manim.community/en/stable/faq/installation.html

Would you like to prepare a contribution with these two changes? Help would be welcome. :-)
I'd like to work on this (and it'll be my first open-source contribution too!)
> I'd like to work on this (and it'll be my first open-source contribution too!)

Thank you! Do you need any help getting started? Otherwise, just go ahead and send a pull request! 👍 

Resolving patch:
diff --git a/manim/utils/tex_file_writing.py b/manim/utils/tex_file_writing.py
--- a/manim/utils/tex_file_writing.py
+++ b/manim/utils/tex_file_writing.py
@@ -244,7 +244,8 @@ def convert_to_svg(dvi_file: Path, extension: str, page: int = 1):
             f"Your installation does not support converting {dvi_file.suffix} files to SVG."
             f" Consider updating dvisvgm to at least version 2.4."
             f" If this does not solve the problem, please refer to our troubleshooting guide at:"
-            f" https://docs.manim.community/en/stable/installation/troubleshooting.html",
+            f" https://docs.manim.community/en/stable/faq/general.html#my-installation-"
+            f"does-not-support-converting-pdf-to-svg-help",
         )
 
     return result


Test patch:
Repository: ManimCommunity/manim

Issue:
alignment_vect argument in Mobject.align_to() method is deprecated. 
After getting mad to trying to figure out what such an argument does, I found this: https://github.com/3b1b/manim/issues/1353
Can that be removed from code and docs? 


Discussion:
I can work on this, if others agree on this issue!
Help is welcome, go ahead and send a PR. 👍 

Resolving patch:
diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py
--- a/manim/mobject/mobject.py
+++ b/manim/mobject/mobject.py
@@ -2094,17 +2094,12 @@ def align_to(
         self,
         mobject_or_point: Mobject | np.ndarray | list,
         direction=ORIGIN,
-        alignment_vect=UP,
     ):
         """Aligns mobject to another :class:`~.Mobject` in a certain direction.
 
         Examples:
         mob1.align_to(mob2, UP) moves mob1 vertically so that its
         top edge lines ups with mob2's top edge.
-
-        mob1.align_to(mob2, alignment_vect = RIGHT) moves mob1
-        horizontally so that it's center is directly above/below
-        the center of mob2
         """
         if isinstance(mobject_or_point, Mobject):
             point = mobject_or_point.get_critical_point(direction)


Test patch:
Repository: ManimCommunity/manim

Issue:
Not all arrow tips are accessible
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
The [manim.mobject.geometry.tips](https://docs.manim.community/en/stable/_modules/manim/mobject/geometry/tips.html#ArrowTriangleFilledTip) file has presents of some arrow tips to use. The list `__all__` contains:
```py
__all__ = [
    "ArrowTip",
    "ArrowCircleFilledTip",
    "ArrowCircleTip",
    "ArrowSquareTip",
    "ArrowSquareFilledTip",
]
```

## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->
Instead, it should have:

```py
__all__ = [
    "ArrowTip",
    "ArrowCircleFilledTip",
    "ArrowCircleTip",
    "ArrowSquareTip",
    "ArrowSquareFilledTip"
    "ArrowTriangleTip",       # added
    "ArrowTriangleFilledTip", # added
]
```

## How to reproduce the issue
<!-- Provide a piece of code illustrating the undesired behavior. -->

<details><summary>Code for reproducing the problem</summary>

```py
class Test(Scene):
    def construct(self):
      my_line = Line()
      my_line.add_tip(ArrowTriangleFilledTip(fill_color=WHITE))
      self.add(my_line)
```

</details>


## Additional media files
<!-- Paste in the files manim produced on rendering the code above. -->
None



<!-- Insert screenshots here (only when absolutely necessary, we prefer copy/pasted output!) -->

</details>


## System specifications

<details><summary>System Details</summary>

- OS: macOS 13.0.1 (Ventura)
- RAM: 8GB
- Python version: Python 3.10.9
- Installed modules: manim 0.17.2




Discussion:

Resolving patch:
diff --git a/manim/mobject/geometry/tips.py b/manim/mobject/geometry/tips.py
--- a/manim/mobject/geometry/tips.py
+++ b/manim/mobject/geometry/tips.py
@@ -8,6 +8,8 @@
     "ArrowCircleTip",
     "ArrowSquareTip",
     "ArrowSquareFilledTip",
+    "ArrowTriangleTip",
+    "ArrowTriangleFilledTip",
 ]
 
 import numpy as np


Test patch:
Repository: ManimCommunity/manim

Issue:
NumberPlane plot_implicit_curve method doesnot respect 'scaling' factor of Axes
## Description of bug / unexpected behaviour
Graphs plotted with plot implicit curve do not respect the "scaling" factor set in NumberLine and remain unchanged on all scaling factors.


## Expected behaviour
Like with graphs plotted with the plot() function we need to take the scaling of axes into account and plot curves according to it.

## How to reproduce the issue

<details><summary>A: Without scaling (Working as usual)</summary>

```py
from manim import *


class Test(Scene):
    def construct(self):
        numberplane = NumberPlane().add_coordinates()

        unit_circle = numberplane.plot_implicit_curve(
            lambda x, y: (x) ** 2 + (y) ** 2 - 1, color=BLUE
        )

        self.add(numberplane, unit_circle)
```

</details>

<details><summary>B: Code for reproducing the problem</summary>

```py
from manim import *


class Test(Scene):
    def construct(self):
        numberplane = NumberPlane(
            axis_config=dict(
                scaling=LinearBase(scale_factor=0.5),
                decimal_number_config=dict(
                    num_decimal_places=1,
                ),
            ),
        ).add_coordinates()

        unit_circle = numberplane.plot_implicit_curve(
            lambda x, y: (x) ** 2 + (y) ** 2 - 1, color=BLUE
        )

        self.add(numberplane, unit_circle)
```

</details>


## Additional media files

<details><summary>A: Image output</summary>
 
![Test_ManimCE_v0 17 2](https://user-images.githubusercontent.com/25475894/216259840-fda384b9-dc3a-4698-8df4-43fb0c30eba1.png)

</details>

<details><summary>B: Image output</summary>

![Test_ManimCE_v0 17 2](https://user-images.githubusercontent.com/25475894/216259135-480490bb-bcc1-402c-bd67-ba5e0debcd7b.png)

</details>


## Logs

not relevant


## Additional comments




Discussion:

Resolving patch:
diff --git a/manim/mobject/graphing/coordinate_systems.py b/manim/mobject/graphing/coordinate_systems.py
--- a/manim/mobject/graphing/coordinate_systems.py
+++ b/manim/mobject/graphing/coordinate_systems.py
@@ -715,8 +715,10 @@ def construct(self):
                     )
                     self.add(ax, a)
         """
+        x_scale = self.get_x_axis().scaling
+        y_scale = self.get_y_axis().scaling
         graph = ImplicitFunction(
-            func=func,
+            func=(lambda x, y: func(x_scale.function(x), y_scale.function(y))),
             x_range=self.x_range[:2],
             y_range=self.y_range[:2],
             min_depth=min_depth,


Test patch:
Repository: ManimCommunity/manim

Issue:
reST in ``MoveAlongPath`` not correct
[https://docs.manim.community/en/stable/reference/manim.animation.movement.MoveAlongPath.html](https://docs.manim.community/en/stable/reference/manim.animation.movement.MoveAlongPath.html)

![image](https://github.com/ManimCommunity/manim/assets/110117391/cb0a1d4a-a766-486b-9986-9e4fcb15e74a)

The ``..rubric:: Example`` should not be shown in the docs.


Discussion:

Resolving patch:
diff --git a/manim/animation/movement.py b/manim/animation/movement.py
--- a/manim/animation/movement.py
+++ b/manim/animation/movement.py
@@ -136,8 +136,7 @@ def interpolate_mobject(self, alpha: float) -> None:
 
 class MoveAlongPath(Animation):
     """Make one mobject move along the path of another mobject.
-    Example
-    --------
+
     .. manim:: MoveAlongPathExample
 
         class MoveAlongPathExample(Scene):


Test patch:
Repository: ManimCommunity/manim

Issue:
Sector.get_arc_center() return a reference but not a copy, cause rotate unexpected behavior. 
- ## Description of bug / unexpected behavior

manim version: `0.18.0`

```python
class SectorArcCenterRotate(Scene):
  def construct(self):
    self.add(NumberPlane())
    sector = Sector(outer_radius=2, start_angle=0, angle=PI / 6)
    sector.shift(LEFT * 3)
    self.add(sector)
    self.wait()
    self.add(sector.copy().set_color(RED).set_opacity(0.5))
    sector.rotate(PI / 6, about_point=sector.get_arc_center())  # unexcepted
    # sector.rotate(PI / 6, about_point=deepcopy(sector.get_arc_center()))
    self.wait()
```


## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->
expected behavior:
<img width="572" alt="image" src="https://github.com/ManimCommunity/manim/assets/1728633/b134ee09-0450-48f8-9800-35cb882285e8">

the actual behavior:
<img width="591" alt="image" src="https://github.com/ManimCommunity/manim/assets/1728633/01519761-976a-450f-a9fd-530217915f78">


## System specifications

<details><summary>System Details</summary>
- OS (MacOS 14.2.1 (23C71)):
- RAM:
- Python version 3.11.5
- Installed modules (provide output from `pip list`):
</details>

I think the "problem" is `get_arc_center` return a reference of Sector's point:
https://github.com/ManimCommunity/manim/blob/3b496ea2e6f1a6ab7829398590b41e17bfbd34c1/manim/mobject/geometry/arc.py#L381-L392
But the other method, such as get_corner return a copy. 
Not sure it's a feature or a bug. Thanks. 


Discussion:

Resolving patch:
diff --git a/manim/mobject/geometry/arc.py b/manim/mobject/geometry/arc.py
--- a/manim/mobject/geometry/arc.py
+++ b/manim/mobject/geometry/arc.py
@@ -389,7 +389,7 @@ def get_arc_center(self, warning: bool = True) -> Point3D:
             # For a1 and a2 to lie at the same point arc radius
             # must be zero. Thus arc_center will also lie at
             # that point.
-            return a1
+            return np.copy(a1)
         # Tangent vectors
         t1 = h1 - a1
         t2 = h2 - a2


Test patch:
Repository: ManimCommunity/manim

Issue:
Underline markup tag for MarkupText should be documented as <u></u> not <ul></ul>.
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->

Documentation at https://docs.manim.community/en/stable/reference/manim.mobject.text.text_mobject.MarkupText.html lists "&lt;ul>underline&lt;/ul>" in a list of supported tags.

## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->

It should be "&lt;u>underline&lt;/u>".



Discussion:

Resolving patch:
diff --git a/manim/mobject/text/text_mobject.py b/manim/mobject/text/text_mobject.py
--- a/manim/mobject/text/text_mobject.py
+++ b/manim/mobject/text/text_mobject.py
@@ -907,7 +907,7 @@ def construct(self):
     Here is a list of supported tags:
 
     - ``<b>bold</b>``, ``<i>italic</i>`` and ``<b><i>bold+italic</i></b>``
-    - ``<ul>underline</ul>`` and ``
strike through
``
+    - ``<u>underline</u>`` and ``
strike through
``
     - ``<tt>typewriter font</tt>``
     - ``<big>bigger font</big>`` and ``<small>smaller font</small>``
     - ``<sup>superscript</sup>`` and ``<sub>subscript</sub>``


Test patch:
Repository: lisa-lab/pylearn2

Issue:
Deprecate the use of set_iteration_scheme
Datasets hang on to far too much state as it is. Stuff relating to iteration can be done by calling iterator() with the appropriate arguments, and we can let the client deal with handling state.



Discussion:

Resolving patch:
diff --git a/pylearn2/datasets/dense_design_matrix.py b/pylearn2/datasets/dense_design_matrix.py
--- a/pylearn2/datasets/dense_design_matrix.py
+++ b/pylearn2/datasets/dense_design_matrix.py
@@ -86,7 +86,7 @@ def __init__(self, X=None, topo_view=None, y=None,
     def iterator(self, mode=None, batch_size=None, num_batches=None,
                  topo=None, targets=None, rng=None):
 
-        # TODO: Refactor, deduplicate with set_iteration_scheme
+        # TODO: Refactor
         if mode is None:
             if hasattr(self, '_iter_subset_class'):
                 mode = self._iter_subset_class
@@ -443,7 +443,7 @@ class DenseDesignMatrixPyTables(DenseDesignMatrix):
     def iterator(self, mode=None, batch_size=None, num_batches=None,
                  topo=None, targets=None, rng=None):
 
-        # TODO: Refactor, deduplicate with set_iteration_scheme
+        # TODO: Refactor, deduplicate with DenseDesignMatrix.iterator
         if mode is None:
             if hasattr(self, '_iter_subset_class'):
                 mode = self._iter_subset_class


Test patch:
Repository: lisa-lab/pylearn2

Issue:
Make get_origin_batch return dtype=floatX
Also can we alias this as `make_origin_batch`? having `make_theano_batch` and this as `get_` always confuses me.



Discussion:
Sure

The dtype is now floatX by default, unless explicitly specified, since the following change by @memimo: https://github.com/lisa-lab/pylearn2/commit/9b03f7f4a5e03356a0bdb3c88a12d8ce9a8b2773

Should we keep the ticket open fo the alias as `make_origin_batch`?


Resolving patch:
diff --git a/pylearn2/space/__init__.py b/pylearn2/space/__init__.py
--- a/pylearn2/space/__init__.py
+++ b/pylearn2/space/__init__.py
@@ -46,6 +46,7 @@
 from pylearn2.utils import py_integer_types
 from pylearn2.utils import safe_zip
 from pylearn2.utils import sharedX
+from pylearn2.utils import wraps
 from pylearn2.format.target_format import OneHotFormatter
 
 if theano.sparse.enable_sparse:
@@ -123,6 +124,11 @@ def get_origin_batch(self, n):
         """
         raise NotImplementedError()
 
+    @wraps(get_origin_batch)
+    def make_origin_batch(self, *args, **kwargs):
+
+        return self.get_origin_batch(*args, **kwargs)
+
     def make_shared_batch(self, batch_size, name=None, dtype=None):
         """
         .. todo::
@@ -163,6 +169,12 @@ def make_batch_theano(self, name=None, dtype=None, batch_size=None):
         return self.make_theano_batch(name=name, dtype=dtype,
                                       batch_size=batch_size)
 
+
+    @wraps(make_theano_batch)
+    def get_theano_batch(self, *args, **kwargs):
+
+        return self.make_theano_batch(*args, **kwargs)
+
     def get_total_dimension(self):
         """
         Returns a Python int (not a theano iscalar) representing


Test patch:
Repository: lisa-lab/pylearn2

Issue:
Allow explicit None as YAML mapping value
Missed this in #705. Having `None` as a value in a mapping is totally legitimate and what happens when you pass `null`. `yaml_parse.py:349-352` should be amended/removed, and a regression test, e.g. an !obj instantiation that explicitly passes `null` as an argument.

Allow explicit None as YAML mapping value
Missed this in #705. Having `None` as a value in a mapping is totally legitimate and what happens when you pass `null`. `yaml_parse.py:349-352` should be amended/removed, and a regression test, e.g. an !obj instantiation that explicitly passes `null` as an argument.



Discussion:

Resolving patch:
diff --git a/pylearn2/config/yaml_parse.py b/pylearn2/config/yaml_parse.py
--- a/pylearn2/config/yaml_parse.py
+++ b/pylearn2/config/yaml_parse.py
@@ -346,14 +346,10 @@ def multi_constructor_obj(loader, tag_suffix, node):
 
     assert hasattr(mapping, 'keys')
     assert hasattr(mapping, 'values')
-    for key, val in mapping.iteritems():
-        if val is None:
-            message = "received None as the value for the key %s" % str(key)
-            raise TypeError(message)
 
     for key in mapping.keys():
         if not isinstance(key, basestring):
-            message = "Received non string object (%s) as" \
+            message = "Received non string object (%s) as " \
                       "key in mapping." % str(key)
             raise TypeError(message)
 


Test patch:
diff --git a/pylearn2/config/tests/test_yaml_parse.py b/pylearn2/config/tests/test_yaml_parse.py
--- a/pylearn2/config/tests/test_yaml_parse.py
+++ b/pylearn2/config/tests/test_yaml_parse.py
@@ -117,7 +117,7 @@ def test_multi_constructor_obj():
     try:
         loaded = load("a: !obj:decimal.Decimal { 1 }")
     except TypeError as e:
-        assert str(e) == "received None as the value for the key 1"
+        assert str(e) == "Received non string object (1) as key in mapping."
         pass
     except Exception, e:
         error_msg = "Got the unexpected error: %s" % (e)
@@ -190,6 +190,22 @@ def test_duplicate_keywords_2():
 
     loaded = load(yamlfile)
 
+def test_parse_null_as_none():
+    """
+    Tests whether None may be passed via yaml kwarg null.
+    """ 
+    initialize()
+    yamlfile = """{
+             "model": !obj:pylearn2.models.autoencoder.Autoencoder {
+
+                 "nvis" : 1024,
+                 "nhid" : 64,
+                 "act_enc" : Null,
+                 "act_dec" : null
+
+             }
+    }"""
+
 if __name__ == "__main__":
     test_multi_constructor_obj()
     test_duplicate_keywords()
Repository: lisa-lab/pylearn2

Issue:
monitoring values differ from hand-evaluation in multilabel scenario
I'm training a single-layer model with Sigmoid outputs to annotate Iris dataset. During training, the monitor outputs very low values for "f1" and "recall" measures. However, when I load the .pkl model and re-evaluate, it outputs higher values (the real values).

``` python
from pylearn2.utils import serial
from theano import shared
from pylearn2.datasets.iris import Iris
import numpy as np
from pylearn2.config import yaml_parse
from pylearn2.expr.nnet import (compute_precision, compute_recall, compute_f1)          

yaml_src = '''
!obj:pylearn2.train.Train {
    dataset: !obj:pylearn2.datasets.iris.Iris &train {},
    model: !obj:pylearn2.models.mlp.MLP {
        layers: [
             !obj:pylearn2.models.mlp.Sigmoid {
                 layer_name: 'y',
                 dim: 3,
                 irange: 0.0005,
             }
        ],
        nvis: 4,
    },
    algorithm: !obj:pylearn2.training_algorithms.bgd.BGD {
        batch_size: 150,
        monitoring_dataset: {
            'train': *train,
        },
        termination_criterion: !obj:pylearn2.termination_criteria.MonitorBased {
            channel_name: "train_objective"
        },
    },
    save_path: \'iris.pkl\',
    save_freq: 30
}'''
train = yaml_parse.load(yaml_src)
train.main_loop()

# Load model and dataset to perform hand-evaluation 
# using the same code in http://git.io/tBHXuA#L2624
dataset = Iris()
model = serial.load('iris.pkl')
TX = shared(dataset.X)
y = shared(dataset.y)
y_hat = model.fprop(TX) > 0.5
tp = (y * y_hat).sum().eval()
fp = ((1-y) * y_hat).sum().eval()
precision = compute_precision(tp, fp)
recall = compute_recall(y, tp)
f1 = compute_f1(precision, recall)
print 'precision: {0}'.format(precision.eval())
print 'recall: {0}'.format(recall.eval())
print 'f1: {0}'.format(f1.eval())

```

PD: I know "Iris" is not a multilabel dataset, but it is enough to show my point.



Discussion:
Please post your questions to pylearn-users@googlegroups.com

Thanks for your reply.

I post it as an issue because I understand this is not the expected behavior. The last output of monitoring in training is not the same as the one I get by loading the .pkl model, fprop the same training dataset and finally calculate performance measures.

For bugs you can email pylearn-dev@googlegroups.com
Developers don't look at the issue page here as often as the mailing list, and mailing-list has larger audience. 


Resolving patch:
diff --git a/pylearn2/models/mlp.py b/pylearn2/models/mlp.py
--- a/pylearn2/models/mlp.py
+++ b/pylearn2/models/mlp.py
@@ -2629,7 +2629,7 @@ def get_detection_channels_from_state(self, state, target):
         fp = ((1-y) * y_hat).sum()
 
         precision = compute_precision(tp, fp)
-        recall = compute_recall(y, fp)
+        recall = compute_recall(y, tp)
         f1 = compute_f1(precision, recall)
 
         rval['precision'] = precision


Test patch:
Repository: lisa-lab/pylearn2

Issue:
target_format.py introduces hard dependence on scipy
scipy imports are all meant to be guarded by try/except statements so you can run the core library without installing scipy



Discussion:

Resolving patch:
diff --git a/pylearn2/format/target_format.py b/pylearn2/format/target_format.py
--- a/pylearn2/format/target_format.py
+++ b/pylearn2/format/target_format.py
@@ -2,9 +2,12 @@
 from operator import mul
 
 import numpy as np
-import scipy
-import scipy.sparse
 import theano.sparse
+if theano.sparse.enable_sparse:
+    scipy_available = True
+    import scipy.sparse
+else:
+    scipy_available = False
 from theano import tensor, config
 
 
@@ -92,6 +95,10 @@ def format(self, targets, mode='stack', sparse=False):
         if 'int' not in str(targets.dtype):
             raise TypeError("need an integer array for targets")
         if sparse:
+            if not scipy_available:
+                raise RuntimeError("The converting of indices to a sparse "
+                                   "one-hot vector requires scipy to be "
+                                   "installed")
             if mode == 'concatenate':
                 one_hot = scipy.sparse.csr_matrix(
                     (np.ones(targets.size, dtype=self._dtype),


Test patch: