internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: liqd/a4-meinberlin

Issue:
Missing template translations confirm-email
**URL:** https://meinberlin-dev.liqd.net/accounts/confirm-email/
**user:** user who want to register
**expected behaviour:** 
Translation is shown https://github.com/liqd/a4-meinberlin/blob/80ac3005df15322a330c2ce98833a11fb35d8bc8/locale/de_DE/LC_MESSAGES/django.po#L2180
From mail-override text https://github.com/liqd/a4-meinberlin/blob/80ac3005df15322a330c2ce98833a11fb35d8bc8/meinberlin/apps/contrib/django_standard_messages.py#L13
**behaviour:** django-allauth text is used and not translated https://github.com/pennersr/django-allauth/blob/672507e517eb762f76afae0ec3670d96c6afc143/allauth/templates/account/verified_email_required.html#L16
**important screensize:**
**device & browser:** 

**Comment/Question:** 
The same is true for https://meinberlin-dev.liqd.net/accounts/password/reset/done/ which also shows the django-allauth text https://github.com/pennersr/django-allauth/blob/672507e517eb762f76afae0ec3670d96c6afc143/allauth/templates/account/password_reset_done.html#L15
But this is the same issue, as override text and translation are also actually in our repo. 

Screenshot?
![image](https://user-images.githubusercontent.com/17978375/159699174-a7f4b0c5-57f9-4b2b-9315-360af59dc68f.png)




Discussion:
The third sentence "If you do not see the verification..." is missing from the text.

While you fix that in the standard messages and the translation file, can you also add the translation for the password reset to the standard messages? "We have sent you an e-mail. If you have not received it please check your spam folder. Otherwise contact us if you do not receive it in a few minutes."

Resolving patch:
diff --git a/meinberlin/apps/contrib/django_standard_messages.py b/meinberlin/apps/contrib/django_standard_messages.py
--- a/meinberlin/apps/contrib/django_standard_messages.py
+++ b/meinberlin/apps/contrib/django_standard_messages.py
@@ -12,7 +12,13 @@ def _(s):
       "you do not receive it within a few minutes."),
     _("We have sent an e-mail to you for verification. "
       "Follow the link provided to finalize the signup process. "
-      "Please contact us if you do not receive it within a few minutes."),
+      "If you do not see the verification e-mail in your main inbox, "
+      "check your spam folder. "
+      "Please contact us if you do not receive the verification e-mail "
+      "within a few minutes."),
+    _("We have sent you an e-mail. If you have not received it "
+      "please check your spam folder. Otherwise contact us if you "
+      "do not receive it in a few minutes."),
     _(u'You must select a minimum of  %(limit_value)d choices.'),
     _(u'You must select a maximum of  %(limit_value)d choices.'),
     _('Enter a valid email address.')


Test patch:
Repository: liqd/a4-meinberlin

Issue:
#6460 Previous/Next Button Poll Request Results no backround color
**URL:** https://meinberlin-dev.liqd.net/projekte/test-poll-merge-running-poll-with-user-content/
**user:** any
**expected behaviour:** Previous/Next button on the poll request results has a pink background.
**behaviour:** Button has no background. Only the outlines turn pink when the button is clicked
**important screensize:**
**device & browser:** 
**Comment/Question:** 

Screenshot?

dev:
<img width="286" alt="Bildschirmfoto 2022-11-09 um 05 38 05" src="https://user-images.githubusercontent.com/113356258/200740386-60d26bc2-f169-40e4-9730-79d6d8724dad.png">
<img width="220" alt="Bildschirmfoto 2022-11-09 um 05 40 30" src="https://user-images.githubusercontent.com/113356258/200740411-e40f6bf6-83ba-468f-a941-93bbfe045993.png">

stage:

<img width="189" alt="Bildschirmfoto 2022-11-09 um 05 44 21" src="https://user-images.githubusercontent.com/113356258/200740726-f116d498-cb19-4074-bd57-541f7d5d8d2a.png">



Discussion:

Resolving patch:
diff --git a/meinberlin/apps/ideas/views.py b/meinberlin/apps/ideas/views.py
--- a/meinberlin/apps/ideas/views.py
+++ b/meinberlin/apps/ideas/views.py
@@ -55,7 +55,7 @@ class IdeaFilterSet(a4_filters.DefaultsFilterSet):
 
     class Meta:
         model = models.Idea
-        fields = ['search', 'labels', 'category']
+        fields = ['search', 'category', 'labels']
 
 
 class AbstractIdeaListView(ProjectMixin,


Test patch:
Repository: liqd/a4-meinberlin

Issue:
No "moderation tasks" filter in participatory budget (one phase)
**URL:** https://meinberlin-dev.liqd.net/projekte/module/burgerhaushalt/?mode=list (list view)
or https://meinberlin-dev.liqd.net/dashboard/projects/burgerhaushalt-spandau/basic/ (dashboard)
**user:** Moderator, Admin
**expected behaviour:** When using participatory budget with one phase i want to be able to set up moderation tasks for the discussion of ideas and want to filter ideas with an filter "open moderationtasks"
**behaviour:** There is no filter "moderation tasks" in the list view of ideas in participatory budget (one phase) nor is there the possibility to create moderation tasks in the dashboard of the project
**important screensize:** no
**device & browser:** Mac/Windows Chrome, Edge Firefox, Iphone, Samsung Galaxy 20






Discussion:

Resolving patch:
diff --git a/meinberlin/apps/moderationtasks/dashboard.py b/meinberlin/apps/moderationtasks/dashboard.py
--- a/meinberlin/apps/moderationtasks/dashboard.py
+++ b/meinberlin/apps/moderationtasks/dashboard.py
@@ -17,7 +17,7 @@ class ModerationTasksComponent(ModuleFormSetComponent):
         'meinberlin_moderationtasks/moderation_tasks_form.html'
 
     def is_effective(self, module):
-        return module.blueprint_type in ['PB1', 'PB2', 'PB3']
+        return module.blueprint_type in ['PB', 'PB2', 'PB3']
 
 
 components.register_module(ModerationTasksComponent())


Test patch:
diff --git a/tests/moderationtasks/test_dashboard_components.py b/tests/moderationtasks/test_dashboard_components.py
--- a/tests/moderationtasks/test_dashboard_components.py
+++ b/tests/moderationtasks/test_dashboard_components.py
@@ -5,7 +5,7 @@
 
 @pytest.mark.django_db
 def test_module_moderation_tasks_settings(module_factory):
-    module_pb1 = module_factory(blueprint_type='PB1')
+    module_pb1 = module_factory(blueprint_type='PB')
     module_pb3 = module_factory(blueprint_type='PB3')
     module_ic = module_factory(blueprint_type='IC')
     component = ModerationTasksComponent()
Repository: liqd/a4-meinberlin

Issue:
Export-Button Problem in Modul "Brainstorming (with map)" on Prod, Stage and Dev
**URL:** https://meinberlin-dev.liqd.net/dashboard/projects/multimodul-test-merkmalkategorie/basic/
**user:** initiator, admin
**expected behaviour:** as I user I want to export all Ideas and Comments in all moduls which have Ideas/Proposals
**behaviour:** In the Modules "Brainstorming/Brainstorming with Map" I cannot see the Excel-Export-Button and therefore not export the ideas/comments in my project. 
**important screensize:** - 
**device & browser:** - 
**Comment/Question:** Every other modul with proposals/ideas has the excel-export-button. There's a workaround when recreating the right URL, I can get to the Excel-Export page. In this case: https://meinberlin-dev.liqd.net/dashboard/modules/brainstorming-mit-karte-7/export/mapidea/
<img width="311" alt="Bildschirm­foto 2023-02-03 um 10 50 25" src="https://user-images.githubusercontent.com/113608720/216568760-5075d601-eb68-44f1-9209-a3b547d994f9.png">


Screenshot?



Discussion:
How very weird. Good workaround you found, though!
I am agreeing with @Rineee : this should be in the prod release milestone. @CarolingerSeilchenspringer ?!
@Rineee @fuzzylogic2000 I added it to the prod release milestone.

Resolving patch:
diff --git a/meinberlin/apps/ideas/dashboard.py b/meinberlin/apps/ideas/dashboard.py
--- a/meinberlin/apps/ideas/dashboard.py
+++ b/meinberlin/apps/ideas/dashboard.py
@@ -15,7 +15,7 @@ class ExportIdeaComponent(DashboardComponent):
 
     def is_effective(self, module):
         return (
-            module.blueprint_type == "IC"
+            module.blueprint_type in ["IC", "BS"]
             and not module.project.is_draft
             and not module.is_draft
         )
diff --git a/meinberlin/apps/mapideas/dashboard.py b/meinberlin/apps/mapideas/dashboard.py
--- a/meinberlin/apps/mapideas/dashboard.py
+++ b/meinberlin/apps/mapideas/dashboard.py
@@ -15,7 +15,7 @@ class ExportMapIdeaComponent(DashboardComponent):
 
     def is_effective(self, module):
         return (
-            module.blueprint_type == "MIC"
+            module.blueprint_type in ["MIC", "MBS"]
             and not module.project.is_draft
             and not module.is_draft
         )


Test patch:
Repository: liqd/a4-meinberlin

Issue:
#6963 Too many codes in 1 package
URL: https://meinberlin-dev.liqd.net/dashboard/modules/burgerinnenhaushalt-3-phasen-21/download-codes/
user: admin, initiator
expected behaviour: Each code-package should contain a max. of 1.000.000 codes. ~~The wording of the helptext should have also the right number of 1.000.000 codes per package as each package should contain a maximum of 1.000.000 codes per excel-file.~~
behaviour: ~~the number in the wording of the helptext is "10.000.000" and~~ the packages can contain more than 1.000.000 codes.
important screensize: -
device & browser: mac ff
Comment/Question: I tried it with generating two mill codes and the codes were put in only one code-package. I also couldn't download the package probably because it was too big.

Linked: https://github.com/liqd/a4-meinberlin/issues/4907



Discussion:
@Rineee @fuzzylogic2000 is this due to here:
https://github.com/liqd/a4-meinberlin/blob/71a3bfbac3e9a0a189c0054ee7ea0b90d61fb717/meinberlin/apps/votes/tasks.py#L10
if so it seems deliberate, is this just relic from our old token system or is there a reason?
@phillimorland Yes, seems to be from that number. It was changed from slicing the packages directly in the export view to where you found it now. https://github.com/liqd/a4-meinberlin/commit/eacd22c795353a6a5a0ac9773f74dba6ae533bc5
Hopefully it works again, when you remove one zero.

Resolving patch:
diff --git a/meinberlin/apps/votes/tasks.py b/meinberlin/apps/votes/tasks.py
--- a/meinberlin/apps/votes/tasks.py
+++ b/meinberlin/apps/votes/tasks.py
@@ -5,9 +5,9 @@
 from meinberlin.apps.votes.models import get_token_12
 
 # Number of tokens to insert into database per bulk_create
-BATCH_SIZE = 1000000
+BATCH_SIZE = 100000
 # Max number of tokens in one download / package
-PACKAGE_SIZE = 10000000
+PACKAGE_SIZE = 1000000
 
 
 def generate_voting_tokens(module_id, number_of_tokens, existing_tokens):


Test patch:
Repository: liqd/a4-meinberlin

Issue:
breadcrumb navigation does not work properly
**URL:**https://meinberlin-dev.liqd.net/budgeting/2023-00998/
**user:** user with code
**expected behaviour:** breadcrumb navigation works properly
**behaviour:** project page, enter code above map, get redirected to list, vote on list, go into proposal detail -> breadbrumb is on "map". This does not happen when: project page, enter code above map, get redirected to list, go back to map, go back to list, vote on list, go into proposal detail
**important screensize:**
**device & browser:** tested firefox and safari
**Comment/Question:** 

Screenshot?



Discussion:

Resolving patch:
diff --git a/meinberlin/apps/budgeting/views.py b/meinberlin/apps/budgeting/views.py
--- a/meinberlin/apps/budgeting/views.py
+++ b/meinberlin/apps/budgeting/views.py
@@ -123,7 +123,6 @@ def post(self, request, *args, **kwargs):
                 datetime.datetime.now() + TOKEN_SESSION_EXPIRE
             ).timestamp()
             kwargs["valid_token_present"] = True
-            self.mode = "list"
         kwargs["token_form"] = token_form
         context = super().get_context_data(**kwargs)
         return self.render_to_response(context)


Test patch:
Repository: liqd/a4-meinberlin

Issue:
#7409 [mB] participatory budgeting from rating to support TOP PRIO - wrong wording 2 phase pb
**URL:** https://meinberlin-dev.liqd.net/dashboard/modules/burgerinnenhaushalt-2-phasen-11/phases/
**user:** admin, initiator, group-member
**expected behaviour:** English Wording for description of phase 2 in participatory budgeting with 2 phase should be: "Support the submitted proposals for the participatory budgeting, that you like"
**behaviour:** wrong English wording and therefore wrong German translation.
**important screensize:**
**device & browser:** 
**Comment/Question:** 

Screenshot?
<img width="836" alt="Bildschirm­foto 2023-06-21 um 16 24 42" src="https://github.com/liqd/a4-meinberlin/assets/113356258/84b0b566-ba4e-4a3d-b00a-0660669fbc76">






Discussion:

Resolving patch:
diff --git a/meinberlin/apps/budgeting/phases.py b/meinberlin/apps/budgeting/phases.py
--- a/meinberlin/apps/budgeting/phases.py
+++ b/meinberlin/apps/budgeting/phases.py
@@ -77,6 +77,20 @@ class RatingPhase(phases.PhaseContent):
     features = {"rate": (models.Proposal,)}
 
 
+class BudgetingTwoSupportPhase(phases.PhaseContent):
+    app = apps.Config.label
+    phase = "support_budgeting_two"
+    view = views.ProposalListView
+
+    name = _("Which of the submitted proposals would you like to support?")
+    description = _(
+        "Support the submitted proposals for the participatory budgeting that you like."
+    )
+    module_name = _("participatory budgeting 2 phases")
+
+    features = {"support": (models.Proposal,)}
+
+
 class SupportPhase(phases.PhaseContent):
     app = apps.Config.label
     phase = "support"
@@ -87,7 +101,7 @@ class SupportPhase(phases.PhaseContent):
         "The proposals with the most supporters will be "
         "examined and will then be put to the final vote."
     )
-    module_name = _("participatory budgeting 2 phases")
+    module_name = _("participatory budgeting 3 phases")
 
     features = {"support": (models.Proposal,)}
 
@@ -110,5 +124,6 @@ class VotingPhase(phases.PhaseContent):
 phases.content.register(RequestSupportPhase())
 phases.content.register(CollectPhase())
 phases.content.register(RatingPhase())
+phases.content.register(BudgetingTwoSupportPhase())
 phases.content.register(SupportPhase())
 phases.content.register(VotingPhase())
diff --git a/meinberlin/apps/dashboard/blueprints.py b/meinberlin/apps/dashboard/blueprints.py
--- a/meinberlin/apps/dashboard/blueprints.py
+++ b/meinberlin/apps/dashboard/blueprints.py
@@ -103,7 +103,7 @@
             ),
             content=[
                 budgeting_phases.CollectPhase(),
-                budgeting_phases.SupportPhase(),
+                budgeting_phases.BudgetingTwoSupportPhase(),
             ],
             image="images/participatory-budgeting-2.svg",
             settings_model=("a4maps", "AreaSettings"),


Test patch:
Repository: liqd/a4-meinberlin

Issue:
Wording: no formal adress regarding notice when comment is too long (missing String on Weblate)
**URL:** https://meinberlin-demo.liqd.net/budgeting/2023-00049/
**user:** any
**expected behaviour:** as a user on mein Berlin I want to be adressed in a formal way (Sie) 
**behaviour:** When I write a comment which is too long, I get a notice with an informal adress that the textfield should not contain more than 4000 characters.
**important screensize:** - 
**device & browser:** - 
**Comment/Question:** there is no string on weblate yet, so I cannot translate it correctly

Screenshot?
<img width="725" alt="Bildschirmfoto 2023-02-13 um 10 27 18" src="https://user-images.githubusercontent.com/113608720/219613075-f384b1ad-4227-4ee8-b4fc-c166d9ba3fe4.png">


Discussion:
Can you please check on dev? We don't know if that was an old thing or if it's already fixed when you find stuff on demo.
@fuzzylogic2000 same on dev

Resolving patch:
diff --git a/meinberlin/apps/contrib/django_standard_messages.py b/meinberlin/apps/contrib/django_standard_messages.py
--- a/meinberlin/apps/contrib/django_standard_messages.py
+++ b/meinberlin/apps/contrib/django_standard_messages.py
@@ -28,4 +28,5 @@ def _(s):
     _("You must select a minimum of  %(limit_value)d choices."),
     _("You must select a maximum of  %(limit_value)d choices."),
     _("Enter a valid email address."),
+    _("Ensure this field has no more than {max_length} characters."),
 ]


Test patch:
Repository: liqd/a4-meinberlin

Issue:
#7274 [mB] replace ck editor - CK Editor currently not translated to german
**URL:** https://meinberlin-dev.liqd.net
**user:** all users who have access to a CK-Editor textbox (for example, if you simply submit an idea). 
**expected behaviour:** Since meinBerlin is an german website, i want to have the content in german
**behaviour:** if i use an ck-editor textbox, It happens that texts is in English
**important screensize:** any
**device & browser:** any
**Comment/Question:** How does the CKEditor work with the translation? Is the process here also via Weblate? If so, the issue can of course be closed

Screenshot?
![Screenshot 2024-01-09 at 11-31-12 Dashboard](https://github.com/liqd/a4-meinberlin/assets/6682526/f6e6e96e-6211-43b5-b559-9866c40dd8e9)



Discussion:

Resolving patch:
diff --git a/meinberlin/config/settings/base.py b/meinberlin/config/settings/base.py
--- a/meinberlin/config/settings/base.py
+++ b/meinberlin/config/settings/base.py
@@ -536,6 +536,7 @@
 CKEDITOR_5_UPLOAD_FILE_TYPES = ["jpg", "jpeg", "png", "gif", "pdf", "docx"]
 CKEDITOR_5_CONFIGS = {
     "default": {
+        "language": "de",
         "toolbar": [
             "bold",
             "italic",
@@ -555,6 +556,7 @@
         "link": {"defaultProtocol": "https://"},
     },
     "image-editor": {
+        "language": "de",
         "toolbar": {
             "items": [
                 "bold",
@@ -591,6 +593,7 @@
         "link": {"defaultProtocol": "https://"},
     },
     "collapsible-image-editor": {
+        "language": "de",
         "toolbar": [
             "bold",
             "italic",
@@ -639,6 +642,7 @@
         },
     },
     "video-editor": {
+        "language": "de",
         "toolbar": ["mediaEmbed"],
         "mediaEmbed": {
             "removeProviders": [


Test patch:
Repository: sql-machine-learning/elasticdl

Issue:
Use stable hashing in ps client



Discussion:

Resolving patch:
diff --git a/python/tflib/ps/ps_client.py b/python/tflib/ps/ps_client.py
--- a/python/tflib/ps/ps_client.py
+++ b/python/tflib/ps/ps_client.py
@@ -1,5 +1,4 @@
-import future
-
+from binascii import crc32
 
 # No partition, all in the first ps
 def no_partition(v, ps_size):
@@ -8,6 +7,10 @@ def no_partition(v, ps_size):
 
 # Partition v according to the name hashing.
 def hash_partition(v, ps_size):
+    # a simple stable string hash
+    def _hash(s):
+        return crc32(s.encode())
+
     if v is None:
         return [None for i in range(ps_size)]
     if len(v) == 0:
@@ -18,13 +21,13 @@ def hash_partition(v, ps_size):
         # (name, data) dict from push
         results = [{} for i in range(ps_size)]
         for name, data in v.items():
-            index = hash(name) % ps_size
+            index = _hash(name) % ps_size
             results[index][name] = data
     elif isinstance(v, list):
         # name list from pull
         results = [[] for i in range(ps_size)]
         for name in v:
-            index = hash(name) % ps_size
+            index = _hash(name) % ps_size
             results[index].append(name)
     else:
         raise TypeError('Illegal v type %s, only dict or '


Test patch:
Repository: sql-machine-learning/elasticdl

Issue:
Swamp: experiment with evolution method (selection, crossover)
Currently, worker supports pulling the model from PS with a probability. This is equivalent as the selection in evolution.
We can also add crossover,  by combining the pulled model with the worker's current model (model average is the easiest choice), also with a probability.
Experiment with it to see if this will increase or decrease the training performance.



Discussion:

Resolving patch:
diff --git a/experimental/swamp-optimization/mnist/mnist.py b/experimental/swamp-optimization/mnist/mnist.py
--- a/experimental/swamp-optimization/mnist/mnist.py
+++ b/experimental/swamp-optimization/mnist/mnist.py
@@ -144,7 +144,12 @@ def _prepare_dataloader(self, batch_size):
 
     def _pull_model(self):
         trained_model = self._trained_model_wrapper.value
-        self._model.load_state_dict(trained_model.model_state)
+        if random.random() < self._args.crossover_probability:
+            s_dict = self._model.state_dict()
+            for k in trained_model.model_state:
+                s_dict[k] = (s_dict[k] + trained_model.model_state[k]) / 2
+        else:
+            self._model.load_state_dict(trained_model.model_state)
         self._score = trained_model.loss
         self._pulled_losses.append(self._score.data.item())
         self._pull_timestamps.append(self._timestamps())
@@ -306,6 +311,8 @@ def parse_args():
         help='how many batches to wait before logging training status')
     parser.add_argument('--pull-probability', type=float, default=0,
                         help='the probability of trainer pulling from ps')
+    parser.add_argument('--crossover-probability', type=float, default=0,
+                        help='the probability of crossover op for model pulling')
     parser.add_argument('--trainer-number', type=int, default=1,
                         help='the total number of trainer to launch')
     return parser.parse_args()


Test patch:
Repository: sql-machine-learning/elasticdl

Issue:
[clean up] Should check tf is running eagerly early
so the program can fail early if tf is configured wrong.


Discussion:

Resolving patch:
diff --git a/elasticdl/worker/worker.py b/elasticdl/worker/worker.py
--- a/elasticdl/worker/worker.py
+++ b/elasticdl/worker/worker.py
@@ -1,4 +1,6 @@
 import tensorflow as tf
+assert tf.executing_eagerly()
+
 from tensorflow.python.ops import math_ops
 from proto import master_pb2
 from proto import master_pb2_grpc
@@ -60,9 +62,6 @@ def local_train(self, batch_size, epoch=1, kwargs=None):
             kwargs: contains a dict of parameters used in training
         """
 
-        if not tf.executing_eagerly():
-            raise ValueError('Eager mode is required for LocalTrain')
-
         dataset = self._input_fn(kwargs)
         dataset = dataset.repeat(epoch).batch(batch_size)
         optimizer = self._opt_fn()


Test patch: