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

Issue:
Flatpaked Steam Not Detected 
steam is installed(flatpak). I am using lutris(flatpak) and steam is not showing up as a source.
![image](https://user-images.githubusercontent.com/34032665/187029295-c44440ef-6a87-486b-bdfe-5e18af906824.png)
file system permissions seem to be set correctly
![image](https://user-images.githubusercontent.com/34032665/187029366-2339f0fe-2970-4528-91f3-80d8218cc6c6.png)



Discussion:
Also encountered this issue. Tried uninstalling and wiping data on both Lutris and steam, but it still doesn't show. Permissions look correct. 

What's interesting is if I reinstall a game from my lutris profile that is from my Steam library, The game installs instantly and runs without issue. This will only work for games already on my lutris profile. So new games are still not showing.

Running fedora 36, lutris flatpack, steam flatpack

Resolving patch:
diff --git a/lutris/runners/steam.py b/lutris/runners/steam.py
--- a/lutris/runners/steam.py
+++ b/lutris/runners/steam.py
@@ -30,6 +30,7 @@ class steam(Runner):
     human_name = _("Steam")
     platforms = [_("Linux")]
     runner_executable = "steam"
+    runner_executable_flatpak = "com.valvesoftware.Steam"
     game_options = [
         {
             "option": "appid",
@@ -162,7 +163,7 @@ def get_executable(self):
         runner_executable = self.runner_config.get("runner_executable")
         if runner_executable and os.path.isfile(runner_executable):
             return runner_executable
-        return system.find_executable(self.runner_executable)
+        return system.find_executable(self.runner_executable) or system.find_executable(self.runner_executable_flatpak)
 
     @property
     def working_dir(self):
diff --git a/lutris/util/linux.py b/lutris/util/linux.py
--- a/lutris/util/linux.py
+++ b/lutris/util/linux.py
@@ -233,6 +233,7 @@ def has_steam(self):
         """Return whether Steam is installed locally"""
         return (
             bool(system.find_executable("steam"))
+            or bool(system.find_executable("com.valvesoftware.Steam"))
             or os.path.exists(os.path.expanduser("~/.steam/steam/ubuntu12_32/steam"))
         )
 


Test patch:
Repository: lutris/lutris

Issue:
[Feature Request] Make Locale dropdown list searchable
On Fedora and OpenSUSE, all locales are enabled by default. There are at least 100 of them, probably more. If you want to play some games in a certain locale, like English, and other games in Japanese, you can't set a global preference. It would be a lot easier if you could just search the locale dropdown to find the locale you need.

There is also no way that I know of to remove locales in OpenSUSE. `locale-gen` isn't even installed, there is no `/etc/locale.gen` file, and I only have a single language configured in YaST Sysconfig. I really don't think you're meant to disable locales at all in OpenSUSE.

Here's an idea of what the screen looks like on OpenSUSE:

![opensuse-locale-nightmare](https://github.com/lutris/lutris/assets/88186997/3dfb644b-c1e4-4ef6-b20c-13b70420e428)



Discussion:

Resolving patch:
diff --git a/lutris/sysoptions.py b/lutris/sysoptions.py
--- a/lutris/sysoptions.py
+++ b/lutris/sysoptions.py
@@ -495,10 +495,10 @@ def get_vk_icd_choices():
     {
         "section": "Game execution",
         "option": "locale",
-        "type": "choice",
+        "type": "choice_with_search",
         "label": _("Locale"),
         "choices": (
-            get_locale_choices()
+            get_locale_choices
         ),
         "default": "",
         "advanced": False,


Test patch:
Repository: lutris/lutris

Issue:
[Feature request] Support for all systemwide installed wine versions (Gentoo)
Gentoo is able to install multiple wine versions trough portage. Currently only the "default" version is useable in lutris, because symlinked into `$PATH/wine`.

The installed files looks like
```
$ ls /usr/lib/wine-*/*
/usr/lib/wine-proton-8.0.3c/bin:
msidb    notepad  regsvr32  wine    wine64-preloader  winebuild  wineconsole  winedbg   wineg++  winemine  wine-preloader  wmc
msiexec  regedit  widl      wine64  wineboot          winecfg    winecpp      winefile  winegcc  winepath  wineserver      wrc

/usr/lib/wine-proton-8.0.3c/wine:
i386-unix  i386-windows  x86_64-unix  x86_64-windows

/usr/lib/wine-staging-8.14/bin:
msidb    notepad  regsvr32  wine    wine64-preloader  winebuild  wineconsole  winedbg   wineg++  winemine  wine-preloader  wmc
msiexec  regedit  widl      wine64  wineboot          winecfg    winecpp      winefile  winegcc  winepath  wineserver      wrc

/usr/lib/wine-staging-8.14/wine:
i386-unix  i386-windows  x86_64-unix  x86_64-windows
```

It is possible that multiple staging or proton (and vanilla) versions are installed this way. It will be nice if all versions are useable in wine runner.


Discussion:
I am python beginner, therefore no PR from my site
Tried the next changes, that seems to work for me:

```
diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py
index d9feb8da..0763c1d4 100644
--- a/lutris/util/wine/wine.py
+++ b/lutris/util/wine/wine.py
@@ -23,6 +23,10 @@ WINE_PATHS = {
     "system": "wine",
 }
 
+for version in [p for p in os.listdir('/usr/lib/') if "wine-" in p]:
+    path = os.path.join("/usr/lib/", version, "bin/wine")
+    if os.path.isfile(path):
+        WINE_PATHS["System " + version] = path
 
 def get_playonlinux():
     """Return the folder containing PoL config files"""

```

Resolving patch:
diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py
--- a/lutris/util/wine/wine.py
+++ b/lutris/util/wine/wine.py
@@ -23,6 +23,19 @@
     "system": "wine",
 }
 
+# Insert additional system-wide Wine installations, such as are found
+# on Gentoo.
+try:
+    for _candidate in os.listdir('/usr/lib/'):
+        if _candidate.startswith("wine-"):
+            _wine_path = os.path.join("/usr/lib/", _candidate, "bin/wine")
+            if os.path.isfile(_wine_path):
+                WINE_PATHS["System " + _candidate] = _wine_path
+    _candidate = None
+    _wine_path = None
+except Exception as ex:
+    logger.exception("Unable to enumerate system Wine versions: %s", ex)
+
 
 def _iter_proton_locations():
     """Iterate through all existing Proton locations"""


Test patch:
Repository: lutris/lutris

Issue:
Need better feedback that virtual desktop is not supported with wine-GE
This is the latest [GloriousEggroll/wine-ge-custom](https://github.com/GloriousEggroll/wine-ge-custom) I got working with this game on Lutris. All further versions return error:
```
terminate called after throwing an instance of 'dxvk::DxvkError'
Monitored process exited.
Initial process has exited (return code: 768)
Exit with return code 768
```
I do have everything properly installed, all wine dependencies and 32 bit libs (`mesa` & `lib32-mesa` included)
`pacman -Qs vulkan`:
```
local/lib32-vulkan-icd-loader 1.3.269-1
    Vulkan Installable Client Driver (ICD) Loader (32-bit)
local/lib32-vulkan-intel 1:23.3.1-1
    Intel's Vulkan mesa driver (32-bit)
local/spirv-tools 2023.5-1 (vulkan-devel)
    API and commands for processing SPIR-V modules
local/vkd3d 1.9-1
    Direct3D 12 to Vulkan translation library By WineHQ
local/vulkan-headers 1:1.3.269-1 (vulkan-devel)
    Vulkan header files
local/vulkan-icd-loader 1.3.269-1
    Vulkan Installable Client Driver (ICD) Loader
local/vulkan-intel 1:23.3.1-1
    Intel's Vulkan mesa driver
local/vulkan-tools 1.3.269-1 (vulkan-devel)
    Vulkan Utilities and Tools
local/vulkan-validation-layers 1.3.268.0-1 (vulkan-devel)
    Vulkan Validation Layers
``` 
My iGPU is an `Intel UHD620`, the game was installed using the CD/DVD method

Help resolving this issue would be much appreciated


Discussion:
I get this 'dxvk::DxvkError' if I use the virtual desktop option, and it started happening after lutris-GE-Proton8-8
> I get this 'dxvk::DxvkError' if I use the virtual desktop option, and it started happening after lutris-GE-Proton8-8

Oh yea, disabling virtual desktop indeed fixes it for some reason.
virtual desktop is not supported with wine-GE, we have to add a warning for this



Resolving patch:
diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py
--- a/lutris/runners/wine.py
+++ b/lutris/runners/wine.py
@@ -117,6 +117,14 @@ def _get_fsync_warning(config, _option_key):
         return ""
 
 
+def _get_virtual_desktop_warning(config, _option_key):
+    if config.get("Desktop"):
+        version = config.get("version")
+        if "-ge-" in version.casefold():
+            return _("The virtual desktop feature is not supported on 'GE' Wine versions.")
+    return ""
+
+
 class wine(Runner):
     description = _("Runs Windows games")
     human_name = _("Wine")
@@ -417,6 +425,7 @@ def get_wine_version_choices():
                 "section": _("Virtual Desktop"),
                 "label": _("Windowed (virtual desktop)"),
                 "type": "bool",
+                "warning": _get_virtual_desktop_warning,
                 "default": False,
                 "help": _(
                     "Run the whole Windows desktop in a window.\n"


Test patch:
Repository: lutris/lutris

Issue:
"Accounts" tab in settings is blank
![image](https://github.com/lutris/lutris/assets/1454420/ad64e7a6-b8e2-4080-b031-da99b643279c)

When navigating to the "accounts" tab in the lutris settings (version 0.5.15), it is blank and I get this error. This is on Fedora 39 KDE.

```
2024-01-14 08:52:03,865: Error handling signal 'row-selected': 'PersonalName'
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/lutris/exception_backstops.py", line 79, in error_wrapper
    return handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/lutris/gui/config/preferences_dialog.py", line 109, in on_sidebar_activated
    generator()
  File "/usr/lib/python3.12/site-packages/lutris/gui/config/accounts_box.py", line 33, in populate_accounts
    account["PersonalName"]
    ~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'PersonalName'
```

My only guess is that my steam display name has a " / " in it. But I'm not sure.

I have both Steam RPM and Steam flatpak installed.


Discussion:
Good thing I made this lazy load, or the whole dialog would be disabled.

It looks like your Steam account has no Personal Name; I don't know why that would happen. But I have tweaked the master branch to cope by showing the steam account ID instead in this case. Ugly but better than crashing.

There may be some sort of impersonal name we should be using here, but I don't know Steam too well.

Please download the master branch and run the bin/lutris script within- no need to install. Is the Accounts tab less blank now?
Yeah, the master branch works, but is the steam account ID supposed to be a string of numbers?
It's an ID, but not a very good name. I don't have a Steam account to try this with, so I am not too sure what other name we could show here.

@strycore, Can you take a look at this? We might be able to do better than "don't crash" here.

Resolving patch:
diff --git a/lutris/gui/config/accounts_box.py b/lutris/gui/config/accounts_box.py
--- a/lutris/gui/config/accounts_box.py
+++ b/lutris/gui/config/accounts_box.py
@@ -29,7 +29,7 @@ def populate_accounts(self):
         steam_users = get_steam_users()
         for account in steam_users:
             steamid64 = account["steamid64"]
-            name = account.get("PersonalName") or f"#{steamid64}"
+            name = account.get("PersonaName") or f"#{steamid64}"
             radio_button = Gtk.RadioButton.new_with_label_from_widget(main_radio_button, name)
             radio_button.set_margin_top(16)
             radio_button.set_margin_start(16)


Test patch:
Repository: open-mmlab/mmdetection

Issue:
When resize_keep_ratio is False, rescaling for masks does not work.
Thanks for your error report and we appreciate it a lot.

**Checklist**
1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version.

**Describe the bug**

When `resize_keep_ratio=False`, rescaling for masks in loading the dataset will not work. The error is:
```
Scale must be a number or tuple of int, but got <class 'numpy.ndarray'>
```



Discussion:
Thanks for reporting! It will be fixed.
https://github.com/open-mmlab/mmdetection/pull/883
here are the bug fix pr.
@liushuchun It is not related to this bug.

Resolving patch:
diff --git a/mmdet/datasets/transforms.py b/mmdet/datasets/transforms.py
--- a/mmdet/datasets/transforms.py
+++ b/mmdet/datasets/transforms.py
@@ -34,8 +34,8 @@ def __call__(self, img, scale, flip=False, keep_ratio=True):
         else:
             img, w_scale, h_scale = mmcv.imresize(
                 img, scale, return_scale=True)
-            scale_factor = np.array(
-                [w_scale, h_scale, w_scale, h_scale], dtype=np.float32)
+            scale_factor = np.array([w_scale, h_scale, w_scale, h_scale],
+                                    dtype=np.float32)
         img_shape = img.shape
         img = mmcv.imnormalize(img, self.mean, self.std, self.to_rgb)
         if flip:
@@ -99,10 +99,24 @@ class MaskTransform(object):
     """
 
     def __call__(self, masks, pad_shape, scale_factor, flip=False):
-        masks = [
-            mmcv.imrescale(mask, scale_factor, interpolation='nearest')
-            for mask in masks
-        ]
+        # aspect ratio unchanged
+        if isinstance(scale_factor, float):
+            masks = [
+                mmcv.imrescale(mask, scale_factor, interpolation='nearest')
+                for mask in masks
+            ]
+        # aspect ratio changed
+        else:
+            w_ratio, h_ratio = scale_factor[:2]
+            if masks:
+                h, w = masks[0].shape[:2]
+                new_h = int(np.round(h * h_ratio))
+                new_w = int(np.round(w * w_ratio))
+                new_size = (new_w, new_h)
+                masks = [
+                    mmcv.imresize(mask, new_size, interpolation='nearest')
+                    for mask in masks
+                ]
         if flip:
             masks = [mask[:, ::-1] for mask in masks]
         padded_masks = [


Test patch:
Repository: open-mmlab/mmdetection

Issue:
ImportError: cannot import name 'build_sampler' from 'mmdet.core.bbox.assign_sampling' 
I have successful install the mmdetection by the command "pip install -v -e .". But I have the problem in the test. Would anyone help me ?

(lab) gpuserver@ubuntu:~/ht/labs/mmdetection-master$ python
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mmdet.apis import init_detector
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/apis/__init__.py", line 2, in <module>
    from .inference import inference_detector, init_detector, show_result
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/apis/inference.py", line 9, in <module>
    from mmdet.core import get_classes
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/__init__.py", line 1, in <module>
    from .anchor import *  # noqa: F401, F403
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/anchor/__init__.py", line 2, in <module>
    from .anchor_target import anchor_inside_flags, anchor_target
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/anchor/anchor_target.py", line 3, in <module>
    from ..bbox import PseudoSampler, assign_and_sample, bbox2delta, build_assigner
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/bbox/__init__.py", line 1, in <module>
    from .assign_sampling import assign_and_sample, build_assigner, build_sampler
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/bbox/assign_sampling.py", line 3, in <module>
    from . import assigners, samplers
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/bbox/samplers/__init__.py", line 2, in <module>
    from .combined_sampler import CombinedSampler
  File "/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/bbox/samplers/combined_sampler.py", line 1, in <module>
    from ..assign_sampling import build_sampler
ImportError: cannot import name 'build_sampler' from 'mmdet.core.bbox.assign_sampling' (/home/gpuserver/ht/labs/mmdetection-master/mmdet/core/bbox/assign_sampling.py)


Discussion:
I encountered the same error today. 
same problem here.

Resolving patch:
diff --git a/mmdet/core/bbox/__init__.py b/mmdet/core/bbox/__init__.py
--- a/mmdet/core/bbox/__init__.py
+++ b/mmdet/core/bbox/__init__.py
@@ -1,4 +1,3 @@
-from .assign_sampling import assign_and_sample, build_assigner, build_sampler
 from .assigners import AssignResult, BaseAssigner, MaxIoUAssigner
 from .bbox_target import bbox_target
 from .geometry import bbox_overlaps
@@ -9,6 +8,9 @@
                          bbox_mapping, bbox_mapping_back, delta2bbox,
                          distance2bbox, roi2bbox)
 
+from .assign_sampling import (  # isort:skip, avoid recursive imports
+    assign_and_sample, build_assigner, build_sampler)
+
 __all__ = [
     'bbox_overlaps', 'BaseAssigner', 'MaxIoUAssigner', 'AssignResult',
     'BaseSampler', 'PseudoSampler', 'RandomSampler',


Test patch:
Repository: open-mmlab/mmdetection

Issue:
Cannot reproduce the results of SSD-300 on WIDER_FACE
Hi @sovrasov,
Recently, I'm reproducing the results of SSD-300 on WIDER_FACE.
I use the provided config based on mmdetection and get Recall 36.9, Precision 0.023 and AP 27.3.
The results are worse than Recall 43.4, Precision 0.029 and AP 34.7 (shown in https://github.com/open-mmlab/mmdetection/pull/765#issuecomment-502579220).

Generally, the models provided by mmdetection are trained on 8 gpus. So, is the SSD-300 on WIDER_FACE also trained on 8 gpus? If so, maybe I will change the learning rate because I trained the model on 4 gpus.

Moreover, any other advice?

Thanks a lot.



Discussion:
The problem should be in the learning rate value.
As far as I remember this config is for one or two GPUs, so you have to increase the LR in 2 or 4 times.
That's my fault, I didn't provide the correct LR for 8 GPUs.
Thanks a lot. I will try it.
@sovrasov Maybe you could open a PR to fix that.
@sovrasov @hellock 
I have tried some training settings. In these experiments, I only changed the #GPU and LR. When adopting lr=0.0015 and training the SSD-300 on 1 GPU, I can get the comparable performance as @sovrasov.

![image](https://user-images.githubusercontent.com/11239351/70414042-e4d68480-1a93-11ea-9f14-c1a53fb6ee24.png)
Nice! According to these results most likely I had used 2 gpus with lr=1e-3.
I'll create a PR with lr changed to 8*1.5e-3 for 8 GPUs.

Resolving patch:
diff --git a/configs/wider_face/ssd300_wider_face.py b/configs/wider_face/ssd300_wider_face.py
--- a/configs/wider_face/ssd300_wider_face.py
+++ b/configs/wider_face/ssd300_wider_face.py
@@ -107,7 +107,7 @@
         img_prefix=data_root + 'WIDER_val/',
         pipeline=test_pipeline))
 # optimizer
-optimizer = dict(type='SGD', lr=1e-3, momentum=0.9, weight_decay=5e-4)
+optimizer = dict(type='SGD', lr=0.012, momentum=0.9, weight_decay=5e-4)
 optimizer_config = dict()
 # learning policy
 lr_config = dict(


Test patch:
Repository: open-mmlab/mmdetection

Issue:
Why ga_shape_target_single() return (None,) *6
I got ValueError:not enough values to unpack(expected 5)  whe using ga_shape_target_single(), and found that 
`if not inside_flags.any(): return (None,) *6` but I notice that this function returns a 5-tuple in `inside_flags.any()=True` case.  


Discussion:
Looks like a bug. Feel free to fix that with a PR.

Resolving patch:
diff --git a/mmdet/core/anchor/guided_anchor_target.py b/mmdet/core/anchor/guided_anchor_target.py
--- a/mmdet/core/anchor/guided_anchor_target.py
+++ b/mmdet/core/anchor/guided_anchor_target.py
@@ -250,7 +250,7 @@ def ga_shape_target_single(flat_approxs,
         tuple
     """
     if not inside_flags.any():
-        return (None, ) * 6
+        return (None, ) * 5
     # assign gt and sample anchors
     expand_inside_flags = inside_flags[:, None].expand(
         -1, approxs_per_octave).reshape(-1)


Test patch:
Repository: open-mmlab/mmdetection

Issue:
CUDA error: device-side assert triggered
The error is related to learning_rate, I want to use 4 gpus and each gpu has 24 images to train ssd, so according to your markdown, I should set lr = 3e-3, but CUDA error occurs, if I decreasing the lr, the problem is fixed, so what's the problem?


Discussion:
I guess the training diverge at the begining, you can try a few more times. If you fail every time, you can reduce the `warmup_ratio`, for example, you can reduce from `1.0 / 3` to `1.0 / 10`. 

I try to run ssd300_coco and ssd300_voc with 4gpu, 24 imgs per gpu and lr of 3e-3, they run wihout any problem.
@yzl96 i have met the same error while train SSD using ssd300_coco config file, have you found the reason for this?

Resolving patch:
diff --git a/mmdet/models/anchor_heads/ssd_head.py b/mmdet/models/anchor_heads/ssd_head.py
--- a/mmdet/models/anchor_heads/ssd_head.py
+++ b/mmdet/models/anchor_heads/ssd_head.py
@@ -182,6 +182,12 @@ def loss(self,
         all_bbox_weights = torch.cat(bbox_weights_list,
                                      -2).view(num_images, -1, 4)
 
+        # check NaN and Inf
+        assert torch.isfinite(all_cls_scores).all().item(), \
+            'classification scores become infinite or NaN!'
+        assert torch.isfinite(all_bbox_preds).all().item(), \
+            'bbox predications become infinite or NaN!'
+
         losses_cls, losses_bbox = multi_apply(
             self.loss_single,
             all_cls_scores,


Test patch:
Repository: open-mmlab/mmdetection

Issue:
Fovea doesn't support pictures without annotations
Hello! I tried to start training of Fovea Model, using config `fovea_align_gn_ms_r50_fpn_4gpu_2x.py`, but faced next error in file `mmdet/models/anchor_heads/fovea_head.py`:
```
gt_areas = torch.sqrt((gt_bboxes_raw[:, 2] - gt_bboxes_raw[:, 0]) *
IndexError: index 2 is out of bounds for dimension 1 with size 2
```
When I debugged this problem, I found that `gt_bboxes_raw = torch([])` and `gt_labels_raw = torch([])`, so it is obviously problem with empty pictures. I tried to turn them off with next thing in Albumentation augmentations: 
```
skip_img_without_anno=True,
```
And then with start of training my computer with 3 GPUs just turns off(actually just monitor turns off, computer seems to be working).
What should I do? I think it is bug with empty pictures support for all models.


Discussion:

Resolving patch:
diff --git a/mmdet/datasets/pipelines/transforms.py b/mmdet/datasets/pipelines/transforms.py
--- a/mmdet/datasets/pipelines/transforms.py
+++ b/mmdet/datasets/pipelines/transforms.py
@@ -838,6 +838,7 @@ def __call__(self, results):
             if isinstance(results['bboxes'], list):
                 results['bboxes'] = np.array(
                     results['bboxes'], dtype=np.float32)
+            results['bboxes'] = results['bboxes'].reshape(-1, 4)
 
             # filter label_fields
             if self.filter_lost_elements:
@@ -858,6 +859,7 @@ def __call__(self, results):
         if 'gt_labels' in results:
             if isinstance(results['gt_labels'], list):
                 results['gt_labels'] = np.array(results['gt_labels'])
+            results['gt_labels'] = results['gt_labels'].astype(np.int64)
 
         # back to the original format
         results = self.mapper(results, self.keymap_back)


Test patch: