Kernel panic when running Market Spread Pony on Sierra

When running the Pony market spread app following the instructions in market-spread.pony, it doesn't take long before you encounter a kernel panic on OSX Sierra.
Here's the kernel panic info:
*** Panic Report ***
panic(cpu 1 caller 0xffffff8019a975ce): Preemption level underflow, possible cause unlocking an unlocked mutex or spinlock
Backtrace (CPU 1), Frame : Return Address
0xffffff9205e8bcf0 : 0xffffff8019ae953c
0xffffff9205e8bd70 : 0xffffff8019a975ce
0xffffff9205e8bd80 : 0xffffff8019a972ef
0xffffff9205e8bd90 : 0xffffff8019f4c0c0
0xffffff9205e8bdd0 : 0xffffff8019f5a7cb
0xffffff9205e8bf10 : 0xffffff8019f59df6
0xffffff9205e8bf50 : 0xffffff801a0240f5
0xffffff9205e8bfb0 : 0xffffff8019a9ad96
BSD process name corresponding to current thread: market-spread

I've crashed my OS X Sierra box multiple times with the same Preemption level underflow... panic message.  By machida, receiver, and (very infrequently) sender.

@jtfmumm @slfritchie @JONBRWN which version of XCode do y'all have installed?

@SeanTAllen 9.0.3

@SeanTAllen Xcode 8.3.3

My app's "About" box says "Versoin 9.0 (9A235)"

Can one of you try hooking Giles sender up directly to Giles receiver and sending info from one to the other and see if we get the kernel panic? Ideally one of you who has something that's very reproduceable.
I would like to narrow down where we might have a problem.
Another test, do you get this problem if you only send NBBO to marketspread (thereby avoiding the sink?) Its possible some of our network code has some kind of issue. Metrics, Sink and Source would all be options so it would be good to try to narrow that down.

My OS X Sierra box just panic'ed with only these two processes talking to each other:
giles/receiver/receiver --ponythreads=1 --ponynoblock --listen <IP_ADDRESS>:7002 --no-write
sh -c 'while [ 1 ]; do `pwd`/../../../giles/sender/sender --host <IP_ADDRESS>:7002 --file votes.msg --batch-size 70000 --interval 2_000_000 --messages 7000 --binary --msg-size 9  --ponythreads=1 --ponynoblock --no-write --repeat; done'

I've been researching around and it seems that lots of folks in general have been having issues with Sierra and High Sierra having kernel panics with various applications so there seems to be some bug or bug(s) out there with Sierra/High Sierra that we are also triggering. Issue is figuring out what is triggering it so we can route around.

Things I have tried that still cause the kernel to panic:
Rebuilt ponyc 0.20.0 with:
make config=release arch=x86-64 tune=intel install

Rebuilt Giles Sender + Receiver with:
stable env ponyc --cpu=x86-64

Ran the following commands:
giles/receiver/receiver --ponythreads=1 --ponynoblock --listen <IP_ADDRESS>:7002 --no-write
sh -c 'while [ 1 ]; do `pwd`/../../../giles/sender/sender --host <IP_ADDRESS>:7002 --file votes.msg --batch-size 70000 --interval 2_000_000 --messages 7000 --binary --msg-size 9  --ponythreads=1 --ponynoblock --no-write --repeat; done'

After OS X panics and you log back in after the reboot, the user is frequently/always? prompted to send a diagnostic report to Apple.  It's possible to examine that report prior to sending.  I choose not to send it, but I do examine them.  If it's noteworthy, I'll cut-and-paste the report and save it to a local file.  In the cases that I've saved, I see this:
$ egrep ^BSD ~/*panic*
/Users/scott/foo.panic:BSD process name corresponding to current thread: receiver
/Users/scott/foo.panic2:BSD process name corresponding to current thread: receiver
/Users/scott/foo.panic3:BSD process name corresponding to current thread: receiver
/Users/scott/foo.panic4:BSD process name corresponding to current thread: machida
/Users/scott/foo.panic5:BSD process name corresponding to current thread: receiver

In that one case where machida was the process & thread running at panic time, I do not know if I was using nc or receiver as the TCP sink, sorry.

I'm running into kernel panics trying to debug a separate problem.  I'm running the Pony word count app.  Here is part of the report after rebooting:
*** Panic Report ***
panic(cpu 5 caller 0xffffff801d0a07ce): Preemption level underflow, possible cause unlocking an unlocked mutex or spinlock
Backtrace (CPU 5), Frame : Return Address
0xffffff92414fbe20 : 0xffffff801d0f211c
0xffffff92414fbea0 : 0xffffff801d0a07ce
0xffffff92414fbeb0 : 0xffffff801d0a04ef
0xffffff92414fbec0 : 0xffffff801d550bc0
0xffffff92414fbf00 : 0xffffff801d55e1c8
0xffffff92414fbf60 : 0xffffff801d560c83
0xffffff92414fbfb0 : 0xffffff801d0a0af7

BSD process name corresponding to current thread: receiver

Mac OS version:
16C68

Kernel version:
Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64
Kernel UUID: 8DF81F81-019F-348E-B47E-40A4484B9E21
Kernel slide:     0x000000001ce00000
Kernel text base: 0xffffff801d000000
__HIB  text base: 0xffffff801cf00000
System model name: MacBookPro11,5 (Mac-06F11F11946D27C5)

System uptime in nanoseconds:<PHONE_NUMBER>92151
last loaded kext at<PHONE_NUMBER>95108: com.apple.driver.AppleUSBAudio	307.7 (addr 0xffffff7fa156d000, size 364544)
last unloaded kext at<PHONE_NUMBER>86618: com.apple.driver.usb.cdc	5.0.0 (addr 0xffffff7fa1566000, size 28672)

I tried running with tcpserver instead of receiver and things seemed to be fine for a while.  Then running a word count variant app I encountered the panic again.  Here's the output of the report:
*** Panic Report ***
panic(cpu 4 caller 0xffffff801bea07ce): Preemption level underflow, possible cause unlocking an unlocked mutex or spinlock
Backtrace (CPU 4), Frame : Return Address
0xffffff9252493e20 : 0xffffff801bef211c
0xffffff9252493ea0 : 0xffffff801bea07ce
0xffffff9252493eb0 : 0xffffff801bea04ef
0xffffff9252493ec0 : 0xffffff801c350bc0
0xffffff9252493f00 : 0xffffff801c35e1c8
0xffffff9252493f60 : 0xffffff801c360c83
0xffffff9252493fb0 : 0xffffff801bea0af7

BSD process name corresponding to current thread: word_count_variant

Mac OS version:
16C68

Kernel version:
Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64
Kernel UUID: 8DF81F81-019F-348E-B47E-40A4484B9E21
Kernel slide:     0x000000001bc00000
Kernel text base: 0xffffff801be00000
__HIB  text base: 0xffffff801bd00000
System model name: MacBookPro11,5 (Mac-06F11F11946D27C5)

System uptime in nanoseconds:<PHONE_NUMBER>729
last loaded kext at<PHONE_NUMBER>5: com.apple.filesystems.smbfs	3.1.1 (addr 0xffffff7f9cc01000, size 425984)
last unloaded kext at<PHONE_NUMBER>65: com.apple.driver.AppleFileSystemDriver	3.0.1 (addr 0xffffff7f9ec96000, size 8192)

anyone here think there's any worth looking into this using the OSX Kernel Debug Kit? http://lightbulbone.com/2016/10/04/intro-to-macos-kernel-debugging.html

This appears to be related to kqueue one shot support we turned on in september. I'm working on turning it off.

ponyc branch: no-osx-one-shot-tcp commit: 1d3479f
wallaroo branch: exhuastiv-match commit: 8a57f07
Kernel panic occurred when running the following:
giles/receiver/receiver --ponythreads=1 --ponynoblock --listen <IP_ADDRESS>:5555 --no-write

./market-spread -i <IP_ADDRESS>:7000,<IP_ADDRESS>:7001 -o <IP_ADDRESS>:5555 -m <IP_ADDRESS>:5001 --ponythreads 8 --ponypinasio --ponynoblock -c <IP_ADDRESS>:12500 -d <IP_ADDRESS>:12501 -t

giles/sender/sender -h <IP_ADDRESS>:7001 -m 350 -s 300 -i 2_500_000 -f testing/data/market_spread/nbbo/350-symbols_initial-nbbo-fixish.msg --ponythreads=1 -y -g 46 --ponypinasio -w —ponynoblock && \
giles/sender/sender -h <IP_ADDRESS>:7001 -m<PHONE_NUMBER>0 -s 300 -i 2_500_000 -f testing/data/market_spread/nbbo/350-symbols_nbbo-fixish.msg -r --ponythreads=1 -y -g 46 --ponypinasio -w —ponynoblock

giles/sender/sender -h <IP_ADDRESS>:7000 -m<PHONE_NUMBER> -s 300 -i 5_000_000 -f testing/data/market_spread/orders/350-symbols_orders-fixish.msg -r --ponythreads=1 -y -g 57 --ponypinasio -w —ponynoblock

Kernel Panic Report:
Anonymous UUID:       8CED5491-72A1-BB3B-6AC9-D9D04C7A181F

Mon Nov 20 16:37:50 2017

*** Panic Report ***
panic(cpu 1 caller 0xffffff800d4975ce): Preemption level underflow, possible cause unlocking an unlocked mutex or spinlock
Backtrace (CPU 1), Frame : Return Address
0xffffff91fdd43e20 : 0xffffff800d4e953c
0xffffff91fdd43ea0 : 0xffffff800d4975ce
0xffffff91fdd43eb0 : 0xffffff800d4972ef
0xffffff91fdd43ec0 : 0xffffff800d94c0c0
0xffffff91fdd43f00 : 0xffffff800d959e58
0xffffff91fdd43f60 : 0xffffff800d95c963
0xffffff91fdd43fb0 : 0xffffff800d4978f7

BSD process name corresponding to current thread: market-spread

Mac OS version:
16G29

Kernel version:
Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
Kernel UUID: D3314D98-5D40-3CD8-98A4-F1DD46C20E03
Kernel slide:     0x000000000d200000
Kernel text base: 0xffffff800d400000
__HIB  text base: 0xffffff800d300000
System model name: MacBookPro11,4 (Mac-06F11FD93F0323C5)

System uptime in nanoseconds:<PHONE_NUMBER>6997
last loaded kext at<PHONE_NUMBER>1478: com.apple.driver.usb.cdc	5.0.0 (addr 0xffffff7f9050e000, size 28672)
last unloaded kext at<PHONE_NUMBER>5206: com.apple.driver.IOBluetoothHIDDriver	5.0.5f1 (addr 0xffffff7f90515000, size 102400)

Potentially related, wakeup resources report for market_spread 2 minutes before crash:
Date/Time:       2017-11-20 16:35:17.433861 -0500
OS Version:      Mac OS X 10.12.6 (Build 16G29)
Architecture:    x86_64
Report Version:  19

Command:         market-spread
Path:            /Users/USER/*/market-spread
Version:         ??? (???)
Parent:          bash [421]
Responsible:     Terminal [274]
PID:             38929

Event:           wakeups
Wakeups:         45788 wakeups over the last 33 seconds (1393 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
Duration:        32.87s
Steps:           10

Hardware model:  MacBookPro11,4
Active cpus:     8

Fan speed:       2154 rpm

Powerstats for:  market-spread [38929]
UUID:            B704E02C-F94C-3C37-A18E-1A292A64519C
Start time:      2017-11-20 16:35:18 -0500
End time:        2017-11-20 16:35:41 -0500
Microstackshots: 10 samples (100%)
Primary state:   8 samples Non-Frontmost App, Kernel mode, Effective Thread QoS Unspecified, Requested Thread QoS Unspecified, Override Thread QoS Unspecified
User Activity:   0 samples Idle, 10 samples Active
Power Source:    10 samples on Battery, 0 samples on AC
  10 thread_start + 13 (libsystem_pthread.dylib) [0x7fffbae4908d]
    10 _pthread_start + 286 (libsystem_pthread.dylib) [0x7fffbae49887]
      10 _pthread_body + 180 (libsystem_pthread.dylib) [0x7fffbae4993b]
        9 run_thread + 306 (market-spread) [0x10013c202]
          8 ponyint_cpu_core_pause + 116 (market-spread) [0x10013b8f4]
            7 __semwait_signal + 10 (libsystem_kernel.dylib) [0x7fffbad5ef46]
            1 __semwait_signal + 12 (libsystem_kernel.dylib) [0x7fffbad5ef48]
              1 <User mode>
          1 ponyint_cpu_core_pause + 20 (market-spread) [0x10013b894]
        1 run_thread + 404 (market-spread) [0x10013c264]
          1 ponyint_mpmcq_pop + 118 (market-spread) [0x10013ba66]
            1 <User mode>

  Binary Images:
         0x100000000 -        0x10017afef  market-spread (0) <B704E02C-F94C-3C37-A18E-1A292A64519C> /Users/USER/*/market-spread
      0x7fffbad45000 -     0x7fffbad67ff7  libsystem_kernel.dylib (3789.70.16) <34B1F16C-BC9C-3C5F-9045-0CAE91CB5914> /usr/lib/system/libsystem_kernel.dylib
      0x7fffbae46000 -     0x7fffbae50ff7  libsystem_pthread.dylib (218.60.3) <B8FB5E20-3295-39E2-B5EB-B464D1D4B104> /usr/lib/system/libsystem_pthread.dylib

@JONBRWN does Sender -> Receiver with no marketspread kernel panic?

@SeanTAllen  running this caused no panic:
giles/receiver/receiver --ponythreads=1 --ponynoblock --listen <IP_ADDRESS>:7002 --no-write
sh -c 'while [ 1 ]; do `pwd`giles/sender/sender --host <IP_ADDRESS>:7002 --file examples/python/alphabet/votes.msg --batch-size 70000 --interval 2_000_000 --messages 7000 --binary --msg-size 9  --ponythreads=1 --ponynoblock --no-write --repeat; done'

ran for over an hour

See See https://gist.github.com/slfritchie/3e79a4b98c759c5da909a66e2b9bb56f for a panic caused by sender in Sierra 10.12.6 in Safe Mode: sender -> wallaroo -> nc.

@JONBRWN how is giles sending more than 7000 messages? that doesnt seem like its running for more than an hour. looks like 7000 messages.

@slfritchie do you get a panic if you only do sender to receiver?

@JONBRWN can you set it to run uninterrupted for an hour, not starting and stopping? start and stop isn't really what we are looking for here. What we've seen its that its sustained runs that seem to cause issues, yes?

@SeanTAllen No panic with sending directly from giles/sender/sender to giles/receiver/receiver, in approx 1 hour of runtime.  I'll let it run over dinnertime to see what happens.

I'm replicating this panic both when running a pipeline and when it's only the sender and receiver. The latter panics in about 10 seconds and the prior in a few minutes.

This is an OSX kernel bug that we can't work around.


ZEVA - Write Unit Tests for Compliance

Describe the task
There is a considerable lack of unit tests for Compliance components. We aim to fill this gap.
Purpose
Adding unit tests will increase the confidence in capturing the business logic and ensure the consistent functioning of the Compliance components.
Acceptance Criteria

[ ] Create a new tests directory in the compliance directory
[ ] Pick 3 files and create test files for the components that currently lack coverage
[ ] Write unit tests to reach 50% coverage in the Components test files
[ ] Focus on capturing business logic in each of the component files such as compliance calculation logic, user input validation, state changes, etc.

Additional context
use the jest --coverage command to view the current coverage percentages for the files

WIP writing unit tests for AssessmentContainer, moved out of in progress for building next sprint.


[question] Is it possible to disable the overscroll?

By the default, it is possible to overscroll when swiping right on the first element and left on the last element.
As per title, is it possible to disable the overscroll altogether?

Hello.
I dont know if it is your point, but did you try the loop prop? Just set it to false to disable overscroll.

I am also curious on the same. Disabling the loop is fine. But can we disable the elastic scroll at the edge of left and right most cards?

I want to stop scrolling at the edge of the left and right for specific scenarios. so can I?

Yes, I found it through enabled prop you can achieve it.

Yes, I found it through enabled prop you can achieve it.

How? I dont want to disable all swiping, only when you reach the ends of the carousel.
There's a prop called overscrollEnabled, but ti doesn't work

Same question here, could we provide sth like ScrollView bounces? Which won't let view bounces when reaches the end of content.

@dohooo


Missing Write-UploadFile method in VstsTaskSdk

##vso[task.uploadfile]local file path is not available in VstsTaskSdk powershell module. Could you please add it?

@ericsciple this can be closed now


ESP32s3: Do not include specfic board in commom

Summary
board/esp32s3/common is for common board driver for ESP32s3. It should not include a header file from specific board.
When build a board config rather than esp32s3-devkitc with some configuration enabled, e.g. CONFIG_ESP32S3_SPIFLASH, the build will be failed.
So remove the inclusion of esp32s3-devkitc.h in the source of common driver under esp32s3 board.
Impact
Build error fix
Testing
Pass the build and no impact to the build of configs under esp32s3-devkit

I'll re-run this PR on our internal CI and I'll let you know before merging ;)


Question: How to get rid of the quotations marks in the title: inside the YAML frontmatter ?

Hi there !
Excuse me for bothering you, I searched along the documentation but can't find an answer to my question.
Basically, I'm using Obsidian to write blogs, and they auto-upload to my website that is built using mkdocs material.
My issue is that I need a title: a random title formatting, not a title: "a random title", otherwise my content is broken on my website end.
Is there a way to disable the " quote escape character ? I couldn't figure a way to do it.
And what's more weird, it doesn't happen with other YAML keys, for example :
before :
title: Projet Industriel De Fin D'études - Chariot De Course À Assistance Électrique
aliases:
description: Je décris ici mon projet industriel de fin d'études réalisé à Polytech Lyon, la conception d'un chariot de course à assistance électrique.

after :
title: "Projet Industriel De Fin D'études - Chariot De Course À Assistance Électrique"
aliases:
description: Je décris ici mon projet industriel de fin d'études réalisé à Polytech Lyon, la conception d'un chariot de course à assistance électrique.

See, the description key wasn't automatically escaped even thought there's a ' character, which is the trigger that makes my title using quotation marks.
Thanks in advance !

Hey @mathisgauthey . Could you provide your data.json?

Hey @mathisgauthey . Could you provide your data.json?

Sure thing, here it is :
{
  "ruleConfigs": {
    "Space between Chinese and English or numbers": {
      "Ensures that Chinese and English or numbers are separated by a single space. Follow this [guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines)": false,
      "Ensures that Chinese and English or numbers are separated by a single space. Follows these [guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines)": true
    },
    "Remove Space around Fullwidth Characters": {
      "Ensures that fullwidth characters are not followed by whitespace (either single spaces or a tab)": true,
      "Ensures that fullwidth characters are not followed by whitespace (either single spaces or a tab). Note that this may causes issues with markdown format in some cases.": true
    },
    "escape-yaml-special-characters": {
      "enabled": false,
      "try-to-escape-single-line-arrays": false
    },
    "force-yaml-escape": {
      "enabled": false,
      "force-yaml-escape-keys": ""
    },
    "format-tags-in-yaml": {
      "enabled": true
    },
    "format-yaml-array": {
      "enabled": true,
      "alias-key": false,
      "tag-key": true,
      "default-array-style": "single-line",
      "default-array-keys": true,
      "force-single-line-array-style": "",
      "force-multi-line-array-style": "categories\nauthors"
    },
    "insert-yaml-attributes": {
      "enabled": true,
      "text-to-insert": "description:\nauthors: Mathis Gauthey\ncategories: \ntags: \naliases: \nshare: false\ncomments: true"
    },
    "move-tags-to-yaml": {
      "enabled": false,
      "how-to-handle-existing-tags": "Nothing",
      "tags-to-ignore": ""
    },
    "remove-yaml-keys": {
      "enabled": false,
      "yaml-keys-to-remove": ""
    },
    "yaml-key-sort": {
      "enabled": true,
      "yaml-key-priority-sort-order": "title\naliases\ndescription\nauthors\ncategories\ntags\ndate_created\ndate_modified\nshare\ncomments",
      "priority-keys-at-start-of-yaml": true,
      "yaml-sort-order-for-other-keys": "Ascending Alphabetical"
    },
    "yaml-timestamp": {
      "enabled": true,
      "date-created": true,
      "date-created-key": "date_created",
      "force-retention-of-create-value": true,
      "date-modified": true,
      "date-modified-key": "date_modified",
      "format": ""
    },
    "yaml-title": {
      "enabled": true,
      "title-key": "title",
      "mode": "first-h1-or-filename-if-h1-missing"
    },
    "yaml-title-alias": {
      "enabled": false,
      "preserve-existing-alias-section-style": true,
      "keep-alias-that-matches-the-filename": false,
      "use-yaml-key-to-keep-track-of-old-filename-or-heading": true
    },
    "capitalize-headings": {
      "enabled": true,
      "style": "Title Case",
      "ignore-case-words": true,
      "ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript",
      "lowercase-words": "via, a, an, the, and, or, but, for, nor, so, yet, at, by, in, of, on, to, up, as, is, if, it, for, to, with, without, into, onto, per"
    },
    "file-name-heading": {
      "enabled": true
    },
    "header-increment": {
      "enabled": true,
      "start-at-h2": false
    },
    "footnote-after-punctuation": {
      "enabled": true
    },
    "move-footnotes-to-the-bottom": {
      "enabled": true
    },
    "re-index-footnotes": {
      "enabled": false
    },
    "convert-bullet-list-markers": {
      "enabled": true
    },
    "emphasis-style": {
      "enabled": true,
      "style": "consistent"
    },
    "no-bare-urls": {
      "enabled": false
    },
    "ordered-list-style": {
      "enabled": true,
      "number-style": "ascending",
      "list-end-style": "."
    },
    "proper-ellipsis": {
      "enabled": true
    },
    "remove-consecutive-list-markers": {
      "enabled": true
    },
    "remove-empty-list-markers": {
      "enabled": true
    },
    "remove-hyphenated-line-breaks": {
      "enabled": false
    },
    "remove-multiple-spaces": {
      "enabled": true
    },
    "strong-style": {
      "enabled": true,
      "style": "consistent"
    },
    "two-spaces-between-lines-with-content": {
      "enabled": false
    },
    "unordered-list-style": {
      "enabled": true,
      "list-style": "-"
    },
    "compact-yaml": {
      "enabled": true,
      "inner-new-lines": true
    },
    "consecutive-blank-lines": {
      "enabled": true
    },
    "convert-spaces-to-tabs": {
      "enabled": false,
      "tabsize": "4"
    },
    "empty-line-around-blockquotes": {
      "enabled": true
    },
    "empty-line-around-code-fences": {
      "enabled": true
    },
    "empty-line-around-math-blocks": {
      "enabled": true
    },
    "empty-line-around-tables": {
      "enabled": true
    },
    "heading-blank-lines": {
      "enabled": true,
      "bottom": true,
      "empty-line-after-yaml": true
    },
    "line-break-at-document-end": {
      "enabled": true
    },
    "move-math-block-indicators-to-their-own-line": {
      "enabled": true
    },
    "paragraph-blank-lines": {
      "enabled": true
    },
    "remove-empty-lines-between-list-markers-and-checklists": {
      "enabled": true
    },
    "remove-link-spacing": {
      "enabled": true
    },
    "space-after-list-markers": {
      "enabled": true
    },
    "trailing-spaces": {
      "enabled": true,
      "twp-space-line-break": false
    },
    "add-blockquote-indentation-on-paste": {
      "enabled": false
    },
    "prevent-double-checklist-indicator-on-paste": {
      "enabled": false
    },
    "prevent-double-list-item-indicator-on-paste": {
      "enabled": false
    },
    "proper-ellipsis-on-paste": {
      "enabled": false
    },
    "remove-hyphens-on-paste": {
      "enabled": false
    },
    "remove-leading-or-trailing-whitespace-on-paste": {
      "enabled": false
    },
    "remove-leftover-footnotes-from-quote-on-paste": {
      "enabled": false
    },
    "remove-multiple-blank-lines-on-paste": {
      "enabled": false
    },
    "headings-start-line": {
      "enabled": false
    },
    "remove-trailing-punctuation-in-heading": {
      "enabled": false,
      "punctuation-to-remove": ".,;:!。，；：！"
    },
    "auto-correct-common-misspellings": {
      "enabled": false,
      "ignore-words": ""
    },
    "blockquote-style": {
      "enabled": false,
      "style": "space"
    },
    "quote-style": {
      "enabled": false,
      "single-quote-enabled": true,
      "single-quote-style": "''",
      "double-quote-enabled": true,
      "double-quote-style": "\"\""
    },
    "remove-space-around-characters": {
      "enabled": false,
      "include-fullwidth-forms": true,
      "include-cjk-symbols-and-punctuation": true,
      "include-dashes": true,
      "other-symbols": ""
    },
    "remove-space-before-or-after-characters": {
      "enabled": false,
      "characters-to-remove-space-before": ",!?;:).’”]",
      "characters-to-remove-space-after": "¿¡‘“(["
    },
    "space-between-chinese-japanese-or-korean-and-english-or-numbers": {
      "enabled": false
    },
    "add-blank-line-after-yaml": {
      "enabled": false
    },
    "default-language-for-code-fences": {
      "enabled": false,
      "default-language": ""
    }
  },
  "lintOnSave": true,
  "recordLintOnSaveLogs": false,
  "displayChanged": true,
  "lintOnFileChange": false,
  "displayLintOnFileChangeNotice": false,
  "settingsConvertedToConfigKeyValues": true,
  "foldersToIgnore": [
    "_Sources",
    "5-Templates",
    "Passions Backlog"
  ],
  "linterLocale": "system-default",
  "logLevel": "ERROR",
  "lintCommands": [
    {
      "id": "",
      "name": ""
    }
  ],
  "customRegexes": [],
  "commonStyles": {
    "aliasArrayStyle": "single-line",
    "tagArrayStyle": "multi-line",
    "minimumNumberOfDollarSignsToBeAMathBlock": 2,
    "escapeCharacter": "\"",
    "removeUnnecessaryEscapeCharsForMultiLineArrays": true
  }
}

Sorry about the delay in responding @mathisgauthey , is it possible that a custom replacement could be used to remove the quotes at this time? I need to take some time to take a closer look at this, but I have something else that I am working on right now.
The custom replacement would be something like:
search for ^(\s*title: ?)"([^"]+)"
replace with $1$2
flags: gm

Sorry about the delay in responding @mathisgauthey , is it possible that a custom replacement could be used to remove the quotes at this time? I need to take some time to take a closer look at this, but I have something else that I am working on right now.
The custom replacement would be something like: search for ^(\s*title: ?)"([^"]+)" replace with $1$2 flags: gm

Hey there, don't worry about that !
That's what I ended up doing using /title:\s"([^"]+)"/i and title: $1 using gi flags on my obsidian-github-publisher text replacer setup. It is quite similar.
That's fine, thanks for the input and your time, have a great day o/

I believe this has been resolved based on the comments here, so I am going to close this. We can reopen this if there is a need to do so.

I believe this has been resolved based on the comments here, so I am going to close this. We can reopen this if there is a need to do so.

Oh yes sorry for forgetting about it, thanks for your time and help 💪

No worries. I was just going back through issues to try to figure out which ones need what to happen yet. I am glad I was able to help and your issue got resolved.


Promise.map and co throws TypeError: fn should be a function

Hey,
I'm refactoring my code base from a full promises api and trying to mix with generators,
But I don't know how to execute a yield operator inside Bluebird.map,
exports.saveAll = function* (items, options) {
  options || (options = {})
  options.upsert = true

  return Promise.map(items, item => {
    const gen = function* () {
      const query = createQuery(item)
      const args = [query, item, options]
      return yield collection.findAndModify.apply(this, args)
    }
    return co(gen)
  })
}

And somewhere else I call
yield Collection.saveAll(items)
```

I'm having this error `TypeError: fn should be a function`

How do I iterate a array of object with bluebird collection api and execute a generator in there?

Please ask support questions on StackOverflow, this issue tracker is for feature requests and bug reports. Make sure to include the complete stacktrace of your error when you post it there, also a bit more context about the "somewhere".
PS: My guess is on the this inside your gen, or that you forgot to co.wrap (or Promise.coroutine) your saveAll method so that it returns a promise.

Thank's @bergus I'll ask there next time :)
So I'll try what your suggestions too,
But after wrapping findAndModify(co-monk) on a try catch block I see the error comes from there and I dont know why,
Thx


pileup column in .xls file when setting --broad

Hi Tao,
I wonder what is the meaning of pileup column in .xls file(--broad) as there is no summit in broad peak calling.  I want to calculate correlation of peak strength  between a TF  and a histone marker. Is it OK to correlate the pileup column?

I would also love to hear the answer to this question. We are getting an error where the pileup column is giving us hug negative numbers when we use the --broad tag.

@ChenFengling  The pileup in 'broad call' is the average pileup over the entire region -- total pileup / length of the peak. It really depends on what you want to do. If you want to correlate TF with histone mark, I would compute the signal of histone mark at a narrow surrounding region at TF binding sites instead of using MACS2 pileup values which will be affected by peak length.  My suggestion is to make the SPMR (signal per million reads) tracks for both your TF and HM, convert the signal tracks to bigwig, manually define the regions you want to check such as a 200bps window centered at TFBS summit, then extract the average pileup in that window using UCSC tool bigWigAverageOverBed. Afterwards, you can try to do correlation.

@AmandaKedaigle Haven't seen negative numbers for pileup before. Could you explain it more in detail? Thanks!

@taoliu THX！Your answer helped  a lot!

Thank you @taoliu! We ended up upgrading to version 2.1.1 instead of 2.1.0, and that seems to have fixed the problem.

I have encountered the same issue concerning negative pileup values as @AmandaKedaigle. Using the same command, macs2 version (macs2 <IP_ADDRESS>40616) and cluster resources as in the initial run (which gave the negative pileup values), a second run fixed the problem. The peaks called in both runs are the same but the reported pileup and statistics are negative. Could this be an overflow error?

@mxenoph There was overflow issue in some older versions.


feat: FastAPI debugger

For #14247
Only tests are missing.

[X] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[X] Title summarizes what is changing.
[X] Has a news entry file (remember to thank yourself!).
[X] Appropriate comments and documentation strings in the code.
[X] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[X] package-lock.json has been regenerated by running npm install (if dependencies have changed).
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #14606 into main will decrease coverage by 0.00%.
The diff coverage is 78.04%.

@@            Coverage Diff             @@
##             main   #14606      +/-   ##
==========================================
- Coverage   64.88%   64.88%   -0.01%
==========================================
  Files         541      542       +1
  Lines       25156    25197      +41
  Branches     3545     3551       +6
==========================================
+ Hits        16323    16349      +26
- Misses       8171     8178       +7
- Partials      662      670       +8

Impacted Files
Coverage Δ

...tension/configuration/debugConfigurationService.ts
78.94% <ø> (ø)

src/client/telemetry/index.ts
78.12% <ø> (ø)

...debugger/extension/configuration/resolvers/base.ts
90.00% <50.00%> (-1.03%)
:arrow_down:

...extension/configuration/providers/fastapiLaunch.ts
73.33% <73.33%> (ø)

src/client/common/utils/localize.ts
91.15% <100.00%> (+0.15%)
:arrow_up:

...tension/configuration/providers/providerFactory.ts
100.00% <100.00%> (ø)

...bugger/extension/configuration/resolvers/launch.ts
91.01% <100.00%> (+0.10%)
:arrow_up:

src/client/debugger/extension/serviceRegistry.ts
100.00% <100.00%> (ø)

src/client/debugger/extension/types.ts
100.00% <100.00%> (ø)

src/client/common/utils/platform.ts
60.00% <0.00%> (-8.00%)
:arrow_down:

... and 5 more

Continue to review full report at Codecov.

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

Converted to a draft as this is not ready to be reviewed.
@Kludex I will leave this here for a week, but if you are not able to get your tests ready by then I will close this PR as we try not to leave non-team member PRs as drafts since they tend to linger that way. And please sign the CLA.

@brettcannon I've signed the CLA, I thought the WIP was enough, thank you for moving to draft.
I've added analogous tests as the ones in Flask, as the debugger is similar, but I'm not satisfied with my work. I've used replace to get the filename without extension (and probably there's  a smart way to do it) and there are some tests lacking. If someone can give me some feedback, I'll appreciate.
The functionality per se is working, jfyk. But instead of having main.py as default on inputBox, maybe the current file would be a better option, but none of the other debuggers are doing it, so I was wondering if there's a reason...

@Kludex no need to worry about those other checkmarks; that's mostly for the team.
As for the best default, whatever makes sense for FastAPI should be it; don't read too much into how the other configurations do things. 😄

I didn't have the time to add the remaining tests, is it possible to not close until the weekend? If a pre-review is possible I'll appreciate as well.

@Kludex yep, as long as you're still working on it we can leave it open her for now and make an exception for you. 😄

Thank you for the review. I'm going to apply the necessary changes and the rebase tomorrow. :)

@kimadeline I've applied the necessary changes. Is there anything else?
P.S.: I'm unable to see the coverage report... I'm waiting for it to be updated here.

When I open the debugger, I have the default being main.py (which is the default name for files that contains a FastAPI application). But maybe having the current open file path would be a better idea. What do you think?
How can I get the tests/test_union_inherited_body.py? (Check the image below)

@Kludex Apologies for slow response times - many people are away on Thanksgiving week.
For the file name, since the configuration is going to persist once it's created, it's probably best to not pick up some transient state such as selected editor tab - if somebody is setting up FastAPI debugging for the first time, they're likely to just click through the wizard on the assumption that the defaults make sense; if it picks the default from tab selection, it's likely to be wrong more often than picking the standard entrypoint. OTOH users who know what they're doing will just enter the correct value there for their custom layout.

@int19h Got it! Thank you!

@Kludex don't wait for code coverage; it seems to be broken at the moment.

@kimadeline Thank you for the review :) I've applied the necessary changes.

@Kludex don't wait for code coverage; it seems to be broken at the moment.

@brettcannon Ok, thank you. :+1:

Thanks for the hard work on this PR, @Kludex !

Thank you for all the attention. You guys are great! :) @brettcannon @int19h @kimadeline


Check if a template exist.

Hi,
I try to check if a mail template in current language exist or fallback in default language.
there is some way ? :) something as symfony...
$mail_template = '$fallback_lang .'/template.html.twig';
if ( $app->get('templating')->exists($lang .'/template.html.twig') ) {
$mail_template = '$lang .'/template.html.twig';
}
Other point dump in template for example {{ dump (user) }} ?
Thanks!

Excellent points, thanks!
Regarding the first one: Please use composer update delight-im/foundation-core to update this framework to version v4.3.0 and you’ll be able to catch \Delight\Foundation\Throwable\TemplateNotFoundError whenever you try to load a template from views which does not actually exist. That should work for your use case:
try {
    echo $app->view('mail_' . $lang . '.html.twig');
}
catch (\Delight\Foundation\Throwable\TemplateNotFoundError $e) {
    echo $app->view('mail_' . $fallback_lang . '.html.twig');
}

Of course, you should make sure that directory traversal attacks are not possible, i.e. that your language variables really contain only characters you’d expect.
As for the second point: You’ll also need v4.3.0, and when setting your application to debugging mode via APP_DEBUG=1, you’ll be able to use the dump function in your templates.

Work great! 👍
Thanks.


Avoid space leaks in TxSubmission.Inbound

Copying from https://github.com/input-output-hk/ouroboros-network/pull/1476#discussion_r369689613:
https://github.com/input-output-hk/ouroboros-network/blob/f5741efd37c5558d8a29d0d2b142e01f650a3d45/ouroboros-network/src/Ouroboros/Network/TxSubmission/Inbound.hs#L76
This record is the state of this server, so we should check whether this contains thunks to avoid space leaks. This record is not stored in a StrictTVar (or variant), but passed around. See
https://github.com/input-output-hk/ouroboros-network/blob/5c90d6e6e57f46f7fe22aa5fd657554493a71948/ouroboros-consensus/src/Ouroboros/Consensus/ChainSyncClient.hs#L786
for an example on how to check for thunks in such a state. Slightly annoying: this code lives in ouroboros-network, while the thunks checking code lives in ouroboros-consensus. So something should be moved at some point.

Plan: move unsafeNoThunks to cardano-prelude (or some other place?) and use that, just like in the ChainSyncClient.


Update nottinygc

Important release
https://github.com/wasilibs/nottinygc/releases/tag/v0.7.0

Great opportunity to cut a release and try the mechanics


Callback Event on Camera Disconnection

I am using Harvester to interface with a GiGE camera and would like a callback feature that triggers when the camera gets disconnected due to a networking issue.
Currently, Harvester provides callback events, such as NEW_BUFFER_AVAILABLE, but there seems to be no event indicating when the connection to the camera is lost due to network outages. TURNED_OBSOLUTE does not seem to be fired when a disconnect happens
Here's a snippet of how I use the Harvester:
import harvesters.core as harvcore
from pathlib import Path
from threading import Event, Thread
from loguru import logger
import time

harvester = harvcore.Harvester()

file_path = "./Galaxy_Linux_Python_2.0.2106.9041/api/Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.3.2107.9261/Galaxy_camera/lib/armv8/GxGVTL.cti"
if not Path(file_path).exists():
    raise ValueError(f"{file_path} is not found")
harvester.add_file(file_path)
harvester.update()

camera = harvester.create()

class CallbackOnNewBuffer(harvcore.Callback):
    def __init__(self, ia: harvcore.ImageAcquirer):
        super().__init__()
        self._ia = ia

    def emit(self, context=None):
        with self._ia.fetch() as buffer:
            image_data = buffer.payload.components[0]
            img = image_data.data.reshape(image_data.height, image_data.width)
            # logger.info(f"Received data with shape {img.shape}")

camera.add_callback(
    harvcore.ImageAcquirer.Events.NEW_BUFFER_AVAILABLE,
    CallbackOnNewBuffer(ia=camera)
)

# I would like to add a callback when the camera is disconnected due to network outage
# No events seem to indicate when connection is lost to the harvester remote device
camera.start(run_as_thread=True)

# *** _gentl.TimeoutException: GenTL exception: Operation timed out before completion. (Message from the source: {-1011}{ReadRegList:line[223]}{TLError: Timeout !}) (ID: -1011)
# camera.remote_device.node_map.ExposureTime.value = 20000

# Event().wait()

def _check_health_monitor():
    try:
        camera.remote_device.node_map.ExposureTime.value = 2000
        return True
    except:
        return False # not connected, got a Timeout

while True:
    time.sleep(1)
    logger.info(f"Access status {camera.remote_device.module._get_access_status()}") # always prints 3
    logger.info(f"Is open {camera.remote_device.module.is_open()}") # always True
    logger.info(f"Is open healthCheck {_check_health_monitor()}") # return correct result

# Sample output when unplugging
# 2023-09-29 15:57:30.880 | INFO     | __main__:<module>:53 - Access status 3
# 2023-09-29 15:57:30.887 | INFO     | __main__:<module>:54 - Is open True
# 2023-09-29 15:57:30.892 | INFO     | __main__:<module>:55 - Is open healthCheck True
# 2023-09-29 15:57:31.902 | INFO     | __main__:<module>:53 - Access status 3
# 2023-09-29 15:57:31.909 | INFO     | __main__:<module>:54 - Is open True
# 2023-09-29 15:57:31.913 | INFO     | __main__:<module>:55 - Is open healthCheck True
## UNPLUGGED THE GiGE Camera
# 2023-09-29 15:57:32.921 | INFO     | __main__:<module>:53 - Access status 3
# 2023-09-29 15:57:32.928 | INFO     | __main__:<module>:54 - Is open True
# 2023-09-29 15:57:32.933 | INFO     | __main__:<module>:55 - Is open healthCheck False
# 2023-09-29 15:57:33.942 | INFO     | __main__:<module>:53 - Access status 3
# 2023-09-29 15:57:33.949 | INFO     | __main__:<module>:54 - Is open True
# 2023-09-29 15:57:33.954 | INFO     | __main__:<module>:55 - Is open healthCheck False

camera.stop()
camera.destroy()

logger.info("Destroyed camera")

Additionally, I have tried using the is_open method and the access_status property of the remote_device, but they don't seem to detect or reflect the actual loss of the camera due to a network disconnection. Even when the camera is unplugged, is_open returns True and access_status returns 3.
logger.info(f"Access status {camera.remote_device.module._get_access_status()}") # always prints 3
logger.info(f"Is open {camera.remote_device.module.is_open()}") # always True

To work around this, I have attempted to monitor the connection health by checking the camera.remote_device.node_map.<random_field>.value, but this approach feels more like a workaround than a direct event-based solution:
def _check_health_monitor():
    try:
        camera.remote_device.node_map.ExposureTime.value = 2000
        return True
    except:
        return False # not connected, got a Timeout

Is there a callback event or a more accurate method to determine the loss of the camera due to network issues. I want to find a solution that can handle such disconnections gracefully.

Also was looking for a solution… My approach was based it the fetch timeout. To the best of my understanding UDP cannot detect disconnects


Fix app.py name to streamlit_app.py in README.md

A recent change [#13] changed the name of app.py to streamlit_app.y. Changing readme to reflect that.

👍

Thanks for the update @rcanand ! This will certainly cause less confusion!


Badge effect without "new"

How to have a badge effect without appending new to the badge ?

Remove the "new" text.

Do you mean remove new from the class name ?
The class used to get the teal box badge effect is "new badge" but if I remove new and use only "badge" then I won't get the teal box badge effect.
How to get the teal box badge effect without appending new ?

Its very easy I figure it out. Thanks

Hi. I just came across this. How did you figure it out. I am a bit new to Materialize CSS. @ask007java

There should be an element with "New" text in your html. remove it.

its pretty easy, just remove the following script from materialize css file
span.badge.new:after{content:" new"}

Official Solution:
To remove the "new" text, use the data-badge-caption Attribute.
Either set an empty String inside data-badge-caption="".
Or use it for your text

I am getting more and more tired of working with materialize design with these illogical implementations


fix(travis): deploy

While it looks like you setup your Travis key correctly (but since I don't have admin on this repo I can't verify that) you forgot to edit your .travis.yml.

Codecov Report

Merging #2 (888f2d1) into master (972bee6) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 888f2d1 differs from pull request most recent head 141e091. Consider uploading reports for the commit 141e091 to get more accurate results

@@          Coverage Diff           @@
##           master      #2   +/-   ##
======================================
  Coverage    6.66%   6.66%
======================================
  Files          13      13
  Lines          60      60
======================================
  Hits            4       4
  Misses         56      56

Continue to review full report at Codecov.

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

@redallen access granted!


how to get the "current epoch" value

🐛 Bug
how to get the "current epoch" value in the validation_epoch_end ?
Since I want to use the "epoch" value to create a dir path, like "predicitions_0" (predicitions_epoch)
thanks

PyTorch Lightning Version (e.g., 1.6.4):
PyTorch Version (e.g., 1.10):
Python version (e.g., 3.9):
OS (e.g., Linux):
CUDA/cuDNN version:
GPU models and configuration:
How you installed PyTorch (conda, pip, source):
If compiling from source, the output of torch.__config__.show():
Any other relevant information:

Additional context

Check out the current_epoch property: https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#current-epoch

Duplicate of #13543.


API Token docs

Add documentation for the API Token usage.

Coverage increased (+0.2%) to 55.926% when pulling b41683aeb1bf498472796674711d2c7a1cec46e8 on docs/api-tokens into b8378e59d2452d2aa59211045035d04b4f43a26c on main.


rewriting of DMRG with Sweep engines

@Lschoon  is working on a rewrite of DMRG. Discussions here

Note that the rewrite is taking place in my personal branch, rather than in the tenpy repository.

Update:

The file mps_sweeps.py is now essentially finished, modulo some future generalizations and/or inclusion of Mixers in the Sweep class.
I built an implementation of a two-site DMRG engine using the Sweep class in dmrg.py. Note that this file is in absolute disarray at the moment, please ignore all but the TwoSiteDMRGEngine.

Next order of business is to include (a) mixer(s) in the two-site DMRG algorithm as a proof of concept, and hopefully do some testing.
Any feedback on the work done so far would be very helpful.

So far it looks very good and I have nothing to complain about :+1:
You wrote some questions in the ToDo's, I would suggest to discuss in person as long, that's easier.

Let us discuss those points today, then (if possible).
Two-site DMRG now works completely; I have rewritten d_dmrg.py by ways of a test, which now gives the same result as the original did.
Next up:

The documentation for the new setup still needs some work and cleanup.
Implement single-site DMRG algorithm.

Update:

Single-site DMRG with combine=False runs without error. It does not reproduce the correct results yet, as it has no way to grow the bond dimension.
Single-site DMRG with combine=True currently fails at this line, as the pipes are incorrect. I have yet to figure out how to replace pipesR with a trivial pipe in such a way that things don't break. @jhauschild, perhaps you could have a brief look?
The single-site mixer is only defined for engines with combine=True.

To Do:

[ ] Documentation
[ ] Make single-site mixer work with combine=False
[ ] Make single-site DMRG work with combine=True

I think in the line you referenced there should only be one pipe, not two?
I think in the single-site DMRG, the combine=True should combine the 'p' leg to the left ('vL') if we move right, or to the right ('vR') if we move left. Thus this whole function 'prepare_update' depends on the sweep movement.

I agree. Turns out the problem was a small syntax issue leading to combine_legs demanding I specify two pipes when I only had one. I believe this is fixed now.
To figure out which direction the sweep is going, it turns out to be not sufficient to look at the update_LP or update_RP flags (they are True too often). I am working around this by setting a global flag move_right to True by default, switching it to False when i0 == max(schedule_i0). Would you agree or do you think there is a cleaner way?

Single-site DMRG without mixer now runs without errors (but again, without increasing the bond dimension, the results are nonsense).
The SingleSiteMixer is giving me a slight headache, not in the least because subspace_expand() (which I believe to be bugged) uses numerically indexed legs rather than labels. I am working through the 2015 Hubig paper, but if you could send me a quick sketch of what the idea is, that would speed things up considerably.

After discussing with @jhauschild, it turns out I made a mistake in prepare_svd() by already contracting theta with the next MPS tensor. This is now fixed. Some issues still remain:

[ ] Running single-site DMRG with combine=True and mixer=True fails.
[ ] Running single-site DMRG with any other configuration of those two parameters runs without errors, but gives the wrong result, even when the mixer is activated.

I believe both these issues might be due to the indices update_LP() and update_RP() being off, but haven't fully figured out what's going on yet.

should I take a quick look?

I think that would be helpful. My github repo is up-to-date.
One thing also worth thinking about is if the schedules for 1- and 2-site DMRG are the same for finite DMRG. I think the rightmost site might not be updated right now, but changing the schedule seems to lead to an indexing error in the MPS.

About this last issue. I am now convinced that the schedule for single-site algorithms was wrong and missed the rightmost site. I fixed this in a recent commit. This now leads to some issues where get_LP or get_RP try to get out-of-bounds MPS tensors.

Agreed. I'm already working on it and changed this locally. I will soon upload my commit.

Alright, I will hold off on more updates until your commit is in.

With @jhauschild's help, single-site DMRG for finite systems now works correctly. Infinite systems not yet.

[ ] Debug 1-site DMRG for infinite systems
[ ] Documentation

As per https://github.com/Lschoon/tenpy/commit/14c877b90bfdca21c3f8b1845be7f271f1daf825, single-site DMRG works as expected in all test cases! The bugfix for the infinite system turned out to be an indexing error in update_RP().
I will now focus on writing documentation.

That's great news! One additional thing:

[ ] make sure that test/test_dmrg.py doesn't fail (using pytest). There might still be some bugs in orthogonal_to, for example.

Good point! I have changed test_dmrg.py to work with the new engines. Two issues remain here:

1-site infinite DMRG does not reach the required threshold in energy (the difference with the exact energy is around 1e-8, while tests fail for errors bigger than 1e-10). I tried playing around with the mixer parameters, but this problem persists.
(probably unrelated) test_model_toric_code.py fails a test as the ground state energy is way off. Here,  even 2-site DMRG does not change the MPS bond dimension, so the state remains a product state. No idea why this happens...

All class and method docstrings are finished and ready for review. Also, I changed the global dmrg.run() function to work with the new engines.
Remaining tasks:

[ ] Global docstring for mps_sweeps.py
[ ] The TwoSiteMixer has not been ported yet, this could potentially be interesting (but not absolutely necessary).
[ ] Fix precision issue with 1-site iDMRG (see above).
[ ] Fix toric code model problem (see above).
[ ] (Medium term) Move all methods that OneSiteDMRGEngine inherits from TwoSiteDMRGEngine to a DMRGEngine superclass.
[ ] (Medium term) Port plotter functions from old Engine class.
[ ] (Medium term) Include orthogonal theta's in EffectiveH's. Not sure how/why anymore.
[ ] (Long term, should probably be done by someone who understands TDVP) Port TDVP to the new Sweep-based setup.

@jhauschild, I could use your input with the issue I mentioned above. I initially thought this was some problem with the DMRG parameters in test_dmrg.py, but I have played with those a bit without affecting the problem at all. The issue is as follows:

1-site DMRG with bc='infinite' does not reach the threshold set by test_dmrg.py.
(Reported) convergence is good, reaching norm_err = 1.7e-13, Delta E = -1.4033e-12, Delta S = -7.7925e-11 on my last test before hitting max_sweeps.
chi_max is not saturated and, perhaps crucially, the final bond dimension is lower than in the 2-site case. However, when I decrease svd_min, the bond dimension grows but the final result gets worse.

I am not sure where to start debugging this, any suggestions would be helpful.

I looked a little bit into the problem and observed the following:

While the energy returned by DMRG is off, the energy calculated with np.mean(M.bond_energies(psi)) seems to be correct down to Machine precision for g=1.5 in the transverse field Ising model.
I think this is due to the mixer screwing up the orthonormality of the left/right states in the infinite case.
The default 15 sweeps with activated mixer will often be too little for 1-site DMRG.
Too small mixer amplitude compared to svd_min is bad, because it doesn't allow to grow the bond dimension with the mixer. Too large mixer amplitude on the other hand screws up the state (in particulare the norm_err) quite badly. I'm not sure what the best values are...
The toric code test works, if one puts Lx=2 instead of Lx=1.
Reason: all of the star terms getting us out of the initial product state extend over more than one 'ring'/MPS unit cell.
In the old Code, we kept 'mixing' with the left part of the effective Hamiltonian whenever we updated the left part, while the new code we only mix on the left while moving right. We might need to change this.

Thank you for looking into this! I took the liberty of numbering your comments for easier discussion.

Indeed; in fact every single bond energy is has a reasonable error. I don't fully understand your comment about the orthonormality of left/right states.
True, but this is not why the tests fail (as you probably found yourself).
As in 2. These probably requires some amount of tinkering depending on the model.
That fixed it indeed! I am still curious why this did not cause an issue before the rewrite.
Again, not completely sure what you mean here. Do you mean the old (Python 2) tenpy, or the current master build?

In the finite case, we need the canonical form only to ensure the orthonormality A^dagger A = eye and B B^dagger = eye of the left and right schmidt states. This is ensured by the SVD we do after the mixing. However, the mixing screws up the normalization: if we move right, we do:

theta, next_B = subspace_expand(theta, next_B)  # add's zeros in next_B
U, S, VH = svd(theta)
# I think, here norm(U S)=1 and norm(S VH)=1, but
#  norm(dot(S VH, next_B)) != 1 because of the extra zeros in next_B.
next_B = dot(VH, next_B)

In the infinite case, we absorb the next_B in the right environment when changing direction, which then screws up the normalization of the envirionments. In the end, I think it's just a global prefactor in the environment tensors, which screws up the energy values, but still leads to the correct ground state - if you calculate the overlap with the ground state from two-site DMRG without mixer, it's 1.
2. Sure, just wanted to mention it
3. As 2.
4. This is still a severe issue, changing the test doesn't fix the problem. I think the reason is what I tried to explain in 5. Let me try again:
5. Here, old=both "before the rewrite" and "old Tenpy", they behave the same way.
Before the rewrite, we decided with update_LP, update_RP whether to mix on the left or rigtht. Considering the schedule, this leads to more mixing, in particular to continuously mix on the left whenever we grow the left environment. In contrast, after the rewrite, we stop mixing on the left the moment we switch to a right move, even though we might update the left part of the environment.
It might be necessary to do this to properly account for long-range terms.

This comment is mostly to track my own thoughts while debugging; however, any input is still very welcome. I am in a world of confusion about normalizations...

Regarding the normalization of the left/right environments: these are non-normalized in the infinite case even when no mixer is used. That does not mean there is no problem with an overall factor in the environments. There seems to be a difference between finite/infinite here: in the finite case, the leftmost/rightmost environments are normalized to 1. The leftmost env starts out 1-normalized in the infinite case as well, but changes during the sweeps. I am not convinced this is the expected behaviour
In the finite case, the normalization of the MPS tensors is also not equal to 1 except at the edge of the system. This is independent of mixer use.
@jhauschild's comment in the code above:

# I think, here norm(U S)=1 and norm(S VH)=1, but
#  norm(dot(S VH, next_B)) != 1 because of the extra zeros in next_B.

is indeed correct.
Given all this, and the discussion above about the scheduling of updates to LP/RP, I am not fully convinced there is a problem with normalizations. Rather, I have a suspicion that somewhere, an environment is wrongly updated (or not updated when it should be) due to a scheduling or related error.

576120d4926b21646aea62b7ddea9bdcf586dead solves the problem of the DMRG energy not being accurate (enough) by enforcing normalization of the A/B tensors explicitly after (mixed) SVD. This is as we discussed above.
There is some potential for this code to be prettified or otherwise improved, so any feedback would be very welcome. In particular, it would probably be good to only enforce the normalization when the mixer is active, to avoid extra overhead when we don't need it.

a3134cdd89d1b237ccb5abb79236c74424d895df resolves the issue found in the toric code test, but inadvertently introduces some problems with finite systems.


test(e2e): Add basic cucumber setup for better e2e testing.

Move all e2e tests to Cucumber feature descriptions.

[x] angular-scenario
[x] basic
[x] browserstack
[x] pass-opts
[x] reconnecting
[x] syntax-error
[x] timeout

What is the test/e2e/proxy folder?
You said you added the "timeout" test but I can't see it. Where is it?

@Dignifiedquire

What is the test/e2e/proxy folder?
You said you added the "timeout" test but I can't see it. Where is it?

@vojtajina Sorry about that, not sure why I thought I finished it.
I've added the correct proxy and timeout features now.

#merge

Thank you sir @Dignifiedquire - good stuff!

You're very welcome. It took long enough :laughing:


Let us change the location of the settings.json file

Description of the new feature/enhancement
It would be awesome to be able to change the location of the settings.json file. Individual users could put it on their OneDrive, small teams might throw the file onto an FTP server or Sharepoint. This would allow syncing look and feel, as well as profiles across multiple devices.
Proposed technical implementation details (optional)
Simple input that opens the file picker dialog if you click on it, but should also be able to accept URLs so you could specify a gist or whatever.

Good idea. I am using environment variable for settings.json. Symbolic or hard link are variants too.

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #2933 for more discussion.
/dup #2933


CSGO crashes after inject

The cheat worked fine yesterday.
CSGO crashes without any error message.
I have updated the cheat to the latest version (recompiling with the latest src) and it still happens

Another cheat I use for rage cheating works (I use the same injector for osiris and my rage cheat)

Is there any error message?

Please verify game files https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335

I did and it still crashes

(It closes itself it does not really freeze or crash it just closes)

Attach debugger to game process before injection, and check what's crash cause. Also try different dll injectors.

I attached the vs debugger and this is what I got: Exception thrown at 0x41D49D50 (Osiris.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x0000390A. occurred

Should now be fixed. Thanks for your report!

im getting crashes now

this issue is 15 months old. (over a year!)
can we make new issues and not necro post?


Feature Request: Allows defining a title different from the prefix

Checklist

[X] The feature would be useful to more users than just me.
[X] The suggestion is related to creating or editing snippets. (Expanding and using snippet is the responsibility of the snippet engine plugin, such as Luasnip or nvim-snippets.)

Feature Requested
Currently defined snippets have the same title and prefix, but they can contain more information, for example:
    "Module template": {
        "body": [
            "local M = {}",
            "${TM_SELECTED_TEXT}$0",
            "return M"
        ],
        "description": "This is a module template",
        "prefix": "M"
    },

This will look like:

So it would be great if could allow custom title and description.
Relevant Screenshot
No response

That would require rewriting the plugin's UI to support somehow writing more than the snippet body and snippet prefix. Not impossible, but would take a certain amount of work, and make the plugin more complicated to use, while ease-of-use is one of the goals.
Tbh, the benefit of being able to define a title different from the prefix is not that big in my view. For the very few cases where this might be useful, you can use the openInFile keymap to edit the title directly.

good point. Should be fixed.

After this fix, some keys that were not originally there appear after the snippet is saved, such as the above snippet:
    "Module template": {
        "body": [
            "local M = {}",
            "${TM_SELECTED_TEXT}$0",
            "return M"
        ],
        "description": "This is a module template",
        "filetype": "lua",
        "fullPath": "C:/Users/MasouShizuka/scoop/persist/vscode/data/user-data/User/snippets/lua.json",
        "originalKey": "Module template",
        "prefix": "M"
    },

fixed


[Bug Report] is there a plan to fix the bug #9916?

Element UI version
2.3.4
OS/Browsers version
IE11
Vue version
2.5.16
Reproduction Link
https://jsfiddle.net/xyhxyw/kp3ffLtw/
Steps to reproduce
see detail on #9916
What is Expected?
fix this bug
What is actually happening?
the latest  element-ui version is 2.3.4, but it seems there is no plan to fix the bug since element-ui 2.2.0.

目前没有人手。有进展会在 #9916 更新。


Provide code for login, logout and user information

Provide API for user information in rest service and in SPA client

This is supersed by https://github.com/atende/angular-spa


TypeError: Cannot Read Property 'children' Of Null

There's Some Kind Of Error In The Repository Plz Fix It

@DevAndromeda


Wrong msgID

Hi, the message id is different in the two js files,
https://github.com/davidjbradshaw/iframe-resizer/blob/master/src/iframeResizer.js#L23 => iFrameResizer
https://github.com/davidjbradshaw/iframe-resizer/blob/master/src/iframeResizer.contentWindow.js#L39 => iFrameSizer
//Must match host page msg ID

Also, in https://github.com/davidjbradshaw/iframe-resizer/blob/master/src/iframeResizer.contentWindow.js#L1101 the message ID is hardcoded..shouldn't it use the msgID variable?

I agree that it's a little old that it is msgId in one and msgID in the other, but it is their contents that needs to match. Feel free to make a PR is you want to change it to be msgId everywhere.
The second one is a different message, so have a different msgId.

I meant that the content of the two differ, not the name of the variables

They are both [iFrameSizer].

    msgId                 = '[iFrameSizer]', //Must match iframe msg ID
    msgID                 = '[iFrameSizer]',  //Must match host page msg ID


Object oriented analysis

Object oriented analysis
We need to create CRC cards in the wiki for all types of classes that are going to be involved with the process.

I am adding a database class for the items in the wiki.

Figure out if we need to make classes for the filter and sort menu.

We are including super classes on the crc cards

#31

Components of the project
Item
ItemList
Tags
Photographs
Scanning
User Profiles

Closing due to completion of CRC cards. View part 5 in wiki


Add blank string check for XML responses

Addresses #21, #22, #31 in its simplest form.
This does not add an expansion for more specific error messages as suggested on #21 (or using something like https://gist.github.com/henriquemoody/6580488), but that could be an interesting additional update later.
Also adds a branch alias to make it easier to do fork tests.

@rb-cohen is this still being maintained? If so, can this be reviewed?

Yes, sorry, I remember looking at this before but can't see why it wasn't merged.


Invalid setup error

Describe the bug
After the update to v8.4.4 I am getting this error:

Reproduction steps
Issue appeared after last integration update
Expected behaviour
Integration is expected to load and all the sensors to report the respective values
Tariff Code
No response
Integration Version
8.4.4
Home Assistant Version
2023.10.3
Fresh Install?
After upgrading
Home Assistant Logs
Logger: homeassistant.setup
Source: setup.py:215
First occurred: 16 October 2023 at 06:16:17 (1 occurrences)
Last logged: 16 October 2023 at 06:16:17

Setup failed for custom integration octopus_energy: Unable to import component: No module named 'custom_components.octopus_energy.const'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 818, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/octopus_energy/__init__.py", line 4, in <module>
    from custom_components.octopus_energy.utils import get_active_tariff_code
  File "/config/custom_components/octopus_energy/utils/__init__.py", line 7, in <module>
    from ..const import (
ModuleNotFoundError: No module named 'custom_components.octopus_energy.const'

Hello and sorry that you're receiving this error. Myself and others have successfully installed this version, so I suspect something went wrong with the download/installation. If you're going through HACS, i suggest you redownload the target version and restart your HA instance.

Hello @BottlecapDave, many thanks for your reply.
I followed your advise and it did work. Appreciate it.
This is the first time I have an issue like this that simply needs reinstallation so will keep in mind for the future as well.
Have a wonderful day!
Kind regards,
Ilias


[TRI-1029] @trigger.dev/react doesn't work out of the box with Next.js Page Router: Cannot use import statement outside a module Error

When using @trigger.dev/react in Next.js Page Router, importing will cause an error because Page Router modules aren't automatically transpiled to CJS (whereas they are in App Router).
From Next 13.1 onwards, the fix is to the add @trigger.dev/react to the list of transpiled packages in the next.config.js file:
const nextConfig = {
  transpilePackages<EMAIL_ADDRESS>};

module.exports = nextConfig;

In Next versions below 13.1, the next-transpile-modules package should be used in next.config.js:
const withTM = require('next-transpile-modules')(['@trigger.dev/react']); // pass the modules you would like to see transpiled

module.exports = withTM({});

We should do the following:

[ ] Look into why Next.js is using the ESM module exported by @trigger.dev/react instead of the CJS
[ ] If nothing can be done about the above issue, then we should make sure @trigger.dev/cli init correctly handles this (whenever the @trigger.dev/react stuff is added to the init command (see https://github.com/triggerdotdev/trigger.dev/issues/330)
[ ] Add to the React Hooks docs (and the Next.js quickstart) info about this

TRI-1029

I'll look into this

You'll be sick of me after all that ngrok faffing on @Chigala, but I just ran into this and solved it with the above advice 😅
I don't think the work in the other issue/PR made it into the Docs, unless I've missed where this is specifed somewhere.
Just wanted to flag / bump this, as I'm sure many people are still using the Page router for Next.js.
I regularly use the T3 Stack, which is still on Page Router Next:
https://create.t3.gg/


HWY-250: Use ConsensusValue's hash as a key in map.

Instead of storing the whole ConsensusValue as a key in the map (where ConsensusValue is a set of all deploys that the block includes), we will store a hash of ConsensusValue. This will improve memory management.
https://casperlabs.atlassian.net/browse/HWY-250

bors merge


tf.function-decorated  Value error

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:no
TensorFlow installed from (source or binary):binary
TensorFlow version (use command below):2.3
Python version:3.7
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:10.1
GPU model and memory: GTX 1050

I'm using the following code to create a custom loss,
@tf.function
def custom_loss(self, y_true, y_pred):
        mask_shape = tf.shape(y_true)[:4]

        cell_x = tf.cast(tf.reshape(tf.tile(tf.range(self.grid_w), [self.grid_h]), (1, self.grid_h, self.grid_w, 1, 1)),dtype=tf.float32)
        cell_y = tf.transpose(cell_x, (0,2,1,3,4))

        cell_grid = tf.tile(tf.concat([cell_x,cell_y], -1), [self.batch_size, 1, 1, self.nb_box, 1])

        coord_mask = tf.zeros(mask_shape)
        conf_mask  = tf.zeros(mask_shape)
        class_mask = tf.zeros(mask_shape)

        seen = tf.Variable(0.)
        total_recall = tf.Variable(0.)

But it throws the following error,
ValueError: tf.function-decorated function tried to create variables on non-first call.

@Zumbalamambo
I ran the code shared by you on tf_nightly and tf 2.2 but do not face any error, please have a look at the gist here

with the nightly build, I'm getting the following error, :(
RuntimeError: The layer has never been called and thus has no defined output shape.

@Zumbalamambo please share the minimal amount relevant code so we can reproduce the RuntimeError you are seeing. With just the function you have provided, I am unable to reproduce either the ValueError or the RuntimeError.
However, on first glance, the issue you are facing is likely from the creation of the variables within your tf.function. I recommend checking out the Variables section of the documentation for tf.function, which provides some context on the ValueFunction error you are seeing. In general, avoid creating variables inside of tf.function. Happy to provide more help if you share a minimal reproducible example.

@Zumbalamambo
Please update as per above comment.

this is my tf function @Saduf2019 @nikitamaia
@tf.function
    def custom_loss(self, y_true, y_pred):
        mask_shape = tf.shape(y_true)[:4]

        cell_x = tf.cast(tf.reshape(tf.tile(tf.range(self.grid_w), [self.grid_h]), (1, self.grid_h, self.grid_w, 1, 1)),dtype=tf.float32)
        cell_y = tf.transpose(cell_x, (0,2,1,3,4))

        cell_grid = tf.tile(tf.concat([cell_x,cell_y], -1), [self.batch_size, 1, 1, self.nb_box, 1])

        coord_mask = tf.zeros(mask_shape)
        conf_mask  = tf.zeros(mask_shape)
        class_mask = tf.zeros(mask_shape)

        if self.seen  is None:
            self.seen  = tf.Variable(0.)
            self.total_recall = tf.Variable(0.)

        """
        Adjust prediction
        """
        ### adjust x and y
        pred_box_xy = tf.sigmoid(y_pred[..., :2]) + cell_grid

        ### adjust w and h
        pred_box_wh = tf.exp(y_pred[..., 2:4]) * np.reshape(self.anchors, [1,1,1,self.nb_box,2])

        ### adjust confidence
        pred_box_conf = tf.sigmoid(y_pred[..., 4])

        ### adjust class probabilities
        pred_box_class = y_pred[..., 5:]

        """
        Adjust ground truth
        """
        ### adjust x and y
        true_box_xy = y_true[..., 0:2] # relative position to the containing cell

        ### adjust w and h
        true_box_wh = y_true[..., 2:4] # number of cells accross, horizontally and vertically

        ### adjust confidence
        true_wh_half = true_box_wh / 2.
        true_mins    = true_box_xy - true_wh_half
        true_maxes   = true_box_xy + true_wh_half

        pred_wh_half = pred_box_wh / 2.
        pred_mins    = pred_box_xy - pred_wh_half
        pred_maxes   = pred_box_xy + pred_wh_half

        intersect_mins  = tf.maximum(pred_mins,  true_mins)
        intersect_maxes = tf.minimum(pred_maxes, true_maxes)
        intersect_wh    = tf.maximum(intersect_maxes - intersect_mins, 0.)
        intersect_areas = intersect_wh[..., 0] * intersect_wh[..., 1]

        true_areas = true_box_wh[..., 0] * true_box_wh[..., 1]
        pred_areas = pred_box_wh[..., 0] * pred_box_wh[..., 1]

        union_areas = pred_areas + true_areas - intersect_areas
        iou_scores  = tf.truediv(intersect_areas, union_areas)

        true_box_conf = iou_scores * y_true[..., 4]

        ### adjust class probabilities
        true_box_class = tf.argmax(y_true[..., 5:], -1)

        """
        Determine the masks
        """
        ### coordinate mask: simply the position of the ground truth boxes (the predictors)
        coord_mask = tf.expand_dims(y_true[..., 4], axis=-1) * self.coord_scale

        ### confidence mask: penelize predictors + penalize boxes with low IOU
        # penalize the confidence of the boxes, which have IOU with some ground truth box < 0.6
        true_xy = self.true_boxes[..., 0:2]
        true_wh = self.true_boxes[..., 2:4]

        true_wh_half = true_wh / 2.
        true_mins    = true_xy - true_wh_half
        true_maxes   = true_xy + true_wh_half

        pred_xy = tf.expand_dims(pred_box_xy, 4)
        pred_wh = tf.expand_dims(pred_box_wh, 4)

        pred_wh_half = pred_wh / 2.
        pred_mins    = pred_xy - pred_wh_half
        pred_maxes   = pred_xy + pred_wh_half

        intersect_mins  = tf.maximum(pred_mins,  true_mins)
        intersect_maxes = tf.minimum(pred_maxes, true_maxes)
        intersect_wh    = tf.maximum(intersect_maxes - intersect_mins, 0.)
        intersect_areas = intersect_wh[..., 0] * intersect_wh[..., 1]

        true_areas = true_wh[..., 0] * true_wh[..., 1]
        pred_areas = pred_wh[..., 0] * pred_wh[..., 1]

        union_areas = pred_areas + true_areas - intersect_areas
        iou_scores  = tf.truediv(intersect_areas, union_areas)

        best_ious = tf.reduce_max(iou_scores, axis=4)
        conf_mask = conf_mask + tf.cast(best_ious < 0.6,dtype=tf.float32) * (1 - y_true[..., 4]) * self.no_object_scale

        # penalize the confidence of the boxes, which are reponsible for corresponding ground truth box
        conf_mask = conf_mask + y_true[..., 4] * self.object_scale

        ### class mask: simply the position of the ground truth boxes (the predictors)
        class_mask = y_true[..., 4] * tf.gather(self.class_wt, true_box_class) * self.class_scale

        """
        Warm-up training
        """
        no_boxes_mask = tf.cast(coord_mask < self.coord_scale/2.,dtype=tf.float32)
        self.seen  = tf.compat.v1.assign_add(self.seen , 1.)

        true_box_xy, true_box_wh, coord_mask = tf.cond(tf.less(self.seen , self.warmup_batches+1),
                              lambda: [true_box_xy + (0.5 + cell_grid) * no_boxes_mask,
                                       true_box_wh + tf.ones_like(true_box_wh) * \
                                       np.reshape(self.anchors, [1,1,1,self.nb_box,2]) * \
                                       no_boxes_mask,
                                       tf.ones_like(coord_mask)],
                              lambda: [true_box_xy,
                                       true_box_wh,
                                       coord_mask])

        """
        Finalize the loss
        """
        nb_coord_box = tf.reduce_sum(tf.cast(coord_mask > 0.0,dtype=tf.float32))
        nb_conf_box  = tf.reduce_sum(tf.cast(conf_mask  > 0.0,dtype=tf.float32))
        nb_class_box = tf.reduce_sum(tf.cast(class_mask > 0.0,dtype=tf.float32))

        loss_xy    = tf.reduce_sum(tf.square(true_box_xy-pred_box_xy)     * coord_mask) / (nb_coord_box + 1e-6) / 2.
        loss_wh    = tf.reduce_sum(tf.square(true_box_wh-pred_box_wh)     * coord_mask) / (nb_coord_box + 1e-6) / 2.
        loss_conf  = tf.reduce_sum(tf.square(true_box_conf-pred_box_conf) * conf_mask)  / (nb_conf_box  + 1e-6) / 2.
        loss_class = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=true_box_class, logits=pred_box_class)
        loss_class = tf.reduce_sum(loss_class * class_mask) / (nb_class_box + 1e-6)

        loss = tf.cond(tf.less(self.seen , self.warmup_batches+1),
                      lambda: loss_xy + loss_wh + loss_conf + loss_class + 10,
                      lambda: loss_xy + loss_wh + loss_conf + loss_class)

        return loss

Thanks @Zumbalamambo. Can you share a minimal example that can be reproduced? Also please provide the error you are seeing. Is it still the ValueError mentioned in your original post, or something else?

@Zumbalamambo I think it might be because in your if-statement for tf.Variables you have self.total_recall = tf.Variable(0.). Try moving it into its own if-statement.

Hi @Zumbalamambo, were you able to resolve this issue with the suggestion from @sumanthratna? Essentially you want to make sure your variables are only created the first time your tf.function is executed (ie do not create a new variable with each call), or you'll see the ValueError.

@Zumbalamambo
Please update a s per above comment.


Using timestamp_field to replace @timestamp field

Hi, I have logs that don't use the label "@timestamp". Instead, the field name is "dt".
How and where do I configure my rule so that ElastAlert uses "dt" instead of "@timestamp"?
I've tried the following but it doesn't work:
name: Check Atlas Logs for 'Could not load items into queue' logs
description: This alert requires action from Operations. There are items that could not be loaded into queues. Please check the attached Kibana link to view logs.
type: frequency
index: atlas*
timestamp_field: dt
num_events: 10
timeframe:
minutes: 5
filter:

query:
query_string:
query: "message:"ASP.NET session has expried or could not be found""

alert: "email"
alert_subject: "CRITICAL: [PROD-NA11] - 'Could not load items into queue' logs are occurring. Check attached link."
email<EMAIL_ADDRESS>

timestamp_field is how you configure it. What do you mean by "it doesn't work"? Do have logs which show that it ran over the correct time period and got no hits? Have you tried using elastalert-test-rule?

I've ran elastalert-test-rule example_rules/example_frequency.yaml  and this is what I get:
NOTE that my index name is atlas. I've tested this rule against logstash- indices where the @timestamp field DOES exist, and the rule works correctly. Its only when I test the rule against the atlas* indices where the @timestamp field does not exist, do I get this error below:
Successfully loaded Check Atlas Logs for 'Could not load items into queue' logs
INFO:urllib3.connectionpool:Starting new HTTP connection (1): logselasticprodna11-lb1.atlas.cm.com
WARNING:elasticsearch:GET http://logselasticprodna11-lb1.atlas.cm.com:8081/atlas*/_search?ignore_unavailable=true&size=1 [status:N/A request:10.315s]
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 67, in perform_request
response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, *kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 493, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 324, in _make_request
self, url, "Read timed out. (read timeout=%s)" % read_timeout)
ReadTimeoutError: HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10)
Error running your filter:
ConnectionTimeout('TIMEOUT', "HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10)", ReadTimeoutError("HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10)",))
INFO:urllib3.connectionpool:Starting new HTTP connection (1): logselasticprodna11-lb1.atlas.cm.com
WARNING:elasticsearch:GET http://logselasticprodna11-lb1.atlas.cm.com:8081/atlas/_search?_source_include=dt%2C%2A&ignore_unavailable=true&size=10000 [status:N/A request:10.253s]
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 67, in perform_request
response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 493, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 324, in _make_request
self, url, "Read timed out. (read timeout=%s)" % read_timeout)
ReadTimeoutError: HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10)
ERROR:root:Error running query: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10))
Would have written the following documents to elastalert_status:
elastalert_error - {'message': "Error running query: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10))", 'traceback': ['Traceback (most recent call last):', '  File "/usr/lib/python2.7/site-packages/elastalert-0.0.75-py2.7.egg/elastalert/elastalert.py", line 279, in get_hits', "    res = self.current_es.search(index=index, size=rule['max_query_size'], body=query, ignore_unavailable=True, **extra_args)", '  File "/usr/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 68, in _wrapped', '    return func(*args, params=params, **kwargs)', '  File "/usr/lib/python2.7/site-packages/elasticsearch/client/init.py", line 498, in search', '    params=params, body=body)', '  File "/usr/lib/python2.7/site-packages/elasticsearch/transport.py", line 301, in perform_request', '    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)', '  File "/usr/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 75, in perform_request', "    raise ConnectionTimeout('TIMEOUT', str(e), e)", "ConnectionTimeout: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='logselasticprodna11-lb1.atlas.cm.com', port=8081): Read timed out. (read timeout=10))"], 'data': {'rule': "Check Atlas Logs for 'Could not load items into queue' logs"}}

If you have too many indexes matching "atlas*", your queries are likely to timeout because it's querying every single shard. Try using something like:
index: atlas-%Y.%m.%d
use_strftime_index: true

I don't have many indices matching "atlas*", just 14 open at any point in
time. However, they are large. Each index is about 50GB to 100GB in size.
I did make the change you recommended and it works now. Thanks!!
On Fri, Mar 11, 2016 at 12:33 PM Quentin Long<EMAIL_ADDRESS>wrote:

If you have too many indexes matching "atlas*", your queries are likely to
timeout because it's querying every single shard. Try using something like:
index: atlas-%Y.%m.%d
use_strftime_index: true
—
Reply to this email directly or view it on GitHub
https://github.com/Yelp/elastalert/issues/426#issuecomment-195490802.

--
Melanie Zamora
Application Performance Engineer
SpringCM
Springing since 2012
<EMAIL_ADDRESS>+1.312.253.4723 http://+1.312.253.4720/
www.springcm.com
LinkedIn http://www.linkedin.com/company/springcm | Facebook
http://www.facebook.com/SpringCMCloud | Twitter
https://twitter.com/springcm/
--
https://appexchange.salesforce.com/results?keywords=springcm


TS 3.9 - No overload matches this call

TypeScript Version:  3.9.1-rc

Search Terms:
No overload matches this call
Code
export interface SyncNgccOptions {
    basePath: string;
    targetEntryPointPath?: string;
    async?: false;
}

export type AsyncNgccOptions = Omit<SyncNgccOptions, 'async'> & { async: true };

export function process(options: AsyncNgccOptions): Promise<void>;
export function process(options: SyncNgccOptions): void;
export function process(options: AsyncNgccOptions | SyncNgccOptions): void | Promise<void> {
    return mainNgcc(options);
}

export function mainNgcc(options: AsyncNgccOptions): Promise<void>;
export function mainNgcc(options: SyncNgccOptions): void;
export function mainNgcc(options: AsyncNgccOptions | SyncNgccOptions): void | Promise<void> {
}

Expected behavior:
No error as per TS 3.8
Actual behavior:
Error
No overload matches this call. Overload 1 of 2, '(options: AsyncNgccOptions): Promise', gave the following error. Argument of type 'SyncNgccOptions | AsyncNgccOptions' is not assignable to parameter of type 'AsyncNgccOptions'. Type 'SyncNgccOptions' is not assignable to type 'AsyncNgccOptions'. Type 'SyncNgccOptions' is not assignable to type '{ async: true; }'. Types of property 'async' are incompatible. Type 'false | undefined' is not assignable to type 'true'. Type 'undefined' is not assignable to type 'true'. Overload 2 of 2, '(options: SyncNgccOptions): void', gave the following error. Argument of type 'SyncNgccOptions | AsyncNgccOptions' is not assignable to parameter of type 'SyncNgccOptions'. Type 'AsyncNgccOptions' is not assignable to type 'SyncNgccOptions'. Types of property 'async' are incompatible. Type 'true' is not assignable to type 'false | undefined'.
Playground Link: https://www.typescriptlang.org/v2/en/play?ts=3.9.0-beta#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgZQE8lsA5Ac22wHkwYEIkBnOAbwCg4u4AjTJ4AAVMMABYAuOExhRk5ANyduMTFHLAYAURRRCgiMhjCxAfknTZSBUq79i2M3CwAbAYoC+7dqEiw4MQjA8AEEmewoqWnpGFgBeOGoAWwQYAB4iEgiaOgZmABo4AHI7EkKAPjgAMjY4EuxJGQBXPHdFb3BoeHRGkmikODAoCFwmJgAKCByYyVDwymy+pgBKSUEh5IFUgDcDABMyxR9Opx7sPoGhkfHJxckMsnmo3OXJHYRdw46-bt7ci+HgKMJlNmDMwplHiCWAAfAhzSJQlZwN67OCwtYQDbAbZ7CocbhwKAaRpQfqJTDILLAxZLDxedq+Lqnc7kynzanPMHwhbPJEYrE494HBnHH5nP6spBUm6cuEQhE0157T6Mk6-RhwSXSqFc+U8mJouUPBW8pXvQ38hCbFF49ieIA
Related Issues:

It is a breaking changed covered in https://github.com/microsoft/TypeScript/pull/37195.  async? being optional is causing your problem.  It was unsound code before that is now being caught.

This convoluted typing was created because we could not work out a better way to support a function that if invoked with async: true would return a Promise or void otherwise.
@kitsonk - do you have a suggestion for how we can support this scenario?

I think we just need to define one extra overload:
 export function mainNgcc(options: AsyncNgccOptions): Promise<void>;
 export function mainNgcc(options: SyncNgccOptions): void;
+export function mainNgcc(options: AsyncNgccOptions | SyncNgccOptions): void | Promise<void>;
 export function mainNgcc(options: AsyncNgccOptions | SyncNgccOptions): void | Promise<void> {
   // ...
 }

See https://www.typescriptlang.org/v2/en/play?ts=3.9.0-beta#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgZQE8lsA5Ac22wHkwYEIkBnOAbwCg4u4AjTJ4AAVMMABYAuOExhRk5ANyduMTFHLAYAURRRCgiMhjCxAfknTZSBUq79i2M3CwAbAYoC+7dqEiw4MQjA8AEEmewoqWnpGFgBeOGoAWwQYAB4iEgiaOgZmABo4AHI7EkKAPjgAMjY4EuxJGQBXPHdFb3BoeHRGkmikODAoCFwmJgAKCByYyVDwymy+pgBKSUEh5IFUgDcDABMyxR9Opx7sPoGhkfHJxckMsnmo3OXJHYRdw46-bt7ci+HgKMJlNmDMwplHiCWAAfAhzSJQlZwN67OCwtYQDbAbZ7CocbhwKAaRpQfqJTDILLAxZLDxedq+Lqnc7kynzanPMHwhbPJEYrE494HBnHH5nP6spBUm6cuEQhE0157T6Mk6-RhwSXSqFc+U8mJouUPBW8pXvQ38hCbFHCo7fZkSilS9ky6ZwWZ6p4G2H3LJe5hIlEW9ZW7E2tjsTzsbAxeBiK0ASSYADU9nB4lr2aw+AJjBIiugIBBCu5adHY-5RImU3sAEzpzVOqnZ-hCET5wqF4sFOqSFwCUuKGPMONVphJy0CBuZqhjFu59uSTtFwo98H1fxQZqDrzD6SV6up97BVwQBuDAFA+dtsRLvhQEtlvejw91k9MM-xC9XOc5m8d+9V1qdc+0wVxgB3Z8D3HJhJ2Ad9P3+H9rzzO9VCA3tN23MsgA.

I'm tempted to mark Working as Intended but I'm not totally clear exactly why Omit<..., "async"> & { async: true } causes issues. @ahejlsberg care to weigh in?

@DanielRosenwasser not to step on Ander's toes, but I believe it is very intentional, because #37195 was specifically to fix unsafe situations with Omit and intersection types brought up in #36604.

Oh, I see - I wasn't looking at where the error was being issued. This makes sense.
@gkalpak technically you could condense the whole thing down to
// Overload
export function process<T extends AsyncNgccOptions | SyncNgccOptions>(options: T):
  T extends AsyncNgccOptions ? Promise<void> : void;

// Implementation
export function process(options: AsyncNgccOptions | SyncNgccOptions): void | Promise<void> {
    return mainNgcc(options);
}

Thanks guys for your input.

Thx, @DanielRosenwasser!

FWIW, I still find overloads more readable (and wish TypeScript would recognize the 3rd overload signature from the implementation):
function process(options: SyncNgccOptions): void;
function process(options: AsyncNgccOptions): Promise<void>;
function process(options: SyncNgccOptions | AsyncNgccOptions): void | Promise<void> {
    // ...
}


[Packaging] Podman/Docker image

It would be nice to have an easily deployable podman/docker image, containerized from the rest of the system.

@aotakeda Hello, Can I do this? I can containerize this app with docker you do not have any problem.


high memory and cause vscode killed by system

ShellCheck v0.37.1
vscode:
版本: 1.91.1
提交: f1e16e1e6214d7c44d078b1f0607b2388f29d729
日期: 2024-07-09T22:08:12.169Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.1.0-23-amd64

try disable extended analyais: https://github.com/vscode-shellcheck/vscode-shellcheck/issues/1365#issuecomment-1926379787

try disable extended analyais: #1365 (comment)

thanks, it works after i add custom arg '--extended-analysis==false' in settings
but my extension is already the newest 0.37.1, i don't know the version of shellcheck binary, but it should be 0.10 and this bug should not exist?

@lazebird since 0.37.1 it just means you are able to disable extended analysis.


Convert readthedocs links for their .org -> .io migration for hosted projects

As per their blog post of the 27th April ‘Securing subdomains’:

Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.

Coverage remained the same at 80.699% when pulling eafdb497a1e1219b742cca95babc635391033532 on adamchainz:readthedocs.io into 784830b907ca14525c4cecdb6ae35306f6f8a877 on bionikspoon:develop.


[FEA] Set RMM async allocator as default

Is your feature request related to a problem? Please describe.
Currently the RMM arena allocator is the default, but in some circumstances it can still run into OOM errors due to memory fragmentation. The async allocator, relying on cudaMallocAsync and cudaFreeAsync, can remap physical pages when running of GPU memory, thus is more resistant to memory fragmentation.
Describe the solution you'd like
Set the async allocator as the default.
Describe alternatives you've considered
Continue improving the arena allocator is possible, but since it doesn't remap memory, probably won't ever be as fragmentation resistance as the async allocator.
Additional context
Set this at the beginning of 22.04 for more testing.

Since cudaMallocAsync requires CUDA 11.2, we'll do a version check and only switch to the async allocator if cuda driver and runtime are above 11.2.


Support for Obtaining Job Requests By Pool

We have a use case where we need to get a list of all jobs - currently executing or queued for future execution - in a pool on a by-pool basis. We found the following route which provides this information: /distributedtask/pools/{poolId}/jobrequests. This appears to return a collection of TaskAgentJobRequest, which is defined in azuredevops/taskagent.models.go.
Does this API have support for this route endpoint? If not, are there plans to add support for this in the (near) future?
In the meantime, if this endpoint does not exist in the API, other than making the HTTP call directly and unmarshalling into the model ourselves, do you have any recommended path for obtaining this data?

@tedchamb any thoughts/input on this?

@tedchamb any thoughts/input on this?


Don't add the tab character to the text of an iOS text field when the tab key is pressed

This change is for platform parity in TextInput. Fixes an inconsistency where Android text fields ignore the tab key, while iOS text fields add the tab character to their value and dispatch a Text Change event.
Test Plan: In a TextInput running on an iOS device, press the tab key from an external keyboard (e.g. simulator's soft keyboard). Observe that no tab character is added to the value of the text field.
This is my first pull to this repository. Completed a CLA for username terribleben.

I'm not sure if I like this or not. X-platform consistency is good, but this seems like removing functionality.
Should we perhaps add an iOS-specific property, such as ignoreTabs (defaulting to true)?

@nicklockwood i feel like we should do ignoreTabs defaulting to false...we should err on the side of keeping native platform functionality, while allowing for platform parity based on developer needs.

@skevy makes sense.

@facebook-github-bot import

@facebook-github-bot import creates an internal diff but doesn't merge it. Therefore, the merge didn't fail, removing the label. Pinged Milen to see if he wants to merge this.

This wasn't landed because it generated some internal discussion about how to handled tabs in pasted text, etc. I think that has yet to be resolved.


OpenFlow 1.3?

Are there any plans to support OpenFlow 1.3? It looks like flower_packet_v12/v11.erl are autogenerated - could the same approach be taken for v1.3?

The packet en/decoder is not auto-generated. Some of defines are generate using a simple regex replace of the defines in the spec, but the bulk part of binary matching and the records is hand drafted.
Implementing support for 1.3 and newer will require someone going through the spec and implementing it manually.
Currently, we don't have any plans to work on that in the near future.
Pull requests are always welcome!


remove test string

Remove test string on delete project button, I overlooked it in a previous PR 😄

ping @GiteaBot

Then we'll do manual. #25448


bug fixed: made popup links working on home page

Related Issue
[Cite any related issue(s) this pull request addresses. If none, simply state “None”]
Fixes:  #1213
Description
i have linked the terms of service page and privacy policy page here for better user experience.
fixes: #1213
Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
https://github.com/user-attachments/assets/6a31990e-78d6-4cae-9823-7463dbdee9c1
Checklist:

[x] I have made this change from my own.
[ ] I have taken help from some online resources.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@PriyaGhosal please review this pr and also assign this pr to me with the necessary labels if you find it worth merging

@PriyaGhosal please review this pr.

@Palmistry2310 Your pull request has been successfully merged! Don't stop here—continue contributing by addressing more issues and aiming to become a top contributor. Exclusive swag awaits for those who go the extra mile!
Great contribution ! 🎉


Add Sprite Fonts by @256ArtsDeveloper

[x] Project URL: https://www.jaydenirwin.com/spritefonts/
[x] Update contents.json instead of README
[x] One project per pull request
[x] Screenshot included
[x] Avoid iOS or open-source in description as it is assumed
[x] Use this commit title format if applicable: Add app-name by @github-username
[x] Use approved format for your entry

Thx


misleading information on jwt fields

sub: subject of the token (rarely used)

Sub should be your userID, and you should use it as such.
those fields are used in openId and it is a good idea to at least mention it and update at least the mandatory fields.

sub
REQUIRED. Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client, e.g., 24400320 or AItOawmwtWwcT0k51BayewNvutrJUqsvl6qs7A4. It MUST NOT exceed 255 ASCII characters in length. The sub value is a case sensitive string.

your users will change names and such, but the ID will stay constant. This is a very very very important field.

@deddu Pull Request very much welcome to improve the clarity of the sub field. 👍


can't use on xcode6.2

the plugin didn't work on xcode6.2

This is addressed already by https://github.com/FuzzyAutocomplete/FuzzyAutocompletePlugin/pull/66.

That's correct. And I even put some text regarding this kind of issues into the readme...
Closing. Please reopen if the newest plugin version is affected.