internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: chaoss/augur

Issue:
repo_info worker: dev/test branch
Please help us help you by filling out the following sections as thoroughly as you can.

**Description:**
Looks like the new Fork information collection has some kind of mismatch between the method and parameters passed: 

```
INFO:root:Worker ran into an error for task: {'job_type': 'MAINTAIN', 'models': ['repo_info'], 'display_name': 'repo_info model for url: https://github.com/davepacheco/node-verror.git', 'given': {'github_url': 'https://github.com/davepacheco/node-verror.git'}}

INFO:root:Printing traceback...

INFO:root:Traceback (most recent call last):
  File "/mnt/md0/github/augur-census/workers/worker_base.py", line 189, in collect
    model_method(message, repo_id)
  File "/mnt/md0/github/augur-census/workers/repo_info_worker/repo_info_worker/worker.py", line 149, in repo_info_model
    forked = self.is_forked(owner, repo)
  File "/mnt/md0/github/augur-census/workers/repo_info_worker/repo_info_worker/worker.py", line 232, in is_forked
    data = self.get_repo_data(self, url, r)
TypeError: get_repo_data() takes 3 positional arguments but 4 were given

INFO:root:This task inserted 0 tuples before failure.

INFO:root:Notifying broker and logging task failure in database...

INFO:werkzeug:127.0.0.1 - - [31/May/2020 18:48:58] "GET /AUGWOP/heartbeat HTTP/1.1" 200 -
INFO:root:Recorded job error in the history table for: {'job_type': 'MAINTAIN', 'models': ['repo_info'], 'display_name': 'repo_info model for url: https://github.com/davepacheco/node-verror.git', 'given': {'github_url': 'https://github.com/davepacheco/node-verror.git'}, 'worker_id': 'com.augurlabs.core.repo_info_worker.50700'}

INFO:root:Updated job process for model: repo_info
```

If the log does not provide enough info, let me know 


Discussion:

Resolving patch:
diff --git a/workers/repo_info_worker/repo_info_worker/worker.py b/workers/repo_info_worker/repo_info_worker/worker.py
--- a/workers/repo_info_worker/repo_info_worker/worker.py
+++ b/workers/repo_info_worker/repo_info_worker/worker.py
@@ -226,7 +226,7 @@ def is_forked(self, owner, repo): #/repos/:owner/:repo parent
         r = requests.get(url, headers=self.headers)
         self.update_gh_rate_limit(r)
 
-        data = self.get_repo_data(self, url, r)
+        data = self.get_repo_data(url, r)
 
         if 'fork' in data:
             if 'parent' in data:
@@ -242,7 +242,7 @@ def is_archived(self, owner, repo):
         r = requests.get(url, headers=self.headers)
         self.update_gh_rate_limit(r)
 
-        data = self.get_repo_data(self, url, r)
+        data = self.get_repo_data(url, r)
 
         if 'archived' in data:
             if data['archived']:


Test patch:
Repository: chaoss/augur

Issue:
Repo set to initializing forever
**Description:**
The bug happens when an unexpected error occurs in the `clone_repos` task. Then the task auto retries in 5 minutes, but the repo that errored never gets it's `facade_status` updated, so it is left at `Initializing` forever.

**Expected behavior:**
Where an unexpected error occurs in clone_repos the repo should be set to `Pending` or `Error`



Discussion:
I think we should set the repository to Error when we run into an issue like this otherwise it will just cycle through the failed repositories over and over when it has no other repos left to clone. 

Resolving patch:
diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py
--- a/augur/tasks/git/facade_tasks.py
+++ b/augur/tasks/git/facade_tasks.py
@@ -353,25 +353,26 @@ def clone_repos():
             try:
                 git_repo_initialize(session, repo_git)
                 session.commit()
+
+                # get the commit count
+                commit_count = get_repo_commit_count(session, repo_git)
+                facade_weight = get_facade_weight_with_commit_count(session, repo_git, commit_count)
+
+                update_facade_scheduling_fields(session, repo_git, facade_weight, commit_count)
+
+                # set repo to update
+                setattr(repoStatus,"facade_status", CollectionState.UPDATE.value)
+                session.commit()
             except GitCloneError:
                 # continue to next repo, since we can't calculate 
                 # commit_count or weight without the repo cloned
