Is it possible to write my own loss function (criterion)using sklearn for torch, while the new loss function still use some original torch criterion?

Is it possible to write my own loss function (criterion)using sklearn for torch, while the new loss function still use some original torch criterion?

I guess your question comes down to "can I pass a python function into lua, so that it becomes a lua function, in lua, that proxies into the python function?"
It seems like it should be possible to implement such a thing, no particular reason I can think of why that wouldnt be fairly straightforward to get working, but pretty sure that it's not implemented currently.  I dont have time to implement this at this time.  You would need to add such functionality yourself, into pytorch.
What works currently:

passing an object from lua to python, such that the lua object is wrapped by a python object (or retrieving such an object out of the lua, from python)
calling methods on this object, from python, which methods can return additional lua objects, which are wrapped into python objects, and returned to the python side

Thanks for your reply. Let me put my question more specifically:  the lua function produces several tensors, and I need to operate these tensors using numpy or sklearn , and return additional tensors , and after this, I need to operate these additional tensors back in lua. So is this fairly easy to perform using pytorch?

@hughperkins
Thanks for your reply!
Let me make my question more specifically:
I want to write the code mainly in lua, and calling numpy and sklearn functions in lua to operate on torch tensors. and the return tensors of numpy and sklearn needs to be back to lua again.
Is that possible right now?

Yeah, so, if you call into the lua from python, then you can receive the tensors from lua into the python, eg by calling methods on the lua object which return them. Then you can process those using eg sklearn, then call back into lua, passing the new tensors as parameters.
On 9 December 2016 15:20:53 CET, numberjcc<EMAIL_ADDRESS>wrote:

@hughperkins
Thanks for your reply!
Let me make my question more specifically:
I want to write the code mainly in lua, and calling numpy and sklearn
functions in lua to operate on torch tensors. and the return tensors of
numpy and sklearn needs to be back to lua again.
Is that possible right now?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/hughperkins/pytorch/issues/26#issuecomment-266024526

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

@hughperkins
Even more specifically: how to call back into lua ?  It seems that there is no "require numpy" .

Your 'main' should be in python. Python calls into lua, gets the lua tensor, then passes it to sklearn.
On 9 December 2016 16:27:32 CET, numberjcc<EMAIL_ADDRESS>wrote:

@hughperkins
Even more specifically: how to call back into lua ?  It seems that
there is no "require numpy" .
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/hughperkins/pytorch/issues/26#issuecomment-266040738

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

@hughperkins
Hi,I am using pytorch,  and after I finish training a model, I find the training epoch seems not enough, so I reload it and try to finetune(retrain), but why the training loss seems like the beginning training loss, just like I am training it from scratch?！ I got really confused about this bug! Help?


Backend error after second run of Colab Notebook from Google Drive

I already installed SwarmUI with comfy backend to my Google Drive.
After each SwarmUI start I see this error
11:37:09.945 [Warning] ComfyUI start script is '', which looks wrong - did you forget to append 'main.py' on the end? 11:37:09.960 [Error] Failed to auto-update comfy backend: System.ArgumentException: The value cannot be an empty string. (Parameter 'path')    at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName)    at System.IO.Path.GetFullPath(String path)    at StableSwarmUI.Builtin_ComfyUIBackend.ComfyUISelfStartBackend.Init() in /content/drive/MyDrive/StableSwarmUI/src/BuiltinExtensions/ComfyUIBackend/ComfyUISelfStartBackend.cs:line 107 11:37:42.689 [Init] Scan for web extensions... 11:37:46.366 [Init] Readying extensions for launch... 11:37:46.367 [Init] Launching server... 11:37:46.367 [Init] Starting webserver on http://localhost:7801/
and backend eror in UI.
I solved that problem by specifying main.py path (/content/drive/MyDrive/StableSwarmUI/dlbackend/ComfyUI/main.py) in SwarmUI settings. But I have to do that every SwarmUI start which is not convenient. How could I solve this issue?

That's... entirely wrong. What? That sounds like either

A: You've somehow customized/modified the backend in a way that broke it, or
B: Something is wrong with file access or saving.

When running properly, Swarm will automatically save any backend settings edits you make and preserve them to the next restart. Nothing should change itself nor forget edits made.

Agreed, but that's exactly what happened, and time to time what is also quite strange. I'm not a programmer, so please let me know where I went wrong:
I installed everything on my Google Drive.
After the first start, I installed all the dependencies again:
!apt update
!apt install dotnet-sdk-7.0 git
!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
!dpkg -i cloudflared-linux-amd64.deb

I also added the following:
requirements_file_path = "/content/drive/MyDrive/StableSwarmUI/dlbackend/ComfyUI/requirements.txt"
!pip install -r "{requirements_file_path}"

Because, in another way, Comfy just doesn't work. And as I just noticed, is it possibly because I'm also cloning the repository every time?

wh... why... why have you done any of that?
Don't do any of that.
My recommendation:
Nuke your customizations and your current install folder(s), load up the colab in the readme, use it as prescribed and don't muck with the code. It works. It doesn't self-delete settings. It doesn't require any coding or command-hacking.

wh... why... why have you done any of that? Don't do any of that.
My recommendation: Nuke your customizations and your current install folder(s), load up the colab in the readme, use it as prescribed and don't muck with the code. It works. It doesn't self-delete settings. It doesn't require any coding or command-hacking.

Thanks for you kind reply. But do you really think I had the desire to dig into all of this when there's a ready-to-use notebook? It doesn't work. Please, could you try to be a little less contemptuous and install SwarmUI in Google Drive (with notebook in readme), then restart the session, and you'll see the 'backend error'.
=16:28:46.082 [Init] Self-Start ComfyUI on port 7821 is loading... Traceback (most recent call last):   File "/content/drive/MyDrive/StableSwarmUI/dlbackend/ComfyUI/main.py", line 66, in <module>     import comfy.utils   File "/content/drive/MyDrive/StableSwarmUI/dlbackend/ComfyUI/comfy/utils.py", line 5, in <module>     import safetensors.torch ModuleNotFoundError: No module named 'safetensors' =16:28:58.033 [Info] Self-Start ComfyUI on port 7821 exited. 16:28:58.056 [Init] Scan for web extensions... 16:29:01.603 [Init] Readying extensions for launch... 16:29:01.604 [Init] Launching server... 16:29:01.604 [Init] Starting webserver on http://localhost:7801/ warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]       No XML encryptor configured. Key {b3491ed4-acab-48d9-b1b9-66aa83d94ff7} may be persisted to storage in unencrypted form. 16:29:01.697 [Init] Program is running. 2023-09-04T16:29:01Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps 2023-09-04T16:29:01Z INF Requesting new quick Tunnel on trycloudflare.com... 2023-09-04T16:29:04Z INF +--------------------------------------------------------------------------------------------+ 2023-09-04T16:29:04Z INF |  Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):  | 2023-09-04T16:29:04Z INF |  https://gras-ham-industry-contemporary.trycloudflare.com/                                  | 2023-09-04T16:29:04Z INF +--------------------------------------------------------------------------------------------+ 2023-09-04T16:29:04Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared] 2023-09-04T16:29:04Z INF Version 2023.8.2 2023-09-04T16:29:04Z INF GOOS: linux, GOVersion: go1.20.6, GoArch: amd64 2023-09-04T16:29:04Z INF Settings: map[ha-connections:1 protocol:quic url:http://localhost:7801/] 2023-09-04T16:29:04Z INF Generated Connector ID: 2e7150da-f74b-4bd0-8524-3d1934901cf6 2023-09-04T16:29:04Z INF cloudflared will not automatically update if installed by a package manager. 2023-09-04T16:29:04Z INF Initial protocol quic 2023-09-04T16:29:04Z INF ICMP proxy will use <IP_ADDRESS> as source for IPv4 2023-09-04T16:29:04Z INF ICMP proxy will use :: as source for IPv6 2023-09-04T16:29:04Z INF Starting metrics server on <IP_ADDRESS>:36353/metrics 2023/09/04 16:29:04 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details. 2023-09-04T16:29:04Z INF Registered tunnel connection connIndex=0 connection=271c1031-8051-4fdb-ab58-5b4317588ca2 event=0 ip=<IP_ADDRESS> location=kul01 protocol=quic 2023-09-04T16:29:21Z ERR  error="stream 245 canceled by remote with error code 0" cfRay=80179c4e0086093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 245 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/site.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 241 canceled by remote with error code 0" cfRay=80179c4e008a093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 241 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/params.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 121 canceled by remote with error code 0" cfRay=80179c48942a093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 121 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/select2_bootstrap.min.css event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 137 canceled by remote with error code 0" cfRay=80179c489426093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 137 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/genpage.css?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 273 canceled by remote with error code 0" cfRay=80179c4e10a1093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 273 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/ExtensionFile/GridGeneratorExtension/Assets/grid_gen.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 253 canceled by remote with error code 0" cfRay=80179c4e0087093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 253 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/util.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 257 canceled by remote with error code 0" cfRay=80179c4e008f093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 257 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/backends.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 269 canceled by remote with error code 0" cfRay=80179c4e0097093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 269 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/ExtensionFile/ComfyUIBackendExtension/Assets/comfy_workflow_editor_helper.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 117 canceled by remote with error code 0" cfRay=80179c489431093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 117 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/jquery.min.js event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 261 canceled by remote with error code 0" cfRay=80179c4e0089093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 261 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/models.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 249 canceled by remote with error code 0" cfRay=80179c4e008d093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 249 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/main.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 281 canceled by remote with error code 0" cfRay=80179c4e0093093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR  error="stream 185 canceled by remote with error code 0" cfRay=80179c488423093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 281 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/browsers.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR Request failed error="stream 185 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/bootstrap.min.css event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 129 canceled by remote with error code 0" cfRay=80179c489427093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR  error="stream 277 canceled by remote with error code 0" cfRay=80179c4e0095093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 277 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/presets.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR Request failed error="stream 129 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/select2.min.css event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 145 canceled by remote with error code 0" cfRay=80179c489428093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 145 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/bootstrap.min.js event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 149 canceled by remote with error code 0" cfRay=80179c489438093b-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 149 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/select2.min.js event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 201 canceled by remote with error code 0" cfRay=80179c4cd04ec616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 201 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/site.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 197 canceled by remote with error code 0" cfRay=80179c4cd050c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 197 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/params.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 205 canceled by remote with error code 0" cfRay=80179c4cd052c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 205 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/util.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 229 canceled by remote with error code 0" cfRay=80179c4cf060c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 229 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/main.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 169 canceled by remote with error code 0" cfRay=80179c48d5d6c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 169 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/select2_bootstrap.min.css event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 165 canceled by remote with error code 0" cfRay=80179c48d5d2c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 165 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/css/bootstrap.min.css event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 221 canceled by remote with error code 0" cfRay=80179c4cd04cc616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 221 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/browsers.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 237 canceled by remote with error code 0" cfRay=80179c48f5e7c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 237 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/select2.min.js event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 177 canceled by remote with error code 0" cfRay=80179c48d5cdc616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 177 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/bootstrap.min.js event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 209 canceled by remote with error code 0" cfRay=80179c4ce055c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 209 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/ExtensionFile/ComfyUIBackendExtension/Assets/comfy_workflow_editor_helper.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:21Z ERR  error="stream 285 canceled by remote with error code 0" cfRay=80179c4cd04dc616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:21Z ERR Request failed error="stream 285 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/genpage/presets.js?vary=<IP_ADDRESS> event=0 ip=<IP_ADDRESS> type=http 2023-09-04T16:29:22Z ERR  error="stream 181 canceled by remote with error code 0" cfRay=80179c48e5e1c616-SEA event=1 originService=http://localhost:7801/ 2023-09-04T16:29:22Z ERR Request failed error="stream 181 canceled by remote with error code 0" connIndex=0 dest=https://gras-ham-industry-contemporary.trycloudflare.com/js/jquery.min.js event=0 ip=<IP_ADDRESS> type=http 16:29:23.759 [Info] Creating new admin session for <IP_ADDRESS> 16:29:24.438 [Error] [WebAPI] Error handling API request '/API/TriggerRefresh': Request input has unknown session id 16:29:24.883 [Info] Creating new admin session for <IP_ADDRESS>

I did test colab on google drive, with stopping and restarting it in the UI, and it worked when I did.
What I didn't think to test was fully disabling the runtime, closing colab, and opening an entirely new session.
The errors you originally reported are still not an issue, but the new error you posted does appear to occur in my own testing - it looks like Google Drive is unwilling to store the ComfyUI venv folder which contains necessary modules.
No offense or contempt was intended. Your original error was caused by your modifications to the notebook, I was not able to replicate any issue until you specified further now.
Adding a cell of !pip install -r $SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/requirements.txt and running it fixes it and allows it to run as normal.
It's extremely odd that Colab refused to save venv files into drive - I'd argue that this is technically a bug with Google's server software rather than a bug with Swarm, as it's temporarily storing files in drive as far as the VM can see, but never actually synchronizing it to long-term storage.
Regardless, I've pushed an update that will automatically execute the backup install when needed for colab+drive usage. This now works flawlessly in my testing across a full colab runtime replacement (other than the network conn through trycloudflare being slow and silly as usual).

The irony is that my 'code modification' was literally the same as what you suggested.
requirements_file_path = "/content/drive/MyDrive/StableSwarmUI/dlbackend/ComfyUI/requirements.txt"
!pip install -r "{requirements_file_path}"

I haven't changed anything else. The error I described in the issue occurs randomly, to be precise, I'll repeat, with only one aforementioned code modification. I haven't encountered it lately; perhaps this bug won't occur anymore, but time will tell.


Make InspektifyActivity public

Hello, i would like to run an Inspectify via Android's shortcut. For this i need to create an intent with InspektifyActivity, but its internal. Will be very helpful if its gonna by public.
Thanks

Thank you @Savrov for the suggestion. I will take a look into that. My first idea is that InspektifyActivity should stay internal and that the library itself could provide the configuration for creating a shortcut. What is your use case for creating a shortcut? To only have a way to open the InspektifyActivity window?

Actually yes, i was asked to add debug-related feature to shortcuts, so testers had easy access to it, because we do not have a proper place for Inspektify launch-icon in our design. And Shake gesture is taken by Instabug :/
Actually, we have a KMP application, so iOS-related solution would be required as well.

@Savrov, I need to think about how to tackle this properly. Maybe app shortcuts and Home screen quick actions are a better fit for such a use case.
Regarding your additional message that the library is not a fit for you, it is actually. It doesn't matter if you are sharing the UI layer and which UI toolkit are you using for your project. This library acts as an independent entity and uses its own libraries and frameworks. You can do a quick check by just attaching the next line to one of your buttons to test it out with your project:
InspektifyKtor.startInspektify()

@Savrov I just published a new version of Inspektify, which supports Shortcut for Android and Quick Action for iOS apps. This feature is included in this release:
https://github.com/BVantur/inspektify/releases/tag/1.0.0-beta05
I also found out that you can make an app shortcut as a separate icon in your Android system if you long-press on the shortcut and drag it onto your phone's home screen. That way you don't need to deal with your own implementation of creating a new launch icon and adding logic for it. Sadly this works only for Android systems, but I hope shortcut capability will be enough for your use case.
I will close this issue now. Let me know if new features resolve your use case.


Change position_id calculation to fix last token being ignored.

So as we talked on slack the current model ignores the last token, as also seen in the demo.
we add +2 to position_ids which is done so we can use 0 for the [PAD] token.
But then currently we are not using the position_id=1 for any token, and [SEP] token which is a special token gets whatever is the following id in the sentence (depending on sentence length). & I guess this confuses the model somehow to always guess the last token as non-entity. I suggest using this unused position_id=1 for the [SEP] token.
I trained a model this way and it solved the last token ignoring problem (proven empirically 😆 for an Electra Model)
In my understanding position_ids are calculated like this:

input tokens are: "[CLS], My, test, sentence, [SEP]" -> 0,1,2,3,4 to which we add +2. meaning now [CLS] always has id 2 and our actual word tokens start from 3.
this tracks because "start_position_ids" for spans are calculated by batch_encoding.word_to_tokens and goes like
1,1,1,2,2,3-> which we also added +2 so it becomes 3,3,3,4,4,5
same for "end_position_ids"  1,2,3,2,3,3-> which we also added +2 so it becomes 3,4,5,4,5,5

for reference(spans don't include cls&sep):
spans=
0:(0, 1) # My
1:(0, 2) # My test
2:(0, 3) # My test sentence
3:(1, 2) # test
4:(1, 3) # test sentence
5:(2, 3) # sentence

Can argue that [SEP] token having an id following the sentence makes sense but I think it just confuses it. this might also be because the last token never actually has a "span" I mean it is always just itself ("sentence" in the example above ). which then gets effected more by being next to an always ignored token [SEP]
So with this change positon_ids would be like:  2[CLS],3,4,5,1[SEP],0[PAD],0[PAD],0[PAD],0[PAD]
I don't know how this should be different for different model backbones... maybe some models use more special tokens and position_ids would need different values. I suggest re-training the demo example and seeing if it works before merging & if it makes logical sense.

Hey! Thanks for the PR!
I believe that your understanding of the position_ids is exactly correct.
Just thinking out loud here, the [SEP] before this PR has a position id of num_tokens + 1 (normally it has num_tokens - 1, and then we add +2 based on PL-Marker's approach). And then this PR overrides the [SEP] position ID to be 1 instead. Is that right?
Out of curiosity, have you tried using 0 just like the padding?
I'll definitely retrain the demo model (or a smaller version of it that I can train in a few minutes) to try and figure out if this indeed resolves the issue. I'll likely work on that tonight or tomorrow morning as I'm currently investigating the performance downsides of an approach that can improve training times by ~30%.

Tom Aarsen

Yes,exactly. the [SEP] before this PR has a position id of num_tokens + 1. And this PR overrides the [SEP] position ID to be 1 instead.
I haven't tried using 0 just like the padding... which actually makes a lot of sense. I'll it next time!
I'm still not %100 on how the sep token's position_id has such an effect on the results. Maybe it is a combined effect with something else of what I'm not sure.

It definitely could be. I think it's a little confusing that the position ID of a token that gets ignored should affect performance at all. Might be indicative or another problem somewhere. (For example, perhaps the position ID of the SEP is accidentally used as the position ID of the last "real" token in some situations instead)

true should have been position_ids[num_tokens-1] = 1 for it to be the sep token... now it just makes it that much weirder as to why that worked... So I checked the code again and I had actually used this:
position_ids = torch.arange(num_tokens-1, dtype=torch.int) + 2
position_ids = F.pad(position_ids, (0, total_size - len(position_ids)), value=0)
position_ids[num_tokens]=1

So was making sep=0 🤦♀ and adding a 1 after. perhaps reaching the right conclusion with the wrong solution 🤣
2[CLS], 3, 4, 5, 6, 7, 8, 0[SEP], 1, 0, 0, 0, 0, ...

I think this means we can just use 0 for the sep token

I've narrowed it down 🎉 . It's caused by these two lines:
https://github.com/tomaarsen/SpanMarkerNER/blob/a7ca63fd3142b2ac3130be97aec4ebe892ccb475/span_marker/label_normalizer.py#L48
https://github.com/tomaarsen/SpanMarkerNER/blob/a7ca63fd3142b2ac3130be97aec4ebe892ccb475/span_marker/label_normalizer.py#L96
These "final cases" cover the situation where the last token is a part of the entity. The start and end indices (i.e. the second and third elements in the tuples) should always be at least one apart, so that tokens[start_idx: end_idx] shows the correct span, e.g.:
>>> ['I', 'want', 'to', 'go', 'to', 'Paris'][5:6]
['Paris']

However, with this approach, the idx can be 5 at maximum, when the end index needs to be 6 instead. As a result, the ner tags of [0, 0, 0, 0, 0, 1] (where 1 is e.g. B-LOC) is normalized to [(1, 5, 5)], while it should be [(1, 5, 6)]. So, the tokenizer which is responsible for converting the normalized labels (i.e. [(1, 5, 5)] in our case) to a full list of labels, will produce e.g.:
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Instead of
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]

With other words, it'll always learn that the very last word is no entity, even if it actually is an entity. Now, the model may still "break free" from this and output the last word as an entity. After all, it may have also learned that Paris is a very strong clue for "Location", and so sometimes it (almost) predicts it.

Proof that the fix works:
from datasets import Dataset
from span_marker import SpanMarkerModel, Trainer
from transformers import TrainingArguments

train_dataset = Dataset.from_dict({
    "tokens": ["Tom wants to go to Paris".split()],
    "ner_tags": [[1, 0, 0, 0, 0, 2]],
})
labels = ["O", "Person", "Location"]

model_name = "prajjwal1/bert-tiny"
model = SpanMarkerModel.from_pretrained(
    model_name,
    labels=labels,
    model_max_length=256,
    marker_max_length=128,
    entity_max_length=4,
)

args = TrainingArguments(
    output_dir="models/last_token_fix",
    learning_rate=5e-5,
    per_device_train_batch_size=32,
    per_device_eval_batch_size=32,
    num_train_epochs=300,
    weight_decay=0.01,
    report_to="none",
    push_to_hub=False,
    logging_first_step=True,
    logging_steps=50,
    bf16=True,
    dataloader_num_workers=0,
    warmup_ratio=0.1,
    seed=42,
    save_total_limit=3,
)

trainer = Trainer(
    model=model,
    args=args,
    train_dataset=train_dataset,
    eval_dataset=train_dataset,
)

trainer.train()

metrics = trainer.evaluate()
print(metrics)

print(model.predict("Tom wants to go to Paris"))

produces
[{'span': 'Tom', 'label': 'Person', 'score': 0.954353928565979, 'char_start_index': 0, 'char_end_index': 3}, {'span': 'Paris', 'label': 'Location', 'score': 0.9681439399719238, 'char_start_index': 19, 'char_end_index': 24}]

I'll close this now. Thanks for letting me know about this issue and the help with chasing it down!

🤯 Labels were the first thing I looked at because it felt like a classic  last yield missing bug (can't tell you how many times I missed processing a last batch that way) & but the yield was there and I missed the idx was off (very nice catch 🦅👀  🥳 )
Then I just continued only debugging the inference part which had no mistakes (spans & indexes were all okay). So I assumed it was the model when position_id change worked! Lesson learned; when debugging model behaviour you never know!
This brings me to think why my wrong fix was working for me, and it was working very correctly too 🤔 I think it was because:
Model learned to predict wrongly labeled "...ent,no_ent,[sep],..." to be "...ent,ent,[sep]..." when the [sep] position id was more clearly marked as 1 (vs when it was just num_tokens + 1)...cheating to predict the last token as ent but not so much that it was predicting all non-entity tokens as an entity. example: "Paris." was correctly predicted as "Paris" and "." wasn't an entity, as you said because of token occurrence strength)
Well this was a wild debugging ride & It all makes sense now!
Thank you

wouldn't how position_ids are calculated depend on how the base model was pretrained
Ideally, yeah. I think that's why PL-Marker does +2 for RoBERTa models.


Fixing sip0024 duration

When a new user stakes after max duration is elapsed(30 weeks) from the start time of the staking rewards program, the rewards computation doesn't work. Hence, we introduce a restartTime to restart the calculation from the end of the last period. This ensures that the rewards are calculated and distributed correctly.

Reviewed the test cases and test are passing. Performed UI testing on the testnet and the rewards are accumulating as expected.


Make line outline animation delays relative to previous line length and animation speed

Inspired (and mostly worked out in https://svelte.dev/repl/b70938d563c443ccaedbb9f3b1feca64?version=4.2.2) by @mxdvl, this PR adjusts the logic that animates outlines. Before there was a blanket one second delay between lines being drawn - sometimes leading to unnatural looking flows - now it's depends on the length of the previous line and the animation speed.
This is done in OutlineSVG.svelte when the paths of a given outline are being iterated over. There's a little bit of nasty element creation going on - not as clean as the proof of concept Max put together - but it was the best solution I could come up with within the confines of a Svelte each loop. Perhaps scope for jsdom or some such to step in further down the line but it seems to work ok with this solution.
Hard to argue with the results though... nice and smooth.
Screencast from 11-11-23 23:31:07.webm
The animation speed adjustment has no visible impact for now but seemed sensible to include as a 'wpm' toggle of some kind (allowing users to see what 60, 80, 100, 120 wpm looks like) would be super cool, especially if the site ever starts animating entire sentences or passages.

I think you could leverage the SVG Path Commander to do server-side calculations without relying on “nasty” element creation 😉


Optional layers tree

A separate list of additional map layers, organized in a hierarchical tree, that can be added to the layer switcher by the user, see #145.

[x] check existing plugins: Layer switching controls
[x] reference/use existing tile server collections

Tree components:

jonmiles/bootstrap-treeview: Tree View for Twitter Bootstrap
maxazan/jquery-treegrid: TreeGrid plugin for jQuery

Further work after #164:

[ ] persist with local storage
[ ] Strava, Bing, DigitalGlobe
[ ] hash: use id?, unchecked layer
[ ] country/language prefixes, ordering
[ ] i18n, JOSM layer translations?
[ ] attribution, map link
[ ] ...


program::create_with_source_file doesn't fail with bad input

Calling boost::compute::program::create_with_source_file silently creates a program if the input filename is incorrect.  Even program.build() succeeds.  This patch throws std::ios_base::failure if stream.fail() is true.  This seems preferable to something else failing way downstream because of a typo in the filename.
I added a test, but didn't actually test it since I'm using this outside the standard boost build system.  I think it should work, but it's easy to figure out what it does.  It simply tries to create a program from a source file, where the filename is an empty string.  The test verifies that this throws.

Hi, I will check and test it tomorrow. Could you make this pull request against the develop branch?

Also, check clang build of your pull request on Travis (don't worry about g++ internal compiler error, it's a recurrent problem).

Closed in favor of PR #535.


Spelling mistake in error message "exists"

There is a spelling mistake

Issue moved to DamianCummins/hello-world #1 via ZenHub


🔀 :: (#14) 깃허브 액션 추가

Codecov Report

Merging #17 (57eb512) into develop (2849fe0) will increase coverage by 30.97%.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             develop      #17       +/-   ##
==============================================
+ Coverage       0.00%   30.97%   +30.97%
- Complexity         0        7        +7
==============================================
  Files              5        5
  Lines            113      113
  Branches           9        9
==============================================
+ Hits               0       35       +35
+ Misses           113       76       -37
- Partials           0        2        +2

Impacted Files
Coverage Δ

.../src/main/java/com/leeseojune/neisapi/NeisApi.java
32.94% <0.00%> (+32.94%)
:arrow_up:

...c/main/java/com/leeseojune/neisapi/dto/School.java
70.00% <0.00%> (+70.00%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2849fe0...57eb512. Read the comment docs.


React JS Free Course Added for Complete Beginners

What does this PR do?
Add resource(s)
For resources
Description
It is a free React JS course for beginners in Hindi by Hitesh Choudhary aka Chai aur Code. This is a very famous emerging playlist.
Why is this valuable (or not)?
It is a very detailed course for the beginners and well explained as well. He explains each and every concept while building react projects side by side which in turn helps the learners in knowing how to approach and build a project.
How do we know it's really free?
It is free because it's on YouTube
For book lists, is it a book? For course lists, is it a course? etc.
Yes it is a free video course.
Checklist:

[x] Read our contributing guidelines.
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction).
[x] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Done

Thanks, and welcome to free-programming-books!


Clicking on the privacy on the bank account page in offline mode doesn’t show an alert box

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open android and turn your wifi off
First, go to the workspace and invite members page. Click on the invite button and click on Privacy . Notice that it displays an alert pop up box.
Now, go back and click on connect bank account
Try to click on privacy again and notice that it opens up a new page. It should have also displayed an alert box as it did on the invite members page.

Expected Result:
Clicking on the privacy on the connect bank account page should also show an alert box like in invite members page
Actual Result:
Clicking on the privacy on the connect bank account page doesn’t show an alert box
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.2 85-0
Reproducible in staging?:  y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/225314793-77b4bd42-3182-48ad-aeca-cf3fa2d42369.mp4

Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678723300016119
View all open jobs on GitHub

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Catching up from being OOO and urgent bank GHs, I'll try to get to this one by EOW.

Ops GHs have been a higher priority, I haven't had time to test yet.

Focused on another urgent task, I'll try to get to this one tomorrow.

Triggered auto assignment to @marcochavezf (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@marcochavezf - I was able to replicate this experience and didn't get a warning that I'm offline. Should this one be internal or external? Thanks for the feedback!

Proposal
Please re-state the problem that we are trying to solve in this issue.
Clicking on the privacy link on the Connect bank account page doesn’t show an alert box during offline.
What is the root cause of that problem?
Within /BankAccountStep.js we are using <TextLink href="https://use.expensify.com/privacy"> at line 149 to open  privacy link. So in case of offline mode it will open href directly without checking internet status.
https://github.com/Expensify/App/blob/c542e8b7dab32a8fb5aa057c9d69e3a891653172/src/pages/ReimbursementAccount/BankAccountStep.js#L149-L151
What changes do you think we should make in order to solve the problem?
Within /BankAccountStep.js change line 149 as shown below. i.e. for <TextLink> use onPress={} instead of href. So it will solve the problem and show growl message during offline.
import * as Link from '../../libs/actions/Link';

<TextLink onPress={() => Link.openExternalLink(CONST.PRIVACY_URL)}>. // *** Updated Code ***
    {props.translate('common.privacy')}
</TextLink>

We can see  that Link.openExternalLink will show (line 87) growl message during offline.
https://github.com/Expensify/App/blob/c542e8b7dab32a8fb5aa057c9d69e3a891653172/src/libs/actions/Link.js#L86-L92
What alternative solutions did you explore? (Optional)
None

Result - Web
https://user-images.githubusercontent.com/7823358/225397383-f7532753-55ab-4e3d-a2a5-b8175da55e1a.mp4

I think this can be external and we should check all the links that open external resources. Also, I asked here for a second opinion about the solution because afaik we wanted to get rid of the growl notifications but not sure if those are ok for cases like this one.

We're not actively adding growl notifications, and there's already another GH to remove the existing growl notifications. So I'm going to close this issue.


Protection against too long file names

Sometimes the naming of the folder gets too long and the torrent upload fails with the API returning:
{"status":"failure","error":"The torrent contained one or more files with too long a name: [name]"}
A check should be added to see if the path is too long.

I just saw that there is a check in place already, but this one slipped through the cracks. It is an exceptionally long album name with a sub-folder with images.


PLAT-62358: Updated the RadioItem stroke to ~"2px"

Issue Resolved / Feature Added
The circle thickness is just too nice looking and convenient.
Resolution
The stroke has been updated to be thinner, and use the one value we simply can't incorporate into resolution independence.
Additional
There may be a really terrible solution involving calc(). Something like calc(2apx * 1rem / 24px)

https://www.youtube.com/watch?v=69fPof-ZTnU

They alignment of the selected radio button is a bit off in Chrome for FHD. It appears correct for HD and 4k, however. Does it render correctly on the TV?

The effect you're seeing, @ryanjduffy, is the consequence of not using a multiple of 3, then scaling by 2/3. When previewing this on a HiDPI display, you must view it at 100% scale emulation. The following is what I see when at 100% scale for each of the resolutions. We'll need to properly verify on the TV, due to this awful rounding issue.

My idea from above (calc(2apx * 1rem / 24px)) will need some tuning due to the fact that evidently, one cannot multiply values in CSS that have different units, un-unit-ed or addition/subtraction works just fine... Alternatively, if we use apx (absolute pixels, an invention of ours) the result will be HD being too bold and 4K UHD being too thin, with FHD at the Goldilocks sweet spot of 2px. :facepalm:

It is off-center on those, too.  Just less noticeably.

It's only off-center in 4k. The others are perfectly centered.
If you have a better suggestion of how to get a 2px border in a system that doesn't allow 2px, I'm happy to hear it.

I think it's the best we can do with ri. Would this be an appropriate occasion to use a media query to achieve the exact requirement rather than approximating it with ri?

The most straight-forward approach would be to hard-code (via LESS math) apx values for each of the key RI classes (not media queries). I'll submit an update to this ticket using that approach.

PR Updated

Good change. I'm going to tinker a little more with this to see if I can snap the standard value to 16px  instead of 16.031px.


GWT Grid, FlexTable conflict

sorry I can't write English.
GWT SDK 2.7
JAVA 1.7
gwtboootstramp3 0.9.1
problem..
Grid grid = new Grid(2,1);
grid.setCellPadding(4);  <-- not working
grid.setCellSpacing(4);  <-- not working
FlexTable table = new FlexTable();
table.setCellPadding(4);  <-- not working
table.setCellSpacing(4);  <-- not working

This is the wrong place to be asking a question like this. You should ask on stackoverflow.com and provide more information about what you are doing and the errors you are seeing.
This doesn't seem to anything to do with gwtbootstrap3 as Grid and FlexTable are GWT classes.


[AutoPR cognitiveservices/data-plane/FormRecognizer] Cognitive Services Form Recognizer - Initial commit.

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5684

This PR has been merged into https://github.com/Azure/azure-sdk-for-java/pull/3499


execute phpunit 9.5.11 in Github actions

Describe the bug
Since 2022-01-04 evening without any code changes when i run php bin/phpunit it failed in Github actions. I checked the dir where the command is executed and its in root dir where composer.json is listed and phpunit is allready installed. And before it was working.
Error Output
No composer.json found in the current directory, showing available packages from packagist.org
Creating a "phpunit/phpunit" project at "./phpunit-9.5-0"
Installing phpunit/phpunit (9.5.11)
Plugins have been disabled.
  - Installing phpunit/phpunit (9.5.11): Extracting archive
Created project in /home/runner/work/XXX/bin/.phpunit/phpunit-9.5-0

A fix is running instead php vendor/bin/phpunit
Version

[ ] I have checked releases, and the bug exists in the latest patch version of v1 or v2.
[x] v2

Runners

[x] GitHub Hosted

Operating systems

ubuntu-latest
PHP versions

8.1
To Reproduce

Create a composer.json with added phpunit/phpunit "^9.5"
Workflow steps
jobs:
  foo:
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.1'
          extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, imagick
          coverage: pcov

      - name: Install Composer dependencies
        run: |
          composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest

      - name: Run Tests
        run: |
          php bin/phpunit # <-- this was working before

Expected behavior

Screenshots/Logs

Additional context

Are you willing to submit a PR?

Composer installs all packages in the vendor directory, so the correct path for PHPUnit would be vendor/bin/phpunit. Not sure why bin/phpunit was working unless you have PHPUnit in your repository in the bin directory.
Please provide a link to your workflow, if it is a private repository, please create a test repo to reproduce the error and provide the link.

ok i will take a look later to get the time to create some reproducer repo.

https://github.com/benblub/workflow-phpunit-bug-reproducer/runs/4726226312?check_suite_focus=true
@shivammathur

Your test repo needs composer.json file to install all the dependencies. Use the one you have in your project
Also if you have a bin directory add that also to the test repo.

Also, in your test workflow add a  actions/checkout step before setup-php step.
uses: actions/checkout@v2

Thanks. Yes i missed some steps.
https://github.com/benblub/workflow-phpunit-bug-reproducer/runs/4727978865?check_suite_focus=true
Its getting more understandable for me now. php bin/phpunit execute the phpunit script provided by symfony. And it installs phpunit in bin folder and not in "vendor".
And with that in an Symfony App where other Symfony Services are running it appears this problem. Looks like loader cant resolve then correct -> eg uses autoload from that new vendor in bin folder then from vendor.
PHP Fatal error:  Class phpDocumentor\Reflection\PseudoTypes\List_ cannot extend final class phpDocumentor\Reflection\Types\Array_ in /home/runner/work/XXX/bin/.phpunit/phpunit-9.5-0/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php on line 27
..............................Symfony\Component\Config\Exception\LoaderLoadException {#45501
  #message: "Cannot load resource "kernel::loadRoutes". Make sure there is a loader supporting the "service" type."
  #code: 0
  #file: "./vendor/symfony/framework-bundle/Routing/DelegatingLoader.php"
  #line: 65
  -previous: Symfony\Component\ErrorHandler\Error\FatalError {#62469
    #message: "Compile Error: Class phpDocumentor\Reflection\PseudoTypes\List_ cannot extend final class phpDocumentor\Reflection\Types\Array_"
    #code: 0
    #file: "./bin/.phpunit/phpunit-9.5-0/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php"
    #line: 27
    -error: array:4 [
      "type" => 64
      "message" => "Class phpDocumentor\Reflection\PseudoTypes\List_ cannot extend final class phpDocumentor\Reflection\Types\Array_"
      "file" => "/home/runner/work/XXX/bin/.phpunit/phpunit-9.5-0/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php"
      "line" => 27
    ]
  }

But one of the Questions is why happens this on CI and not on in my local docker Container? I will try later to add more Code which reproduces the error which happened on the private repo.

Updating the phpdocumentor/type-resolver package to use the latest 1.6.0 should fix this
https://github.com/phpDocumentor/TypeResolver/issues/148
composer update phpdocumentor/type-resolver


How do I use the library to generate native segwit addresses with BIP84 derivation paths?

For example, let's assume I want to generate addresses under the following BIP84 (BIP44 for native segwit) derivation paths:
m / 84' / 0' / 0' / 0 / 0
m / 84' / 0' / 0' / 1 / 0
And let's suppose that all I have is the wallet mnemonic. I know that I can get to the node by using the following (i think):
final seed = bip39.mnemonicToSeed(await secureStore.read(key: 'mnemonic'));
final root = bip32.BIP32.fromSeed(seed);
final node = root.derivePath("m/84'/0'/0'/0/0");

You can assume that the secureStore read call always returns a valid mnemonic. How do I generate a native segwit address from what I have using this library?
Thanks once again

I believe I have the solution. Heres a working function for those that care to understand. Keep in mind that this solution assumes that you're using Flutter with Dart:
  Future<String> generateReceivingAddress(int index) async {
    final secureStore = new FlutterSecureStorage();
    final seed = bip39.mnemonicToSeed(await secureStore.read(key: 'mnemonic'));
    final root = bip32.BIP32.fromSeed(seed);
    final node = root.derivePath("m/84'/0'/0'/0/$index");

    final address = P2WPKH(data: new PaymentData(pubkey: node.publicKey)).data.address;
    return address;
  }


MM-17157 Only send notification receipt if server url and session token are set

Summary
The receipt notification needs the serverURL to be set, at some point the url was removed from the general.credentials entities and is only being set when resetting the cache.
This fix consist on writing the url to the entities file as needed and also make sure to invoke the requests only if the serverURL and session token are set.
Ticket Link
https://mattermost.atlassian.net/browse/MM-17157

@enahum
Error trying doing the automated Cherry picking. Please do this manually
+++ Updating remotes...
Fetching upstream
Fetching origin
+++ Updating remotes done...
!!! 'upstream/release-1.25' not found. The second argument should be something like upstream/release-0.21.
    (In particular, it needs to be a valid, existing remote branch that I can 'git checkout'.)

/cherry-pick release-1.25


Add config flag for GDPR compliance. Remove last octet from ips in request-logs accordingly.

A short explanation of the proposed change:
IP Adresses now get their last octet cut of and replaced by 0 if the
new config option logging.gdpr_compliant is true. E.g <IP_ADDRESS>
will be logged as <IP_ADDRESS> which provides sufficent anonymization
to comply with european data protection regulations.
If the flag is false or not present, CC will have the old behaviour
which means logging the full ips.
This flag can also be used in other places that one may find needs
adoptions to comply to EU GDPR.
An explanation of the use cases your change solves
It provides a way to comply to the european data protection regulations.
All EU Customers of Pivotal that save their logs would benefit from this change.
The IP is specifically called as Personal information: https://gdpr.eu/recital-30-online-identifiers-for-profiling-and-identification/
So either one has to:

Not save it at all
Request formal approval from all users for saving their ips
Anonymise the IP so it can not be tracked down to an individual

This change enables customers to use the third option as the first ones are not practicable.
Links to any other associated PRs
Followup of: #1575
Issue: #1568
Slack discussion: https://cloudfoundry.slack.com/archives/C07C04W4Q/p1584635872138900

[X] I have reviewed the contributing guide

[X] I have viewed, signed, and submitted the Contributor License Agreement

[X] I have made this pull request to the master branch

[X] I have run all the unit tests using bundle exec rake

[ ] I have run CF Acceptance Tests
Could not get CATS to run(having no bosh-lite atm). Would be thankful if some pivot can run it against one of you bosh-lites.

@selzoc can you review again,  also squashed all changes into one commit so history is more clean once merged.

Thanks for the PR!


Shortcut to create index on column

Is your feature request related to a problem? Please describe.
I often want to add a simple index (i.e. not composite) to an existing column in a table. This happens for example when I stumble upon inefficient queries during database tuning.
Of course DBeaver can already create indexes, but I need to go to the Indexes Tab, create a new Index and then find the correct column in the possibly long list of columns.
Describe the solution you'd like
I would love to be able to right-click on a row in the Columns tab and have an option "Create New Index for this column".
("a row in the Columns tab" is a column in the actual table :) )
Describe alternatives you've considered
The option could also be provided under the "Generate SQL" section of the right-click menu in the Columns tab.
Obviously there is still the way to go to the Index tab and start the workflow from there.
Additional context
I love DBeaver and use it everyday in a professional environment. I stumbled upon this topic several times now - that's why I finally considered suggesting this small shortcut.
We mainly (but not exclusively) work with PostgreSQL.
Additional information: PostgreSQL requires no index at the source of a foreign key and therefore does not automatically create one. But I encountered many situations where this is a bad idea. A further leading feature request could make DBeaver warn against such situations when displaying the foreign keys.

Thank you for the idea.

Thank you for the idea.

Implemented.

The screenshot looks great and promising! :)
Maybe the new functionality is not "important" enough though to keep it at the top of the popup menu?

verified


create_group KeyError

creating a new group (workspace) works, but the RestAPI response of Microsoft might have changed.
raw ist not a list but a dictionary/json
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
[/app/etl/mgmt.ipynb](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f64665f6e6f7465626f6f6b227d-0040ssh-002dremote-002bssh-002egeoflow-002ech.vscode-resource.vscode-cdn.net/app/etl/mgmt.ipynb) Cell 15 line 1
----> [1](vscode-notebook-cell://attached-container%2B7b22636f6e7461696e65724e616d65223a222f64665f6e6f7465626f6f6b227d@ssh-remote%2B/mgmt.ipynb#X51sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) pbi.client.create_group("testgroup")

File [/usr/local/lib/python3.11/site-packages/pbipy/powerbi.py:604](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f64665f6e6f7465626f6f6b227d-0040ssh-002dremote-002bssh-002egeoflow-002ech.vscode-resource.vscode-cdn.net/usr/local/lib/python3.11/site-packages/pbipy/powerbi.py:604), in PowerBI.create_group(self, name, workspace_v2)
    602 raw = self.post_raw(resource, self.session, payload)
    603 # Endpoint returns as list with one element.
--> 604 group_raw = raw[0]
    606 return Group(group_raw.get("id"), self.session, raw=group_raw)

KeyError: 0

Thanks for spotting this, I'll take a look in the day or two.

@KlausGlueckert - Have uploaded a fix. I think you're right, the response is different from what the code expects. From what I can tell, the response in the docs for this endpoint is incorrect and suggests a list. Looking at the C# sdk, it seems to expect a response that is a single object which makes sense.
Unfortunately I'm not able to test this myself, but if you're happy to, please try installing this branch, let me know if the fix works and I'll merge.
pip install git+https://github.com/andrewvillazon/pbipy@bugfix/5/create_group-key-error

Closing. Fixes included in: v2.5.9


[Feature] Add page.waitForRequest() and page.waitForResponse()

Hey!
After using Puppeteer for a little while now in a number of different scenarios (SSR, automated testing) a common piece of functionality that often came up as needed, or at very minimum a nice to have, was the ability to wait for a specific network request to be made, or alternatively for a specific network response to come back. As a result I propose the addition of the following two functions.
page.waitForRequest( match[, options])

match <string> A regular expression to match against the request URL
options <Object> Optional parameters

method <string|Array> Either a single HTTP request method (GET, POST, etc) as a string or an array of values ["GET", "POST"]. Defaults to all HTTP request methods.
timeout <number> Maximum time to wait in milliseconds

And additionally
page.waitForResponse( match[, options])

With a similar set of options. I'd probably also additionally add support for filtering by response code.
An example
await page.waitForRequest( 'https?://example.com/(users|companies)', { method: 'POST' });

Happy to submit a PR if you all think it's a worthwhile addition!
Thanks!

I think this would be pretty helpful

Kindly submit a Pull request 😄

This looks reasonable. Feel free to submit a PR.
Let's pass RegExp object as the first argument if you want a regex, and a string if you want an exact url match.
// Wait for regex to match
const request = await page.waitForRequest(new RegExp('https?://example.com/(users|companies)'), { method: 'POST' });
// Wait for exact url
const request = await page.waitForRequest('https://example.com/');

@aslushnikov @dowsanjack Thanks! Will get to it within the next couple of days :)

Agreeing with @aslushnikov, but since there's some minor differences between RegExp objects and literals, please do test both :-)

@matthaywardwebdesign - are you working on this? Can I help? (:

@aslushnikov - I started implementing this feature, and I have a questions regarding the api:
Do we want to get an options object, with timeout, for example? (or is it enough to use default timeout)

Do we want to get an options object, with timeout, for example?

@yanivefraim yes, options object with timeout will come handy. It will also make API consistent with other waitFor* methods.

@aslushnikov it looks like the second argument isn't really made for options like the issue was requesting?
const firstResponse = await page.waitForResponse('https://example.com/resource');
const finalResponse = await page.waitForResponse(response => response.url() === 'https://example.com' && response.status() === 200);
return finalResponse.ok();

Do we need to always return return finalResponse.ok();?


rotations not normalized in solver, causing colliders to expand and eventually explode

Adding  *body1.rotation.0 = *body1.rotation.0.normalize(); after rotational updates in position_constraints.rs fixes  this.  (Doesn't seem to be necessarily in angular_constraints.rs, but I think that's because it happens that the constraints are applied with positional_constraints running after in all existing joints which use both — so that should also be done just in case.)
I think rather than sticking the normalization after every rotation, it could be done by refactoring get_delta_rot() —  this would mean less code duplication, but probably also it getting called a few more times than necessary. Maybe it's actually better to put it up into the solver step somewhere, so it only gets called once.
If joints end up getting unified into one 6dof universal joint, that might change this entirely. So, I'm going to submit a PR for quick-and-easy fix now, but am also filing this so we can later look at putting the normalization at the most optimal level.

Also, I want to put this here for the record, because it kinda makes me laugh every time I watch it.
Screencast from 2023-11-08 17-30-13.webm


Remote Goland development is broken in the latest release

Description of the bug:
I have been manually building and testing every new commit with the latest Goland EAP and it has always worked. I have recently noticed that creating a new project fails but I'm not sure yet which commit caused that. If I enable IDE errors I can see the error in the attached log file
goland.log
. Note that I tested using the official build on the latest Goland release and it worked locally but not remotely. That same release was tested on a remote computer with an existing project and it worked. It seems that the bug is related to new project generation.
Which category does this issue belong to?
GoLand
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
1- Clone a Bazel project on a remote machine.
2- Import the project from scratch using Goland.
Which Intellij IDE are you using? Please provide the specific version.
Goland 2024.1 Release
What programming languages and tools are you using? Please provide specific versions.

No
Any other information, logs, or outputs that you want to share?
goland.log

I could fix it by reverting this line https://github.com/bazelbuild/intellij/commit/b7b5ac6046bfe43ea5f0c032ad0cf0f15f28ea9c#diff-02de1d11ce569be6f82be2a91441d7180cb18c2fcbdcd2cb7bb9e724f3547c92R61.
Now the error is still thrown by everything is working as expected.
FYI @tpasternak

Do you want me to create a PR fir this? It would be a one aliner?

Fixed by https://github.com/bazelbuild/intellij/pull/6395


Text breaks and duplicates

I am having an issue. I noticed it in here I could see some strange dots in the beginning of the second page:

When selected the text, I can see how it was hidden text:

Which is duplicated as can be seen from the last row from the previous page.
Options:
const options = { format: 'A4', border: '2cm' };

However I've noticed it happens without border or other border values; just in different places:

Here is the generated PDF for debugging:
Generated PDF

Did you found a fix for this? I'm having this same issue

How does your html look like? I thought phantomjs puts paragraphs automatically onto the new page. This might not work if you're using a div that has a fixed size around them.

This combined with setting margins in inches not centimeters solved my issue. Thanks!

any update for this issue?

I solved my issue by removing fixed size in some divs as Marc suggested and by using margins in inches


[Bug] ElasticSearch storage secretsManagementFile hot reloading doesn't work as expected

Search before asking

[X] I had searched in the issues and found no similar issues.

Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
The BulkProcessor created here is bound to the client and the BulkProcessor is not updated afterwards.
https://github.com/apache/skywalking/blob/de59bf7aebc20110c21c0e39e9b987e4aec91911/oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java#L569-L578
When the secretsManagementFile is updated, the client will be re-created in elasticSearchClient.connect(), and the original BulkProcessor is still bound to the old ElasticSearch client, which should not work.
https://github.com/apache/skywalking/blob/69ddc07cc152c415f385f863baff65c9c6079e2b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java#L145-L148
What you expected to happen
The BulkProcessor should use the newly-created ElasticSearch client, or the ElasticSearch client is not created, only update the needed fields.
How to reproduce
I notice this when reviewing the codes in #7634 , but haven't fixed it in #7634 , we'd better fix this in 8.8.0
Anything else
No response
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Please update this in the change log of #7634

Please update this in the change log of #7634

This is a bug report, and the bug exists in all previous version, what's the point to include this in the change log?

what's the point to include this in the change log?

Because your PR(even rewrite all) fixed this bug, isn't it?

No 😢, I haven't found out the best way to fix this yet,

I notice this when reviewing the codes in #7634 , but haven't fixed it in #7634 , we'd better fix this in 8.8.0

No 😢, I haven't found out the best way to fix this yet,

OK, now it's fixed in #7634 and change log is updated too


CLI History Error on ARM

When running the InfluxDB CLI on ARM Linux (specifically Raspbian), the command history returns the error:
There was an error writing history file: open : no such file or directory

Even though the user is set appropriately. Based on this comment, it seems like the file history path isn't being set correctly.

Hi I have the same problem.

FWIW: i can reproduce the same symptom on linux/amd64 if I compile the influx binary with CGO_ENABLED=0 set in the environment. In this case, the reason is that user.Current() then fails with the error: 'Current not implemented on linux/amd64.'
This causes the branch in this block to be skipped, which then results in the reported symptom after a command is run (since the history path is never initialised properly).
So, I suspect the reason this is occurring on arm systems is either that the ARM build of the influx binary was done with CGO_ENABLED=0 for some reason or go has not implemented user.Current() for ARM systems for some different reason.

Based on a quick review of the go source, it seems more likely that the arm influx binary was compiled with CGO_ENABLED=0.

same problem:
uname -a
Linux Nas-XMN 3.2.40 #7321 SMP Wed Mar 23 11:47:17 CST 2016 armv7l GNU/Linux synology_armada375_ds215j
influx -version
InfluxDB shell 0.12.1

Same issue on a beaglebone (arm based).
root@beaglebone:~# uname -a
Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux
root@beaglebone:~# influx --version
InfluxDB shell 0.12.0
root@beaglebone:~# influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.12.0
InfluxDB shell 0.12.0

create database snmp
There was an error writing history file: open : no such file or directory

Same here :(.

installed on Linux pi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
downloaded from https://s3.amazonaws.com/influxdb/influxdb_0.12.1-1_armhf.deb

~# influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.12.1
InfluxDB shell 0.12.1
> create database foo;
There was an error writing history file: open : no such file or directory

Same issue on ubuntu 14.04.
 ~ uname -a
Linux ubuntu 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8 17:59:01 UTC 2015 i686 i686 i686 GNU/Linux
 ~ influx --version
InfluxDB shell 0.12.1
 ~ influx
> create database foo;
There was an error writing history file: open : no such file or directory

same here on a fresh rPi3

0.12.2, Banana Pi, same problem:
$ uname -a
Linux bananapi 3.4.108-bananian #2 SMP PREEMPT Thu Aug 13 06:08:25 UTC 2015 armv7l GNU/Linux
$ influx --version
InfluxDB shell 0.12.2

I am seeing this on x86_64 running the 0.12.2 static linux binaries (inside an alpine docker container)

On the latest Windows builds I get this after every command in the the influx.exe terminal: "There was an error writing history file: open : The system cannot find the file specified."

Same error on CubieTruck:
mirage@cubietruck:~$ uname -a
Linux cubietruck 3.16.0-00124-g6b6dcc2-dirty #2 SMP Wed Feb 3 14:27:34 GMT 2016 armv7l armv7l armv7l GNU/Linux
mirage@cubietruck:~$ influx --version
InfluxDB shell 0.12.2
> create database test
There was an error writing history file: open : no such file or directory

I still see this issue in the latest (Windows) nightly on 8 July 2016. It seems to slow the influx.exe client a little too -- maybe it has some timeout where it tries to right to the file.

Same error on Windows

This is a high-priority issue for me. I'm glad to see progress. Thanks.

The original issue this was opened for is actually fixed. The code no longer uses user.Current().
However it instead uses $HOME which now errors on windows, and on *nix when $HOME is unset.

On Windows 10, doing SET HOME=<path to exe location> seems to fix this for me.

Adding environment variable HOME with value <path to exe location> solved problem for me either, OS Windows 7. But that's doesn't looks like a fix, just a workaround. Look forward to an appropriate fix.

Adding environment variable HOME with value  solved for me in Win7

How did anyone come up with the idea to use SET HOME= ? I didn't find "HOME" in the config file or in the Influx docs...
For less experienced Windows users: Use the configuration screen tot set this environment variable. Using SET wil only change the environment variable once for that instance of the command prompt...

@rossmcdonald is this still a problem?

@e-dard It looks like the error still occurs if the HOME environment variable is not set correctly. It looks like the client code should handle this correctly, though, so this may be Windows-specific.

was there ever a resolution to this?

I am facing the same issue with freshly installed influxdb on Windows 10 system. Is adding an environment variable HOME to the path a recommended solution for this problem?

This issue persists on Windows.
This batch file wraps influx.exe in the fix given by @JackUkleja. Save to influx.bat in the same directory as your influx executable and run the batch file instead:
@ECHO OFF
SETLOCAL
SET HOME=%~dp0
"%~dp0\influx.exe" %*
ENDLOCAL

Temporary shim but it works. Some details:

Sets environment variable HOME to the directory containing the batch file.
Localizes the environment variable setting so it won't interfere with other things.
Passes all command line arguments on to influx.

The culpable feature seems to be command history logging. Once HOME is set up right influx will create .influx_history in the HOME directory. It contains a history of commands you've entered at the influx shell.

Very good LycanStack!!

The windows build should use HOMEPATH (trust MS to use something slightly different from the 45 year old UNIX convention). In the meantime, I am "shimming" my environment with set HOME=%HOMEPATH% - much simpler than playing with %~ business.

Hello, I'm new to influxdb, am getting this error and am quite confused about to solve it. I've read the above posts, but where specifically should I write "set home=file_path"? In the configuration file I take it? Where specifically in the configuration file, and do I need to make a new header? Thank you very much


executor: Refactor package

What this PR does / why we need it:
Perform several refactoring changes on the executor package:

Simplify the pool by embedding the map.
Move the executor files to a ratelimit package. Allowing new executor types to be added later without cluttering the package.
Rename functions/types, adjusting them with the new package name.
Add the executor package to the lint coverage (comes with a small fix).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:
NONE

/test pull-kubevirt-build
/test pull-kubevirt-generate
/test pull-kubevirt-unit-test
/test  pull-kubevirt-e2e-kind-1.22-sriov

/test pull-kubevirt-build
/test pull-kubevirt-generate
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-kind-1.22-sriov

/cc @RamLavi
/cc @ormergi

/retest-required

At the moment, this does not seem to be needed.
Closing for the time being.


feat: export utils from index

Export util functions from  main entry  instead of subpath entry , in order to compat Jest.
Jest currently doesn't support subpath exports by default. Refer  #9430、#9565.

Codecov Report
Base: 83.54% // Head: 83.54% // No change to project coverage :thumbsup:

Coverage data is based on head (62cbfca) compared to base (8bd2f3e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   83.54%   83.54%
=======================================
  Files          32       32
  Lines         960      960
  Branches      210      210
=======================================
  Hits          802      802
  Misses        157      157
  Partials        1        1

Impacted Files
Coverage Δ

packages/plugins/auto-actions/src/index.ts
90.90% <100.00%> (ø)

packages/react/src/batchManager.ts
98.21% <100.00%> (ø)

packages/react/src/connect.tsx
100.00% <100.00%> (ø)

packages/react/src/createApp.tsx
95.49% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[Feature request] Show native progress for aria2c

Checklist

[X] I'm asking a question and not reporting a bug/feature request
[X] I've looked through the README
[X] I've read the guidelines for opening an issue
[X] I've searched the bugtracker for similar questions including closed ones

Question
How do I capture the percentage download when use aria2c as external downloader ?

If you are invoking via a subprocess, you can parse the output. Otherwise, not currently possible.
Something similar to https://github.com/yt-dlp/yt-dlp/pull/1133 https://github.com/yt-dlp/yt-dlp/pull/1947 will need to be implemented for aria2c

Is there a way to access console output in real time like progress_hooks option ?

yt-dlp's own output can be captured using a logger. But as I said, we are not capturing aria2c output so you wont get them in the logger

It would be great if we can access to raw output of all external downloaders via hooks.
Something like
'downloader_output': [downloader_output]

Something similar to #1133 #1947 will need to be implemented for aria2c

Aria2c is recommended downloader by.
Please implement this feature.

Note to devs: Once this is done, https://github.com/yt-dlp/yt-dlp/issues/214 should also become possible to implement since we will be able to know exactly which fragments have finished

This can be done with Aria2c RPC.
Start the RPC server, add the download with aria2.addUri method and then check the status with aria2.tellStatus.

This can be done with Aria2c RPC.
Start the RPC server, add the download with aria2.addUri method and then check the status with aria2.tellStatus.

这可以通过 Aria2c RPC 完成。 启动 RPC 服务器，使用 aria2.addUri 方法添加下载，然后使用 aria2.tellStatus 检查状态。

I would like to be able to use PRC to download but I don't know how I can do that

See https://github.com/yt-dlp/yt-dlp/issues/5931

What's the current status on this? I saw that the PR was merged, but using --progress still doesn't print a custom progress (formatted using --progress-template)


feat!: improve naming and organization

This is a breaking change, but it helps to make things a little more readable.
Also use as_string instead of to_string, since the later should come from the Display trait.

(GitHub doesn't handle PR stacks very well when they are from forks unfortunately. GitHub would have auto-updated this PR to point to main if this branch was on the same repo. 😞)

When you reopen it, can you reopen it with the same commits (without rewriting history)?


Traefik v3-beta5 compress middleware overrides http response status code

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?
Hi all,
currently, I have 2 environments with different traefik instances (same config, but different versions)

DEV: Traefik v3-beta5
PRO: Traefik 2.10.7

In both of them I have registered many routes, services and middlewares (same config for both environments of each route/service/middleware), but after the upgrade to v3-beta in the dev environment I saw a wrong behavior while using the compress middleware.
When I request to a PRO route expecting a status code different from 200, (400, 401,403...) all is fine.
When I request to a DEV route expecting a status code different from 200, (400, 401,403...) the returned status code is always 200.
What did you see instead?

ENV
COMPRESS ENABLED
EXPECTED STATUS CODE
RETURNED STATUS CODE
IMAGES

DEV
FALSE
400
400

DEV
TRUE
400
200

What version of Traefik are you using?
Version:      3.0.0-beta5
Codename:     beaufort
Go version:   go1.21.4
Built:        2023-11-29T15:14:06Z
OS/Arch:      linux/amd64
What is your environment & configuration?
# (paste your configuration here)

Here is the route and service configuration:

Just remove the middleware label to change the behavior.
The compress middleware is define as:
traefik.http.middlewares.compress.compress=true
in the traefik service.
If applicable, please paste the log output in DEBUG level
No response

Hello @rmartcas,
Thanks for reporting this!
It would be more handy if you can provide a fully reproducible case, like a docker-compose with both Traefik and the service, and an example command to make the request (e.g.: curl).
Also, can you please indicate if the service behind Traefik is using 1xxs informational responses, and if it does compress responses as well?

Hi!, after some digging i have new conclusions:
I have a property on my spring boot service that enables o disables the compression acording to the official doc:
server.compression.enabled = true|false
The next table shows the tests with different settings:

Traefik compress middleware enabled
Spring boot compress enabled
Expected status code
Returned status code
IMAGES

YES
NO
400
400

YES
YES
400
200

NO
YES
400
400

NO
NO
400
400

So, when the service has the compression enabled and traefik has the compression middleware enabled too the response status is changed from 400 to 200.

Hi!, here you have a repo with the full demo:
https://github.com/rmartcas/traefik3-demo
Just compile the project with "mvn clean install", then run the docker compose with "docker-compose up".
Then you can access the urls described in the readme to check the response headers and status.
Regards

Is there any progress on this? @rtribotte
Regards

Hello @rmartcas,
Sorry for the late answer, thanks for your feedback.
I'm going to look into it and let you know.


Use Pipenv for dependencies

I'd like to contribute some improvements to this repo, and to get it up and running locally my first step was to bring the dev environment up to date by adding support for pipenv.
The Pipfile requires Python 3.7 mainly because I don't have 3.6 at the moment (homebrew makes it awkward, it seems), but if you don't want to make that change I can try to get 3.6 installed and roll back.

Just realised I need to fix the travis config as well - I'll do that this evening.


Error loading transactions: Failed to subscribe to paths:[m/1/0-m/1/19]

Imported wallet from Trezor - it has generated a different xpub to the original wallet. Also does not download any transactions. I looked at the log and see this message: Error loading transactions: Failed to subscribe to paths:[m/1/0-m/1/19]
I chose derivation path m/84'/0'/0' which I think is the same as the Trezor. Since I noticed on FAQ that Trezor may use nested segwit, I created a new wallet with a different name but using m/49'/0'/0'/0/0 - that didn't work either so I deleted this wallet.
Any suggestions to fix this? Thanks from a befuddled non-techie.

Note: imported into Sparrow

Try File > Import Wallet > Scan for connected devices > Discover (when the Trezor appears in the list of import options). This will look across script types and derivation paths.
Closing as this is a support request - rather use the Telegram group.

Thank you - will join the Telegram group - please let me know what to search for to join the right group.

Here's the link: https://t.me/SparrowWallet
Make sure you solve the loading issues too - these are a separate concern.

thank you - will work on it.
------- Original Message -------
On Wednesday, November 1st, 2023 at 3:42 PM, craigraw @.***> wrote:

Here's the link: https://t.me/SparrowWallet
Make sure you solve the loading issues too - these are a separate concern.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Yeah, it worked. So I have a new wallet for the Trezor on Sparrow - it imported one hidden wallet on the trezor but not another one. Do I need to set up a new import wallet for this? Or is there a way to import the transactions on the one just imported as it is the same Trezor device?
So grateful for your help.
------- Original Message -------
On Wednesday, November 1st, 2023 at 3:42 PM, craigraw @.***> wrote:

Here's the link: https://t.me/SparrowWallet
Make sure you solve the loading issues too - these are a separate concern.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

You'll either need a new wallet, or a new account on the existing wallet. Try Add Account > Account 1. If that doesn't work, you'll need to experiment with other script types. Ask on the group if you need further assistance.

Thanks again for your help. It turns out that I needed to set up a new wallet on Sparrow to import the second wallet from Trezor.
Sent from Proton Mail for iOS
On Thu, Nov 2, 2023 at 4:10 AM, craigraw @.***(mailto:On Thu, Nov 2, 2023 at 4:10 AM, craigraw < wrote:

You'll either need a new wallet, or a new account on the existing wallet. Try Add Account > Account 1. If that doesn't work, you'll need to experiment with other script types. Ask on the group if you need further assistance.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Hello
I was able to see posts on the Telegram site using this link - just tried to access it again to ask a question, but now I get the message that it's a private group. Do I need an invitation to join? Thanks.
------- Original Message -------
On Wednesday, November 1st, 2023 at 3:42 PM, craigraw @.***> wrote:

Here's the link: https://t.me/SparrowWallet
Make sure you solve the loading issues too - these are a separate concern.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

What is your Telegram handle?

Thanks - telegram group handle is, I think:
Lotus @.***_dishes
------- Original Message -------
On Tuesday, November 7th, 2023 at 4:23 AM, craigraw @.***> wrote:

What is your Telegram handle?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

I see a Lotus Flower, or Lotus Flowers - is it either of these?

Lotus Flower
I think 🤔
Sent from Proton Mail for iOS
On Wed, Nov 8, 2023 at 2:24 AM, craigraw @.***(mailto:On Wed, Nov 8, 2023 at 2:24 AM, craigraw < wrote:

I see a Lotus Flower, or Lotus Flowers - is it either of these?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Ok you can try again. Make sure you are not in any of the other scam SparrowWallet groups.

Thank you- yes, I did see those other groups and was wondering if they were legit. Glad to know you’re the real deal.
Sent from Proton Mail for iOS
On Thu, Nov 9, 2023 at 2:12 AM, craigraw @.***(mailto:On Thu, Nov 9, 2023 at 2:12 AM, craigraw < wrote:

Ok you can try again. Make sure you are not in any of the other scam SparrowWallet groups.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Issue with resent-50 image classifier

I've been having trouble training an resent 50 model on both my computers (2015 iMac running latest Mojave and 2017 MacBook Air running High Sierra). I kept getting this error:
[14:08:26] src/nnvm/legacy_json_util.cc:190: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[14:08:26] src/nnvm/legacy_json_util.cc:198: Symbol successfully upgraded!
Traceback (most recent call last):
File "train.py", line 17, in
model = tc.image_classifier.create(train_data, target='label', model='resnet-50')
File "/anaconda2/envs/venv/lib/python2.7/site-packages/turicreate/toolkits/image_classifier/image_classifier.py", line 255, in create
feature_extractor = _image_feature_extractor._create_feature_extractor(model)
File "/anaconda2/envs/venv/lib/python2.7/site-packages/turicreate/toolkits/_image_feature_extractor.py", line 32, in _create_feature_extractor
mxnetResNet = _pre_trained_models.ResNetImageClassifier()
File "/anaconda2/envs/venv/lib/python2.7/site-packages/turicreate/toolkits/_pre_trained_models.py", line 111, in init
self.mxmodel = _mx.model.load_checkpoint(_os.path.join(path, self.name), epoch)
File "/anaconda2/envs/venv/lib/python2.7/site-packages/mxnet/model.py", line 421, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/anaconda2/envs/venv/lib/python2.7/site-packages/mxnet/ndarray/utils.py", line 175, in load
ctypes.byref(names)))
File "/anaconda2/envs/venv/lib/python2.7/site-packages/mxnet/base.py", line 146, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [14:08:26] src/ndarray/ndarray.cc:1114: Check failed: fi->Read(data) Invalid NDArray file format
Stack trace returned 7 entries:
[bt] (0) 0   libmxnet.so                         0x0000000d17d8f7cf libmxnet.so + 59343
[bt] (1) 1   libmxnet.so                         0x0000000d17d8f56f libmxnet.so + 58735
[bt] (2) 2   libmxnet.so                         0x0000000d17d8ee79 libmxnet.so + 56953
[bt] (3) 3   libmxnet.so                         0x0000000d18e748e7 MXNDListFree + 1330215
[bt] (4) 4   libmxnet.so                         0x0000000d18d00201 MXNDArrayLoad + 241
[bt] (5) 5   libffi.6.dylib                      0x00000001019ce884 ffi_call_unix64 + 76
[bt] (6) 6   ???                                 0x00007ffeef4e4060 0x0 +<PHONE_NUMBER>03648
I initially thought that this bug was related to my python distribution or data, so I moved to an Anaconda Virtual environment and used the images from the cats and dogs dataset you guys provided. I still got this exact error message on both computers.
It only worked when I specified in my train.py scripts that it should use squeezenet_v1.1. Here's my train script:
import turicreate as tc
Np GPU.  Using CPU')
Load the data
data =  tc.SFrame('images.sframe')
Make a train-test split
train_data, test_data = data.random_split(0.8)
Use the CPU
tc.config.set_num_gpus(0)
Create the model
model = tc.image_classifier.create(train_data, target='label', model='squeezenet_v1.1')
Save predictions to an SArray
predictions = model.predict(test_data)
Evaluate the model and print the results
metrics = model.evaluate(test_data)
print(metrics['accuracy'])
Save the model for later use in Turi Create
model.save('mymodel.model')
Export for use in Core ML
model.export_coreml('MyCustomImageClassifier.mlmodel')
What do you recommend I do to get around this problem?

It looks like MXNet can not open the downloaded model. What version of MXNet are you using? This can be determined by running pip freeze | grep mxnet.

mxnet==1.1.0.post0

I am not able to reproduce this issue using mxnet==1.1.0.post0 on either Mojave or High Sierra.
This issue is probably related to #1086.

Are you still encountering this error? If so, please feel free to reopen!


Scenarios not compatible with next

When calling one method let's say /services/ i'm using
req.url = req.url.concat("login");
next(req, res);
It should return lets say /services/login. It is working. When i turn on scenario and type /services/login - scenario is returned. But When i use /services and next it doesn't return active scenario - it returns normal response from plugin.

Hm, I cannot think of any reason why that wouldn't work just because the head is part of a scenario. Are you sure that the reason isn't that the /services/ head is below the scenario heads? You can go to http://localhost:3000/robohydra-admin/ and see the head order (after you have activated the scenario, of course).
If that's indeed the case, you'll have to register your /services/ head dynamically with the "registerDynamicHead" method in the RoboHydra object. See the logger plugin source code for an example.
I'll close this for now, assuming my theory is right. Please reopen if I was wrong!

Thanks for quick reply. Indeed using registerDynamicHead solved issue.


Remote app listening error

I'm trying to connect the Player to the Remote with the remote's listening method. The method throws this exception:
NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.GetUnsafePtr[T] (Unity.Collections.NativeArray`1[T] nativeArray) (at <91dc399f41a440558c716315c7e834ab>:0)
Microsoft.MixedReality.OpenXR.Remoting.AppRemotingSubsystem.InitializeRemoting () (at Library/PackageCache/com.microsoft.mixedreality.openxr@1.8.1/Runtime/Subsystems/AppRemotingSubsystem.cs:170)
Microsoft.MixedReality.OpenXR.Remoting.AppRemotingPlugin.OnSystemChange (System.UInt64 systemId) (at Library/PackageCache/com.microsoft.mixedreality.openxr@1.8.1/Runtime/FeaturePlugins/AppRemotingPlugin.cs:78)
UnityEngine.XR.OpenXR.Features.OpenXRFeature.ReceiveNativeEvent (UnityEngine.XR.OpenXR.Features.OpenXRFeature+NativeEvent e, System.UInt64 payload) (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/Features/OpenXRFeature.cs:634)
UnityEngine.XR.OpenXR.OpenXRLoaderBase.ReceiveNativeEvent (UnityEngine.XR.OpenXR.Features.OpenXRFeature+NativeEvent e, System.UInt64 payload) (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/OpenXRLoader.cs:635)
(wrapper native-to-managed) UnityEngine.XR.OpenXR.OpenXRLoaderBase.ReceiveNativeEvent(UnityEngine.XR.OpenXR.Features.OpenXRFeature/NativeEvent,ulong)
UnityEngine.IntegratedSubsystemDescriptor`1[TSubsystem].Create () (at <2e588915cb5341eb91148de7ca64db2c>:0)
UnityEngine.IntegratedSubsystemDescriptor`1[TSubsystem].CreateImpl () (at <2e588915cb5341eb91148de7ca64db2c>:0)
UnityEngine.IntegratedSubsystemDescriptor.UnityEngine.ISubsystemDescriptor.Create () (at <2e588915cb5341eb91148de7ca64db2c>:0)
UnityEngine.XR.Management.XRLoaderHelper.CreateSubsystem[TDescriptor,TSubsystem] (System.Collections.Generic.List`1[T] descriptors, System.String id) (at Library/PackageCache/com.unity.xr.management@4.4.0/Runtime/XRLoaderHelper.cs:118)
UnityEngine.XR.OpenXR.OpenXRLoaderBase.CreateSubsystem[TDescriptor,TSubsystem] (System.Collections.Generic.List`1[T] descriptors, System.String id) (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/OpenXRLoader.cs:486)
UnityEngine.XR.OpenXR.OpenXRLoaderBase.CreateSubsystems () (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/OpenXRLoader.cs:267)
UnityEngine.XR.OpenXR.OpenXRLoaderBase.InitializeInternal () (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/OpenXRLoader.cs:240)
UnityEngine.XR.OpenXR.OpenXRLoaderBase.Initialize () (at Library/PackageCache/com.unity.xr.openxr@1.8.2/Runtime/OpenXRLoader.cs:185)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Microsoft.MixedReality.OpenXR.Remoting.StartOrStopXRHelper:Start() (at Library/PackageCache/com.microsoft.mixedreality.openxr@1.8.1/Runtime/Subsystems/AppRemotingSubsystem.cs:466)

I've cloned the repo, opened the RemotingSample and started the RemotingSampleScene without any modification. I've tried it with Unity 2021.3.29, 2021.3.27 and 2020.3.44 and the results are the same.

I am running into the exact same error.

Hi @olcsa,
Thank you for reporting this issue. Unfortunately, we are not able to repro this issue on our end. Could you help us understand the problem a little better by clearly specifying the repro steps? And may I know the Player app you are using to connect to the remote here? Is this a custom player app that supports connecting to an IP using HAR runtime?


CDN install instructions

Per #324, updates component documentation with CDN installation instructions.

Thus far, I've only updated the accordion documentation. If this looks good, let me know and I'll go through and do the rest.

See my comment at https://github.com/cagov/design-system/issues/324

I've added CDN installation instructions for a majority of the components.
Some have been excluded due to inconsistent file paths for CSS/JS, which has led to broken CDN uploads. #923 describes this problem. I think we'll need to work through that issue to fully finish this PR.

#923 has been added to this PR.

All components now have a dist folder, including CSS-only components.
Major version numbers have been bumped in affected components.
Link-icon gets a dist folder too. It's been modified to insert CSS via JS like the other JavaScript components.
The CDN publisher has been altered to support these changes. It will now publish CSS to the dist folders.

I did not add CDN installation instructions to base-css and combined-css. We need to do a lot more with those READMEs to make them useful, so I'm punting.
I also skipped icons. I suspect there may be a larger discussion worth having about how to make that available via CDN.
Finally, I feel we should remove the component dist folders from the Git repo. They are build artifacts. We would still include them in the NPM packages, of course. But that's a project for another day.

All components now have a dist folder, including CSS-only components.

This sparks joy. ✨

@aaronhans @zakiya I'd like to get a fresh review on this PR if y'all don't mind. It's changed quite a bit since the previous approval, including major version bumps to half the components.

I'm going to merge into release branch and publish to NPM. The major version bumps should keep all our sites safe.


How to ignore warnings

warnings output makes me not comfortable, and how to ignore it in the api

Hello He-haitao,
ImageAI doesn't currently support provide a way to suppress warnings. Hopefully, in a future version of ImageAI, there would be a way to suppress warnings.

@He-haitao You can use the solution provided here
https://stackoverflow.com/questions/14463277/how-to-disable-python-warnings


Add sample to consistent with other languages.

Description
Add sample to consistent with other languages
Addresses https://github.com/Azure/azure-sdk-for-java/issues/28906
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


⚠ Bofrost.com has degraded performance

In 0e68fad, Bofrost.com (https://www.bofrost.com) experienced degraded performance:

HTTP code: 200
Response time: 665 ms

Resolved: Bofrost.com performance has improved in bb7c9b4 after 6 minutes.