ITT Fermi Frascati

@callmecampa Is this organization a part of Istituto Tecnico Tecnologico
ENRICO FERMI-FRASCATI? Is it accredited as a recognized distance learning institution? If yes, could you please advise where I can check its accreditation (Ministry of Education?)

No, it's a computer liceo, not at a distance. It is accredited by the Italian Ministry of Education, as you can see from the website www.fermifrascati.it
Nicola Campanile
Il 24 ott 2018, 09:52 +0200, Philip Torchinsky<EMAIL_ADDRESS>ha scritto:

@callmecampa Is this organization a part of Istituto Tecnico Tecnologico
ENRICO FERMI-FRASCATI? Is it accredited as a recognized distance learning institution? If yes, could you please advise where I can check its accreditation (Ministry of Education?)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

No, it's a computer liceo, not at a distance. It is accredited by the Italian Ministry of Education, as you can see from the website www.fermifrascati.it


ENH: Ignore errors in checking for tox.

Following the discussion in #108, this PR ignores tox call errors during initialization.

@gaborbernat I am not sure how to test for that since it only gets triggered when tox -aqq fails. Do you have a suggestion?

Or just create a test that mocks the subprocess call to fail.

I added a test with a false tox binary.

Didn't work. Any idea why it's not working? I think monkeypatch.syspath_prepend is not working as expected? I checked the tox file that the test generates, and it's executable, but for some reason the test still is not picking it up.

Well the entire test is incorrect... Supreseeded by https://github.com/tox-dev/pyproject-fmt/pull/120.


Added base64 support, closes #90

Added base64 loading support

It would still be a nice addition but needs a major refactoring for the new version.

Yea, probably better to just start over.


<IP_ADDRESS> - Crash while in demuxing process

Hello,
on a fresh installation with default settings, each time i load a source file it starts to demux it and it crashes.
Tried with avi, mov, mp4 input and each time it crashes.
Selecting an avi while having manual for input
On the options menu to select a source select " automatic"
it starts to demux and crash.
One log file from one of the crash reports : https://pastebin.com/665jPrVV
Thank you.

Another different crash :
Just open staxrip, select the re-mux3 script, select a container mkv or mp4 then this happens :
https://img15.hostingpics.net/pics/31122720170517165147.png
No log file for this one

Still happening with <IP_ADDRESS> sadly.

new build is uploading

Seems fixed in <IP_ADDRESS>, thanks a lot


Regression: TextField not working on Linux

Duplicate Check

[X] I have searched the opened issues and there are no duplicates

Describe the bug
When trying to use a TextField, it is not possible to input text, and the window stops being closeable as soon as the TextField is focused.
Any other interaction also fails when the TextField is focused. Flet becomes completely unresponsive.
Code sample
Code
import flet as ft

async def main(page: ft.Page):
    field = ft.TextField(on_change=print, on_submit=print)
    page.add(field)

ft.app(main)

To reproduce
On linux (in my case mint):

run code
select text field
try to type (no text appears, nothing is being printed)
try to hit enter (nothing is being printed)
try to close window

Expected behavior
at step 3: text is being entered
at step 5: the window closes
Screenshots / Videos

state of Flet window after focusing the text field and resizing
Operating System
Linux
Operating system details
Linux Mint 21.3 Cinnamon
Flet version
0.24.0
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Logs
Logs
when run with debug level logging, and executing the steps to reproduce:
DEBUG:asyncio:Using selector: EpollSelector
INFO:flet_runtime:Assets path configured: /home/[username]/.config/JetBrains/PyCharm2024.1/scratches/assets
DEBUG:flet_core:Creating new PubSubHub instance
DEBUG:flet_core:Creating new PubSubHub instance
INFO:flet_runtime:Starting up UDS server on /tmp/OK1ms9Ei21
INFO:flet_runtime:Flet app has started...
INFO:flet_runtime:App URL: /tmp/OK1ms9Ei21
INFO:flet_runtime:Starting Flet View app...
INFO:flet_runtime:Flet View found in: /home/[username]/.flet/bin/flet-0.24.0
package:media_kit_libs_linux registered.

DEBUG:flet_runtime:Flet View process 6056
DEBUG:flet_runtime:Closing connection...
DEBUG:flet_runtime:Disconnecting all pages...
DEBUG:flet_core:page.on_event_async: page disconnect
DEBUG:flet_runtime:Shutting down thread pool...

Process finished with exit code 0

Additional details
This is a new regression with 0.24.0, it used to work in 0.23.2.
I have tested both versions after each other to make sure the issue is not caused by anything else.
I have also tested the code sample on windows and macOS, it works just fine there.

Same behavior for SearchBar and CupertinoTextField

Hello,
In my Linux (Mint 22 - Cinamon 6.2.9) they work fine, exept the accents.
If I type something like "Aló", appears "Al´ó" (a first nonesense accent and then the correct one)
Thanks, best regards

Hello,
In my Linux (Mint 22 - Cinamon 6.2.9) they work fine, exept the accents.
If I type something like "Aló", appears "Al´ó" (a first nonesense accent and then the correct one)
Thanks, best regards

Opps... and another strange behaviour.
I can't delete completely their values... Always remains the first character.
If I want to remove "Aló", always remains "A"

I can't delete completely their values... Always remains the first character.

https://python.plainenglish.io/whats-new-in-flet-v0-24-0-83f758245f4d

When trying to use a TextField, it is not possible to input text, and the window stops being closeable as soon as the TextField is focused.
Any other interaction also fails when the TextField is focused. Flet becomes completely unresponsive.

Works normally on my Mac. @Birnendampf do you have Linux too?

Found a Flutter issue related this: https://github.com/flutter/flutter/issues/153560

I can't delete completely their values... Always remains the first character.

https://python.plainenglish.io/whats-new-in-flet-v0-24-0-83f758245f4d

Ok!! Thanks

Hello,
In my Linux (Mint 22 - Cinamon 6.2.9) they work fine, exept the accents.
also using mint and for you its fine? that's strange, maybe its my system.
I will try upgrading to Mint 22 maybe its the OS

didn't fix it for me sadly, is there any more info I should provide or do we wait until it's fixed upstream?
At the risk of sounding inexperienced, is there a way to use the new version of flet with an old version of flutter?

Hello,
In my Linux (Mint 22 - Cinamon 6.2.9) they work fine, exept the accents.
If I type something like "Aló", appears "Al´ó" (a first nonesense accent and then the correct one)
Thanks, best regards

Hello,
Just now I reviewed it again with Linux (Mint 22 - Cinnamon 6.2.9) and Flet v.0.24.1 and doing the right steps explained at:
https://python.plainenglish.io/whats-new-in-flet-v0-24-0-83f758245f4d
And all works perfect for me, I can't help you sorry.
Thanks, best regards.

didn't fix it for me sadly, is there any more info I should provide or do we wait until it's fixed upstream? At the risk of sounding inexperienced, is there a way to use the new version of flet with an old version of flutter?

That is interesting. I did a fresh mint installation so there was no backup involved apart from my old code. Did you use timeshift or something to create a snapshot or backup of either the entire machine or just the home folder? If so, did you install it too before or after installing flutter? I have a hypothesis that nothing from the home directory is causing the flutter TextField to not function properly like a binary or lib*.so from somewhere else. However, I have neither any reasoning to back that up nor any means to try it out at the moment. By the way, did you try to remove your flutter folder and install it again? Ah also, I installed arch linux on my machine before re-installing mint so I was fiddling around with secure boot and other things. Maybe you can try to toggle those around tho' that is very unlikely to work.

I have some bad news. I just went to try if TextField is still working on my mint or not and I realized that it is not :sob:
When I had my fresh mint installation, everything was working fine. Hmm, maybe I installed or apt autopurge-d something I shouldn't have.

@Birnendampf and others,  I would like to bring your attention to this https://github.com/flutter/flutter/issues/153560#issuecomment-2336682859. If you have an urgent project and don't want to downgrade flutter, then you can just change your desktop environment. I am using i3wm for a while and didn't have the textfield issue so far. I tried on KDE Plasma and didn't have issue there either but my KDE setup was not configured or anything i.e., it was the bare minimum KDE setup so cannot say for sure if switching to KDE Plasma is a guaranteed workaround or not but worth a try if it is urgent.

Seems like we have a workaround: https://github.com/flutter/flutter/issues/153560#issuecomment-2497160535

Please install the latest Flet prerelease and let know if the issue is resolved: pip install flet --pre -U

as I mentioned upstream, all widgets that Internally use the EditableText widget are affected, i forgot to mention this here sorry. This means that
import flet as ft

async def main(page: ft.Page):
    page.add(ft.Text("select me!", selectable=True), ft.FilledButton("hi"))

ft.app(main)

also hangs when selecting the text, because it uses SelectableText which uses EditableText.
TextField works though!

Yes, I just realized this applies to CuppertinoTextField, SearchBar, TimePicker, DatePicker, the Cupertino Variants of Those, anything where you can type in text is affected

Alright, let's just leave it as-is for now while waiting for an upstream fix.


this command not working only on android 11 and above.

val command = arrayOf(
"-i",
inputPath,
"-filter:v",
"crop=$width:$height:$x:$y",
"-threads",
"5",
"-preset",
"ultrafast",
"-strict",
"-2",
"-c:a",
"copy",
outputPath
)
his command not working only on android 11 and above
library version 1.0.8

@ahmadbajwa0328 We will check it asap and get back to you.

@yashwantgowla-simform thank you brother.

@yashwantgowla-simform  any update?

@ahmadbajwa0328 Team is on it and will fix it in the upcoming release.

@yashwantGowla  any updates? It's been 14 days.

When to wait for update ?

We shall update the next release asap. Kindly wait for the upcoming one.

@ahmadbajwa0328 @ArtiomYak Can you please share the entire query with every parameter and the error you are receiving while performing the crop operation?
I was able to successfully run the query on android 11, 12, and 13.
https://user-images.githubusercontent.com/109596498/185370550-ccb391b2-652b-4f63-bb88-0527e0049c98.mp4

@priyankj-simform here is the command:
 val command = arrayOf(
"-i",
inputPath,
"-filter:v",
"crop=$width:$height:$x:$y",
"-threads",
"5",
"-preset",
"ultrafast",
"-strict",
"-2",
"-c:a",
"copy",
outputPath
)

Can you share your command also? I'll try out that too.

I have used the same command that you have shared.
-i /storage/emulated/0/Download/sample-mp4-file.mp4 -filter:v crop=160:120: 100:100 -threads 5 -preset ultrafast -strict -2 -c:a copy /storage/emulated/0/Android/data/com.simform.videoimageeditor/files/Output/Output1660821907.mp4
The values for variables are as follow
inputPath = /storage/emulated/0/Download/sample-mp4-file.mp4
width = 160
height = 120
x = 100
y = 100
outputPath = /storage/emulated/0/Android/data/com.simform.videoimageeditor/files/Output/Output1660821907.mp4
Can you please share the full query with all the variable information?

@ahmadbajwa0328 Did you get a chance to look into the above comment?

Sorry for the late reply here is the full query which I'm using.

Now I have changed the path for android 11 and above. After that I got this error:
New Path: /storage/emulated/0/Android/data/com.dxapps.screenrecorder.videoeditor.videorecorder.free/files/Movies/t_1661679753721_VID_20220213_141822.mp4
Error:
ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
libavutil      56. 55.100 / 56. 55.100
libavcodec     58. 96.100 / 58. 96.100
libavformat    58. 48.100 / 58. 48.100
libavdevice    58. 11.101 / 58. 11.101
libavfilter     7. 87.100 /  7. 87.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/VID_20220213_141822.mp4':
Metadata:
major_brand     : mp42
minor_version   : 0
compatible_brands: isommp42
creation_time   : 2022-02-13T09:18:33.000000Z
com.android.version: 11
Duration: 00:00:11.33, start: 0.000000, bitrate: 1897 kb/s
Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 2365 kb/s, SAR 1:1 DAR 16:9, 5.97 fps, 90k tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate          : 90
creation_time   : 2022-02-13T09:18:33.000000Z
handler_name    : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
Metadata:
creation_time   : 2022-02-13T09:18:33.000000Z
handler_name    : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Too many packets buffered for output stream 0:1.
Conversion failed!

@ahmadbajwa0328 I have checked your query with different h264 inputs. From the primary investigation, it seems like the problem is in the source file. From this FFMPEG discussion, we can solve this error by adding an extra command. You may need to add -max_muxing_queue_size in commands to check for that.
The final query will look something like this. Here 1024 is the value for -max_muxing_queue_size.
val command = arrayOf(
            "-i",
            inputPath,
            "-filter:v",
            "crop=$width:$height:100:100",
            "-threads",
            "5",
            "-preset",
            "ultrafast",
            "-strict",
            "-2",
            "-max_muxing_queue_size",
            "1024",
            "-c:a",
            "copy",
            outputPath
        )

The value for the max_muxing_queue_size is a arbitrary value. If 1024 does not work please try to change it to 9999.
More details about this flag on Stack Overflow.
If you can share the source file we can look into it to see if the problem is within the SSffmpegVideoOperation or the actual source file.

@ahmadbajwa0328 did you get a chance to look into the above comment to solve the issue?

still no output  @priyankj-simform
I/mobile-ffmpeg: ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
      built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
      configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
      libavutil      56. 55.100 / 56. 55.100
      libavcodec     58. 96.100 / 58. 96.100
      libavformat    58. 48.100 / 58. 48.100
      libavdevice    58. 11.101 / 58. 11.101
      libavfilter     7. 87.100 /  7. 87.100
      libswscale      5.  8.100 /  5.  8.100
      libswresample   3.  8.100 /  3.  8.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/VID_20220213_141822.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
        creation_time   : 2022-02-13T09:18:33.000000Z
        com.android.version: 11
      Duration: 00:00:11.33, start: 0.000000, bitrate: 1897 kb/s
        Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 2365 kb/s, SAR 1:1 DAR 16:9, 5.97 fps, 90k tbr, 90k tbn, 180k tbc (default)
        Metadata:
          rotate          : 90
          creation_time   : 2022-02-13T09:18:33.000000Z
          handler_name    : VideoHandle
        Side data:
          displaymatrix: rotation of -90.00 degrees
        Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
        Metadata:
          creation_time   : 2022-02-13T09:18:33.000000Z
          handler_name    : SoundHandle
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
      Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [graph 0 input from stream 0:0 @ 0xf492b040] sws_param option is deprecated and ignored
    [mp4 @ 0xee4e0f80] Could not find tag for codec amr_nb in stream #1, codec not currently supported in container
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Error initializing output stream 0:0 --
    Conversion failed!

@ahmadbajwa0328 From the error it seems like mpeg4 cannot encode amr_nb audio stream. I have checked the documentation, in which the supported container for amr_nb seems to be 3gp.
The solution seems to be, to re-encode the audio stream so that the container can support it. So can you please try the following command?
Here the audio codec is changed to aac, so that audio can be converted from amr_nb to aac.
val command = arrayOf(
            "-i",
            inputPath,
            "-filter:v",
            "crop=$width:$height:100:100",
            "-threads",
            "5",
            "-preset",
            "ultrafast",
            "-strict",
            "-2",
            "-max_muxing_queue_size",
            "1024",
            "-c:a",
            "aac",
            outputPath
        )

If the re-encoding does not work and if possible can you please share the source file? so that we can look into it to see if the problem is within the SSffmpegVideoOperation or the actual source file.

This cmd works but the file got corrupted like it says this video cannot be played.
val command = arrayOf(
            "-i",
            inputPath,
            "-filter:v",
            "crop=$width:$height:100:100",
            "-threads",
            "5",
            "-preset",
            "ultrafast",
            "-strict",
            "-2",
            "-max_muxing_queue_size",
            "1024",
            "-c:a",
            "aac",
            outputPath
        )


Fix java 8 because of remove sun internal Nullable annotation

The annotation com.sun.istack.internal.Nullable was removed in java 8.
In order to compile with java 8 this type can't be used.

@pahimar Any interest in this PR?

@pahimar Alive or recording something?

Closing as a big refactor is under way


Segformer Support

Feature request
Would love for Optimum to add support for transformers.SegformerForSemanticSegmentation
https://huggingface.co/docs/transformers/model_doc/segformer#transformers.SegformerForSemanticSegmentation
As best I could tell, semantic segmentation is not something that Optimum currently supports for any models (https://huggingface.co/docs/optimum/main/en/pipelines) would love for this to be improved!
Motivation
I use HuggingFace's Segformer for an image segmentation model I have and would love to improve my inference speeds.
Your contribution
I don't know what a PR is so I kind of doubt it.

Hi @HugeBob,
So if I understand correctly you would love to use a semantic-segmantation pipeline.
It seems that this is not currently supported by transformers, so we will not support it on our end, until it is supported there.

Hi @michaelbenayoun,
I had the same thing in head than Bob.
From my understanding, some of the architectures from the transformers package, allows for sementic segmentation such as transgormers.SegformerForSemanticSegmentation.
For example, nvidias Segformers (https://huggingface.co/nvidia/mit-b0), apparently based on "a hierarchical Transformer encoder and a lightweight all-MLP decode head".
Those transformer based models, even though they are implemented in transformers cannot be optimized with optimum ?
Thank you,
Theo

Hi @TheoMrc
Yes, they can, we just need to support the ONNX export of those models actually. We do support the Segformer export, so you will be able to both export, optimize and quantize a Segformer model with ONNX Runtime.
For pipelines, it might not be usable because it was not available in transformers last time I checked.
What we can do on our end is to add support for an ORTModelForImageSegmentation. I will create an issue for that!

Hi again,
Thanks for your answer,
If you don't mind, I could need some points of clarification to better understand how things might turn up.
After some very interesting reading time in various documentations, I'm guessing from your answer that:

In order to optimize inference speed, I should consider converting my SegFormer pytorch models to ORT (ONNX runtime) models, and then applying ORTOptimizer and ORTQuantizer from optimum.onnxruntime.
Links for mortals like me : Transformers export to ONNX runtime ; Optimum tutorial

Once optimized and quantized in the .onnx format, I should theoretically be able to load and do inferences with my model in my python app through the ORT's python API with some kind of weird session-based syntax - Python api ORT tutorial

Optimum is (among other things) some kind of python wrapper for ORT, that allows mortals like me to handily benefit from ORT with some HuggingFace's user-friendly syntax. That is what you plan to implement as ORTModelForImageSegmentation.

If my previous points are kind of accurate, the fact that SegFormers use transformer encoding layers might make them candidate for further optimization through BetterTransformer, after which I should convert to ONNX, optimize and quantize. See BetterTransformer example bellow
Or maybe the "BetterTransformer" stuff only works upon torch-based inference and is not about the layer structure ?

BetterTransformer example from Hugging Face
from transformers import AutoModelForSequenceClassification
from optimum.bettertransformer import BetterTransformer
model_hf = AutoModelForSequenceClassification.from_pretrained("bert-base-cased")
model = BetterTransformer.transform(model_hf, keep_original_model=True)

Anyway thanks a lot for your time,
I'm starting to feel like I should do an internship at huggingface to learn more about how these things work after my PhD !
See you around,
Theo

To answer to each of your points:

Yes, we also support the export in optimum  now, and it is the recommended way; check here.
Yes, in theory, but as you mention in point 3, we save you this pain by implementing wrappers hiding this logic.
Yes
So it is not possible to mix both for now, since the PyTorch kernel for BetterTransformer is not supported by ONNX Runtime. That being said, in a general case I would suggest to both try BetterTransformer in PyTorch and ONNX Runtime, and see what gives the best latency. In your case, Segformer cannot use BetterTransformer because it has some custom way of computing the FFNs.

Maybe!
In any case do not hesitate if you have any questions, or want to contribute!

Thanks once again for your answer.
Just a quick follow-up bellow

After late Sunday night investigations of Hugging Face's transformers tutorials I managed to save my local segformer model to .onnx
Code bellow:

model = AutoModelForSemanticSegmentation.from_pretrained(model_path)
feature_extractor = SegformerFeatureExtractor()

model_kind, model_onnx_config = FeaturesManager.check_supported_model_or_raise(model, feature="semantic-segmentation")
onnx_config = model_onnx_config(model.config)

onnx_inputs, onnx_outputs = transformers.onnx.export(preprocessor=feature_extractor,
                                                     model=model,
                                                     config=onnx_config,
                                                     opset=13,
                                                     output=target_path)

Turns out that optimization is not supported for segformers
Code bellow:

optimizer = ORTOptimizer.from_pretrained(onnx_model_path)
optimization_config = OptimizationConfig(optimization_level=99)

>>> KeyError: 'segformer model type is not supported yet. Only albert, bart, [...]

Although I don't mind since I have no idea what it does 😎. Sounded nice though, since it does not impact model outputs but appears to halve latency in some cases Optimum tutorial.

On the other hand, quantization worked :

quantizer = ORTQuantizer.from_pretrained(torch_model_path)
qconfig = AutoQuantizationConfig.avx512_vnni(is_static=False, per_channel=True)
quantizer.quantize(save_dir=quantized_onnx_path, quantization_config=qconfig)

(This, I read a bit about the theory)

I took some inspiration from transformers and optimum source codes for Pipeline and ORTmodel classes, and managed to grasp how they work.
Turns out SegFormer work just fine with pipelines().

From this, I built my own custom Pipeline class with strategic outputs based on my own application (I basically want to output the segmentation map i.e. the argmax of all logits).
class CustomImageSegmentationPipeline(ImageSegmentationPipeline):
    def postprocess(self, model_outputs):
        logits = model_outputs.logits
        logits = nn.functional.interpolate(
            logits,
            size=model_outputs.target_size[0],  # (height, width)
            mode='bilinear',
            align_corners=False
        )

        segmentation_map = logits.argmax(dim=1)[0]
        return segmentation_map

# Creating instance
auto_model = AutoModelForSemanticSegmentation.from_pretrained(torch_model_path)
feature_extractor = SegformerFeatureExtractor()
hf_pipe = pipeline("image-segmentation", model=auto_model, feature_extractor=feature_extractor)
custom_pipe = CustomImageSegmentationPipeline(model=auto_model, feature_extractor=feature_extractor)

Everything worked perfectly for torch models (tested only on CPU).
inputs = feature_extractor(pil_image, return_tensors="pt")
print('Duration of the prediction with torch model:')
%timeit auto_model(**inputs)
>>> Duration of the prediction with torch model:
>>> 2.82 s ± 73.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Using the ORTModel class from optimum, I loaded my onnx models, performed predictions, which were around twice as fast than torch inference:

onnx_model = ORTModel(onnx_path)
quantized_model = ORTModel(quantized_path)
onnx_inputs = feature_extractor(pil_image, return_tensors="np")

print('\nDuration of the prediction with onnx model:')
%timeit onnx_model.session.run(None, input_feed=onnx_inputs)
print('\nDuration of the prediction with quantized onnx model:')
%timeit quantized_model.session.run(None, input_feed=onnx_inputs)

>>> Duration of the prediction with onnx model:
>>> 1.68 s ± 113 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
>>> Duration of the prediction with quantized onnx model:
>>> 1.45 s ± 50.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Although, I could not manage to implement a custom transformers.Pipeline because several class attributes are not implemented in ORTModel (ORTModel.config for example) which are necessary upon Pipeline.__init__ and Pipeline._sanitize_parameters calls.
For now, I just built custom "pipeline functions" that work on cpu only, but avoid unecessary tasks performed in implemented Pipeline classes, doing only what is necessary for my goal
def custom_onnx_workflow(image, onnx_model):
    inputs = feature_extractor(image, return_tensors="np")
    onnx_inputs = {'pixel_values': inputs['pixel_values']}
    outputs = onnx_model.session.run(None, input_feed=onnx_inputs)
    upsampled_logits = nn.functional.interpolate(
        torch.from_numpy(outputs[0]),
        size=image.size[::-1],  # (height, width)
        mode='bilinear',
        align_corners=False
    )
    segmentation_map = upsampled_logits.argmax(dim=1)[0]
    return segmentation_map

Next step for me is to enable GPU coverage, which I am sure I will find how-to in optimum.ORTModel source code, for example in the ORTModelForImageClassification source code.
I'd love to try to actually implement it and do a PR.
I'm gessing the forward method will have to return a SemanticSegmenterOutput instead of an ImageClassifierOutput.
Appart from this, I think everything will actually be the exact same as the ORTModelForImageClassification.
Or have you already started writing this class ?
Else, any other obvious advice ?
Thanks for your time,
Theo

Hi @TheoMrc,
First, thank you for your feedbacks, they are very valuable!
About you questions:

You can also convert it using optimum.exporters.onnx . It is the suggested way since it is more up-to-date. The API is mostly similar, and you can do it via a command-line:

python -m optimum.exporters.onnx --model model_name --task semantic-segmentation segformer_onnx

Basically, among other things, the ORTOptimizer will look for patterns, and try to fuse operations together (such as attention), and we support common patterns (BERT, GPT-2. etc). I will need to check if segformer can be supported.

That is nice, it would be interesting to check what operators end up quantized, I feel like the speed-up compared to the non-quantized ONNX model is small, you can get more. Performing graph optimization before would also help.

ORTModel do have a config attribute, altough it might not always be set.. I am currently working on improving and cleaning the ORTforXXX classes to avoid such cases and make the API easier. But you're right, adding a ORTModelForImageSegmentation is the first step. Writing such class would most likely consist in preparing the IO binding (cc @JingyaHuang) and returning the proper output class as you mentioned. For this, ORTModelForImageClassification  is a great example to follow. I have not started working on it by the way.

You can open a PR and I can help you there, what do you think?

Hi @TheoMrc,
Just to expand on the second point of @michaelbenayoun, as Segformer is based on transformer encoder architecture, we can apply a bert-like optimization, by registering Segformer in ORTManager
(But there is a caveat based on the fact that Segformer's encoder blocks have different hidden_size, I am not sure if this has been taken into consideration in ONNX Runtime(although ort supports automatical shape inference to get hidden_size and num_head with Reshape nodes), better check.)
And if you are interested in contributing the ORTModelForImageSegmentation class, please feel free to tag me.

With a quick test, the automatic detection of hidden_size and num_head works.  I got some fused nodes(level=99) like the following:

I am thinking of letting BERT-like model infer hidden_size and num_head themselves instead of reading from the config in these cases(various hidden_size for blocks), WDYT? @michaelbenayoun

Hi @michaelbenayoun and @JingyaHuang,
Thanks to you both for your answers, as a "novice" in the field, I find it personnally extremely useful to speak with you. I started ML in python through a from "scratch" manner in tensorflow, and then torch, for which I had to grasp more of the theory, create new loss functions, ... Hugging Face is very nice but hides most the complicated stuff, which is very handy to get working prototypes but surely makes it easy to ignore the way this work. I surely plan to learn and understand everything :)
Michael:

You can open a PR and I can help you there, what do you think?

I will clone the optimum repo and open a PR once I have a first (hopefully working) version of the ORTModelForImageSegmentation and tag you both for review !
Before my previous answer, following your advice, I first had tried this from commandline with optimum :

python -m optimum.exporters.onnx --model model_name --task semantic-segmentation segformer_onnx

But initially failed because I tried to input the path to pytorch_model.bin as model_name instead of parent directory (actually, might also be because I did not input a task).
I then went down a level and managed conversion through transformers.onnx (cf. my previous answer).
Anyways, worked out just fine once I tried with your command and the right inputs, thanks for the tip !
Michael:

Basically, among other things, the ORTOptimizer will look for patterns, and try to fuse operations together (such as attention), and we support common patterns (BERT, GPT-2. etc). I will need to check if segformer can be supported.

Jingya:

Just to expand on the second point of @michaelbenayoun, as Segformer is based on transformer encoder architecture, we can apply a bert-like optimization, by registering Segformer in ORTManager

Being a computer vision guy (and a biologist), I only use segformers from HuggingFace :

nvidia/mit-b0 for classification of fish orientation on microscope images
nvidia/mit-b4 for zebrafish larvae organ segmentation on images.
I'd obviously enjoy any performance gain from segformer optimization support !
Once again, I'd love to contribute in order to improve my understanding of what's going on behind the nice Hugging Face syntax.

Michael:

That is nice, it would be interesting to check what operators end up quantized, I feel like the speed-up compared to the non-quantized ONNX model is small, you can get more. [...]

To be noted, my quantized_model.onnx file (117 Mo) is half the size when compared to the original model.onnx (246 Mo). Not sure how relevant this is.
I'm guessing that around half the weights were converted from float32 to int8.
32bits/8bits = 4, so theoretical max "size" gain, would be about 4-times smaller. (Probably oversimplyfing though, the model is obviously not just a bunch of weights)
I don't know how to check what was quantized, maybe you could redirect me to some documentation ?
As well, I tested inference on my old-ish laptop CPU which tends to overheat, and latency is quite variable. I'll test inference on my main machine and comeback with more reliable latency data.
Thanks again for your time, see you soon after my PR

Fixed in https://github.com/huggingface/optimum/pull/539


Compatibility with Arduino Mega 2560

Do you plan to make library compatible with Arduino Mega 2560? If i use it on Mega i cannot retrieve data from the sensor (case Pms5003::noData:). Is there any special requirements for Mega? Thank you!

About the plans: yes, probably I'll test it with Mega in the not so far future.
My priority is to clean-up the first version, including docs.
How did you connect sensor and Arduino? Have you used logic converter?

I have used active logic converter. I made four tests:

Arduino UNO with PMS - works fine
Arduino Mega 2560 with PMS - no data read
Arduino UNO with Dragino v1.3 LoRa shield with PMS (exactly the same connections as in test 1) - no data read; this is quite strange because between Arduino and PMS is only the shield
Arduino Mega 2560 with Dragino v1.3 LoRa shield with PMS (again the same connections) - no data read

In all four test i used the same minimum sketch to read the PMS senzor.  If you need any more informations please let me know.

I'll try to switch my board (Arduino Uno Plus) to 5V and use converter - probably during the weekend.
According to https://codebender.cc/example/AltSoftSerial/Test#Test.ino have you used pins 46,48 ?

Good question and the simple answer is: no. I missed this. I have tested with Arduino MEGA 2560, BMP280 on I2C, PMS5003 and Dragino LoRa shield v1.3 with LMIC library and it works. The only problem is sometimes i get the error "sumError" but i believe this is due to coexisting code which needs some optimization. Anyway, in what cases could this error emerge?

After tests i found out where is the problem. If the main code to read PMS is within void loop () than it is OK and there is no error. But if the loop () just call separate function with exactly the same code to read PMS, than the errors becoming more an more often.  Is there any limitations or any other conditions for function to read PMS data?

Please share the code causing errors?

Here it is. If the content of readPMS() is inside of void loop() than works without any error :
/*
pin 4 on D9
pin 5 on D8
no pullup resistors, RESET and SET are not connected
SET = LOW means sensor sleep mode
*/
#include <Arduino.h>
#include <pms.h>
#include <LowPower.h>
//#include <AltSoftSerial.h>
Pms5003 pms;
////////////////////////////////////////
void setup(void) {
Serial.begin(115200);
while (!Serial) {};
Serial.println("PMS5003");
pms.begin();
pms.waitForData(Pms5003::wakeupTime);
pms.write(Pms5003::cmdModeActive);
}
////////////////////////////////////////
auto lastRead = millis();
void loop(void) {
Serial.println("Main loop");
readPMS();
delay(5000);
}
void readPMS () {
const auto n = Pms5003::Reserved;
Pms5003::pmsData data[n];
Pms5003::PmsStatus status = pms.read(data, n);
switch (status) {
case Pms5003::OK:
{
Serial.println("_________________");
auto newRead = millis();
Serial.print("Wait time ");
Serial.println(newRead - lastRead);
lastRead = newRead;
    // For loop starts from 3
    // Skip the first three data (PM1dot0CF1, PM2dot5CF1, PM10CF1)
    for (size_t i = Pms5003::PM1dot0; i < n; ++i) {
      Serial.print(data[i]);
      Serial.print("\t");
      Serial.print(Pms5003::dataNames[i]);
      Serial.print(" [");
      Serial.print(Pms5003::metrics[i]);
      Serial.print("]");
      Serial.println();
    }
    break;

  }
case Pms5003::noData:
  //Serial.println("Did not get any data from the sensor!!!");
  break;
default:
  Serial.println("______________ E R R O R !!! _______________");
  Serial.println(Pms5003::errorMsg[status]);

};
}

Did you have a solution for this?
I’m using the library and works great with Esp8266 (wemos d1 mini), I moved the simple test out of main loop with a call and it fail several time with a SumError.

This is what I found. even without moving the code out of look.
Using the Simple test Adding a 5 seconds delay just before the LOOP() end, I get the sum error almost immediately after the first read., then more sumerrors..
here are the last pieces of code with the simple test that ALWAYS create the error, how can I fix it, please?
	case Pmsx003::noData:
		break;
	default:
		Serial.println("_________________");
		Serial.println(Pmsx003::errorMsg[status]);
};

delay(5000);
}


Could MacosTheme be a type of ThemeData so i could use it in my MaterialApp ?💡

Use case
I'm building a macOS app using Flutter and i would like to use some the macOS theming but still use the regular classes for MaterialApp and Scaffold.
Proposal
Could you just use the regular ThemeData. Why the need to create a MacosTheme class?
Rant on cross platform packages
I appreciate the effort, but it seem like these cross platform packages they have limitations. Once you buy into one, like macos_ui or flutter_platform_widgets, it seems it locks you down into that specific platform, as now you can't support other platforms without rebuilding everything (!), and there is always limitations to these packages and their widgets. I would rather see more independent packages where you can pick and choose UI elements or ThemeData themes which would fit with the default MaterialApp or Scaffold.

Hi there.
Thanks for filing this issue. I understand your frustrations and agree that Flutter itself should offer theming and components that address platform specific styles for desktop.
If you'd like to use macOS theming with the material library, I suggest that you lift the style values from macos_ui and create your own ThemeData for use with regular material widgets.


Replace @temp with ordinary ivars

@matthewd @dclarizio Amazing that this straight-forward refactoring makes the view code easier to read (at least for me)

@matthewd The one warning concerns me:

[ ] :red_circle: Warn - Line 371, Col 28 - Lint/ShadowingOuterLocalVariable - Shadowing outer local variable - timeprofile.

@Fryguy that warning's already there.
Looks like the argument, which is what's being shadowed, is never touched, and should just go away. But that can probably wait for a later cleanup.

Ah ok.  Thanks @matthewd

@matthewd The UI seems to be happy with these changes (as am I) . . . good to go for rebase.

@matthewd Since we got the green light from @dclarizio in an earlier comment, please rebase, and let me know so I can merge before you have to rebase again.  Thanks!

@Fryguy :+1:


Lists

As already pushed on the repo with the solution : https://github.com/jarvismayur/Hackerrank-Problem-Solutions/blob/main/Python/Lists/Lists.py


Automated Splunk TA Update 61

This PR contains updates to Splunk TAs made by GitHub Actions workflow.

LGTM!


Request: Ability to use decoder previous output as decoder input in seq2seq model.

At run time, I would like to be able to run my seq2seq model without advanced knowledge of what the model is aiming for (e.g. translating an out-of-corpus english sentence into french). To do this, I cannot have a set of decoder inputs pre-prepared, and need to rely on the output of the decoder itself.
Is there an easy way to do this with the current Seq2Seq layer, or is it quite a serious modification?
Cheers, Dan

Hi, you can use the standard Seq2seq to do this http://tensorlayer.readthedocs.io/en/latest/modules/layers.html#simple-seq2seq
there is a example in the docs.
However, you still need to tokenize your sentence and feed the data during training by following this link https://arxiv.org/pdf/1409.3215v3.pdf
Hope it helps

Hi - thanks for the response!
I'm really sorry, I feel like I'm missing something. In the docs, the main example given
>>>     net = Seq2Seq(net_encode, net_decode,
...             cell_fn = tf.contrib.rnn.BasicLSTMCell,
...             n_hidden = 200,
...             initializer = tf.random_uniform_initializer(-0.1, 0.1),
...             encode_sequence_length = retrieve_seq_length_op2(encode_seqs),
...             decode_sequence_length = retrieve_seq_length_op2(decode_seqs),
...             initial_state = None,
...             dropout = None,
...             n_layer = 1,
...             return_seq_2d = True,
...             name = 'seq2seq')

sets up a dependency of net.outputs upon both net_encode and net_decode. In that case, it is not possible for the graph to give me a value for net.outputs unless net_encode.outputs and net_decode.outputs both have values.
I would like the DynamicRNNLayer acting on net_encode, using the inputs to net_encode to give a final hidden state. Using this final hidden state, I would like the decoder DynamicRNNLayer to give me what it thinks should be the target_sequence, without being explicitly fed a target sequence. Absolutely, during training I will feed it the encode, decode and target sequences as appropriate (I have no masks as all of my sequences are the same length), but at inference time, I only want to feed it the encoder sequence, and it's not clear to me how to resolve this. I see that the tutorial_translate example can achieve this behaviour, but unfortunately it depends on functionality deprecated since TF 0.12.
Any help you can offer would be greatly appreciated, thanks again!
Dan

Hi, i have had a script for this, but can't find it, and I just have a new commit for Seq2Seq.
For inferencing, you will need to reuse the model parameters and set the decode_sequence_length to 1 (just like the text generation example). Then after you get the final_state_encode of RNN encoder by feeding the encoding text, you feed the final_state_encode to Seq2Seq as the initial_state_decode of the RNN decoder, by doing this, you can get a new output and a new final_state_decode, so you can continuous to feed the final_state_decode as initial_state_decode and new output as decode_seqs to get the next output and final_state_decode.
Let me know if you still have problem.

@dbusbridge I am reimplementing my previous Twitter Chatbot, will send the link to you later.

Cool thanks!
Your explanation of using single sequence lengths iteratively to construct the output sequence also made sense. I have something rough working but I'm still tidying it up.

Hi, here is a simple Seq2Seq chatbot example without using tf.contrib.seq2seq and attention.
You can clearly see how to iterate the data during training and inferencing.
https://github.com/zsdonghao/seq2seq-chatbot

Hey - that works great, thank you!


Add a Puma plugin for Solid Queue

This allows you to run Solid Queue as part of a puma cluster, by adding
plugin :solid_queue

to your Puma config.
It will boot up the Solid Queue supervisor, leaving it to manage the scheduler and worker processes as normal.
If either Puma or the Solid Cache supervisor dies, the other will notice and shut itself down.
On Puma shutdown, it will signal Solid Queue to also shutdown.
cc @rosa

How do I control the puma solid_queue concurrency? The config/solid_queue.yml does not seem to apply here
# config/solid_queue.yml
default: &default
  workers:
    - queues: "*"
      threads: 25
``


Task exception was never retrieved

Describe the bug
The integration is properly configured and works perfectly, however it keeps filling the log with the following:
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/eufy_security/alarm_control_panel.py:236
Integration: Eufy Security (documentation, issues)
First occurred: 12:20:55 (1 occurrences)
Last logged: 12:20:55
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/eufy_security/init.py", line 60, in update
coordinator.async_set_updated_data(coordinator.data)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 287, in async_set_updated_data
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/eufy_security/alarm_control_panel.py", line 236, in state
return CODES_TO_STATES[current_mode]
KeyError: -1

this should be raised once for every reload and it is expected to raise the error. We are getting a wrong input from eufy-security-ws library as a state of home-base or camera station and there is no mapping for -1, as it is not expected :)

In short, error is expected and should be resolved in eufy-security-ws, please work with repository owner.

I believe this should have been resolved by now, please reopen if needed.


createSchemaCustomization lifecycle failing with Gatsby 5.10.0

Versions

gatsby-source-prismic: v5.3.0
gatsby-plugin-image: v3.10.0
@imgix/gatsby: v1.7.5
gatsby: v5.10.0
node: v18.15.0

Reproduction
See https://github.com/ghostcassette/gatsby-prismic-graphql-types for a reproducible test case. You'll need to provide the required environment variables for the gatsby-config.js but then running yarn build should trigger the error.

Additional Details

The output of `yarn build`:
$ gatsby build
success compile gatsby files - 0.196s
success load gatsby config - 0.014s
success load plugins - 1.216s
success onPreInit - 0.000s
success initialize cache - 0.040s
success copy gatsby files - 0.061s
success Compiling Gatsby Functions - 0.097s
success onPreBootstrap - 0.105s

 ERROR #11321  API.NODE.EXECUTION

"gatsby-source-prismic" threw an error while running the createSchemaCustomization lifecycle:

Cannot read properties of undefined (reading 'slice')

  TypeError: Cannot read properties of undefined (reading 'slice')

  - graphqlTypes.ts:57
    [gatsby-prismic-graphql-types]/[@imgix]/gatsby/src/modules/gatsby-plugin/graphqlTypes.ts:57:35

  - Array.reduce

  - graphqlTypes.ts:24 ImgixParamsInputType
    [gatsby-prismic-graphql-types]/[@imgix]/gatsby/src/modules/gatsby-plugin/graphqlTypes.ts:24:54

  - typeBuilder.ts:55 buildImgixGatsbyTypes
    [gatsby-prismic-graphql-types]/[@imgix]/gatsby/src/modules/gatsby-plugin/typeBuilder.ts:55:47

  - pluginHelpers.ts:16 Object.createImgixGatsbyTypes
    [gatsby-prismic-graphql-types]/[@imgix]/gatsby/src/pluginHelpers.ts:16:24

  - buildImageBaseFieldConfigMap.ts:121
    [gatsby-prismic-graphql-types]/[gatsby-source-prismic]/src/builders/buildImageBaseFieldConfigMap.ts:121:16

  - Chain.js:15
    [gatsby-prismic-graphql-types]/[fp-ts]/lib/Chain.js:15:103

  - EitherT.js:83
    [gatsby-prismic-graphql-types]/[fp-ts]/lib/EitherT.js:83:97

  - ReaderT.js:24
    [gatsby-prismic-graphql-types]/[fp-ts]/lib/ReaderT.js:24:97

  - Task.js:133
    [gatsby-prismic-graphql-types]/[fp-ts]/lib/Task.js:133:41

  - task_queues:95 processTicksAndRejections
    node:internal/process/task_queues:95:5

  - async Promise.all

  - create-schema-customization.ts:155 Object.createSchemaCustomization
    [gatsby-prismic-graphql-types]/[gatsby-source-prismic]/src/create-schema-customization.ts:155:9

  - api-runner-node.js:509 runAPI
    [gatsby-prismic-graphql-types]/[gatsby]/src/utils/api-runner-node.js:509:16

not finished createSchemaCustomization - 0.848s

error Command failed with exit code 1.

Steps to reproduce

Configure gatsby-source-prismic 5.3.0 with Gatsby 5.10.0
Attempt to run a full Gatsby build with yarn build

What is expected?
The build should succeed.
What is actually happening?
The build errors out with:
"gatsby-source-prismic" threw an error while running the createSchemaCustomization lifecycle:

Cannot read properties of undefined (reading 'slice')

(See "Additional Details" above for the full output.)

We have made a test locking one dependency of gatsby-source-prismic
imgix-url-params to "11.13.1" and it's running now.
I don't know why this newer version is breaking the build.
Hope with this you are able to build the project again.

Thanks @ochoarobert1, I can confirm adding the following selective dependency resolution to our package.json means we can successfully run a build now:
  "resolutions": {
    "imgix-url-params": "11.13.1"
  },

Looking at the diff between imgix-url-params 11.13.1 and 11.15.0, could there be some issue where an inconsistent version of parameters.json is being used resulting in one package trying to check a deprecated param against a newer version?

I guess that exactly is the problem. I cannot confirm which deprecated parameter is being used in this version of the repo. (There's no warning at all)
I figure it out this error because I'm making a controlled upgrade from Gatsby 4 to 5 and this error popups out a few days ago.
I'm glad that you are able to build the project again.

Hi @mudge and @ochoarobert1,
Thank you for sharing these details and a workaround! Could you try this alpha version of the plugin and let me know if it fixes the issue?
I updated @imgix/gatsby in both plugins which seems to resolve the error on my end. (See PR #532)
npm install<EMAIL_ADDRESS><EMAIL_ADDRESS>
Thank you!

So glad that I stumbled upon this. It was driving me crazy & I couldn't find out what the problem was since the code was working fine before

@angeloashmore I'm able to build with these two dependencies you sent.
For installation I had to use --legacy-peer-deps because the prismic<EMAIL_ADDRESS>is looking for<EMAIL_ADDRESS>I've tested the build and I'm able to complete it with the latest version of imgix/gatsby.

Perfect, thank you @ochoarobert1! I updated the command above to include --legacy-peer-deps for anyone else coming to this thread later.
I will be merging and publishing the alpha version as latest.

This issue should be fixed as of v5.3.1. Thank you everyone for your help diagnosing the error! 🙂
You can update to the latest version with the following commands:
npm install gatsby-source-prismic@latest
npm install gatsby-plugin-prismic-previews@latest

If this doesn't resolve the issue, please comment here and I will take another look.

Thanks for the new release, @angeloashmore. I confirm it fixes the problem for us too.

Thank you for confirming, @mudge!


add initialSummary to ISummaryContext

For #7110

I'd love to start seeing such changes happening against main. We would still require them to be additive and optional, but it would be great to move forward. @anthony-murphy - any thoughts here?


How can I generate a xslx file and send it  at the same time, like pipe.

I need generate a big xslx file, it can't all in memory.
how  can I generate a xslx file and save it or send it  at the same time, just like pipe

Hi @huangapple, I have added a stream writer for generating a new worksheet with huge amounts of data. We need to generate the complete file before sending.


feat: add delete functionality with axiosError 404 not found

Selected values: [{…}]
page.js:365 Selected option: {label: 'Delete Post', isMenuOpen: false, action: ƒ}
page.js:50 Deleting post with ID: 64ba3de8959b91e16c4c11a5
page.js:53 Post found: undefined
xhr.js:251     DELETE http://localhost:8000/posts/post/64ba3de8959b91e16c4c11a5 404 (Not Found)

npm install react-dropdown-select
npm install react-toastify


stack overflow with a certain Rust project

It seems the Rust builder will stack overflow if used on the helix repo. I've tested the translator separately, which works fine. This also happens on #83 with the crane builder, so it doesn't seem to be specific to the buildRustPackage builder.
repro:
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    dream2nix = {
      url = "github:nix-community/dream2nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    helix = {
      url = "github:helix-editor/helix";
      flake = false;
    };
  };

  outputs = inputs@{ nixpkgs, dream2nix, helix, ... }:
    let
      system = "x86_64-linux";
      dream2nix = inputs.dream2nix.lib.init {
        pkgs = nixpkgs.legacyPackages.${system};
      };
    in dream2nix.riseAndShine { source = helix; };
}

Fixed this on #83. The issue was that the code that got all transitive dependencies were handling cyclic dependencies incorrectly, which caused it to recurse infinitely. I'll keep this open until #83 gets merged.


[Feature] Basename API

Is it possible to get an API for basename? So that we can do something like:
<Router basename="/admin">
  <Home path="/" />
  <Login path="/login" />
</Router>

and have Home at /admin, and Login at /admin/login.
Documentation for React Router's basename API

I did something similar by:
const RouteWrapper = ({ children }) => <React.Fragment>{children}</React.Fragment>;

<Router>
  <RouteWrapper path="/admin">
    <Home path="/" />
    <Login path="/login" />
  </RouteWrapper>
  <RouteWrapper path="/admin-two">
    <Home path="/" />
    <Login path="/login" />
  </RouteWrapper>
</Router>

This was so I could see an overview of all my routes via indentation. If there's a better way please let me know!

@px-tristan-davey I wasn't aware you could do that, neat! I guess that works fine, but I'll leave this issue open.

It appears that a prop exists called basepath which accomplishes this same thing - though it is specified in the documentation as normally used internally.
import './App.css';

import { Router } from '@reach/router';
import React, { Component } from 'react';

const Page1 = props =>
page1
;
const Page2 = props =>
page2
;
const Page3 = props =>
page3
;

class App extends Component {
  render() {
    return (
      <Router basepath="test">
        <Page1 path="page1" />
        <Page2 path="page2" />
        <Page3 path="page3" />
      </Router>
    );
  }
}

export default App;

Page1, Page2, Page3 are all accessible at /test/page1 and so on.

Ah, that's perfect — not sure how I missed it. Thanks!


Fix bug to show missing transition target errors

Missing transition target errors set the properties "Error code" and "Message". The existing formatting logic is based on "Code" and "Message" and will fallback to "message" which isn't set with missing transition target errors, resulting in no error text. This fixes that.
Note: I couldn't find anywhere where "Code" was being used but just to be safe I had it check for both rather than to ONLY look for "Error code".

Thanks, released in 1.10.0


Is there a way to transform new data after fitting with FAMD?

Hello,
I just discovered this package and it seems very interesting. I was wondering is there a way to apply the transform function to new unseen data after calling FAMD fit? Analogous to how PCA works in sklearn.
When I try to do this I get an error:
X)
102             X = self.scaler_.transform(X)
103
--> 104         return pd.DataFrame(data=X.dot(self.V_.T), index=index)
105
106     def row_standard_coordinates(self, X):
ValueError: shapes (2,20) and (49,2) not aligned: 20 (dim 1) != 49 (dim 0)
Basically it looks like it doesn't understand there are a different number of "training examples" as opposed to when the fit occurred.
Cheers,
Kuhan

Hey,
I'm not exactly sure what you're trying to do, could you possible provide a more complete example? Normally if you call the transform method of the FAMD object it should work as long as the number of columns is the same in the new dataset.

Hi Max,
In sklearn I could have:
a = [some data]
a0 = a[:n]
a1 = a[n:]
pca = PCA()
pca.fit(a0)
pca.transform(a1).
Basically performing the PCA on part of the data and then using it to transform another unseen portion of data. Is it possible to do this with the MCA or FAMD modules in Prince?
Cheers,
Kuhan

It should be possible, but it looks something is going wrong... I'll look into now.

Thanks for the reply. Let us know how it goes!
Cheers,
Kuhan

Well I think I fixed the issue for the FAMD, is that what you had a problem with? If not can you copy/paste the entire code you're having a problem with?

Hi Max,
No. See below:
X = pd.DataFrame(
data=[
['A', 'A', 'A', 2, 5, 7, 6, 3, 6, 7],
['A', 'A', 'A', 4, 4, 4, 2, 4, 4, 3],
['B', 'A', 'B', 5, 2, 1, 1, 7, 1, 1],
['B', 'A', 'B', 7, 2, 1, 2, 2, 2, 2],
['B', 'B', 'B', 3, 5, 6, 5, 2, 6, 6],
['B', 'B', 'A', 3, 5, 4, 5, 1, 7, 5]
],
columns=['E1 fruity', 'E1 woody', 'E1 coffee',
'E2 red fruit', 'E2 roasted', 'E2 vanillin', 'E2 woody',
'E3 fruity', 'E3 butter', 'E3 woody'],
index=['Wine {}'.format(i+1) for i in range(6)]
)
famd.fit(X[:4])
famd.transform(X[4:])

ValueError                                Traceback (most recent call last)
 in ()
----> 1 famd.transform(X[4:])
c:\users\wangku\appdata\local\continuum\anaconda3\envs\tensorflow-gpu\lib\site-packages\prince\mfa.py in transform(self, X)
121     def transform(self, X):
122         """Returns the row principal coordinates of a dataset."""
--> 123         return self.row_coordinates(X)
124
125     def _row_coordinates_from_global(self, X_global):
c:\users\wangku\appdata\local\continuum\anaconda3\envs\tensorflow-gpu\lib\site-packages\prince\mfa.py in row_coordinates(self, X)
135         # Prepare input
136         X = self._prepare_input(X)
--> 137         return self._row_coordinates_from_global(self._build_X_global(X))
138
139     def row_contributions(self, X):
c:\users\wangku\appdata\local\continuum\anaconda3\envs\tensorflow-gpu\lib\site-packages\prince\mfa.py in _row_coordinates_from_global(self, X_global)
125     def _row_coordinates_from_global(self, X_global):
126         """Returns the row principal coordinates."""
--> 127         return len(X_global) ** 0.5 * super().row_coordinates(X_global)
128
129     def row_coordinates(self, X):
c:\users\wangku\appdata\local\continuum\anaconda3\envs\tensorflow-gpu\lib\site-packages\prince\pca.py in row_coordinates(self, X)
102             X = self.scaler_.transform(X)
103
--> 104         return pd.DataFrame(data=X.dot(self.V_.T), index=index)
105
106     def row_standard_coordinates(self, X):
ValueError: shapes (2,11) and (12,2) not aligned: 11 (dim 1) != 12 (dim 0)
If you fit on the first three rows rows X[:3] and try to transform the last three X[3:] it will work. Something to do with the shape?
Cheers,
Kuhan

I think I know what this id due to. I'll fix it over the weekend :)

@kuhanw sorry for the delay, can you install the latest code from GitHub and tell me if it works? It should do. You can install it by running pip install git+https://github.com/MaxHalford/Prince.

I did some quick testing and it seemed to work. I will try it on some more complicated datasets later and see if it holds. Thanks for looking into this.
Cheers,
Kuhan

Hi, i'm getting the same issue

This is also happening to me now with FAMD

This issue is back in 0.7.1


Revert "Remove Consultation presentation"

Reverts alphagov/whitehall#3006 We need to contnue to use Whitehall for preview until we implement the draft links as consultations can have HtmlAttachments.

@gpeng Can be bring this back now?


php8{1..3}Extensions.soap: fix tests

See e.g. https://github.com/cachix/devenv/actions/runs/11125063603/job/30922426947#step:7:527
There were multiple issues I observed:

--offline not being set causing several tests to try accessing the internet:
Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://www.w3.org/2009/01/xml.xsd' in /build/php-8.3.12/ext/soap/tests/bugs/bug76348.php:2

I'm not really sure, why this worked before or if a default was flipped. However, the tests are passing on Linux (both x86_64-linux and aarch64-linux for me).

On Darwin, a few more tests are failing like this:
reason: php_network_getaddresses: getaddrinfo for localhost failed: nodename nor servname provided, or not known

This looks like some sandbox problem on Darwin, but since we have a working test-suite on Linux I figured that's good enough and turned it off on Darwin.

cc @domenkozar @drupol

Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

For the tests depending on localhost, setting __darwinAllowLocalNetworking = true; should resolve it.


PR Template

off the top of my head from some concerns that have been raised.
/cc @carolynvs @jberkhahn
Going to go look at the k/k template and pull some more from there.

resolves #2207


Hidden fields are not supported

There is no hidden fields support in regform.
My case:
MariaDB [gdg_db]> select hidden from gdg_events \G
*************************** 1. row ***************************
hidden: ["www", "company"]

I suppose that happens because of [these lines] (https://github.com/GDG-Ukraine/gdg.org.ua/blob/master/src/GDGUkraine/model.py#L133-L160). There is no 'hidden' field in SQLAlchemy model.

Is this issue fixed?

It should be fixed now.
I'll be able to check it in the evening.

@webknjaz it seems this issue has been fixed=)

Plz refer the commit

This workaround should be reconsidered after merging api-for-admin into master

@webknjaz reconsiderations you mentioned and required refactorings will be done in separate task:
https://github.com/GDG-Ukraine/gdg.org.ua/issues/50


small simplification to URLParam

Can't https://github.com/pressly/chi/blob/master/context.go#L50 be simplified to just
// URLParam returns the url parameter from a http.Request object.
func URLParam(r *http.Request, key string) string {
        return URLParamFromCtx(r.Context(), key)
}

yes, true it definitely can be

feel free to submit a PR for this if you like

closing as this isn't an issue, but if you want to submit a PR sometime, go for it


test irc bot

See original issue on GitLab
In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 09:45
Opening or closing this issue, or having it change state, should cause the irc bot to notify in #buildstream IRC

In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 09:49
This is a comment !

In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 09:51
Another comment ?

In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 09:52
more ?

In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 10:55
Screw this, irc bot works but I have networking issues, which are not solvable things in general.
Not wasting time, closing.

In GitLab by [Gitlab user @tristanvb] on May 13, 2017, 10:55
closed


Documentation: Switch

Figma:
https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=7777%3A33877&mode=design&t=VnF7Nfba4zszs6Kt-1
Story Book:
https://next.design-system.post.ch/?path=/docs/components-forms-switch--docs

Hi Rouven and Philipp, the switch is ready for review. Thanks for your Feedback :)

@Cian77 Pattern is ready for Dev

@Cian77 I updated the already existing ticket https://github.com/swisspost/design-system/issues/853. The design looks good to me.


Accent color not rendered correctly in the UI

Steps to reproduce

Set the Accent color from the Style settings (#2168AB)
Navigate Obsidian menu or create a link on a page
The accent color does not have the same shade (shows darker color)

Expected behaviour
Accent color set by the Style Settings should be rendered as is.
Notes:
Latest version of Minimal, Minimal Style settings and Style settings installed
Tried each style setting separately. Issue persists only when Style setting is enabled with an Accent color

Does not look like its an issues with the Style settings (see https://github.com/mgmeyers/obsidian-style-settings/issues/55#issue-1121350705). Issue is resolved when testing with another theme.

This is intentional because the accent picker is used to generate multiple sub-colors. If you want to exactly define the checkbox color you can do so in the settings below (as mentioned in the description for that setting)


feat: add sign out warning and check

Try out this version of the Hiro Wallet - download extension builds.

This pr is clone of https://github.com/hirosystems/stacks-wallet-web/pull/3107

sorry for review requesting before all test have finished, need to fix 1 integration test

I fixed problems with integrations tests. @fbwoolf could you review please


STYLE: Improve itk::SimilarityIndexImageFilter class test file style

Improve itk::SimilarityIndexImageFilter class test file style:

Exercise the basic object methods using the
ITK_EXERCISE_BASIC_OBJECT_METHODS macro.
Use the ITK_TRY_EXPECT_NO_EXCEPTION macro to avoid boilerplate code
when updating a filter that can trigger exceptions.

PR Checklist

[X] No API changes were made (or the changes have been approved)
[X] No major design changes were made (or the changes have been approved)

Tests are passing on CircleCI:
100% tests passed, 0 tests failed out of 2884

It is just that it was unable to submit the report to CDash:
Submit files
   SubmitURL: https://open.cdash.org/submit.php?project=Insight
   Error when uploading file: /home/circleci/ITK-build/Testing/20211002-2349/Update.xml
   Error message was: SSL certificate problem: certificate has expired
   Problems when submitting via HTTP


APMI-2306 slow and frozen frame detection

Changes: with signed commits.
Pause CADisplayLink when on app will resign and resume it on app activation. Simplifies the code somewhat and avoids issues with counting the frame duration when the app is moved to background.
Group slow and frozen frames per screen names. This is necessary so when 2 different screens have a slow frame in a second interval, they are both reported.
Use screen name callbacks to store the screen name locally to avoid the locking in getScreenName()
Use a 1 second timer to periodically dump the detected frames.

You can definitely disable that line length warning in the .swiftline.yml.

ok

all changes from #90 with signed commit.


Remove Backend tx-service calls

Description
Remove tx-service direct calls.
There are 3 places where we are using BE tx-service endpoints. These should be converted to use the CGW.
Places to modify:

[ ] Fetching the tokens asset list: getTokensServiceUrl().
Add a function to the gateway-sdk. We will likely have to update the way in which type Token = RecordOf<TokenProps> are created from Redux.
[ ] Get decoded data: getDataDecoderUrl()
Add a function to the gateway-sdk
[ ] Remove getMasterCopiesUrl() entirely and retrieve Safe version/update (in 'Safe Details' settings) from fetchSafe() directly (we may need to add the update necessity to Redux).

Instead all these call should go through the CGW.

Decoded data
Slack thread with more details

I believe we are using transactionService (returned from the CGW) as intended now: fetching tokens, safes, master copies and data decoder. We fetch all transactions from /chains.
Safe Apps use it for their communicator and iframe message handler. Can you confirm if this is correct @mikheevm?

Safe Apps use it for their communicator and iframe message handler. Can you confirm if this is correct @mikheevm?

This is correct, but it was used only in older versions and we keep it only for backward compatibility. After we implement https://github.com/gnosis/safe-apps-sdk/issues/255 we'll check if we can remove it

Just to be totallly certain this is necessary, the CGW generally returns TokenInfo within the transaction response. It would be good to know whether having a dedicated token endpoint is even necessary. Maybe this can get removed entirely without the need for an endpoint.

It would be good to know whether having a dedicated token endpoint is even necessary.

It appears to not be being used at all. I've removed the redundant code in the linked PR.

@katspaugh can we close this one?

Yes. Thanks!


Switch from tab to 4 spaces in baseline

Switch from a tab to 4 spaces in the baseline file for each violation.
Given the strip() in the parseBaseline function, there should be no issue with backward compatiblity.
This is confirmed with an additional test added.
Closes #143

@jsh9 Any hints here?  I don't have easy access to a windows box to sort the path issue.
Any guidence appreciated. - brad

Thank you so much for making this change! Sorry it took me a while to finally get to it.

Thanks for the cleanup and style fixes.


Preliminary review - conformance to RFC9110

This PR

preliminary review to comply with HTTP specifications RFC9110

Notes

payload / body -> content

@ioggstream thanks for this!  We are rearranging how our branches and directories are laid out which is about to make this PR invalid, so I'm closing it (and other 3.2.0 draft PRs).  However, issue #3800 is tracking this, and you're welcome to re-submit once the branching/directory changes described in #3677 are finalized and implemented.
Otherwise, issue #3800  is in the 3.2.0 milestone already so we'll definitely look at it, and it will have a link to this PR for us to consider when deciding how to handle it.  As you guessed with your later comments, we won't change "Request Body Object" to "Content Body Object" in a minor release, but we should consider the general vocabulary alignment.


Plugin execution engine

The motivation here is to split resource generation and schema operations.

This architecture looks fine to me. I can see that we are incrementally changing it as we discover the different requirements, which is fine.
Spotted some implementation-level bugs.


Pages::insertPages should not assume a valid qboard file

Or all invalid qboard files should be completely rejected in the caller.
The line
this.pagesJSON.splice(index, 0, ...pages);

can be trying to iterate over undefined because pages need not exist in an invalid file

Already resolved at the call site.
Namely, this line throws an error:
https://github.com/cjquines/qboard/blob/80a1de4fe276eebedd8deb5531d613ab5ace1ed7/src/lib/files.ts#L109
and every JSON read goes through that line at some point.
The only other "file" is our default JSON, which is known to be valid ahead of time


As a Devops, i would like to establish a systematic process for auditing and responding to security assessments in our repositories

We want to eventually allow our team to elaborate comprehensive document covering Authorization to Operate (ATO) and Security Assessment & Authorization (SA&A) for our softwares. To enhance our security posture, we aim to establish a systematic process for auditing security assessments and ensuring timely follow-ups. This process will help us monitor and verify that security features are active across all our repositories and that security alerts are addressed systematically by our development teams.
Goals

[ ] Audit and Monitor Security Assessments**: Implement a system to regularly audit our repositories, ensuring that security assessments like vulnerability scans, dependency checks, and other security features are actively in place and functioning correctly.
[ ] Systematic Follow-up on Security Alerts**: Develop a protocol for systematically tracking and addressing security alerts. This involves ensuring that every alert is assigned and addressed within a predetermined timeframe, and maintaining clear documentation of the response for audit purposes.
[ ] Developer Engagement and Accountability**: Create guidelines and procedures for developers to follow in responding to security alerts. This includes training on best practices for handling security vulnerabilities and creating a culture of accountability for security within the development team.
[ ] Reporting and Continuous Improvement**: Establish a system for regular reporting on security audit findings and the status of security alerts. Use these reports to identify trends, areas for improvement, and to track the progress of our security enhancement efforts.

Desired Outcomes

All repositories are consistently monitored for security vulnerabilities.
Increased developer engagement in security practices.
Comprehensive documentation and reporting of security assessment outcomes and alert responses.

this is already covered by Github Security applied to our sources:

I'd be more interested in seeing how we monitor these are turned on for all our repos and how we ensure that security alerts are followed up on systematically by developers.

this is already covered by Github Security applied to our sources:

I'd be more interested in seeing how we monitor these are turned on for all our repos and how we ensure that security alerts are followed up on systematically by developers.

Updated the issue to address this. Converted to an 'Epic' issue


UNTESTED PCB design

Hello, I've been working on a pcb design. This design is untested and I'm unsure if works, this pcb cost around $40 - $50. The 3.7v to 5v might not work, I'm going to provide the gerber file if you'd like to take a look at it. I want this to be a starting point if anyone wants to modify it go for it!

Spotifypod.zip

Did you ever get round to testing this design please?

@stephenvalente I, unfortunately, haven't had the time to test it


CON-601: Remove CCL parsing code from concourse in favor of external CCL parsing library

This PR is code complete. Unit tests are passing. Do some more manual testing and then merge.


Latest version of annotorious  does not work well for drawing boundaries

The previous version  2.6.0 works fine but 2.6.1 does not allow drawing boundaries when testing from localhost where the image from the server cannot be downloaded.
I see the following console error
annotorious.min.js?73e3:24 Uncaught TypeError: r.clone is not a function
at eval (annotorious.min.js?73e3:24)
at iS.emit (annotorious.min.js?73e3:1)
at HTMLImageElement.eval (annotorious.min.js?73e3:24)
      <img
            ref={imgEl}
            id={`${id}`}
            alt="result"
            onError={onError}
            src={`/repo/path1/${id1}/image/${id2}/`}
        />

It now only works fine when the image is like this
     <img
            ref={imgEl}
            id={`${id}`}
            alt="result"
            onError={onError}
            src="https://media.istockphoto.com/photos/winter-in-the-sequoias-picture-id1292624259"
       />

         annotorious = new Annotorious({
          image: imgEl.current,
          drawOnSingleClick: true,
          disableEditor: true,
          allowEmpty: true,
        });

Thanks for reporting. There was a minor change to how lazy loading is handled. It might be related to that. Just to confirm: you are using Annotorious standard version in a Rect project, right? Are you using the onLoad handler on the image anywhere?

Yes I am using Annotorious standard version in a React project. No onLoad handler.

The bug is now fixed on the main branch. Will work again in the next release (v2.6.2).

Hello @rsimon , I am also facing this issue.

This happens only when image is loaded first time in the browser. Second time it works fine.
When image loads first time:

When it loads second time:

Annotorious Version
"@recogito/annotorious": "^2.6.1",


Remove Parentheses when Generating Filenames with Project Template

If there are parentheses in a book title or author name, those parentheses are transferred to the suggested file name in the template. They should not transfer to the file name.

I thought this would be a quick fix. But…
The current code black lists several special characters:  , ,, -, ?, !, ", ', :, ., ;, °, ª.  It would be easy to add parenthesis to that list. But what about other special characters such as @, #, $, & or many more?
I wonder if instead of the code black listing certain characters if it should instead white list the allowed ones. The question then is what should that white list be?
Just a-z and 0-9?
The file names have _ between title and author and such but seem like they should be filtered out of title portion by default.
What about accents or other international characters? For accents they could be converted to non accented characters. But some international characters don’t have a simple conversion like that.

I thought this would be a quick fix. But…
The current code black lists several special characters:  , ,, -, ?, !, ", ', :, ., ;, °, ª.  It would be easy to add parenthesis to that list. But what about other special characters such as @, #, $, & or many more?
I wonder if instead of the code black listing certain characters if it should instead white list the allowed ones. The question then is what should that white list be?
Just a-z and 0-9?
The file names have _ between title and author and such but seem like they should be filtered out of title portion by default.
What about accents or other international characters? For accents they could be converted to non accented characters. But some international characters don’t have a simple conversion like that.


[HPRO-699] Update README for credential scanning

During our conversion to the second generation runtime for App Engine, we lost the composer post-install-cmd stanzy because it prevented deployments (doesn't mesh well with their Cloud Deploy tool). As a result, we no longer have a way of ensuring that a developer has installed the git-secrets utiliity that scans for potentially leaked credentials prior to commit. This PR updates the README to include instructions to run the helper script manually.
HPRO-699

Work in #765 will fix the failing tests.


export: Support export of Reactions and Custom emojis.

Gist of the PR:
Commit 1:
Moved 'zerver_reaction' field from the messages file to realm.json file.
commit 2:
Reactions are obtained from the messages exported.
commit 3:
In zerver_reaction, the emoji_code should be updated with the RealmEmoji allocated id when the reaction_type is realm_emoji. Hence we add an extra field reaction_field in function re_map_foreign_keys, to process the above mentioned condition.
commit 4:
RealmEmoji should be imported after UserProfile,
as the new user_profile ids are not allocated
if we import it before.
commit 5:
Export of RealmEmoji should also include the image file of those emojis.
Here, we export emojis both for local and S3 backend in a method with is similar to attachments and avatars.
Added tests for the same
Next I'll work upon: adding further tests for both import_realm and export modules and also finish up #9439

Nice, merged, thanks @rheaparekh!

@timabbott Thank you for your review!


Netatmo Radiator valve

Hi, is it possible to get data and control radiator valves? thanks

Hey @lecabel, sadly there is no support for the Smart Radiators yet because I don't own any myself.
To be precise the gem currently supports the /getstationdata endpoint.
But I'd love to add support for the radiators too. Feel free to spin up a PR and I will be happy to merge it 😊


Host Exclusion

First, I love your website!!  I spent a fair bit of time trying to find a website that works for me this year, and this is by far the best.  I love the feature of being able to manage the party after it's been set up.  The only feature I would ask to be included is that the host isn't automatically included in the party.  I am a youth leader at my church, and I am helping to facilitate a virtual gift exchange this year.  I do not want any of the kids to get me as someone they need to get a gift for, and I was not planning on gifting any of the kids.  It would be great if there was a checkbox next to the host to choose to opt-in, or opt-out.

I understand that this is something some people want and you are not the first one to ask. A workaround that can be applied is:

Use your email address as the host.
After you receive the initial email with the management link, change your email to one of the kid's emails.
Start the party.

We try to keep the number of knobs we add as low as possible to limit the number of decisions people have to make. Maybe we will add this as an option in the future, but I don't see room for this in the near future


Unable to expectError on decorator applicability

I'm writing a helper library around decorators (standard ECMAScript ones, as supported by TypeScript 5+ and @babel/plugin-proposal-decorators) and have been unable to test errors when applying them.
Here's a self-contained reproduction:
import { expectError } from "tsd";

class Base extends HTMLElement {
  foo() {}
}

const classDec = <T extends new (...args: any[]) => Base>(
  value: T,
  context: ClassDecoratorContext<T>
) => {
  return class DecoratedClass extends value {};
};

(
  @classDec
  class extends Base {}
);
expectError(
  @classDec
  class {}
);
expectError(
  @classDec
  class extends Document {}
);
expectError(
  @classDec
  class extends HTMLElement {}
);
expectError(() => {
  @classDec
  abstract class Test extends Base {}
});

classDec can only be applied to a concrete class extending Base, so the anonymous class extending nothing, Document, HTMLElement, or an abstract class are errors.
This however fails with:
  repro.test-d.ts:19:3
  ✖  19:3  Unable to resolve signature of class decorator when called as an expression.
  Argument of type typeof (Anonymous class) is not assignable to parameter of type new (...args: any[]) => Base.
    Type (Anonymous class) is missing the following properties from type Base: foo, accessKey, accessKeyLabel, autocapitalize, and 291 more.
  ✖  23:3  Unable to resolve signature of class decorator when called as an expression.
  Argument of type typeof (Anonymous class) is not assignable to parameter of type new (...args: any[]) => Base.
    Type Document is missing the following properties from type Base: foo, accessKey, accessKeyLabel, autocapitalize, and 132 more.
  ✖  23:3  Decorator function return type { new (...args: any[]): classDec<new (...args: any[]) => Base>.DecoratedClass; prototype: classDec<any>.DecoratedClass; } & (new (...args: any[]) => Base) is not assignable to type void | typeof (Anonymous class).
  ✖  23:3  Decorator function return type { new (...args: any[]): classDec<new (...args: any[]) => Base>.DecoratedClass; prototype: classDec<any>.DecoratedClass; } & (new (...args: any[]) => Base) is not assignable to type void | typeof (Anonymous class).
  Type { new (...args: any[]): classDec<new (...args: any[]) => Base>.DecoratedClass; prototype: classDec<any>.DecoratedClass; } & (new (...args: any[]) => Base) is not assignable to type typeof (Anonymous class).
    Type classDec<new (...args: any[]) => Base>.DecoratedClass & Base is missing the following properties from type Document: URL, alinkColor, all, anchors, and 92 more.
  ✖  27:3  Unable to resolve signature of class decorator when called as an expression.
  Argument of type typeof (Anonymous class) is not assignable to parameter of type new (...args: any[]) => Base.
    Property foo is missing in type HTMLElement but required in type Base.
  ✖  31:3  Unable to resolve signature of class decorator when called as an expression.
  Argument of type typeof Test is not assignable to parameter of type new (...args: any[]) => Base.
    Cannot assign an abstract constructor type to a non-abstract constructor type.

  6 errors

Same result as if I omitted the expectError from the file.

As a workaround, I can call the decorator myself, but that defeats part of the goals of the tests as I now set explicit types inferred from what I think TypeScript will use, rather than let TypeScript use whatever types it expects.
import { expectError } from "tsd";

class Base extends HTMLElement {
  foo() {}
}

const classDec = <T extends new (...args: any[]) => Base>(
  value: T,
  context: ClassDecoratorContext<T>
) => {
  return class DecoratedClass extends value {};
};
() => {
    class Test extends Base {}
    classDec(Test, {} as ClassDecoratorContext<typeof Test>);
};
expectError(() => {
    class Test {}
    classDec(Test, {} as ClassDecoratorContext<typeof Test>);
});
expectError(() => {
  class Test extends Document {}
  classDec(Test, {} as ClassDecoratorContext<typeof Test>);
});
expectError(() => {
  class Test extends HTMLElement {}
  classDec(Test, {} as ClassDecoratorContext<Test>);
});
expectError(() => {
  abstract class Test extends Base {}
  classDec(Test, {} as ClassDecoratorContext<Test>);
});

FWIW tsd is matching errors using a predefined list. Users must open PRs to add missed error codes one by one. For example, see #205

It appears that most of the error codes here fall into what tsd considers "syntactical errors" (< 2000): 1238 to 1241, 1249, 1270 and 1271, 1278 and 1279, and 1329.
Maybe the checks should "just" be inverted? (I'm preparing a PR, with tests!)
https://github.com/tsdjs/tsd/blob/bb28db1eb5272c65e8c7d5da707ca187ee7cd27f/source/lib/compiler.ts#L79-L91

Here is the place to distinguish between semantic and syntactic errors (if there is an intention to keep them distinct, why to pour everything into one list?):
https://github.com/tsdjs/tsd/blob/bb28db1eb5272c65e8c7d5da707ca187ee7cd27f/source/lib/compiler.ts#L109-L111

As an example, in forked tsd-lite (it is not maintained anymore), I was passing only semantic errors to evaluate in the matchers:
https://github.com/mrazauskas/tsd-lite/blob/e6f439ba361dc3c675a67c16294881463a24e1b8/source/tsdLite.ts#L30-L37


Persistent problem with the requested skill's response in Alexa

Good morning. Note: Invocation name in Alexa must be a minimum of two words. I'm doing ALL what your manual says, step by step. Alexa's response: There was a problem with the requested skill's response

If you edit directly the invocationName by JSON Editor you can put only one word.
If you don't do it by JSON Editor, then you need to put two words

I understood. More so doing with a word or two... still doesn't work. And I'm strictly following the steps in the guide manual... but unfortunately... it still doesn't work

Good  morning
I understood. More so doing with a word or two... still doesn't work.
And I'm strictly following the steps in the guide manual...
but unfortunately... it still doesn't work.
Good Sunday
Em sáb., 13 de mai. de 2023 às 16:27, kalish @.***>
escreveu:

If you edit directly the invocationName by JSON Editor you can put only
one word.
If you don't do it by JSON Editor, then you need to put two words
[image: image]
https://camo.githubusercontent.com/c5cae06c0e4892a38719c7ea26233755f318920dc03b7460a26cfef9326f77e6/68747470733a2f2f692e696d6775722e636f6d2f41565154526a6c2e706e67
—
Reply to this email directly, view it on GitHub
https://github.com/kalishcode/alexa-gpt/issues/3#issuecomment-1546735347,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHEB7ECZPGZKWKXV6SYFZD3XF7OB5ANCNFSM6AAAAAAX7UBI5U
.
You are receiving this because you authored the thread.Message ID:
@.***>

I don't know why it didn't work for you, so I modified this repository to be able to directly import the skill.
Now you just need to follow steps 1, 2, 3, 4, 5, 12 and 13.
See the changes in step 5
Let me know if now it works.

Good morning. With your skill import function... it worked!!  -  Now it's working perfectly. Thank you very much

Perfect. I updated the README.md file to make sure boto3 is in the requirements.txt


Consistent between db loads?

More of a question than an issue... I'm just wondering if the database is wiped, is there a way to make the hashes generate the same each time for a given model? Perhaps based on a unique field like a name? I see the salt config but it is more of a global config and only part of the generation picture. Just wondering if there's a way to do that. Thanks!

Hi @NicoleGriesmeyer ! The hashids are generated based on the id column, so as long as a given model has the same id attribute, it will also have the same hashid. The salt used to generate the hashid is uses the model name combined with the salt provided in the configuration:
https://github.com/jcypret/hashid-rails/blob/daa14d9e2d7897b7606a1bb01c955b2522fff45f/lib/hashid/rails/configuration.rb#L21
For a Project model and a global salt of "123", the salt used for the Project model would be "projects123". If you have three records with ids 1, 2, 3, delete them, then recreate records with ids 1, 2, 3, the hashids would be the same despite the database being wiped.

Awesome! Thank you for the help very much!


bc 1.06 using libreadline6

$ pacman -Ss libreadline
msys/libreadline 7.0.003-1 (libraries) [installed]
    GNU readline library
msys/libreadline-devel 7.0.003-1 (development)
    readline headers and libraries

$ bc
C:/msys64/usr/bin/bc.exe: error while loading shared libraries: msys-readline6.dll: cannot open shared object file: No such file or directory

Temp solution: download libreadline6 from the repo and put missing file in /usr/bin
$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.

Perm solution: ?

Need rebuild bc. Will do tomorrow


Support for Windows Edge Browser

Support for Windows Edge Browser
Fix any issue related to Edge
@busbus FYI

@LindsayThomas
Assuming you are looking for support of Windows Edge browser for desktops only. Please confirm.

@CTLocalGovTeam We are waiting to get confirmation from some others at Esri on this. However, I don't want this to impact the estimate schedule. Can we get an estimate with Desktop only and Tablet only?

@CTLocalGovTeam Please test Edge Browser on a desktop with Keyboard and mouse.

Fixed with 4.7


Parametr Filtering

@anagpuyol - can you please have a look at parameter filtering?  The UI is populated properly, but exported .json files still contain all parameters, even if none were checked in this UI.

ah.  found it.  nevermind!


Improve test file structure and naming

This hopefully makes our test files easier to navigate, by separating test files from test utilities, and naming the test files to make it clear they’re tests. See commit messages for more details.

I've removed review requests, given this pull request is in draft state, has conflicts and failing checks. @lawrence-forooghian, it would be helpful if you could update here as to current status and close if that's appropriate. Thanks.

Thanks for that @QuintinWillison. I held off on merging / chasing reviewers for this earlier since it was failing CI presumably due to flaky tests. Since this PR is going to end up with merge conflicts (and hence need another hard-to-get-green CI run) pretty much every time anything gets merged into main, I think landing this might be a hassle at the moment. Perhaps one to revisit once we've got the tests green. We might be able to automate this as part of #1201 even.
I've created #1203 to make sure we revisit, and am closing this PR.


I downloaded and installed the atom on windows 7.After installation it opened automatically and the next time i'm not able to open it. i"m basically not able to find the shortcut. Only .exe file is there on my downloads, and when I run it, it shows some error. can anyone please get the solution for this... :-)

Prerequisites

[ ] Can you reproduce the problem in safe mode?
[ ] Are you running the latest version of Atom?
[ ] Did you check the debugging guide?
[ ] Did you check the FAQs on Discuss?
[ ] Are you reporting to the correct repository?
[ ] Did you perform a cursory search to see if your bug or enhancement is already reported?

For more information on how to write a good bug report or enhancement request, see the CONTRIBUTING guide.
Description
[Description of the bug or feature]
Steps to Reproduce

[First Step]
[Second Step]
[and so on...]

Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Versions
You can get this information from executing atom --version and apm --version at the command line. Also, please include the OS and what version of the OS you're running.

Please fill in the template correctly and provide details of 'some error'

No response, closing. Will re-open if we get a response.