-
                 setattr(repoStatus,"facade_status", CollectionState.FAILED_CLONE.value)
                 session.commit()
-                continue
-            
-            #logger.info("GOT HERE ISAAC")
-
-            # get the commit count
-            commit_count = get_repo_commit_count(session, repo_git)
-            facade_weight = get_facade_weight_with_commit_count(session, repo_git, commit_count)
-
-            update_facade_scheduling_fields(session, repo_git, facade_weight, commit_count)
-
-            # set repo to update
-            setattr(repoStatus,"facade_status", CollectionState.UPDATE.value)
-            session.commit()
+            except Exception as e:
+                logger.error(f"Ran into unexpected issue when cloning repositories \n Error: {e}")
+                # set repo to error
+                setattr(repoStatus,"facade_status", CollectionState.ERROR.value)
+                session.commit()
 
         clone_repos.si().apply_async(countdown=60*5)
 


Test patch:
Repository: chaoss/augur

Issue:
Issue data cntrb_id null for closed issues 
Cntrb_id is stated to be "The ID of the person that closed the issue" and even for closed issues I am seeing nulls 


Discussion:
This issue is related to a GitHub API limitation. We are working on fixing it this month.

Resolving patch:
diff --git a/augur/tasks/github/events/tasks.py b/augur/tasks/github/events/tasks.py
--- a/augur/tasks/github/events/tasks.py
+++ b/augur/tasks/github/events/tasks.py
@@ -1,6 +1,7 @@
 import time
 import logging
 import traceback
+import sqlalchemy as s
 
 from augur.tasks.init.celery_app import celery_app as celery
 from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask
@@ -180,6 +181,7 @@ def process_events(events, task_name, repo_id, logger, augur_db):
     issue_event_natural_keys = ["issue_id", "issue_event_src_id"]
     augur_db.insert_data(issue_event_dicts, IssueEvent, issue_event_natural_keys)
 
+    update_issue_closed_cntrbs_from_events(augur_db.engine, repo_id)
 
 # TODO: Should we skip an event if there is no contributor to resolve it o
 def process_github_event_contributors(logger, event, tool_source, tool_version, data_source):
@@ -194,3 +196,30 @@ def process_github_event_contributors(logger, event, tool_source, tool_version,
         return event, None
     
     return event, event_cntrb
+
+
+def update_issue_closed_cntrbs_from_events(engine, repo_id):
+
+    get_ranked_issues = s.text(f"""
+        WITH RankedIssues AS (
+            SELECT repo_id, issue_id, cntrb_id, 
+                ROW_NUMBER() OVER(PARTITION BY issue_id ORDER BY created_at DESC) AS rn
+            FROM issue_events 
+            WHERE "action" = 'closed'
+        )
+                                            
+        SELECT issue_id, cntrb_id from RankedIssues where rn=1 and repo_id={repo_id}
+    """)
+    result = engine.execute(get_ranked_issues).fetchall()
+
+    update_data = [{'issue_id': row['issue_id'], 'cntrb_id': row['cntrb_id'], 'repo_id': repo_id} for row in result]
+    with engine.connect() as connection:
+        update_stmt = s.text("""
+            UPDATE issues
+            SET cntrb_id = :cntrb_id
+            WHERE issue_id = :issue_id
+            AND repo_id = :repo_id
+        """)
+        connection.execute(update_stmt, update_data)
+
+


Test patch:
Repository: chaoss/augur

Issue:
machine_learning_phase undefined in start_tasks.py
The `machine_learning_phase` variable is referenced a few times in start_tasks.py, but it's undefined:
https://github.com/chaoss/augur/blob/a786ac5a506ffac31931f40c2a58056b7c1f073c/augur/tasks/start_tasks.py#L144
https://github.com/chaoss/augur/blob/a786ac5a506ffac31931f40c2a58056b7c1f073c/augur/tasks/start_tasks.py#L223
https://github.com/chaoss/augur/blob/a786ac5a506ffac31931f40c2a58056b7c1f073c/augur/tasks/start_tasks.py#L260

Probably just missing an import.


Discussion:
@ABrain7710 : This goes to one of my questions. I found the same thing. Let's fix this when we can. @IsaacMilarky : If you have time to address that would also be great!

Resolving patch:
diff --git a/augur/tasks/start_tasks.py b/augur/tasks/start_tasks.py
--- a/augur/tasks/start_tasks.py
+++ b/augur/tasks/start_tasks.py
@@ -29,6 +29,8 @@
 from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_facade_weight_time_factor
 from augur.application.db.lib import execute_sql, get_session
 
+RUNNING_DOCKER = os.environ.get('AUGUR_DOCKER_DEPLOY') == "1"
+
 CELERY_GROUP_TYPE = type(group())
 CELERY_CHAIN_TYPE = type(chain())
 
@@ -140,7 +142,9 @@ def non_repo_domain_tasks(self):
 
     enabled_tasks = []
 
-    if machine_learning_phase.__name__ in enabled_phase_names:
+    enabled_tasks.extend(generate_non_repo_domain_facade_tasks(logger))
+
+    if not RUNNING_DOCKER and machine_learning_phase.__name__ in enabled_phase_names:
         #enabled_tasks.extend(machine_learning_phase())
         from augur.tasks.data_analysis.contributor_breadth_worker.contributor_breadth_worker import contributor_breadth_model
         enabled_tasks.append(contributor_breadth_model.si())
@@ -258,7 +262,7 @@ def augur_collection_monitor(self):
             #start_facade_collection(session, max_repo=30)
             enabled_collection_hooks.append(build_facade_repo_collect_request(session, logger, enabled_phase_names))
         
-        if machine_learning_phase.__name__ in enabled_phase_names:
+        if not RUNNING_DOCKER and machine_learning_phase.__name__ in enabled_phase_names:
             enabled_collection_hooks.append(build_ml_repo_collect_request(session, logger, enabled_phase_names))
             #start_ml_collection(session,max_repo=5)
         


Test patch:
Repository: fineanmol/Hacktoberfest2023

Issue:
Adding A New Tile Game using python
Hey @fineanmol, I would like to contribute to this. Please assign this to me.
I have forked and have star the repo.
Thanks in Advance...!!


Discussion:
hey @fineanmol , Can I get Hactoberfest-accepted Label

@IAmLittleCoder  Please Star ⭐️ the repo to earn "**_hacktober-accepted_**" label for the event.
@fineanmol Done

Resolving patch:
diff --git a/Program's_Contributed_By_Contributors/Python_Programs/Tile_Games.py b/Program's_Contributed_By_Contributors/Python_Programs/Tile_Games.py
new file mode 100644
--- /dev/null
+++ b/Program's_Contributed_By_Contributors/Python_Programs/Tile_Games.py
@@ -0,0 +1,85 @@
+from random import *
+from turtle import *
+
+from freegames import floor, vector
+
+tiles = {}
+neighbors = [
+    vector(100, 0),
+    vector(-100, 0),
+    vector(0, 100),
+    vector(0, -100),
+]
+
+
+def load():
+    count = 1
+
+    for y in range(-200, 200, 100):
+        for x in range(-200, 200, 100):
+            mark = vector(x, y)
+            tiles[mark] = count
+            count += 1
+
+    tiles[mark] = None
+
+    for count in range(1000):
+        neighbor = choice(neighbors)
+        spot = mark + neighbor
+
+        if spot in tiles:
+            number = tiles[spot]
+            tiles[spot] = None
+            tiles[mark] = number
+            mark = spot
+
+
+def square(mark, number):
+    up()
+    goto(mark.x, mark.y)
+    down()
+
+    color('black', 'white')
+    begin_fill()
+    for count in range(4):
+        forward(99)
+        left(90)
+    end_fill()
+
+    if number is None:
+        return
+    elif number < 10:
+        forward(20)
+
+    write(number, font=('Arial', 60, 'normal'))
+
+
+def tap(x, y):
+    x = floor(x, 100)
+    y = floor(y, 100)
+    mark = vector(x, y)
+
+    for neighbor in neighbors:
+        spot = mark + neighbor
+
+        if spot in tiles and tiles[spot] is None:
+            number = tiles[mark]
+            tiles[spot] = number
+            square(spot, number)
+            tiles[mark] = None
+            square(mark, None)
+
+
+def draw():
+    for mark in tiles:
+        square(mark, tiles[mark])
+    update()
+
+
+setup(420, 420, 370, 0)
+hideturtle()
+tracer(False)
+load()
+draw()
+onscreenclick(tap)
+done()
\ No newline at end of file


Test patch:
Repository: fineanmol/Hacktoberfest2023

Issue:
Calculator using python



Discussion:
i am a hacktoberfest 2022 participants. please assing me
Please assign this issue to me 
I created this issue assing me this please

Resolving patch:
diff --git a/python_calculator.py b/python_calculator.py
new file mode 100644
--- /dev/null
+++ b/python_calculator.py
@@ -0,0 +1,22 @@
+# Program to create a calculator using Python that performs basic mathematical operations like addition, subtraction,
+# multiplication, division
+
+
+print("Operation you want to perform :\n1. Addition\n2. Subtraction\n3. Multiplication\n4. Division")
+option = int(input("Input a number 1, 2, 3, 4 "))
+
+print("Enter the two numbers")
+a = int(input("Enter the first number: "))
+b = int(input("Enter the second number: "))
+
+if option==1:
+  print("{} + {} = {}".format(a, b, a+b))
+
+elif option==2:
+  print("{} - {} = {}".format(a, b, a-b))
+
+elif option==3:
+  print("{} * {} = {}".format(a, b, a*b))
+
+else:
+  print("{} / {} = {}".format(a, b, a/b))


Test patch:
Repository: fineanmol/Hacktoberfest2023

Issue:
Want to add weight convertor GUI
I would like to add weigth convertor in Python GUI. Kindly assign me to this.


Discussion:

Resolving patch:
diff --git a/Program's_Contributed_By_Contributors/Python_Programs/leap year.py b/Program's_Contributed_By_Contributors/Python_Programs/leap year.py
new file mode 100644
--- /dev/null
+++ b/Program's_Contributed_By_Contributors/Python_Programs/leap year.py	
@@ -0,0 +1,16 @@
+# Check leap year
+
+def leap_year_check(yr):
+    leap = False
+    if yr % 4 == 0:
+        leap = True
+        if yr % 100 ==0 and yr % 400 != 0:
+            leap = False
+        else: 
+            leap = True
+    if leap: 
+        print("{0} is a leap year".format(yr))
+    else: 
+        print("{0} is not a leap year".format(yr))
+
+leap_year_check(1700)
\ No newline at end of file
diff --git a/Program's_Contributed_By_Contributors/Python_Programs/weight_convertor_gui.py b/Program's_Contributed_By_Contributors/Python_Programs/weight_convertor_gui.py
new file mode 100644
--- /dev/null
+++ b/Program's_Contributed_By_Contributors/Python_Programs/weight_convertor_gui.py
@@ -0,0 +1,41 @@
+from tkinter import *
+
+# Creating a GUI Window
+window = Tk()
+
+def from_kg():
+    gram = float(e2_value.get())*1000
+    pound = float(e2_value.get())*2.20462
+    ounce = float(e2_value.get())*35.274
+
+    t1.delete("1.0",END)
+    t1.insert(END, gram)
+    t2.delete("1.0", END)
+    t2.insert(END, pound)
+    t3.delete("1.0", END)
+    t3.insert(END, ounce)
+
+e1 = Label(window, text="Input the weight in KG")
+e2_value = StringVar()
+e2 = Entry(window, textvariable=e2_value)
+e3 = Label(window, text="Gram")
+e4 = Label(window, text="Pound")
+e5 = Label(window, text="Ounce")
+
+t1 = Text(window, height=5, width=30)
+t2 = Text(window, height=5, width=30)
+t3 = Text(window, height=5, width=30)
+
+b1 = Button(window, text="Convert", command=from_kg)
+
+e1.grid(row=0, column=0)
+e2.grid(row=0, column=1)
+e3.grid(row=1, column=0)
+e4.grid(row=1, column=1)
+e5.grid(row=1, column=2)
+t1.grid(row=2, column=0)
+t2.grid(row=2, column=1)
+t3.grid(row=2, column=2)
+b1.grid(row=0, column=2)
+
+window.mainloop()


Test patch:
Repository: facebookresearch/xformers

Issue:
Logo doesn't appear on documentation sub-pages
# 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

Currently, the `xFormers` logo only appears on the main docs page and the `what_is_xformers` page which is present in the same directory as it, but not on the other sub-pages. I was wondering whether setting the Sphinx option `html_logo` in the `conf.py` file would fix this.

Would be happy to make a PR for this, let me know what you think.



Discussion:
oh you're right, I had not seen that ! Sure for the PR if you don't mind, else I can have a look some time this week :)
I'm not all that well-versed with Sphinx but I could try adding the `html_logo` option as I mentioned. Do you want me to go ahead and do that?
oh I just saw your suggestion, better than the singlehtml build which was a little heavy handed.. I can try that !

Resolving patch:
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -112,7 +112,7 @@
 #
 html_theme_options = {
     "includehidden": True,
-    "canonical_url": "https://fairinternal.github.io/xformers",
+    "canonical_url": "https://facebookresearch.github.io/xformers",
     "pytorch_project": "docs",
     "logo_only": True,  # default = False
 }
@@ -128,7 +128,7 @@
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = "xformersdocs"
-github_doc_root = "https://github.com/fairinternal/xformers/blob/v0.1/"
+github_doc_root = "https://github.com/facebookresearch/xformers/tree/main/docs/"
 
 
 # Over-ride PyTorch Sphinx css


Test patch:
Repository: facebookresearch/xformers

Issue:
[bug] Failing triton dropout test 
# 🐛 Bug

See https://app.circleci.com/pipelines/github/facebookresearch/xformers/212/workflows/8988c71c-84f5-4bd0-bd59-ac7d293c2370/jobs/398

Not sure why this happens just now, looking into that

## Command
can repro locally with ` pytest tests -k dropout -x -v `


Discussion:

Resolving patch:
diff --git a/xformers/triton/dropout.py b/xformers/triton/dropout.py
--- a/xformers/triton/dropout.py
+++ b/xformers/triton/dropout.py
@@ -69,4 +69,7 @@ def grid(meta):
 
 
 def dropout(x: torch.Tensor, p: float):
-    return _dropout.apply(x, p)
+    if p > 0.0:
+        return _dropout.apply(x, p)
+
+    return x
diff --git a/xformers/triton/k_dropout.py b/xformers/triton/k_dropout.py
--- a/xformers/triton/k_dropout.py
+++ b/xformers/triton/k_dropout.py
@@ -24,7 +24,7 @@
 )
 @triton.jit
 def k_dropout(
-    Y, X, S,
+    Y, X, SEEDS,
     stride,
     N,
     p,
@@ -51,7 +51,7 @@ def k_dropout(
     x = tl.load(x_ptrs, mask=mask)
 
     # randomly prune it
-    seed = S + row
+    seed = SEEDS + row
     random = tl.rand(seed.to(tl.int32), offsets)
     x_keep = random > p
 


Test patch:
diff --git a/tests/test_triton_dropout.py b/tests/test_triton_dropout.py
--- a/tests/test_triton_dropout.py
+++ b/tests/test_triton_dropout.py
@@ -55,7 +55,7 @@ def test_dropout(shape, amp):
 
         # Check that 0 means no dropout
         y = dropout(x, p=0)
-        assert torch.allclose(x.to(y.dtype), y, rtol=tol)
+        assert torch.allclose(x.to(y.dtype), y, rtol=tol), f"{x[x>y]}"
 
         # Check that 1 means dropout for sure
         y = dropout(x, p=1)
Repository: facebookresearch/xformers

Issue:
Follow up on #141 with a proper unit test
# 🐛 Bug
Make sure that #141 cannot happen anymore, add a small unit test to guard parity

Follow up on #141 with a proper unit test
# 🐛 Bug
Make sure that #141 cannot happen anymore, add a small unit test to guard parity



Discussion:

Resolving patch:
diff --git a/xformers/triton/softmax.py b/xformers/triton/softmax.py
--- a/xformers/triton/softmax.py
+++ b/xformers/triton/softmax.py
@@ -200,7 +200,7 @@ def _softmax_dispatch(
         _triton_registered_warnings = True
 
     if mask is not None:
-        x += mask
+        x = x + mask
 
     if log:
         return torch.log_softmax(x, dim=-1)


Test patch:
diff --git a/tests/test_triton_softmax.py b/tests/test_triton_softmax.py
--- a/tests/test_triton_softmax.py
+++ b/tests/test_triton_softmax.py
@@ -103,3 +103,61 @@ def test_softmax_fp16(dtype):
 
     a = torch.rand(b, s, d, device="cuda", dtype=dtype)
     triton_softmax(a)
+
+
+@pytest.mark.skipif(not _triton_available, reason="Triton is not available")
+@pytest.mark.parametrize("log", [False, True])
+@pytest.mark.parametrize("masking", [True, False])
+@pytest.mark.parametrize("causal", [True, False])
+@pytest.mark.parametrize("contiguous", [True, False])
+def test_softmax_parity_fallback(log, masking, causal, contiguous):
+    """Check that the fallback paths are correct"""
+    torch.random.manual_seed(0)
+
+    shape = (16, 16)
+
+    # Check the result of a FW pass
+    X = torch.normal(0, 1, size=shape, device="cpu", requires_grad=False)
+
+    if not contiguous:
+        # Make sure that the buffer is not contiguous
+        X = X.transpose(-2, -1).contiguous().transpose(-2, -1)
+
+    X_ = X.clone()
+    X.requires_grad = True
+    X_.requires_grad = True
+
+    seq = shape[1]
+    mask = torch.zeros((seq, seq))
+    if masking:
+        mask[torch.rand((seq, seq)) > 0.8] = -float("inf")
+
+    if causal:
+        mask[~torch.tril(torch.ones_like(mask)).bool()] = -float("inf")
+
+    y_torch = (
+        torch.log_softmax(X + mask, dim=-1) if log else torch.softmax(X + mask, dim=-1)
+    )
+    y_triton = (
+        triton_log_softmax(X_, mask, causal)
+        if log
+        else triton_softmax(X_, mask, causal)
+    )
+
+    assert torch.allclose(y_torch, y_triton, equal_nan=True)
+
+    print(y_torch)
+
+    # Check that BW also gives the same result
+    loss_torch = torch.norm(y_torch.transpose(-2, -1) @ y_torch)
+    loss_torch.backward()
+
+    loss_triton = torch.norm(y_triton.transpose(-2, -1) @ y_triton)
+    loss_triton.backward()
+
+    print(X.grad)
+    print(X_.grad)
+
+    assert torch.allclose(
+        torch.norm(X.grad), torch.norm(X_.grad), equal_nan=True, atol=1e-5
+    ), f"{torch.norm(X.grad)}, {torch.norm(X_.grad)}"
Repository: facebookresearch/xformers

Issue:
JIT scripting is broken
# 🐛 Bug
JIT scripting xformers (running commit 357545ae13948659db07428553155e1802ee15af)  breaks with the following error:

```bash
xformers/components/attention/attention_mask.py", line 128
    def __add__(self, other):
        assert isinstance(other, type(self))
                                 ~~~~~~~~~ <--- HERE
        return AttentionMask(self.values + other.values, is_causal=False)
'AttentionMask.__add__' is being compiled since it was called from '__torch__.xformers.components.attention.attention_mask.AttentionMask'
```

## To Reproduce

Blocks config:
```yaml
reversible: false
block_type: "encoder"
num_layers: 12
dim_model: 768
layer_norm_style: "pre"

multi_head_config:
  num_heads: 12
  residual_dropout: 0.0
  use_rotary_embeddings: false

  attention:
    name: "scaled_dot_product"
    dropout: 0.0
    causal: false

feedforward_config:
  name: "MLP"
  dropout: 0.0
  activation: "gelu"
  hidden_layer_multiplier: 4
```

Python code to repro:
```python
import yaml
import torch

from xformers.factory import xFormer, xFormerConfig

with open(xformer_config_file, "rb") as fileptr:  # above config
    model_config = yaml.load(fileptr, Loader=yaml.FullLoader)

torch.jit.script(xFormer.from_config(xFormerConfig([model_config])))
```



Discussion:
ah, torch script is annoyingly fragile.. This part is being completely rewritten by @fmassa, but in the meantime probably that we can remove the assert, more of a failsafe really

Resolving patch:
diff --git a/xformers/components/attention/attention_mask.py b/xformers/components/attention/attention_mask.py
--- a/xformers/components/attention/attention_mask.py
+++ b/xformers/components/attention/attention_mask.py
@@ -125,7 +125,6 @@ def shape(self):
         return self.values.shape
 
     def __add__(self, other):
-        assert isinstance(other, type(self))
         return AttentionMask(self.values + other.values, is_causal=False)
 
     def to(


Test patch: