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

Issue:
模型预测出错 TypeError: predict() got an unexpected keyword argument 'auc_roc'
### 问题确认 Search before asking

- [X] 我已经查询[历史issue](https://github.com/PaddlePaddle/PaddleSeg/issues)(包括open与closed)，没有发现相似的bug。I have searched the [open and closed issues](https://github.com/PaddlePaddle/PaddleSeg/issues) and found no similar bug report.


### Bug描述 Describe the Bug

我在训练完unet之后，想用模型预测去查看输出的图片
python tools/predict.py \
       --config configs/unet/unet_drive_128x128_40k.yml \
       --model_path output/drive/best_model/model.pdparams \
       --image_path data/DRIVE/images/training/21.png \
       --save_dir output/drive/result
然后就报出这个错误。经过查阅，我发现auc_roc在drive.yml里的
test_config:
  auc_roc: True


报错文本如下
W0728 08:50:13.112543 40846 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.4, Runtime API Version: 10.2
W0728 08:50:13.112588 40846 gpu_resources.cc:149] device: 0, cuDNN Version: 8.2.
2023-07-28 08:50:15 [INFO]	The number of images: 1
Traceback (most recent call last):
  File "/root/distil-unet1/PaddleSeg-release-2.8/tools/predict.py", line 145, in <module>
    main(args)
  File "/root/distil-unet1/PaddleSeg-release-2.8/tools/predict.py", line 140, in main
    **test_config)
TypeError: predict() got an unexpected keyword argument 'auc_roc'

### 复现环境 Environment

platform: Linux-5.4.0-84-generic-x86_64-with-debian-buster-sid
Python: 3.7.13 (default, Mar 29 2022, 02:18:16) [GCC 7.5.0]
Paddle compiled with cuda: True
NVCC: Build cuda_11.2.r11.2/compiler.29558016_0
cudnn: 8.2
GPUs used: 1
CUDA_VISIBLE_DEVICES: 7
GPU: ['GPU 0: Tesla T4', 'GPU 1: Tesla T4', 'GPU 2: Tesla T4', 'GPU 3: Tesla T4', 'GPU 4: Tesla T4', 'GPU 5: Tesla T4', 'GPU 6: Tesla T4', 'GPU 7: Tesla T4']
GCC: gcc (GCC) 8.2.0
PaddleSeg: 2.8.0
PaddlePaddle: 2.5.0
OpenCV: 4.5.5


### Bug描述确认 Bug description confirmation

- [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息，确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.


### 是否愿意提交PR？ Are you willing to submit a PR?

- [X] 我愿意提交PR！I'd like to help by submitting a PR!


Discussion:
是bug，本来应该用于evaluate的，后续会进行修复

Resolving patch:
diff --git a/tools/predict.py b/tools/predict.py
--- a/tools/predict.py
+++ b/tools/predict.py
@@ -17,10 +17,10 @@
 
 import paddle
 
-from paddleseg.cvlibs import manager, Config, SegBuilder
-from paddleseg.utils import get_sys_env, logger, get_image_list, utils
 from paddleseg.core import predict
+from paddleseg.cvlibs import Config, SegBuilder, manager
 from paddleseg.transforms import Compose
+from paddleseg.utils import get_image_list, get_sys_env, logger, utils
 
 
 def parse_args():
@@ -105,6 +105,8 @@ def merge_test_config(cfg, args):
     test_config = cfg.test_config
     if 'aug_eval' in test_config:
         test_config.pop('aug_eval')
+    if 'auc_roc' in test_config:
+        test_config.pop('auc_roc')
     if args.aug_pred:
         test_config['aug_pred'] = args.aug_pred
         test_config['scales'] = args.scales


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
Support circular beds in g-code visualiser
With delta printers we have center of bed at center of coordinate system. So now in G-code visualizer i get my objects in corner of bed. Pronterface has offset or center setting for this case, and repetier host has just checkbox "origin in center of bed" or similar.

Also would be nice to have round grid, like that in pronterface.



Discussion:

Resolving patch:
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -97,7 +97,7 @@ def settings(init=False, configfile=None, basedir=None):
 			{"x": 0.0, "y": 0.0}
 		],
 		"bedDimensions": {
-			"x": 200.0, "y": 200.0
+			"x": 200.0, "y": 200.0, "r": 100
 		}
 	},
 	"appearance": {


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
Daemonized OctoPrint doesn't clean up its pidfile when receiving a TERM signal
1. What were you doing?
   
   Writing a rc.d script for FreeBSD.
2. What did you expect to happen?
   
   OctoPrint would clean up its pidfile after a graceful exit.
3. What happened instead?
   
   The pidfile remained in place. This caused an "already running" error to occur when I attempted to run the daemon again.
4. Branch & Commit or Version:
   
   devel 3d5fdf2a917833808f132212b76ad3c6c5768419
5. Printer model & used firmware incl. version
   
   Not relevant.
6. Link to octoprint.log on gist.github.com or pastebin.com:
   
   Not relevant.
7. Link to contents of terminal tab on gist.github.com or pastebin.com:
   
   https://gist.github.com/rspeed/d37acd6fc447eac1cb3e
# Notes

The base issue is that `daemon.py` uses `atexit`, which states in [its documentation](https://docs.python.org/2/library/atexit.html):

> The functions registered via this module are not called when the program is killed by a signal not handled by Python

Since SIGTERM is the standard POSIX way to ask a daemon to quit, and since daemons are supposed to clean up after themselves, this design requires unusual and fragile behavior in init scripts. Specifically, I noticed that the init script has this line:

> rm -f $PIDFILE

That's generally considered to be a bad practice.



Discussion:

Resolving patch:
diff --git a/src/octoprint/daemon.py b/src/octoprint/daemon.py
--- a/src/octoprint/daemon.py
+++ b/src/octoprint/daemon.py
@@ -4,7 +4,7 @@
 Originally from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/#c35
 """
 
-import sys, os, time, atexit, signal
+import sys, os, time, signal
 
 class Daemon:
 	"""A generic daemon class.
@@ -53,14 +53,16 @@ def daemonize(self):
 		os.dup2(se.fileno(), sys.stderr.fileno())
 	
 		# write pidfile
-		atexit.register(self.delpid)
-
 		pid = str(os.getpid())
 		with open(self.pidfile,'w+') as f:
 			f.write(pid + '\n')
-	
-	def delpid(self):
+
+		# register listener for SIGTERM
+		signal.signal(signal.SIGTERM, self.term)
+
+	def term(self, _signo, _stack_frame):
 		os.remove(self.pidfile)
+		sys.exit(0)
 
 	def start(self):
 		"""Start the daemon."""


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
Add more longRunningCommands (Specifically M400)
1. What were you doing?

> Running a print that makes liberal use of `M400`s
1. What did you expect to happen?

> The print to finish to completion
1. What happened instead?

> The print failed with a communication error
1. Branch & Commit or Version of OctoPrint:

> Version: 1.3.0-dev-71-g3cb8757 (HEAD branch)
1. Printer model & used firmware incl. version
   (if applicable - always include if unsure):

> Marlin Integration Branch (3c54992c1c76af1c4206fb4b1ae915ad6873f3bb)
1. Browser and Version of Browser, Operating 
   System running Browser (if applicable - always 
   include if unsure):

> Chrome on Windows
1. Link to octoprint.log on gist.github.com or pastebin.com
   (ALWAYS INCLUDE AND DO NOT TRUNCATE):

> N/A
1. Link to contents of terminal tab or serial.log on 
   gist.github.com or pastebin.com (if applicable - always 
   include if unsure or reporting communication issues AND
   DO NOT TRUNCATE):

> N/A
1. Link to contents of Javascript console in the browser 
   on gist.github.com or pastebin.com or alternatively a
   screenshot (if applicable - always include if unsure
   or reporting UI issues):

> N/A
1. Screenshot(s) showing the problem (if applicable - always
   include if unsure or reporting UI issues):

> N/A

I have read the FAQ.

I use M400 a good amount in my GCode, and that combined with a large move buffer can cause >30s delay between sending and recieving the response. This is fixed by adding M400 to the "Long running commands" list in the settings. I think it should be there by default.



Discussion:

Resolving patch:
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -83,7 +83,7 @@ def settings(init=False, basedir=None, configfile=None):
 			"sdStatus": 1
 		},
 		"additionalPorts": [],
-		"longRunningCommands": ["G4", "G28", "G29", "G30", "G32"]
+		"longRunningCommands": ["G4", "G28", "G29", "G30", "G32", "M400", "M226"]
 	},
 	"server": {
 		"host": "0.0.0.0",


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[BUG] Plugin Manager no longer supports gzip asset releases
#### What were you doing?

1. Open Plugin Manager
2. Click on `Get More`
3. Find GPX plugin from the repo
4. Click Install
5 Immediate Error

#### What did you expect to happen?

Plugin to install as it did before in older releases of OctoPrint.

#### What happened instead?

Received error in screenshot section below.

#### Did the same happen when running OctoPrint in safe mode?

N/A

#### Version of OctoPrint

1.4.2

#### Operating System running OctoPrint

OctoPi 0.18

#### Printer model & used firmware incl. version

N/A

#### Browser and version of browser, operating system running browser

Google Chrome Version 84.0.4147.135 (Official Build) (64-bit)

#### Link to octoprint.log

[octoprint (14).log](https://github.com/OctoPrint/OctoPrint/files/5110807/octoprint.14.log)

#### Link to contents of terminal tab or serial.log

N/A

#### Link to contents of Javascript console in the browser

N/A

#### Screenshot(s)/video(s) showing the problem:

![image](https://user-images.githubusercontent.com/5249455/90926261-c2d22780-e3c0-11ea-9a75-fa252fb2fc52.png)

I have read the FAQ.



Discussion:

Resolving patch:
diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py
--- a/src/octoprint/plugins/pluginmanager/__init__.py
+++ b/src/octoprint/plugins/pluginmanager/__init__.py
@@ -94,7 +94,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
                           octoprint.plugin.BlueprintPlugin,
                           octoprint.plugin.EventHandlerPlugin):
 
-	ARCHIVE_EXTENSIONS = (".zip", ".tar.gz", ".tgz", ".tar")
+	ARCHIVE_EXTENSIONS = (".zip", ".tar.gz", ".tgz", ".tar", ".gz")
 	PYTHON_EXTENSIONS = (".py",)
 
 	# valid pip install URL schemes according to https://pip.pypa.io/en/stable/reference/pip_install/


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[Request] Turn off "Internal" filename display
Is there a way, or could you add a way (in the general preferences), to turn off the display of the "internal filename" in the list of files?  It takes a lot of room (my filenames are long and show a bunch of information about the file, using the "GCODE Filename Format" plugin in Cura, and I've never understood, nor needed, the ability to display the internal filename.

![CR-10v2 (Blue)  OctoPrint](https://user-images.githubusercontent.com/57936294/86654471-d3f2e080-bf9a-11ea-8701-1d84ea676d45.jpg)





Discussion:

Resolving patch:
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py
--- a/src/octoprint/server/api/settings.py
+++ b/src/octoprint/server/api/settings.py
@@ -114,6 +114,7 @@ def getSettings():
             "showFahrenheitAlso": s.getBoolean(["appearance", "showFahrenheitAlso"]),
             "fuzzyTimes": s.getBoolean(["appearance", "fuzzyTimes"]),
             "closeModalsWithClick": s.getBoolean(["appearance", "closeModalsWithClick"]),
+            "showInternalFilename": s.getBoolean(["appearance", "showInternalFilename"]),
         },
         "printer": {
             "defaultExtrusionLength": s.getInt(
@@ -509,6 +510,11 @@ def _saveSettings(data):
                 ["appearance", "closeModalsWithClick"],
                 data["appearance"]["closeModalsWithClick"],
             )
+        if "showInternalFilename" in data["appearance"]:
+            s.setBoolean(
+                ["appearance", "showInternalFilename"],
+                data["appearance"]["showInternalFilename"],
+            )
 
     if "printer" in data:
         if "defaultExtrusionLength" in data["printer"]:
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -304,6 +304,7 @@ def settings(init=False, basedir=None, configfile=None):
         "showFahrenheitAlso": False,
         "fuzzyTimes": True,
         "closeModalsWithClick": True,
+        "showInternalFilename": True,
         "components": {
             "order": {
                 "navbar": [


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[1.5.0rc1] Error on translation upload
#### What were you doing?

Uploading a translation file, attached.

[OctoPrint.1.5.0rc1.-.Pack.Langue.FR.zip](https://github.com/OctoPrint/OctoPrint/files/5540089/OctoPrint.1.5.0rc1.-.Pack.Langue.FR.zip)

#### What did you expect to happen?

File to upload and translation to be available.

#### What happened instead?

Nothing

#### Did the same happen when running OctoPrint in safe mode?

Yes

#### Version of OctoPrint

1.5.0rc1

#### Operating System running OctoPrint

octopi 0.18 nightly

#### Printer model & used firmware incl. version

N/A

#### Browser and version of browser, operating system running browser

Google Chrome Version 86.0.4240.198 (Official Build) (64-bit) on Windows 10

#### Link to octoprint.log

[octoprint.log](https://github.com/OctoPrint/OctoPrint/files/5540091/octoprint.log)

#### Link to contents of terminal tab or serial.log

N/A

#### Link to contents of Javascript console in the browser

Just a 500 Server error warning.

#### Screenshot(s)/video(s) showing the problem:

I have read the FAQ.



Discussion:
Analysed, Python 2/3 issue - in Py2, `filter()` returned a list. In Py3, it returns an iterable. The problem:
https://github.com/OctoPrint/OctoPrint/blob/b7a45b79bf86339f0b28177ac1eaebb56d00ea37/src/octoprint/server/api/languages.py#L143-L149
In https://github.com/tjjfvi/OctoPrint-IFTTT/pull/35 I just converted it to a list again, will test that this works in this case and prepare a PR.

Resolving patch:
diff --git a/src/octoprint/server/api/languages.py b/src/octoprint/server/api/languages.py
--- a/src/octoprint/server/api/languages.py
+++ b/src/octoprint/server/api/languages.py
@@ -140,8 +140,10 @@ def uploadLanguagePack():
     upload_name = request.values[input_upload_name]
     upload_path = request.values[input_upload_path]
 
-    exts = filter(
-        lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar")
+    exts = list(
+        filter(
+            lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar")
+        )
     )
     if not len(exts):
         return make_response(


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[maintenance] 404 errors downloading logs
### The problem

Click download on a log file, find 404 errors

Just heading to http://localhost:5000/downloads/logs/octoprint.log sends to a 404.

### Did the issue persist even in safe mode?

Yes, it did persist

### If you could not test in safe mode, please state why

_No response_

### Version of OctoPrint

 OctoPrint 1.6.0.dev379+gb5b1e8a81

### Operating system running OctoPrint

Windows 10

### Printer model & used firmware incl. version

NA

### Browser and version of browser, operating system running browser

NA

### Checklist of files to include below

- [X] octoprint.log
- [ ] serial.log or contents of your terminal tab (always include in cases of issues with printer communication)
- [ ] Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- [ ] Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
- [ ] GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)

https://pastebin.com/5sudVTSv

Problem code is here:
https://github.com/OctoPrint/OctoPrint/blob/b5b1e8a812570b23ce3adc1f972744b59cb21982/src/octoprint/server/__init__.py#L769-L775

* Hidden path passes
* log ending passes
* `os.path.realpath(os.path.abspath(path))` gave me `'C:\\Program Files\\JetBrains\\PyCharm 2020.2.1\\jbr\\bin\\octoprint.log'`

Will look and see if I can fix this now.


Discussion:

Resolving patch:
diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py
--- a/src/octoprint/server/__init__.py
+++ b/src/octoprint/server/__init__.py
@@ -766,13 +766,9 @@ def download_name_generator(path):
             )
         }
 
-        valid_log = (
-            lambda path: not octoprint.util.is_hidden_path(path)
-            and path.endswith(".log")
-            and os.path.realpath(os.path.abspath(path)).startswith(
-                settings().getBaseFolder("logs")
-            )
-        )
+        valid_log = lambda path: not octoprint.util.is_hidden_path(
+            path
+        ) and path.endswith(".log")
         log_path_validator = {
             "path_validation": util.tornado.path_validation_factory(
                 valid_log,


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[Request] Remember (and restore) last opened folder in Files list
Currently, the "Files" list is reset (at the root of files) each time octoprint is loaded.
I'd like it to be restored on the last opened folder.



Discussion:
Should be doable by writing the selected folder to local storage on change.

Related: 

  * `src/octoprint/static/js/app/viewmodels/files.js`
  * https://github.com/OctoPrint/OctoPrint/blob/5f7679b11baafc0bb58861c462b9e4568041080b/src/octoprint/static/js/app/helpers.js#L1574
  * https://github.com/OctoPrint/OctoPrint/blob/5f7679b11baafc0bb58861c462b9e4568041080b/src/octoprint/static/js/app/helpers.js#L1579

Minor enhancement -> `maintenance` branch.

Resolving patch:
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py
--- a/src/octoprint/server/api/settings.py
+++ b/src/octoprint/server/api/settings.py
@@ -150,6 +150,7 @@ def getSettings():
             "keyboardControl": s.getBoolean(["feature", "keyboardControl"]),
             "pollWatched": s.getBoolean(["feature", "pollWatched"]),
             "modelSizeDetection": s.getBoolean(["feature", "modelSizeDetection"]),
+            "rememberFileFolder": s.getBoolean(["feature", "rememberFileFolder"]),
             "printStartConfirmation": s.getBoolean(["feature", "printStartConfirmation"]),
             "printCancelConfirmation": s.getBoolean(
                 ["feature", "printCancelConfirmation"]
@@ -637,6 +638,11 @@ def _saveSettings(data):
             s.setBoolean(
                 ["feature", "modelSizeDetection"], data["feature"]["modelSizeDetection"]
             )
+        if "rememberFileFolder" in data["feature"]:
+            s.setBoolean(
+                ["feature", "rememberFileFolder"],
+                data["feature"]["rememberFileFolder"],
+            )
         if "printStartConfirmation" in data["feature"]:
             s.setBoolean(
                 ["feature", "printStartConfirmation"],
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -285,6 +285,7 @@ def settings(init=False, basedir=None, configfile=None, overlays=None):
         "keyboardControl": True,
         "pollWatched": False,
         "modelSizeDetection": True,
+        "rememberFileFolder": False,
         "printStartConfirmation": False,
         "printCancelConfirmation": True,
         "uploadOverwriteConfirmation": True,


Test patch:
Repository: OctoPrint/OctoPrint

Issue:
[1.7.x] Plugin blacklist version processing
### The problem

```
2021-11-01 20:26:39,203 - octoprint.plugin.core - WARNING - Invalid version requirement >=0.1.1,<=0.2.8 for blacklist entry GcodeEditor, ignoring
2021-11-01 20:26:39,204 - octoprint.plugin.core - WARNING - Invalid version requirement >=0.1.0,<=0.1.1 for blacklist entry gcodeleveling, ignoring
```


### Did the issue persist even in safe mode?

I cannot test this issue in safe mode (state why below)

### If you could not test in safe mode, please state why

_No response_

### Version of OctoPrint

1.7.1

### Operating system running OctoPrint

OctoPi 0.18.0

### Printer model & used firmware incl. version

_No response_

### Browser and version of browser, operating system running browser

_No response_

### Checklist of files to include below

- [X] Systeminfo Bundle (always include!)
- [X] Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- [X] Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
- [X] GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)

### Additional information & file uploads

Noticed this in a users log. Seems like blacklist version processing might have a bug. Need to investigate further.


Discussion:

Resolving patch:
diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py
--- a/src/octoprint/plugin/core.py
+++ b/src/octoprint/plugin/core.py
@@ -854,7 +854,7 @@ def __init__(
                 key, version = entry
                 try:
                     processed_blacklist.append(
-                        (key, pkg_resources.Requirement.parse(version))
+                        (key, pkg_resources.Requirement.parse(key + version))
                     )
                 except Exception:
                     self.logger.warning(
@@ -1340,7 +1340,7 @@ def matches_plugin(entry):
                 return entry_key == key and version in entry_version
             return False
 
-        return any(map(lambda entry: matches_plugin(entry), self.plugin_blacklist))
+        return any(map(matches_plugin, self.plugin_blacklist))
 
     def reload_plugins(
         self, startup=False, initialize_implementations=True, force_reload=None


Test patch:
Repository: open-mmlab/mmdetection3d

Issue:
line not reacheable
https://github.com/open-mmlab/mmdetection3d/blob/bafee2eca7eedecc674467d39bc6ca06ce6bf743/tools/data_converter/nuscenes_converter.py#L130


Discussion:

Resolving patch:
diff --git a/tools/data_converter/nuscenes_converter.py b/tools/data_converter/nuscenes_converter.py
--- a/tools/data_converter/nuscenes_converter.py
+++ b/tools/data_converter/nuscenes_converter.py
@@ -127,10 +127,6 @@ def get_available_scenes(nusc):
                 break
             else:
                 break
-            if not sd_rec['next'] == '':
-                sd_rec = nusc.get('sample_data', sd_rec['next'])
-            else:
-                has_more_frames = False
         if scene_not_exist:
             continue
         available_scenes.append(scene)


Test patch: