LedFx with Strip on Rasp3B GPIO

Hi.
I have an LED Strip directly connected to an Raspberry pi 3b Pin 18(GPIO5), controlled via
Scott’s audio-reactive-led-strip. working good.
Now i wanted to try LedFx, got the software running on the Raspberry but
have Problems to get the LEDs lit.
As writen in the wiki i did

Add the device as a UDP
Click ‘Additional Properties’ and check ‘Include Indexes’

but what to enter for UDP-Port? and hostname?
entering the IP of the Raspberry  and some random udp port does not lead to success.
Any hints? Thanks!

UDP port is either 7777 or 7778, you can find it in the Arduino file.
On Wed, 12 Feb 2020, 08:33 dogo77<EMAIL_ADDRESS>wrote:

Hi.
I have an LED Strip directly connected to an Raspberry pi 3b Pin
18(GPIO5), controlled via
Scott’s audio-reactive-led-strip. working good.
Now i wanted to try LedFx, got the software running on the Raspberry but
have Problems to get the LEDs lit.
As writen in the wiki i did

Add the device as a UDP
Click ‘Additional Properties’ and check ‘Include Indexes’

but what to enter for UDP-Port? and hostname?
entering the IP of the Raspberry and some random udp port does not lead to
success.
Any hints? Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ahodges9/LedFx/issues/76?email_source=notifications&email_token=AHXFVTFFDM74WUDXEZFXBADRCOX6BA5CNFSM4KTVC4T2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM3O4YQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHXFVTHHGURPWF57RMZFIXLRCOX6BANCNFSM4KTVC4TQ
.

Tried ports 7777 and 7778, still no success.
Also, i did not find any Arduino file, but that may be because i'm on Pi?
Or did i missunderstand everything and LedFx can not work like in this scheme?
https://github.com/scottlawsonbc/audio-reactive-led-strip/blob/master/images/block-diagram.png

Ah apologies I hadn't read your problem fully. I thought you were using a
wireless Pi - ESP - LEDs setup.
As far as I know there's no standalone pi support for the setup you have
described;  Ledfx is designed to control wireless strips.
I could add in this support as it's pretty straightforward but I'm not sure
if it fits the scope of this project.
I'd recommend using a wireless setup as it allows you to connect multiple
strips. ESP8266s are dirt cheap! You could use the Pi as a headless
controller, and access Ledfx through any browser on the network.
Eg
Phone browser (http://[pi-IP-address]:8888]) for control interface
⬇
Pi running ledfx
⬇
Any number of led strips
On Wed, 12 Feb 2020, 10:08 dogo77<EMAIL_ADDRESS>wrote:

Tried ports 7777 and 7778, still no success.
Also, i did not find any Arduino file, but that may be because i'm on Pi?
Or did i missunderstand everything and LedFx can not work like in this
scheme?
https://github.com/scottlawsonbc/audio-reactive-led-strip/blob/master/images/block-diagram.png
http://url
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ahodges9/LedFx/issues/76?email_source=notifications&email_token=AHXFVTFE4DXZB7LKBPXSNRTRCPDC7A5CNFSM4KTVC4T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQF7DQ#issuecomment-585129870,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHXFVTCUCPWLLYBR4ELPDGDRCPDC7ANCNFSM4KTVC4TQ
.

thanks for your quick answer which clarifies things a bit :)
I still dont fully understand that middle part of your flowchart.
How do i connect the ESP8266 to the strip? I don't need an arduino for each strip, do i?
Sorry for these nooby questions, but i didn't find answers in the wiki. Do you have a pic of such an setup?
what i finally want to achive is the following:
I  have a DJ stand with an LED-Strip facing crowd.
From DJ controller i go > booth out to an > USB-Soundcard on Raspberry running > Scotts audio-reactive-led-strip.

Ah I see, in that case I'd run ledfx on the laptop, no need for a raspberry
pi. As long as the ESPs are on the same network as the laptop it should
work. Maybe configure them so they connect to a hotspot running on the
laptop - I used to do this.
On Wed, 12 Feb 2020, 10:46 dogo77<EMAIL_ADDRESS>wrote:

thanks for your quick answer which clarifies things a bit :)
I still dont fully understand that middle part of your flowchart.
How do i connect the ESP8266 to the strip? I don't need an arduino for
each strip, do i?
Sorry for these nooby questions, but i didn't find answers in the wiki. Do
you have a pic of such an setup?
what i finally want to achive is the following:
I have a DJ stand with an LED-Strip facing crowd.
From DJ controller i go > booth out to an > USB-Soundcard on Raspberry
running > Scotts audio-reactive-led-strip.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ahodges9/LedFx/issues/76?email_source=notifications&email_token=AHXFVTAZ47WHWIQSFR77BRDRCPHQVA5CNFSM4KTVC4T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQJ3VQ#issuecomment-585145814,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHXFVTD6E6NR6ZWBTHWA5W3RCPHQVANCNFSM4KTVC4TQ
.

example setup
https://imgur.com/z7eMCpZ

thanks a LOT! that made it clear.
I now have LedFx runing on the DJ-Laptop, have the controllers audio card as input and see the lines dancing in the webinterface :)
Is a »NodeMCU Lua Lolin V3 Module ESP8266 ESP-12E« the right thing to buy?

Grand, glad I could help.
I'm actually looking into buying small driver boards to allow direct usb
connection to the end of the led strip. Setting up esp connections over
WiFi when you're about to DJ is a pain, I've been there! With these, it
would be a case of soldering the usb connection to the led strip, then plug
and play, no esp tinkering.
On Wed, 12 Feb 2020, 11:58 dogo77<EMAIL_ADDRESS>wrote:

thanks a LOT! that made it clear.
I now have LedFx runing on the DJ-Laptop, have the controllers audio card
as input and see the lines dancing in the webinterface :)
Is a »NodeMCU Lua Lolin V3 Module ESP8266 ESP-12E« the right thing to buy?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ahodges9/LedFx/issues/76?email_source=notifications&email_token=AHXFVTBJ3XLT2KG3HC5A75TRCPP7JA5CNFSM4KTVC4T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQQK6I#issuecomment-585172345,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHXFVTAHFETE2X7BMJZO4DDRCPP7JANCNFSM4KTVC4TQ
.

That sounds awesome!
But i guess thats pre alpha, isn't it? ;)
For now i'll give it a try with the Module mentioned above.
And thanks for leting me missuse the issue tracker as support forum… :)

Pleasure, best of luck! Consider joining the Discord server for support in future.

sosorry for reopening…but after searching all night long i still can't find that discord server address. mind sending me an invite?


Git gutters should update after committing a staged file

VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

vscode-eslint
dbaeumer
1.2.11

theme-dracula
dracula-theme
2.1.3

EditorConfig
EditorConfig
0.9.3

vsc-material-theme
Equinusocio
1.0.0

file-icons
file-icons
1.0.4

Go
lukehoban
0.6.62

csharp
ms-vscode
1.11.0

Material-theme
zhuangtongfa
2.9.1

This is an enhancement, not a bug report. I believe vscode should update the git gutters after you commit a staged file. It doesn't do so on my system and with my current installed version of vscode.
Thoughts?

Can you reproduce the issue in our insider release?

Whoops, I wasn't aware that the insider version might have already implemented this. I will do as you said and get back to you. 😄

Before staging file:

After staging, and committing file:

... Well, it works on the insider release of vscode.  Thanks ❤

Pretty soon! 👍


Add small code examples to docstrings

The utils functions can be enhanced with some short code examples on how to use them

Some examples added for Fisher and GGN in #75


fixed linting issues

What kind of change does this PR introduce?
fixed linitng issues of src/components folder

Did you add tests for your changes?
If relevant, did you update the documentation?
Summary
The project contains a lot of linting and a11y issues, wanted to work on them.

Does this PR introduce a breaking change?

Other information

@pranshuchittora Is the PR okay, if it is can I work on all the issues of the codebase?

Is this related to unused imports ?

Yes, the unused imports. If all the changes are correct should I proceed to the other files?

Thanks


feat: add access e2e cases

Signed-off-by: moweiwei<EMAIL_ADDRESS>
What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for reviewers:

Does this PR introduced a user-facing change?

Additional documentation, usage docs, etc.:

/lgtm
/approve


fixed typo in code comment

This PR fixes a typo in one of the comments in the "Customizing renderPage" code example.

Thank you!


missed indent in RU localisation

between "ntext" and "и" have to space
https://learn.microsoft.com/ru-ru/sql/relational-databases/indexes/guidelines-for-online-index-operations?view=sql-server-ver16

@WilliamAntonRohm you are welcome, glad to help

@baslo2 -- Shamsutdinov, sorry for the delay.  I've created a new localization work item 940497 for this issue.
@rwestMSFT -- Randolph, fyi and thank you.


The plugin can't find eslint even though it is in PATH

I've downloaded and unpacked node.js into $HOME/node/, and have added $HOME/node/bin/ to PATH. Then I have installed eslint: npm -g install eslint. Even though I can now invoke eslint from the command line, vim-autoformat can't find it (it only looks in node_modules/.bin/, ~/.npm-global/bin/ and /usr/local/bin/).
It would be nice if vim-autoformat didn't just look for formatters in the hard-coded locations.

ESLint is a weird one. I did not implement support for it, and do not use it myself either.
Feel free to extend the support in defaults.vim to cover your case.

Since this is related, I won't open a new issue. The automatter also can't find eslint on my system when it's installed globally.
sudo npm -g install eslint installed eslint to /usr/bin/eslint on my Fedora 27 machine with npm v5.6.0. A quick fix might be to just add this as another path to check, as seems to be the case in defaults.vim at the moment, but it would be better if vim-autoformat could just check the path if it fails to find eslint in the current directory's node_modules/ folder.
@opennota I may tackle this issue later if you don't get to it before me. For now I've just symlinked /usr/bin/eslint to /usr/local/bin/eslint

I've submitted PR https://github.com/Chiel92/vim-autoformat/pull/241 which fixes this problem. Please check it out.


Does not work with esbuild packager/Does not work with Remix

Problem
FCL seems to expect to be built using webpack and causes a failure in projects built with esbuild as it performs imports of node packages in the browser.
Uncaught Error: Dynamic require of "http" is not supported
    at chunk-YVIHDCKB.js:13:9
    at<EMAIL_ADDRESS>
Steps to Reproduce
I've created a repo which performs the first step of the FCL example in both Next.js  and Remix
https://github.com/zolrath/flow-remix-next
The Next.js example succeeds while the Remix example throws the http error above as it does not polyfill node packages  in the browser.
Acceptance Criteria
FCL working on other platforms.
Remix is gaining quite a bit of traction and has a great developer experience and I'd love to combine the two on my next project!
Edit: Ah, looks like this is discussed in #934 and #711, but in this instance we're talking esbuild

I'm getting a similar error with Gatsby. https://github.com/onflow/fcl-js/issues/1023

This should be fixed with the 1.0.0 release. If it is still happening please reopen!


Caption Upsampler codes for image-to-video

Feature request  / 功能建议
In the paper, the authors gave an example for caption upsampler for infererence. It would be great if the authors could provide the exact codes, especially for image-to-vdeo.

Motivation / 动机
Prompting is very important, especially for image-to-vdeo
Your contribution / 您的贡献
NA

`from openai import OpenAI
prefix ='''
Objective: **Give a highly descriptive video caption based on input image and user input. **. As an expert, delve deep into the image with a discerning eye, leveraging rich creativity, meticulous thought. When describing the details of an image, include appropriate dynamic information to ensure that the video caption contains reasonable actions and plots. If user input is not empty, then the caption should be expanded according to the user's input.
Note: The input image is the first frame of the video, and the output video caption should describe the motion starting from the current image. User input is optional and can be empty.
Note: Don't contain camera transitions!!! Don't contain screen switching!!! Don't contain perspective shifts !!!
Answering Style:
Answers should be comprehensive, conversational, and use complete sentences. The answer should be in English no matter what the user's input is. Provide context where necessary and maintain a certain tone.  Begin directly without introductory phrases like "The image/video showcases" "The photo captures" and more. For example, say "A woman is on a beach", instead of "A woman is depicted in the image".
Output Format: "[highly descriptive image caption here]"
user input: {xx}
'''
import base64
from mimetypes import guess_type
def local_image_to_data_url(image_path):
# Guess the MIME type of the image based on the file extension
mime_type, _ = guess_type(image_path)
if mime_type is None:
mime_type = 'application/octet-stream'  # Default MIME type if none is found
# Read and encode the image file
with open(image_path, "rb") as image_file:
    base64_encoded_data = base64.b64encode(image_file.read()).decode('utf-8')

# Construct the data URL
return f"data:{mime_type};base64,{base64_encoded_data}"

def get_answer(txt, path):
client = OpenAI()
# client = OpenAI(api_key="sk-YB69LUO4RBhdjTXaF60fBb3e9eA541138cD30a03C2C2A6C6", base_url="https://one-api.glm.ai/v1")
while True:
try:
response = client.chat.completions.create(
model="glm-4o",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": prefix.replace("{xx}", txt)},
{
"type": "image_url",
"image_url": {
"url": local_image_to_data_url(path),
},
},
],
}
],
max_tokens=1000,
)
break
except Exception as e:
print(e)
answer = response.choices[0].message.content
return answer`

Thx!


Fix zoomig in and out while rotation device (in iOS 8 only)

Fix #361

+1 very important

+1

1
Works on  iOS 8.3


Allow multiple min/maxDate ranges

I want to allow multiple min/max date ranges.
Currently, I have the ranges in an array like:
[[min1, max1], [min2, max2], ...]
There are only a few ranges but I want the user to only select dates in any of those ranges. Is there any way to do this using the existing code?

I guess you can do the validation in the dp.change event.
var minMaxDates = [...];
var widget: any = $("#editor").data("DateTimePicker");
$("#editor").on("dp.change", function(evt) {
  if (!evt.date) return;
  var dateObj = evt.date.toDate();
  for (var i=0;i<minMaxDates.length;++i) {
    if (dateObj < minMaxDates[i][0] || dateObj > minMaxDates[i][1]) {
      alert("Invalid date");
      widget.date(evt.oldDate);
    }
  }
});

Note that this is just a sample code, not tested in any ways.

I have a separate validation plugin and the validation is done on server side as well.

Ok, just wanted to give a tip for editing-time validation. Server-side validation is still required of course, and that's another thing.

Worked around this one. Used #1859 to add a custom validator and fix the decade filter for it.


fix: restore case-insensitive search functionality

Codecov Report

Merging #261 (41513a1) into main (942fefc) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #261   +/-   ##
=======================================
  Coverage   81.91%   81.91%
=======================================
  Files          56       56
  Lines        3737     3737
=======================================
  Hits         3061     3061
  Misses        676      676

Impacted Files
Coverage Δ

label_sleuth/data_access/file_based/utils.py
97.36% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Fix remove violations from baseline

On a PHP 7.4 project, after define a baseline, if a violation occurs, all violations are showed, the new violations and the violations defined in the baseline instead to show only new violations.

Hi @hectorespert,
thanks for this pull request!
can you please fix the coding standards?

Fixex


Wrongly removed (or added?) true_ prefix in simulated impact containers with ctapipe-process

Describe the bug
Running ctapipe-process from DL1 to DL1 removes true_ prefix of simulated impact container.
Or is it that the simteleventsource appends a true_ prefix? All the other containers (e.g. simulation/event/telescope/parameters) don't have this prefix at all.
To Reproduce
Steps to reproduce the behavior:

ctapipe-process -i simtel -o dl1
ctapipe-process -i dl1 -o dl1_again

Expected behavior
Fields should not be renamed by ctapipe-process.
Supporting information
If applicable, add screenshots, logs, or a traceback to help illustrate the bug.
Additional context

config:
DataWriter:
  transform_image: True
  transform_peak_time: True
  write_images: True
  write_parameters: True
  write_showers: True

This should be fixed in #1949, that attaches the prefix that was read again to the output container.


Enhancement: No option to provide placeholder value

Expected behavior and actual behavior:
Currently Placeholder value is hardcoded to Select word, where as there should be an option to provide place holder value so that it can say something else , e.g ALL, or Product lines etc.
Steps to reproduce the problem:
https://www.predix-ui.com/#/components/px-dropdown/
Environment (component version number, Browser (including version), operating system, hardware, etc):
All

The property is called displayValue. It's only hardcoded in the demo page because it can interfere with the currently selected value when you're switching things back and forth.
http://codepen.io/randyaskin/pen/vxVJxr?&editors=1001

displayValue get's overridden with the value as Select. I have done local implementation and tested it and it fails.

Sorry you're right, I wasn't in checkbox-mode. Introduced by a pull request, I'll take a look.

Even for single select mode this would be a nice feature. So if we set 'selectedKey = null' it would clear the selection and return to the placeholder text.

I'm actually working on a complete rebuild of px-dropdown, leveraging iron-dropdown and iron-selector from Google, simplifying the API (removing px-dropdown-content and putting all the properties on the parent), etc. Obviously it will be a major version bump and we probably won't release it until the rest of the design refresh items, but I'm hoping it will fix a lot of issues people have with the current dropdown.

So create a property to customize displayValue is a thing right now or you're waiting with any changes till the new px-dropdown is released? i might find some uses cases in my project for such property and I can create a p-r.

The property exists already, and works fine except in the specific situation described above (checkbox-mode after items are selected and deselected). I've mostly finished rebuilding the component from the ground up, I just need to re-add unit tests and figure out how to release it without breaking everything else in the system. 😜

Fixed in v4 of the component.


Possible libgsf race condition with concurrent tile-based output

following from this issue https://github.com/lovell/sharp/issues/678
I set:
"build": {
    "asar": true,
    "asarUnpack": ["**/node_modules/sharp/**/*"]
  }

in my package.json. I packaged the app with yarn dist. This seems to solve something but now my App is randomly crashing (white screen) and I get this error:
(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'

(sharp:24414): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed

(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'

(sharp:24414): GLib-GObject-CRITICAL **: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'

(sharp:24414): GLib-GObject-WARNING **: invalid cast from 'GsfOutfileStdio' to '<invalid>'

my set up is:
$ yarn --version
1.5.1
     "sharp": "0.19.1"
    "electron": "1.8.3",
    "electron-builder": "20.3.1",

Final note: this does not happen in dev mode

Update: with sharp version 0.20.0 I don't neet to set "asarUnpack", but the app still randomly crashes with:
(sharp:36854): GLib-GObject-WARNING **: cannot register existing type 'GsfOutput'

(sharp:36854): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed

(sharp:36854): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed

(sharp:36854): GLib-GObject-CRITICAL **: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

Hello, are there any other native dependencies involved that might rely on glib e.g. canvas?

Hello,
canvas is not in the node_modules directory, It may be some other cross-dependency that I don't know about.

What does npm ls nan and npm ls node-pre-gyp display? Those should list any native dependencies and their tree.

├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   └─┬<EMAIL_ADDRESS>│     └─┬<EMAIL_ADDRESS>│       └──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>extraneous

├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   └─┬<EMAIL_ADDRESS>│     └─┬<EMAIL_ADDRESS>│       └──<EMAIL_ADDRESS>deduped
└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>deduped

Thank you, no obvious conflicts there. My best guess would be that the electron binary itself is dependent on a older glib shared library that is being loaded before sharp. What does ldd node_modules/electron/dist/electron | grep libg say?

I am under Mac OS X so i guess the equivalent would be:
$ otool -L node_modules/electron/dist/Electron.app/Contents/MacOS/Electron
node_modules/electron/dist/Electron.app/Contents/MacOS/Electron:
	@rpath/Electron Framework.framework/Electron Framework (compatibility version 0.0.0, current version 0.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
	/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.10.0)
	/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.20.26)
	/System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface (compatibility version 1.0.0, current version 55058.0.0)
	@rpath/Squirrel.framework/Squirrel (compatibility version 1.0.0, current version 1.0.0)
	@rpath/ReactiveCocoa.framework/ReactiveCocoa (compatibility version 1.0.0, current version 1.0.0)
	@rpath/Mantle.framework/Mantle (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

no occurrences found

Thanks, nothing obviously wrong there either.
Do all the glib-related results from running otool -L node_modules/sharp/build/Release/sharp.node reference files in the sharp/vendor/lib directory?

Thanks for the help debugging!
it seems so:
node_modules/sharp/build/Release/sharp.node:
	@rpath/libvips-cpp.42.dylib (compatibility version 51.0.0, current version 51.1.0)
	@rpath/libvips.42.dylib (compatibility version 51.0.0, current version 51.1.0)
	@rpath/libglib-2.0.0.dylib (compatibility version 5401.0.0, current version 5401.3.0)
	@rpath/libgobject-2.0.0.dylib (compatibility version 5401.0.0, current version 5401.3.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

Please can you try setting the DYLD_PRINT_LIBRARIES and/or DYLD_PRINT_LIBRARIES_POST_LAUNCH environment variables to list all the shared library files as they are opened.
https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/LoggingDynamicLoaderEvents.html

it is really a lot of text, so i used pastebin:
https://pastebin.com/vnpbHYch

I had an idea, somewhere in my code I am using something like:
    console.log("tiling with sharp");
    for (var i = 0; i < nOfImages; i++) {
      arrayOfPromises.push(useSharpToCreateTiles(imagePath[i],options));
    }
  return Promise.all(arrayOfPromises);

where
function useSharpToCreateTiles(imagePath,options){
return sharp(inputImgPath)
    .tile({
      size: 512,
      layout: 'google'
    })
    .toFile(sharpDir)
    .then(info => {
      doSomethingElse();
      return Promise.resolve(info)
    });
}

This could be a problem if two sharp instances call at the same time gLib. I thought that this should not be a problem since javascript is not multithreaded, but maybe?
In this repository https://github.com/BiancoA/electron-webpack-quick-start I am doing some tests, as soon as I get something more specific I post it here

I was able to replicate the issue with the code here: https://github.com/BiancoA/electron-webpack-quick-start/blob/master/src/renderer/index.js
the problem seems to be in the
 for (var i = 0; i < 10; i++) {
          arrayOfPromises.push(sharp(inputImgPath)...
...

Am I misusing sharp? should I wait for each promise to complete before initialising a new one?
for the problem with the .asar package i think it may be an issue in electron-builder, so i created an issue here: https://github.com/electron-userland/electron-builder/issues/2679

@lovell Am I right that sharp uses external libs (vendor/lib/*/.dylib)? And file sharp.node needs these files (not static)?

The invalid class cast from 'GsfOutput' to 'GsfOutput' error initially suggested there are conflicting versions of shared libraries involved. However I can't see any obvious conflicts in the provided logs, and given there are multiple writes occurring concurrently (sharp uses libuv-managed threads and libvips manages its own threads), this is starting to look like a thread safety problem.
Perhaps there is a race condition during library initialisation within libgsf itself? https://github.com/GNOME/libgsf/blob/master/BUGS#L19 suggests this is a possibility.
The next step is probably to remove the sharp/node layer and see if this problem can be recreated using libvips at the command line.

@develar Yes, sharp downloads platform-specific shared libraries (.dylib, .so, .dll) and stores them in node_modules/sharp/vendor at npm install time.

Hello, I tried looking inside libvips:
john@kiwi:~/pics$ gdb vips
Reading symbols from vips...done.
(gdb) break gsf_output_get_type
Function "gsf_output_get_type" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gsf_output_get_type) pending.
(gdb) run dzsave k2.jpg x2
Starting program: /home/john/vips/bin/vips dzsave k2.jpg x2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, 0x00007ffff555d4a0 in gsf_output_get_type ()
   from /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
(gdb) bt
#0  0x00007ffff555d4a0 in gsf_output_get_type ()
    at /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
#1  0x00007ffff5561e35 in gsf_outfile_get_type ()
    at /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
#2  0x00007ffff5563ff5 in gsf_outfile_stdio_get_type ()
    at /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
#3  0x00007ffff55640d5 in gsf_outfile_stdio_new_valist ()
    at /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
#4  0x00007ffff556423f in gsf_outfile_stdio_new_full ()
    at /usr/lib/x86_64-linux-gnu/libgsf-1.so.114
#5  0x00007ffff78e3981 in vips_foreign_save_dz_build (object=0x555555873000)
    at dzsave.c:1824

So the type is being created on demand by libvips the first time it tries to dzsave. This will obviously race if two threads try to dzsave at the same time.
Looking at libgsf, you'd think this would be created by gsf_init(), which libvips is careful to call single-threaded, but it's obviously not. I'll look a bit deeper.

I built libgsf 1.14.42 from source and it looks like it's fixed there. 1.14.41 and earlier seem to have this problem.
john@kiwi:~/pics$ gdb vips
Reading symbols from vips...done.
(gdb) break gsf_output_get_type
Function "gsf_output_get_type" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gsf_output_get_type) pending.
(gdb) run dzsave k2.jpg x
Starting program: /home/john/vips/bin/vips dzsave k2.jpg x
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, gsf_output_get_type () at gsf-output.c:254
254	GSF_CLASS_ABSTRACT (GsfOutput, gsf_output,
(gdb) bt
#0  0x00007ffff5558170 in gsf_output_get_type () at gsf-output.c:254
#1  0x00007ffff5539d0d in gsf_init_dynamic (module=0x0) at gsf-utils.c:202
#2  0x00007ffff5539bfb in gsf_init () at gsf-utils.c:127
#3  0x00007ffff79586e8 in vips_init (argv0=0x7fffffffdf80 "/home/john/vips/bin/vips") at init.c:441
#4  0x0000555555558718 in main (argc=4, argv=0x7fffffffdc08) at vips.c:1095

So init is happening in init (as it should).
I've just uploaded some new Windows binaries for libvips 8.6.3 which (by happy coincidence!) are built against libgsf-1.14.42. Hopefully that'll fix it. Perhaps homebrew needs a nudge as well?

Great detective work, thank you @jcupitt.
Homebrew has provided libgsf v1.14.42 since 12th Nov last year according to https://github.com/Homebrew/homebrew-core/commit/ae4c957c12ae272e4582333e672734df9073365f
The pre-compiled binaries for sharp v0.19.x and v0.20.x also provide libgsf v1.14.42 - console.log(sharp.versions); can be used to confirm this.
This means the behaviour @BiancoA is experiencing may not be related, or at least this has now become even more confusing.

Well ... I ... erm, yes I'm baffled too.
Could another electron package be pulling in an older libgsf?

Could the problem be caused by the node version? electron ships with Node 8.2.1, that means node_module version 57.

Hello again, would it be possible to get a stack dump from the error? This should help to decide who is doing the second gsf_init().
You can make libvips warnings fatal like this:
$ G_ERROR=fatal-warnings gdb myapp

(I forget what the macOS debugger is called). This should make it stop on the first warning, and you should then be able to get a stack dump.

@BiancoA Were you able to make any progress with this?

@BiancoA Thanks for the update, I'll add something to the docs about this.

I've added a comment to the docs about this in commit ddc2349
I'll close this issue for now but please feel free to re-open or comment further when anyone experiencing this can provide a stack trace of the problem occurring.

Just for reference I've come across basically the same issue on Windows since I started using sharp.  I don't have a stack trace yet but it is really odd because it only intermittently occurs.

I'm definitely still getting messages like these on the latest versions with Windows.  It's odd because even if I'm processing lots of images, it either seems to crash at the beginning or not at all, but it probably crashes about 60% of the time I try to start processing a set of images with output like so:
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutput'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfileStdio'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutput'
(sharp:5540): GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type '<invalid>'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutput'
(sharp:5540): GLib-GObject-WARNING **: invalid class cast from 'GsfOutfileStdio' to '<invalid>'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutput'
(sharp:5540): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
error Command failed with exit code<PHONE_NUMBER>.

@lovell I'm having difficulty trying to confirm what version of libgsf is being used on my system.  console.log(sharp.versions) only outputs { vips: '8.6.1' } for me.  Can you provide any more insight?

@dlong500 On Windows you'll probably be using libgsf v1.14.42. I've created https://github.com/lovell/sharp-libvips/issues/6 for the missing versions.json.

I finally got around to making a small project to try and test this issue (as well as another #1232).  Here's the repo: https://github.com/dlong500/sharp-glib-testing
There is some general info about the issues on the README, and I've also managed to get some backtrace data (on an Ubuntu 16.04 machine), but I'm not an expert at interpreting that data.  I ran a concurrent deepzoom generation test (see the repo) with the following command:
G_DEBUG=fatal-warnings gdb --args /usr/bin/node entry.js deepzoom
And got the following backtrace data:
(sharp:6398): GLib-GObject-WARNING **: 23:43:46.199: cannot register existing type 'GsfOutput'
[New Thread 0x7fffcf47b700 (LWP 6411)]

Thread 9 "node" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7fffde3fe700 (LWP 6409)]
0x00007fffe7ce8edc in g_logv () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libglib-2.0.so.0
(gdb) bt
#0  0x00007fffe7ce8edc in g_logv () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libglib-2.0.so.0
#1  0x00007fffe7ce9072 in g_log () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libglib-2.0.so.0
#2  0x00007fffe7a6ad65 in ?? () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgobject-2.0.so.0
#3  0x00007fffe7a6add4 in g_type_register_static ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgobject-2.0.so.0
#4  0x00007fffe6aa2c7d in gsf_output_get_type ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgsf-1.so.114
#5  0x00007fffe6aa7595 in gsf_outfile_get_type ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgsf-1.so.114
#6  0x00007fffe6aa9cd5 in gsf_outfile_stdio_get_type ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgsf-1.so.114
#7  0x00007fffe6aa9de5 in gsf_outfile_stdio_new_valist ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgsf-1.so.114
#8  0x00007fffe6aa9f72 in gsf_outfile_stdio_new_full ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libgsf-1.so.114
#9  0x00007ffff4221c7f in ?? () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips.so.42
#10 0x00007ffff421eeb1 in ?? () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips.so.42
#11 0x00007ffff425c748 in vips_object_build ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips.so.42
#12 0x00007ffff4268758 in vips_cache_operation_buildp ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips.so.42
#13 0x00007ffff46e835c in vips::VImage::call_option_string(char const*, char const*, vips::VOption*) ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips-cpp.so.42
#14 0x00007ffff46eeb6d in vips::VImage::dzsave(char*, vips::VOption*) ()
   from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/../../vendor/lib/libvips-cpp.so.42
#15 0x00007ffff4930ae5 in PipelineWorker::Execute() () from /opt/nodejs/sharp-glib-testing/node_modules/sharp/build/Release/sharp.node
#16 0x00000000009e3721 in ?? ()
#17 0x00007ffff6f146ba in start_thread (arg=0x7fffde3fe700) at pthread_create.c:333
#18 0x00007ffff6c4a41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Is this helpful?  I'm happy to do anything you'd like me to do to see if we can narrow down the problem.

Hello @dlong500, that's great! Thanks for working on this.
Could you be using an older libgsf? Before 1.14.42, libgsf didn't initialize all of its types on startup and so would race if used in parallel. On Ubuntu 16.04, you'll need to build the latest libgsf from source, and then rebuild libvips against that. Perhaps you've done this already.
If you see the problem on libgsf 1.14.42 or later, then sharp must (I think?) be calling vips functions before vips_init() has finished. The timeline ought to be:
main thread             worker thread
===========             =============

enter vips_init()
enter gsf_init()
gsf_output_get_type()
exit gsf_init()
exit vips_init()

                        call dzsave

But I think this race must mean that this is happening:
main thread             worker thread
===========             =============

enter vips_init()
enter gsf_init()        call dzsave
gsf_output_get_type()
exit gsf_init()
exit vips_init()

To prove or disprove this, we need to add logging to vips_init() to verify the order of invocation. Here's the start of vips_init():
https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/init.c#L286
Add something like:
        g_printf( "vips_init: starting\n" );
        g_printf( "vips_init: done\n" );

To the start and end of that function. Do the same for _save_dz_buiild():
https://github.com/jcupitt/libvips/blob/master/libvips/foreign/dzsave.c#L1615
Then run and look at the output to see the order of operations. If build ever starts before init has done, we've found the race.
If that's NOT happening, then libgsf must still be buggy somehow. I've read gsf_init() a couple of times and I don't see how GsfOutput can not be created :(

Right now it's just using the pre-compiled binaries, as I don't have a globally installed version of libvips on this machine, so I think it is using libgsf 1.14.42 as shown with sharp.versions outputting:
{ cairo: '1.14.12',
  croco: '0.6.12',
  exif: '0.6.21',
  expat: '2.2.5',
  ffi: '3.2.1',
  fontconfig: '2.12.6',
  freetype: '2.9',
  gdkpixbuf: '2.36.11',
  gif: '5.1.4',
  glib: '2.55.1',
  gsf: '1.14.42',
  harfbuzz: '1.7.4',
  jpeg: '1.5.3',
  lcms: '2.9-',
  orc: '0.4.28',
  pango: '1.41.0',
  pixman: '0.34.0',
  png: '1.6.34',
  svg: '2.42.0',
  tiff: '4.0.9-cda4b06',
  vips: '8.6.1',
  webp: '0.6.1',
  xml: '2.9.7',
  zlib: '1.2.11' }

I'll have to compile libgsf and libvips with the statements to see the order of operations.  Thanks for the help!  I'll report back hopefully later today.

Ok, I've done some preliminary testing, and I'm not sure quite what to make of the output yet.  Should vips_init() be running hundreds/thousands of times even for just a small number of files?
I've pasted the output of a run that failed into a gist here.  I added the diagnostic statements to libvips, but haven't added any diagnostic code to libgsf yet.  Let me know if that gives you any insight or if you'd like me to take any additional specific steps.

Oh heh I'd forgotten, yes, it's called a lot. Just leave the done one.
That's baffling. init is being called correctly, but gsf is obviously not initing.
Could you add a printf to gsf_init_dynamic() to verify that that is being triggered? It should be in gsf-utils.c:
https://github.com/GNOME/libgsf/blob/master/gsf/gsf-utils.c#L176
Right at the start of that thing.

Ok, I added a printf to gsf_init_dynamic() and it does appear to call it once at the very beginning.  Here's the output:
to be executed: node entry.js deepzoom
gsf_init_dynamic: starting
vips_init: done
sharp.versions: { vips: '8.6.5' }
-> Removed existing output content (if present) in preparation for image processing
Attempting to generate deepzoom data for images in the input folder...
The resultant data will be saved in: /opt/nodejs/sharp-glib-testing/testdata/output/deepzoom
vips_foreign_save_dz_build: starting
vips_foreign_save_dz_build: starting
vips_foreign_save_dz_build: starting
vips_foreign_save_dz_build: starting
vips_foreign_save_dz_build: about to call gsf_outfile_stdio_new() for: /opt/nodejs/sharp-glib-testing/testdata/output/deepzoom/339H-zoom-7LV3MZ
vips_foreign_save_dz_build: about to call gsf_outfile_stdio_new() for: /opt/nodejs/sharp-glib-testing/testdata/output/deepzoom/379H-zoom-FMV3MZ

(sharp:12302): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfileStdio'

(sharp:12302): GLib-GObject-CRITICAL **: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault
error Command failed with exit code 139.

It looks like it attempts to start generating zoom data for 4 images, and two temporary folders get created before the crash.  That matches what I'm seeing in the output folder after the crash (two temporary folders).

Ah, so it looks like there is something odd going on here.
The only type I see being built before vips_init: done is GsfDocPropVector.  As you can see in the output below there are other types being constructed later, including a duplicate for GsfOutfileStdio (which, of course, explains the warning):
to be executed: node entry.js deepzoom
gsf_init_dynamic: starting
GsfDocPropVector: init
vips_init: done
sharp.versions: { vips: '8.6.5' }
-> Removed existing output content (if present) in preparation for image processing
Attempting to generate deepzoom data for images in the input folder...

How completely bizarre. Well, that's certainly the race -- everything should be built before vips_init() finishes.
Could you try without the G_UNLIKELY()?

That last output was with G_UNLIKELY() removed.  I wish I could be more help without having to bug you; I'm just not sure what to check next.

Could it be an optimiser bug? It's generating code like this:
t = gsf_input_get_type();
...
t = gsf_doc_meta_data_get_type();
t = gsf_docprop_vector_get_type();
if (t ==0) { start up error ...; }

You are only seeing gsf_docprop_vector_get_type() being called, so perhaps the optimiser is throwing away all the earlier calls, since they are overwriting the value of t.
Could you try setting t = 0; before the first REGISTER in gsf_init_dynamic(), and then changing the definition of REGISTER from
#define REGISTER(prefix)        t = prefix ## _get_type()

To:
#define REGISTER(prefix)        t |= prefix ## _get_type()

ie. OR all the get types together. That would force the optimiser to keep all the inits.

I think you may be onto something.  Making that last change appears to correctly build all types at the beginning now.  So, if it's a compiler optimization bug where do we go from here?

Wow! OK, that's great!
Try building the original libgsf, but with the optimiser turned off, so no -O flag to gcc or whatever compiler you are using.

Ok, I do think that fixes the issue, though I'll need to do some more extensive testing because of the intermittent nature of the problem to be absolutely sure.  But now the question is how do we get the pre-compiled binaries for all platforms fixed?

That was a very fascinating process!  I'm glad the time spent produced a good result.  I certainly don't think I could have gotten there by myself, so thanks immensely for the help!

That's very exciting! Well done for persevering with this.
It works fine on current Ubuntu with gcc 7.3, so I guess it's just a problem in older versions. Do you know which gcc you are using?

On my Ubuntu 16.04 machine gcc is at version 5.4.0:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
But the pre-compiled version of sharp + libvips + other dependencies that is downloaded when installing sharp on a system that doesn't have a global version of libvips present still exhibits the issue.  That is true on both my Ubuntu machine when I install sharp without a global libvips present as well as on Windows.  Does this mean that something needs to be updated at lovell/sharp-libvips?

I make the main vips win binaries in Ubuntu 18.04, though you're right, I think the dockerised version is still on 16.04.
I'll try updating that.

Would that resolve a Windows build too or do we need to separately test how Microsoft's MSVC compiler handles the optimizations?

You could try dropping these binaries into sharp:
https://github.com/jcupitt/libvips/releases/download/v8.6.5/vips-dev-w64-web-8.6.5.zip
That's built on 18.04 and should have this compiler fix.

sharp uses MSVC to build the libvips C++ API, but it relies on the gcc-built libvips.dll for the actual image processing code.

OK, I updated the builder to use latest stable ubuntu in the container, and fixed it up a bit. Lovell will need to update his builder as well.

Amazing detective work, thank you both.
The pre-compiled Linux x64 libvips binaries provided by sharp are currently created on Debian 7 and therefore gcc v4.7.2. This places a minimum glibc version of v2.13. Upgrading to Debian 8 would then depend on glibc v2.19 so exclude support for RHEL/Centos 7 still on v2.17, so we can't do that quite yet.
Luckily it looks like Debian 7 has a backport of gcc v4.9.2 so we can at least upgrade to that for the next major release. I've created https://github.com/lovell/sharp-libvips/issues/7 to track this.
The change John made in https://github.com/jcupitt/build-win64/commit/43595b9de4d03fcd90e2fd4f82f81b257d0d8f87 will be picked up by the sharp-libvips scripts when they package the forthcoming libvips v8.7.0.

OK, sounds good Lovell.
So the fix until you can get to gcc 7 or later is to disable the optimiser for libgsf.
I'll see if libgsf are still using that REGISTER macro. They might be interested in this.

Yes, libgsf still have this code in master. I opened an issue:
https://gitlab.gnome.org/GNOME/libgsf/issues/10

Could setting the (undocumented?) _GSF_GTYPE_THREADING_FIXED define help?
https://github.com/GNOME/libgsf/blob/79e00674d47817778f233507e7e769cb1906b46e/gsf/gsf-utils.c#L157-L167

It won't compile with that flag enabled -- the GSList types is not defined anywhere.
I think optimiser off is probably the only fix for now.

... off for libgsf, I mean. It's fine to use elsewhere, of course.

The gsf maintainers have fixed it their end, so the next libgsf release should be fine, on this issue at least.

libgsf 1.14.44 has been released that should solve this issue.
Note for build-win64:
This patch should be included (see PR @ libgsf) otherwise it will cause a build error with MinGW.


usb: Fix unaligned access

Use sys_put_le16() for unaligned access, this is refactored work of
PR #8495
PR #11432
Signed-off-by: Andrei Emeltchenko<EMAIL_ADDRESS>

Codecov Report

Merging #11619 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master   #11619   +/-   ##
=======================================
  Coverage   48.22%   48.22%
=======================================
  Files         279      279
  Lines       43285    43285
  Branches    10357    10357
=======================================
  Hits        20875    20875
  Misses      18270    18270
  Partials     4140     4140

Impacted Files
Coverage Δ

subsys/usb/usb_descriptor.c
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


[debugger] When debugging services, debug server is not killed

 Issue by roonyh
Thursday Feb 01, 2018 at 14:10 GMT
Originally opened as https://github.com/ballerina-lang/plugin-vscode/issues/44

Stopping debugging does not kill started debug server, when debugging services.
Gives the address already in use error.

you need to kill the service, we cannot kill the service for "debugStop" command.


Provide external config

First of all, nice job making this seed.
I have just 2 small doubts.
The first is, if a service of the module uses the http service how can i made the factory providing that
export function seedServiceFactory() {
    return new SeedService();
}
export function authServiceFactory() {
    return new AuthenticationService(//parameter http module);
}

@NgModule({
    imports: [CommonModule],
    providers: [
        {provide: SeedService, useFactory: seedServiceFactory},
        {provide: AuthenticationService, useFactory: authServiceFactory}
    ],
    declarations: [SeedComponent],
    exports: [SeedComponent]
})
export class SeedModule {
}

The second is, I would like to do a module to encapsulate my services but depending on the app that use this external module I need diferent configuration for things like endpoints or stuff like that.
I have already done a configService to provide my configuration in my app. My question is, is there any way i can send this service to the module just once, so that the the external module can use it. Like if i inject this service to the module

The first is, if a service of the module uses the http service how can i made the factory providing that

You don't need to do that. It's much easier. Just import the HttpModule into your module, the import Http into your services and that's it! Also, make sure you include @angular/http as a peerDependency into your package.json.

My question is, is there any way i can send this service to the module just once, so that the the external module can use it. Like if i inject this service to the module

Have never done that, but the idea is to pass your configuration with the forRoot() method when importing the module. You might want to take a look here: https://angular.io/docs/ts/latest/guide/ngmodule.html#!#core-for-root

Thanks, It works.
Regarding the second part I will try to do it.
Thanks again, it is really useful


fix(carousel): remove flash when used with cards

info in comments

@EdwardIrby I see the same issue with the development build. if i do a full production build it works fine 🤷  - no idea why

@EdwardIrby I see the same issue with the development build. if i do a full production build it works fine 🤷  - no idea why


ABeeZee camelcase still not allowed

I allowed ABeeZee in #3569
Version used is 0.8.6
But report still failing for the camelcase name. Or maybe I am missing something in the sources or I should have done something more in Fontbakery… I don't know.
cf https://github.com/google/fonts/issues/4227#issuecomment-1027736423

yeah, that's right. I have jut figured out the problem. I'm working on a fix now. Thanks, @RosaWagner


routing problem does terminate in version 9.5 but not in version 9.6/9.7

Version of OR-Tools: 9.5 and 9.6/9.7
Language: Python
Routing Solver
Windows
Take the code example posted on or-tools-discuss. Run with or-tools version 9.5 and 9.6/9.7 to see a different behavior.
In both cases (version 9.5 and version 9.6/9.7) the problem should be solved very quickly.
In version 9.6/9.7 the program is stuck and does not terminate.
The release notes of version 9.6 state that there are "performance improvements (local search)". In this case it is a deterioration.
Problem was also posted on stackoverflow.

On my way to git bissect...

git bisect bad
1505af56efef0de2a4ff57e02ab896bbdb7935e6 is the first bad commit
[Routing] bump code, improve ls
Next test: try to disable the SHORTEST_PATH_SWAP_ACTIVE push operator (default to TRUE)

When adding to ortools_pdp.py (line ~161)
search_parameters.local_search_operators.use_shortest_path_swap_active = "BOOL_FALSE"

I got:
$ python3 -m pip show ortools
Name: ortools
Version: 9.7.2996

$ ./create_model.py
## Done
<bound method Solver.Parameters of <ortools.constraint_solver.pywrapcp.Solver; proxy of <Swig Object of type 'operations_research::Solver *' at 0x7f7a184dba20> >>
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1699344484.952262    7906 search.cc:276] Start search (memory used = 24.36 MB)
I0000 00:00:1699344484.952398    7906 search.cc:276] Root node processed (time = 0 ms, constraints = 279, memory used = 24.36 MB)
I0000 00:00:1699344484.952562    7906 search.cc:276] Solution #0 (58026, time = 0 ms, branches = 0, failures = 0, depth = 0, memory used = 24.39 MB)
I0000 00:00:1699344484.952581    7906 search.cc:276] Finished search tree (time = 0 ms, branches = 0, failures = 1, memory used = 24.39 MB)
I0000 00:00:1699344484.952611    7906 search.cc:276] End search (time = 1 ms, branches = 0, failures = 1, memory used = 24.39 MB, speed = 0 branches/s)
I0000 00:00:1699344484.952743    7906 search.cc:276] Start search (memory used = 24.39 MB)
I0000 00:00:1699344484.952833    7906 search.cc:276] Root node processed (time = 0 ms, constraints = 279, memory used = 24.39 MB)
I0000 00:00:1699344484.952959    7906 search.cc:276] Solution #1 (58026, time = 0 ms, branches = 33, failures = 1, depth = 33, memory used = 24.39 MB, limit = 0%)
I0000 00:00:1699344484.966457    7906 search.cc:276] Solution #2 (56508, maximum = 58026, time = 13 ms, branches = 37, failures = 3, depth = 33, MakePairActive, neighbors = 7829, filtered neighbors = 1, accepted neighbors = 1, memory used = 24.39 MB, limit = 1%)
I0000 00:00:1699344484.966676    7906 search.cc:276] Solution #3 (56336, maximum = 58026, time = 13 ms, branches = 42, failures = 5, depth = 33, PairRelocateOperator, neighbors = 7832, filtered neighbors = 2, accepted neighbors = 2, memory used = 24.43 MB, limit = 1%)
I0000 00:00:1699344484.966842    7906 search.cc:276] Solution #4 (52735, maximum = 58026, time = 14 ms, branches = 46, failures = 7, depth = 33, PairRelocateOperator, neighbors = 7837, filtered neighbors = 3, accepted neighbors = 3, memory used = 24.43 MB, limit = 1%)
I0000 00:00:1699344484.967005    7906 search.cc:276] Solution #5 (51170, maximum = 58026, time = 14 ms, branches = 52, failures = 9, depth = 33, PairRelocateOperator, neighbors = 7843, filtered neighbors = 4, accepted neighbors = 4, memory used = 24.43 MB, limit = 1%)
I0000 00:00:1699344484.967203    7906 search.cc:276] Solution #6 (50517, maximum = 58026, time = 14 ms, branches = 56, failures = 11, depth = 33, PairRelocateOperator, neighbors = 7867, filtered neighbors = 5, accepted neighbors = 5, memory used = 24.43 MB, limit = 1%)
I0000 00:00:1699344484.968197    7906 search.cc:276] Solution #7 (50330, maximum = 58026, time = 15 ms, branches = 61, failures = 13, depth = 33, PairRelocateOperator, neighbors = 8484, filtered neighbors = 6, accepted neighbors = 6, memory used = 24.43 MB, limit = 1%)
I0000 00:00:1699344484.984268    7906 search.cc:276] Solution #8 (47855, maximum = 58026, time = 31 ms, branches = 65, failures = 15, depth = 33, HeuristicPathLNS(GlobalCheapestInsertion), neighbors = 17543, filtered neighbors = 7, accepted neighbors = 7, memory used = 24.50 MB, limit = 3%)
I0000 00:00:1699344484.989581    7906 search.cc:276] Solution #9 (47175, maximum = 58026, time = 36 ms, branches = 72, failures = 17, depth = 33, PairRelocateOperator, neighbors = 17982, filtered neighbors = 8, accepted neighbors = 8, memory used = 24.50 MB, limit = 3%)
I0000 00:00:1699344484.995887    7906 search.cc:276] Solution #10 (46829, maximum = 58026, time = 43 ms, branches = 76, failures = 19, depth = 33, Relocate<1>, neighbors = 22949, filtered neighbors = 9, accepted neighbors = 9, memory used = 24.50 MB, limit = 4%)
I0000 00:00:1699344485.015226    7906 search.cc:276] Finished search tree (time = 62 ms, branches = 111, failures = 54, neighbors = 33648, filtered neighbors = 9, accepted neigbors = 9, memory used = 24.50 MB)
I0000 00:00:1699344485.015289    7906 search.cc:276] End search (time = 62 ms, branches = 111, failures = 54, memory used = 24.50 MB, speed = 1790 branches/s)
solution found

This workaround also works for me. Thx Mizux for the quick help!

encountering this issue with 9.8 as well. Setting use_shortest_path_swap_active to false still makes it hang and eventually times out. Any idea what could be the reason?


added: desktop notifications

hey there, I just added desktop notifications ( linux only so far ).
These are a feature only.

I'm not sure how I feel about this. I think it's a cool feature, but I don't quite think it belongs in cargo watch itself. On the other hand, if it doesn't belong there, there probably needs to be some kind of extension mechanism or customisable hooks or something, so this can be implemented.

You're of course right, there should be a setting like --notify or something in Cargo.toml.
Currently the only thing the user can decide is whether or not to install this feature at all with cargo install cargo-watch --features notifications.

No, I mean, I'm not sure if the feature should at all be in this project. I'm thinking about it, will get back to you.

Current thought is that this ought to be handled by an external application that would consume cargo-watch output (through pipes), parse the stream, spit out notifications through the relevant system bus, and output everything as is. A kind of specialised tee, if you want.
This keeps cargo-watch strictly focused on its mission (watch your cargo project) and lets the user choose which notification tool they use on top. It could even let the user filter the output through some other tools (like dybuk) before handing it over to the notification layer.
Closing this due to the above. I'll be glad, however, to link to such a tool from the Readme, if or when it is made.

That's cool


[BUG] open_ai 回答报错

是否已有关于该错误的issue或讨论？ | Is there an existing issue / discussion for this?

[X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答？ | Is there an existing answer for this in FAQ?

[X] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior
model: Qwen/Qwen-14B-Chat-Int4
使用open_ai 启动，调用api的过程报如下错误：
使用cli 和 webui 都不报错
INFO:     Started server process [9960]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     <IP_ADDRESS>:61537 - "CONNECT fonts.googleapis.com%3A443 HTTP/1.0" 404 Not Found
INFO:     <IP_ADDRESS>:60701 - "OPTIONS /v1/chat/completions HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:60701 - "POST /v1/chat/completions HTTP/1.1" 200 OK
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\fastapi\applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\cors.py", line 91, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
    await self.app(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in __call__
    raise e
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\starlette\routing.py", line 69, in app
    await response(scope, receive, send)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\sse_starlette\sse.py", line 247, in __call__
    await wrap(partial(self.listen_for_disconnect, receive))
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\anyio\_backends\_asyncio.py", line 597, in __aexit__
    raise exceptions[0]
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\sse_starlette\sse.py", line 236, in wrap
    await func()
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\sse_starlette\sse.py", line 221, in stream_response
    async for data in self.body_iterator:
  File "D:\works\demos\Qwen\openai_api.py", line 432, in predict
    for new_response in response_generator:
  File "C:\Users\Administrator/.cache\huggingface\modules\transformers_modules\Qwen\Qwen-14B-Chat-Int4\f91fa8d7b06d37b8f539e57ef48b17ac05012f7f\modeling_qwen.py", line 1273, in stream_generator
    for token in self.generate_stream(
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\torch\utils\_contextlib.py", line 56, in generator_context
    response = gen.send(request)
  File "C:\ProgramData\Anaconda3\envs\baichuan\lib\site-packages\transformers_stream_generator\main.py", line 969, in sample_stream
    next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

期望行为 | Expected Behavior
正常回答不要报错
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
- OS: Windows 10
- Python: 3.9
- Transformers:  4.32.0
- PyTorch: 2.0.0+cu118
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`): 11.8

备注 | Anything else?
No response

请问是不是调了temperature？

请问是不是调了temperature？

除了更改模型，其他代码没动过

same error encountered
python openai_api.py -c /home/work/Qwen-14B-Chat-Int4

INFO:     <IP_ADDRESS>:52381 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 83, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 273, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 190, in run_endpoint_function
    return await dependant.call(**values)
  File "openai_api.py", line 395, in create_chat_completion
    response, _ = model.chat(
  File "/root/.cache/huggingface/modules/transformers_modules/Qwen-14B-Chat-Int4/modeling_qwen.py", line 1195, in chat
    outputs = self.generate(
  File "/root/.cache/huggingface/modules/transformers_modules/Qwen-14B-Chat-Int4/modeling_qwen.py", line 1314, in generate
    return super().generate(
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/generation/utils.py", line 1642, in generate
    return self.sample(
  File "/usr/local/lib/python3.8/dist-packages/transformers/generation/utils.py", line 2760, in sample
    next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

请问是不是调了temperature？

除了更改模型，其他代码没动过

Has the problem been solved?

@allenhaozi @airclear @JustinLin610 @hzhwcmhf I am using Qwen-14B-Chat-Int4 and in the inference I am also getting: "RuntimeError: probability tensor contains either inf, nan or element < 0" Has this been fixed and how? Many thanks

Hi, guys, currently the Int4 quantized models cannot be used with low temperature and low top_p values. Please try using temperature = 1 and top_p > 0.5 (e.g., 0.8).
If the problem still exists, it would be better if you could provide a MWE for us to reproduce the issue. Thanks in advance.

Hi, guys, currently the Int4 quantized models cannot be used with low temperature and low top_p values. Please try using temperature = 1 and top_p > 0.5 (e.g., 0.8).
If the problem still exists, it would be better if you could provide a MWE for us to reproduce the issue. Thanks in advance.

@jklj077 您好，我也遇到了这个问题，因为基于知识库问答，我想要模型回答的严谨，当temperature设置成0.01时，推理报Internal Server Error


TestPublisher.publish System.IO.IOException: Permission denied

Please check our current Issues to see if someone already reported this https://github.com/Microsoft/azure-pipelines-task-lib/issues
Environment
azure-pipelines-task-lib version: 2.9.3
Issue Description
When I try to publish files generated by previously installed program, I got an error: System.IO.IOException: Permission denied.
I found information, that it can happen when another process works with the files, but in my case, I can't figure out, what's wrong because "generator" process does nothing with the files.
There is a code I use inside the task:
import * as taskLib from "azure-pipelines-task-lib/task"

// ...

const allureTool = taskLib.tool(taskLib.which('allure', true))

allureTool.arg(['generate', '-o', outputReportPath, testResultsPath])

const allureRes = allureTool.execSync()

if (allureRes.code !== 0) {
   throw new Error("Failed to generate allure report!")
}

const testPublisher = new taskLib.TestPublisher("JUnit")

testPublisher.publish(outputReportPath, "true", "", "", "", "true")

Task logs
2022-12-15T14:19:38.8826730Z ##[section]Starting: publish allure report
2022-12-15T14:19:38.8832927Z ==============================================================================
2022-12-15T14:19:38.8833187Z Task         : Publish Allure Report
2022-12-15T14:19:38.8833363Z Description  : Publish Allure Report
2022-12-15T14:19:38.8833530Z Version      : 1.0.24
2022-12-15T14:19:38.8833675Z Author       : qameta software
2022-12-15T14:19:38.8833815Z Help         :
2022-12-15T14:19:38.8834025Z ==============================================================================
2022-12-15T14:19:39.0971469Z Downloading: https://github.com/allure-framework/allure2/releases/download/2.20.1/allure-2.20.1.tgz
2022-12-15T14:19:40.1518748Z Extracting archive
2022-12-15T14:19:40.1563867Z [command]/usr/bin/tar xC /home/vsts/work/_temp/7403c5da-7b93-4366-bc5d-9ba7ed36b4b7 -f /home/vsts/work/_temp/b07ed998-c36d-472e-8bdd-31b3a053a075
2022-12-15T14:19:40.3614343Z Caching tool: allure 2.20.1 x64
2022-12-15T14:19:40.4219444Z Prepending PATH environment variable with directory: /home/vsts/work/_temp/7403c5da-7b93-4366-bc5d-9ba7ed36b4b7/allure-2.20.1/bin
2022-12-15T14:19:40.4239107Z [command]/home/vsts/work/_temp/7403c5da-7b93-4366-bc5d-9ba7ed36b4b7/allure-2.20.1/bin/allure generate -o /home/vsts/work/1/s/example-report-1 /home/vsts/work/1/s/allure-results
2022-12-15T14:19:43.4351458Z Report successfully generated to /home/vsts/work/1/s/example-report-1
2022-12-15T14:19:45.2566950Z Result Attachments will be stored in LogStore
2022-12-15T14:19:45.3333126Z Run Attachments will be stored in LogStore
2022-12-15T14:19:45.4042872Z Failed to parse result files: System.UnauthorizedAccessException: Access to the path '/home/vsts/work/1/s/example-report-1' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
   at Microsoft.TeamFoundation.TestClient.PublishTestResults.JUnitResultParser.ReadFile(String filePath, XmlDocument doc)
   at Microsoft.TeamFoundation.TestClient.PublishTestResults.JUnitResultParser.ParseTestResultFile(TestRunContext runContext, String filePath)
   at Microsoft.TeamFoundation.TestClient.PublishTestResults.JUnitResultParser.<>c__DisplayClass1_0.<ParseTestResultFiles>b__0(String file)
   at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
   at Microsoft.TeamFoundation.TestClient.PublishTestResults.JUnitResultParser.ParseTestResultFiles(TestRunContext runContext, IList`1 resultFilePaths)
   at Microsoft.VisualStudio.Services.Agent.Worker.TestResults.Parser.ParseFiles(IExecutionContext executionContext, TestRunContext testRunContext, List`1 testResultsFiles, ITestResultParser testResultParser)
2022-12-15T14:19:45.4101298Z ##[section]Async Command Start: Publish test results
2022-12-15T14:19:45.5139546Z ##[section]Async Command End: Publish test results
2022-12-15T14:19:45.5141816Z ##[section]Finishing: publish allure report

Expected behaviour
Files should be published without access issue
Actual behaviour
I get Failed to parse result files: System.UnauthorizedAccessException: Access to the path '...' error all the time I try to publish any file generated inside the task.
Steps to reproduce

Create a new task
Add allure-commandline node dependency
Use the dependency via node tool and generate a report (can be generated with any folder as input)
Try to publish the report

Hi @epszaw, thanks for reporting! We are working on more prioritized issues at the moment but will get back to this one soon.

@kirill-ivlev  Are you going to take this ticket in work anytime soon?

Up

ping

ping


Feature/controller for control modes

Comment clearing is nessecery

Please remove this line from the hw_interface (L66):
control_signal_ext_.control_signal.control_mode =
kuka_motion_external_ExternalControlMode_POSITION_CONTROL;
This was added to make the driver work with the new protos until this is merged

If review passes, CI blocked with ControllerHandler branch PR


Question: How to set AppWindowContent

WinUI3 1.0.0 Desktop c#

In UWP, I can use
ElementCompositionPreview.SetAppWindowContent(appWindow, new Page());
to set an AppWindow's content.
However, this function doesn't exist in the WinUI3.
How can I set an existed Page to an AppWindow created by AppWindow.Create()

In AppSDK, the AppWindow class doesn't own and manage its own window, but represents an existing window that already has content that was drawn using a UI framework.

In AppSDK, the AppWindow class doesn't own and manage its own window, but represents an existing window that already has content that was drawn using a UI framework. Note that currently, you cannot have multiple windows with WinUI 3.

@Jaiganeshkumaran Thank you.
So, I can't compose an AppWindow created by AppWIndow.Create() with a Frame in WinUI3 now?
As UWP could create an AppWindow and use ElementCompositionPreview.SetAppWindowContent(appWindow, new Page()); to generate a window with style & code defined in XAML, is there any way can implement the same function in WinUI3 now?

You set the Content at the Root of the MainWindow
(I must do this in VB.NEt as I cannot load directly the XAML)

That’s write, you can’t keep WinUI 3 content in an AppWindow other than the initial one.

If you use AppSDK 1.0.0_experimental, you can use multiple windows, and set the content almost like in UWP.

If you use AppSDK 1.0.0_experimental, you can use multiple windows, and set the content almost like in UWP.

@MrDeej Thank you.
I used 1.0.0_experimental and it did work. However, some APIs have not been added into the experimental version such as Win32Interop OverlappedPresenter.SetBorderAndTitleBar.
Maybe I should wait for AppSDK1.1...


All notifications are sent to the active player as well

Currently, whenever you make a move, accept a game, etc., you also get a notification yourself. Looking through your code, it seems this was intentional; Can I ask why? It is really annoying if you have Happening opened on more than just the device you're playing on.

Pleas fix it if you know where the bug is :)

Alright, I'll take a look at it later today :)


[BUG] :Audio is not working while playing the game.

Describe the bug
Audio is not working while playing the game.
To Reproduce
Steps to reproduce the behavior:

Go to 'main.html'
Click on 'get set go'
Click on 'start now'
See error

Expected behavior
Audio should work while playing game
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

This is a duplicate issue #48


Try to fix glow activation bug

What changed?

[x] fix an activation bug if the MetroWindow uses a Glow
[ ] fix this too: the window doesn't zoom in vertical height if the user double clicks on the top Glow

Closes #2577 Window Resizing Erroneously Acts Deferred

@AdditionalPylons my first attempt for the activation resizing bug. the second bug was found by testing the first :-(

@punker76 regarding e8843e0f3c1d838b614c7e164e8bf9a9463e9a70 should we also do the same for the bottom glow border as well?

@AdditionalPylons You're right, done 930f6b8ac05741a249f730dcf4d44cac0a35dcbc thx!


Is lean attention supported by flash infer?

I notice this project is inspired by stream-k, how is the work done?
I notice the lean attention uses stream k for attention, is this supported in flash infer?

Our original implementation (more than one year ago) was based on the in-kernel cross-tile attention merge similar using cuda atomic operators, which is similar to the fixup step in stream-k. But later on we found stream-k doesn't work well for GQA(grouped-query attention), so I removed this part and turn to use split-k instead, it's slightly worse than stream-k for standard multi-head attention but significantly better on GQA.
Regarding lean attention, we have some attempts in reducing wave-quantization using persistent kernels, and we will upstream it recently. But it still uses split-k, not stream-k like in lean-attention.

Another pitfall with stream-k is that the result is not deterministic, which could be problematic if user care about reproducibility. Our current split-k implementation guarantees determinism.

Another pitfall with stream-k is that the result is not deterministic, which could be problematic if user care about reproducibility. Our current split-k implementation guarantees determinism.

Thank you for the quick replay.
I want to confirm that, how is the split-k strategy being applied.

In Tri Dao's flash attention, if the cuda blocks is enough to cover all SMs, split k will not work.

Another question is, when we have multiple sequences with different lengths,  if we still apply the same split-k strategy for each sequence, it will lead to load imbalance, which means, the cuda blocks to compute the long sequences get too much work, while blocks for short sequences exit very early.

How are the two issues handled in flash infer?
Thank you.

In Tri Dao's flash attention, if the cuda blocks is enough to cover all SMs, split k will not work.

One SM can fit multiple CTAs (the number depends on the implementation, if your threadblock uses a lot of shared memory/registers, than one SM can only execute on CTA). FlashInfer will select a grid-size that maximize occupancy.

Another question is, when we have multiple sequences with different lengths, if we still apply the same split-k strategy for each sequence, it will lead to load imbalance, which means, the cuda blocks to compute the long sequences get too much work, while blocks for short sequences exit very early.

In flashinfer, we have a load-balancing scheduler that uses different "K" for different sequence, depending on their lengths.

In Tri Dao's flash attention, if the cuda blocks is enough to cover all SMs, split k will not work.

One SM can fit multiple CTAs (the number depends on the implementation, if your threadblock uses a lot of shared memory/registers, than one SM can only execute on CTA). FlashInfer will select a grid-size that maximize occupancy.

Another question is, when we have multiple sequences with different lengths, if we still apply the same split-k strategy for each sequence, it will lead to load imbalance, which means, the cuda blocks to compute the long sequences get too much work, while blocks for short sequences exit very early.

In flashinfer, we have a load-balancing scheduler that uses different "K" for different sequence, depending on their lengths.

Great，I'll benchmark and learn that feature. Thank you!

For standard MHA (multi-head attention),

Decode attention uses cuda cores (the query length per request is one, which is purely gemv).
Prefill/append attention uses tensor cores, and the tile size is adaptive to query length.

FlashInfer decode attention APIs provide an option of using tensor cores, it's beneficial for GQA/MQA, but not for standard MHA.

For standard MHA (multi-head attention),

Decode attention uses cuda cores (the query length per request is one, which is purely gemv).
Prefill/append attention uses tensor cores, and the tile size is adaptive to query length.

FlashInfer decode attention APIs provide an option of using tensor cores, it's beneficial for GQA/MQA, but not for standard MHA.

That's really great!

XQA is the same thing as 'use_tensor_cores=True' in flashinfer.

XQA is the same thing as 'use_tensor_cores=True' in flashinfer.

@yzh119 I'm curious if you think there is something else that drives the gap between flashinfer and TRT -- on my profiles of SGLang, I see a large gap between TRT attn and flashinfer at long prefill sequences (3500 tokens in, nearly 2x time spent on attn per decode step). I would have assumed it was because of XQA, but it seems it may be otherwise...?

@mvpatel2000 I think sglang didn't enable use_tensor_cores=True by default, so there might be a gap there.
Besides decode, prefill kernel time also influence decode latency. For long sequence length, we recently integrated flashattention 3 for prefill which greatly improves end-to-end performance in terms of both inter-token-latency and time-to-first-token in sglang. Please stay tuned :)

Got it! I think with my benchmarking, it had use_tensor_cores=True. Also, this was a profile step of just a decode step (so did not include prefill) compute.

@mvpatel2000 I think nsys profiling results would be helpful in performance diagnosis.

@mvpatel2000 I think nsys profiling results would be helpful in performance diagnosis.

@zhyncs can you share a good email please? I will share traces with you.

Hi @mvpatel2000 , my github account is @yzh119 :)
You can join the slack channel https://flashinfer.slack.com/join/shared_invite/zt-2r93kj2aq-wZnC2n_Z2~mf73N5qnVGGA#/shared-invite/email and send me the trace there, or email me at<EMAIL_ADDRESS>.


The tree component's bug

Element UI version
2.5.4
OS/Browsers version
chrome 版本 74.0.3702.0（正式版本）canary （64 位）
Vue version
2.6.6
Reproduction Link
https://jsfiddle.net/np84ru15/1/
Steps to reproduce
1、check the node
2、expand the node
3、the node which we clicked has been not checked ( All of this things is just has been  appeared at the first time , It may be because of lazy loading )
What is Expected?
1、check the node
2、expand the node
3、the node which we clicked is also has been checked
What is actually happening?
the node which we clicked has been not checked

更新一下例子https://jsfiddle.net/60v412zt/ 例子中的 Math.random 太迷惑人了。😰

pr #13349 导致的。

pr #13349 导致的。

thanks~~


Error encountered trying to plot online with plotly?

I've run the start_here.ipynb notebook, but in the first example an error is produced, to the effect that it seems to be trying to log in to a plotly account for online display with unrecognised username ''.   Error msg below.  Any idea why?
Aw, snap! We don't have an account for ''. Want to try again? You can authenticate with your email address or username. Sign in is not case sensitive.

Don't have an account? plot.ly

Questions<EMAIL_ADDRESS>
---------------------------------------------------------------------------
PlotlyError                               Traceback (most recent call last)
<ipython-input-2-fb18fdd6a581> in <module>()
      9
     10 # Plot
---> 11 ch.iplot()

~/dev/py-quantmod/quantmod/chart.py in iplot(self, type, volume, log, theme, layout, title, subtitle, hovermode, legend, annotations, shapes, dimensions, width, height, margin, filename, online, **kwargs)
   1070                              link_text=link_text)
   1071         else:
-> 1072             return py.iplot(figure, filename=filename)
   1073
   1074

...

~/anaconda3/lib/python3.6/site-packages/plotly-2.2.3-py3.6.egg/plotly/tools.py in get_embed(file_owner_or_url, file_id, width, height)
    293                 "'{1}'."
    294                 "\nRun help on this function for more information."
--> 295                 "".format(url, plotly_rest_url))
    296         urlsplit = six.moves.urllib.parse.urlparse(url)
    297         file_owner = urlsplit.path.split('/')[1].split('~')[1]

PlotlyError: Because you didn't supply a 'file_id' in the call, we're assuming you're trying to snag a figure from a url. You supplied the url, '', we expected it to start with 'https://plot.ly'.
Run help on this function for more information.

@joshanderson99 you need to create a plotly accuont as detailed here
https://plot.ly/python/getting-started/
for yahoo, the API has been retired - i'm currently looking to get alphavantage data in it instead


Support REGEX

Hello! The current state of the tool is very limited. Can you add regex to it?

Is it fine?

What regex functionality are you expecting to see?

Matching peripheral and register names would be helpful. The existing [ABC] matching doesn't work as expected. For instance, given registers ADDRA, ADDRB, and ADDR0-7 are specified as an array, I would like to remove register ADDR7. Using _delete: "ADDR[01234567]" does not match the numeric registers and in fact, takes no action on in the patch.


Timeout in ServerConfiguration is not the same on client.

While debugging I was still getting timeouts on the client-side even with a 500-second timeout.

Can be looked at without going too deep into the mod. Entry point for setting up a connection is CoopClient.Connect and CoopServer.OnClientConnected on the server side. I assume the timeout is not set on the clients connection implementation LiteNetManagerClient .