WIP: Azure Windows Openblas experiment

@WarrenWeckesser do changes made to your fork trigger CI runs? If they do, then it may be possible to close this PR, and just rely on CI runs based on your fork. Once your fork works you could reopen the PR. This would save workload on the CI suppliers.

@andyfaff, I'm not sure, I can try.  But I'm done experimenting for the next day or so.  If anyone can continue working on this in the mean time, please do.  And don't take any of the changes that I made so far in this PR as the correct way to solve the problem.  I've just been trying some changes based on what Matti is doing in the numpy PR.
If pushing to my fork without a PR doesn't trigger the test suite, what I can do when I get back to this is temporarily comment out all the other CI tests except the Azure Windows runs.

The last change made some progress; now three of the four Azure Windows tests suites pass.  The ILP64 version still fails.

Closing temporarily.

It looks like a better approach is to fix the underlying problem in NumPy's distutils, so closing.

Hmm not yet sure if it's better - if you had already fixed 3 out of 4 failures, maybe we should merge this either way?

Maybe?  With some of these changes, I'm in the dark.  For example, I have no idea why, when NPY_USE_BLAS_ILP64 is defined, the code in the master branch version of azure-pipelines.yml copies both openblas.a and openblas64_.a to the Python lib directory.  My version doesn't copy both files, and I have no idea if that is (a) a legitimate clean up, or (b) something that breaks something else, or (c) safe, but that removes a test related to finding the correct library.
I also don't know what is going on with that fourth failing test.  It might be related to Tyler's comment over in https://github.com/scipy/scipy/pull/11990.

You need both 32-bit and 64-bit libs to build the ilp64 version.

Hey Warren, this diff deals with the final remaining failure, thanks to some help from Pauli (SciPy building ILP64 and tests looking good so far -- see fork PR: https://github.com/tylerjereddy/scipy/pull/31):
May not need the whole diff, and obviously needs a bit of cleaning up/conditionals maybe when the matrix is restored.
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 2ad4ef48b..072fd06e8 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
-          $target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\$target_name"
+          #$target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\$target_name"
+          $target = "$pwd\openblaslib\$target_name"
           Write-Host "target path: $target"
           $old_value = $env:NPY_USE_BLAS_ILP64
           $env:NPY_USE_BLAS_ILP64 = $ilp64
@@ -109,11 +59,29 @@ jobs:
           $env:NPY_USE_BLAS_ILP64 = $old_value
           cp $openblas $target
       }
+      mkdir openblaslib
       Download-OpenBLAS('0')
       If ($env:NPY_USE_BLAS_ILP64 -eq '1') {
           Download-OpenBLAS('1')
       }
     displayName: 'Download / Install OpenBLAS'
+  - bash: |
+      echo "[openblas]" >> site.cfg
+      echo "libraries = openblas" >> site.cfg
+      echo "library_dirs = d:\a\1\s\openblaslib" >> site.cfg
+      echo "include_dirs = d:\a\1\s\openblaslib" >> site.cfg
+      echo "runtime_library_dirs = d:\a\1\s\openblaslib" >> site.cfg
+
+      echo "    " >> site.cfg
+
+      echo "[openblas64_]" >> site.cfg
+      echo "libraries = openblas64_" >> site.cfg
+      echo "library_dirs = d:\a\1\s\openblaslib" >> site.cfg
+      echo "include_dirs = d:\a\1\s\openblaslib" >> site.cfg
+      echo "runtime_library_dirs = d:\a\1\s\openblaslib" >> site.cfg
+      cat site.cfg
+    displayName: 'Set site.cfg for ilp64 case'
+    condition: eq(variables['NPY_USE_BLAS_ILP64'], 1)
   - powershell: |
       # wheels appear to use mingw64 version 6.3.0, but 6.4.0
       # is the closest match available from choco package manager
@@ -121,6 +89,11 @@ jobs:
     displayName: 'Install 32-bit mingw for 32-bit builds'
     condition: and(succeeded(), eq(variables['BITS'], 32))
   - powershell: |
+      # perform choco installs on same root drive as
+      # cwd/SciPy clone
+      Move-Item -Path "c:\\programdata\\chocolatey" -Destination "$pwd\\programdata\\chocolatey" -force
+      $env:ChocolateyInstall = "$pwd\\programdata\\chocolatey"
+      $env:PATH = "$pwd\\programdata\\chocolatey\\bin;" + $env:PATH
       choco install -y mingw --force --version=6.4.0
     displayName: 'Install 64-bit mingw for 64-bit builds'
     condition: and(succeeded(), eq(variables['BITS'], 64))
@@ -156,7 +129,7 @@ jobs:
           $env:LDFLAGS = "-m32"
           refreshenv
       }
-      $env:PATH = "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw$(BITS)\\bin;" + $env:PATH
+      $env:PATH = "$pwd\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw$(BITS)\\bin;" + $env:PATH

We'll eventually want to get rid of all references to absolute paths/drive letters (as per their docs), but one thing at a time maybe.

@tylerjereddy, thanks, that's great.  Are you going to convert that to a PR on the scipy repo?

Up to you--if you want to poach what you need for this PR that's fine too. I didn't want to open a third PR for this issue in the main repo.
If you want to just cleanly fix the 32-bit integer entries and then have me try to just get the last one after in another PR that's probably fine too.

It looks like you have all the pieces in your PR, so it would probably be easier to use yours, and get it done in one shot.

alright, I'll try to clean it up a bit then

Closing (again!); superseded by https://github.com/scipy/scipy/pull/11993.


Add support for the NestedForm form widget

Replaces rainlab/translate-plugin#584

@iboved this is the replacement as none of us work on RainLab plugins or October CMS anymore. Winter CMS for the win 😉

@iboved if you could test this out and see if you can break it in any way that would help us get it merged :)

@LukeTowers thanks for your answer) I am checking. At the moment I have one error after switching the locale:

Call to undefined method MLNestedForm::processSaveValue

We don't have this method in the MLNestedForm or NestedForm classes.

@iboved can you try again with the latest changes I commited?

@mjauvin thanks, but we still don't have the "processSaveValue" method.

Any news on this? Would like to see it beeing finalized. Startet to dig into it myself now too.

@der-On if you are willing to work on this, I can merge it to a seperate branch and you'll be able to submit PRs against that branch.

Replaced by #64


requirement that restore be from the install source breaks CI builds

Description
When developing projects that refer to each other through nuget packages the strict requirement that a package must be restored from the same source that it was installed from breaks builds on the CI server and other developers machines.
It is possible to work around with a different workflow, but that becomes very costly in time when you are talking about dozens of projects depending on project A instead of 1 as in the repro steps below.
Repro steps

Developer works on Project A and B. Project B references A through a nuget package.
Developer locally bumps project A from 1.0 to 1.1 and updates A in B.
paket.lock now has A 1.1 installed from c:\DEV_FEED
Developer pushes the new version of A and B
The CI server builds A and publishes the new version of A.nupkg. to http://OFFICIAL_FEED
The CI server tries to build B but fails since A.nupkg does not exist in c:\DEV_FEED on the CI server

Paket failed with:
        The package A 1.1 can't be found in c:\DEV_FEED.
Please check the feed definition in your paket.dependencies file.

Suggested solution: Development sources
paket.dependencies
source http://OFFICIAL_FEED development c:\DEV_FEED

When updating-to/installing a package from c:\DEV_FEED it would be entered as installed from http://OFFICIAL_FEED in paket.lock
When restoring paket would fall back to packages in c:\DEV_FEED if package is missing in http://OFFICIAL_FEED
Alternative solution: Try each source
set an option in paket.dependencies
allowRestoreFromAnyFeedTryFeedsInOrderDefined true
With that option set paket would check for the existence of a package in each feed in order when restoring.
You would define the official feeds first and the development/local feeds later so that official packages would always be preferred.

yes overwriting sources on dev time is on our agenda. But I think it should be in a different file (to allow you to gitignore it).
I stil need an diea how the format would look like

How about something like this?
paket.dependencies
source OFFICIAL_SOURCE

paket.sourceoverrides
source OFFICIAL_SOURCE fallback LOCALLY_BUMPED_PACKAGES prefer EXPERIMENTING_DEBUGGING

When installing/updating paket.lock would always register the packages as coming from the feed in paket.dependencies
When restoring paket would look up a requested package in this order

prefered
paket.dependencies
fallback

If we want to make the file more generic in order to be able to put other development time overrides in there this might be a better fit:
paket.overrides
sourceoverride OFFICIAL_SOURCE fallback LOCALLY_BUMPED_PACKAGES prefer EXPERIMENTING_DEBUGGING

Interested in helping with this?
On Apr 22, 2016 15:50, "Magnus Lidbom"<EMAIL_ADDRESS>wrote:

If we want to make the file more generic in order to be able to put other
development time overrides in there this might be a better fit:
paket.overrides
sourceoverride OFFICIAL_SOURCE fallback LOCALLY_BUMPED_PACKAGES prefer EXPERIMENTING_DEBUGGING
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/issues/1633#issuecomment-213437038

I'm willing to give it a shot.
However: I'm not exactly fluent in F# and I'm almost completely unfamiliar with the code.
Could you give me some pointers about the structure of the code as relates to this?
Can I get in touch with you and/or other Maintainers using skype or similar?

I'm pretty much always available on gitter.
Let's start with something easy.
For a first step I'd like to see a PR which creates couple of (red) unit test for the parser. You can basically copy https://github.com/fsprojects/Paket/blob/master/tests/Paket.Tests/DependenciesFile/ParserSpecs.fs#L43 - then we implement that parser and I'm trying to discover how to fit that in.

please send that against v3 branch

I'm interested in this feature as well, and could give some help.
Not sure I understand why you'd need the fallback option?
I'd suggest something like following:
paket.local file (added to gitignore)
source http:\\team_nuget_feed -> source c:\git\project\nupkgs
git http:\\remote_git_repository.git master -> git c:\git\project bugfix

Basically during restore, source on the right would replace source on the left side
Also note that Paket v3 comes with feature of git-repo based feeds, thats why I'd propose a format for this as well (second line)

Yes making this work with git repos will be awesome.

/cc  @Krzysztof-Cieslak @Thorium since you are already using git dependencies

:+1: to @theimowski idea. I don't think that "dev time dependency" should modify paket.dependency as it's committed and used by CI. gitignored file (let's say paket.local) would definitely be better option in my opinion.

Not sure I understand why you'd need the fallback option

The gospel of package management as preached in my organisation (I agree completely by the way):

Once an official package exists always build against that package.
Since a published package should never change it makes little sense to develop against anything but the official version once one exists.
CI always builds only against official packages
If you need changes to a package you bump it and update in all dependent projects.

We only need these overrides so that we can develop new versions of packages and test them locally before publishing them on the official feed.
Since our build scripts builds the packages automatically each developer workstation usually has local versions of the latest version of every packages. If these were "prefer"ed over the official source packages the developer would almost never be running the official package. This would make it very easy to make something "work" locally that would fail miserably as soon as pushed to CI. This would be likely to cause a lot of confusion and extra work.
We actually have little to no need for the prefer flag the way we work.

@theimowski

I'm interested in this feature as well, and could give some help.

I hardly speak F#,  I'm unfamiliar with the code base. And I have little to no time to spare for doing this.
Any and all assistance is welcome as far as I'm concerned. Up to and including taking care of the whole thing while I just observe :)

Since our build scripts builds the packages automatically each developer workstation usually has local versions of the latest version of every package. If these were "prefer"ed over the official source packages the developer would almost never be running the official package. This would make it very easy to make something "work" locally that would fail miserably as soon as pushed to CI. This would be likely to cause a lot of confusion and extra work.

Yes it could cause confusion, that's why I think there should be issued a big warning every time you build locally with an "overriden" source (i.e. local source).

Any and all assistance is welcome as far as I'm concerned. Up to and including taking care of the whole thing while I just observe :)

I can try to create a WIP PR for this feature, and then we could cooperate on that

I can try to create a WIP PR for this feature, and then we could cooperate on that

Great :)

Yes it could cause confusion, that's why I think there should be issued a big warning every time you build locally with an "overriden" source (i.e. local source).

I completely agree for the "prefered" case. Prefer replaces official packages. This should in my opinion be done rarely indeed.
Fallback on the other hand will never replace an official package. As such It is not dangerous or confusing the way prefer is. It is a commonplace occurrence for us to work against locally built bumped packages that do not yet exist in the official feed. Fallback let's us do that safely.
You get "fallback" behavior from nuget.exe if you place the official feed before the local feed in the targets file.
If you place the local feed before the official feed nuget.exe gives you "prefer" behavior.
"Fallback" is the way that we have been working for years. We tried "prefer" for a short time, years ago, and it caused a lot of trouble. We quickly changed it and have had no problems with that workflow since.
Could you explain how you imagine the workflow using prefer? Why you consider it to be superior and the only one that should be supported?

Tbh I think we should always replace when we find a local replace
statement. That will makes things much clearer. I work against local copy
of something (git source) or the official repo. This should be configurable
on package level.
On Apr 22, 2016 6:23 PM, "Magnus Lidbom"<EMAIL_ADDRESS>wrote:

I can try to create a WIP PR for this feature, and then we could cooperate
on that
Great :)
Yes it could cause confusion, that's why I think there should be issued a
big warning every time you build locally with an "overriden" source (i.e.
local source).
I completely agree for the "prefered" case. Prefer replaces official
packages. This should in my opinion be done rarely indeed.
Fallback on the other hand will never replace an official package. As such
It is not dangerous or confusing the way prefer is. It is a commonplace
occurrence for us to work against locally built bumped packages that do not
yet exist in the official feed. Fallback let's us do that safely.
You get "fallback" behavior from nuget.exe if you place the official feed
before the local feed in the targets file.
If you place the local feed before the official feed nuget.exe gives you
"prefer" behavior.
"Fallback" is the way that we have been working for years. We tried
"prefer" for a short time, years ago, and it caused a lot of trouble. We
quickly changed it and have had no problems with that workflow since.
Could you explain how you imagine the workflow using prefer? Why you
consider it to be superior and the only one that should be supported?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/issues/1633#issuecomment-213497677

Yeah it probably makes more sense to do it on package level instead of whole feed:
nuget FAKE -> source c:\git\FAKE

But then do we want to point to specific .nupkg file/ dir or rather specify build command?

@mildbom the workflow would be:

you reference an official package from a feed
the referenced package has a bug/ needs a new feature on context of the referencing project
you want to test the new behavior against the referencing package, but ideally not releasing new versions until you've tested it locally
for that you declare in paket.local "for package X use temporarily whatever comes from Y local dir"
when you're done with changing the referenced package, release new version and then remove the entry from paket.local

Does it make any sense?

@theimowski, @forki
(Sorry about the length of the post but I could not see a way to make our situation/needs clear much more consisely.)

Does it make any sense?

Sure it makes sense. For many this workflow would probably work fine.
Let me give you som context on my teams use of nuget packages. I think that context is what is missing for my arguments to make sense.
We maintain an enterprise SOA ecosystem:

A handful of framework/library solutions
Each with its own separate source code repository and release lifecycle
Together producing about 20 nuget packages.
Many consume packages produced by the others
All consume a number of 3rd party packages.
About 30 Application/Service solutions
Each with its own separate source code repository and release lifecycle
Together producing about 100 nuget packages.
Virtually all consume packages from other Services
All consume framework packages
All consume 3rd party packages.
Our own nuget feed server
Our own symbol server with symbols+sources for all published packages
Three Development teams on two continents
Occationally updates to the packages require all consumers to not only update, but to bump their produced packages as well. And so on recursively. For framework packages this might mean almost all packages being bumped and updated in all systems.
Often parallel development efforts means that we must be able to maintain multiple branches that each requires packages from various Applications and/or frameworks to be bumped and all their dependents must updated.
All of this needs to be possible to develop and test on a local environment before publishing the new versions of the packages to the shared feed.
once you have everything working it is extremely important that you can be confident that it will still work when you push all these changes to their various repositories.

Half a decade of experience trying to make this run as smoothly as possible has led us to some conclusions:

It is an unreasonable amount of work for us to manage overrides manually each time something changes.
Tracking down the problem if the wrong package is used is an unacceptable amount of work. In order to avoid this we must know that if there exists as official package that package is always used.

This is a rough outline of how we work to avoid those problems and minimize extra work:

All projects have the local feed configured as the fallback source at all times(By placing the local feed after the official feed in the list of feeds that nuget uses from the targets file).
On each build, create packages and publish them to the local feed (Scripted)
When a package needs to be updated bump it locally and update it in dependents locally. Do this recursively if required.(Scripted)
Once everything works locally push everything to CI(Scripted)
Clean out all local package folders(Scripted)

Hopefully this should help to make our need for "fallback/WIP" sources more clear.

@theimowski, @forki
Looking at the pull request I think I need to clarify what my thinking was.
Say we have the packages A, B, C
And the feeds set up as: source O prefer P fallback F
Then say the actual feeds have this content:
P:A
O:A,B
F:C

Say that we note A from feed O as AO etc.
Then O as used by paket would in practice look like this:
USED_FEED: AP, BO, CF
That combined feed would be used by all paket operations.
It might not be implemented in that fashion, but that would be the principle of it as I imagined it.
This is how nuget behaves when you have multiple sources configured. The first source in the list is the "most prefered". Each package is looked for in the feeds in order. There is no restriction that a package must be restored from the feed it was installed from. This behavior would also be perfectly acceptable to us. But I assume that there are others for whom the restrictions on restore are important. I would appreciate it if someone could explain why that is :)

I just tried to use the source X -> source Y proposed by @theimowski, which is what I would need for our setup, but it seems it has not gotten into the code (or it works differently and is not documented). The use case for this is as follows:
We're working on projects for a certain customer. The customer has his own nuget server, which is only reachable over VPN. Our own build server is not able (or rather, not allowed) to connect to the VPN, so it cannot access the packages. This is not a big deal for classic NuGet, because the build server has to restore packages manually for those, and so can just pass custom sources, pointing to our own nuget server.
I just migrated that project to our build server, though it had been on paket for quite some time now. I added manual single package overrides in paket.local, which is okay for this project (only a single internal nuget dependency), but will get cumbersome for projects with tens of depdendencies. Just overriding the entire source would be the best, especially since doing that would be a one-liner in TeamCity, and I'd love to have a solution that works exactly the same for all projects.
I know that paket.local has originally been made for developer-local overrides of certain packages, but it would be very useful for this as well, if it supported entire server overrides. Actually, a solution where some global configuration on the build server would automatically forward a certain source to our own would be a great thing as well.


Pin to newer version of poetry, and cleanup package pinning

Motivation
People have been using various versions of poetry, each which generates a different lockfile. This should ensure everyone is using a newer version, leading to less lockfile issues
Changes

Pins poetry to use something greater than poetry core 1.5.0
Updates lockfile with latest poetry version
Pins ddtrace to 1.15.0 until datadog fixes its size (https://github.com/DataDog/datadog-lambda-python/issues/349)
Updates black and runs black formatting
Pins botocore so it doesn't get out of step with boto3

Testing Instructions
Run poetry self update
If the above fails, then uninstall old versions of poetry, then install from scratch using docs https://python-poetry.org/docs/

Running in Beta now


Moving tabs is cumbersome and don't snap left or right very well.

VSCode Version: Code 1.15.1 (41abd21afdf7424c89319ee7cb0445cc6f376959, 2017-08-16T18:05:38.342Z)
OS Version: Windows_NT ia32 10.0.15063
Extensions:

Extension
Author (truncated)
Version

vscode-eslint
dba
1.2.11

python
don
0.7.0

cpptools
ms-
0.12.3

vim
vsc
0.9.0

vscode-wakatime
Wak
1.1.13

Steps to Reproduce:

Try moving a tab to the right or to the left of another tab, especially if the tab is at the beginning and it will snap randomly.

Reproduces without extensions: Yes/No

@RockChalkBogota the dropped tab should just always replace the tab you drop it to, can you share  a screen case of what you mean and see?


CVE-2007-4559 Patch

Patching CVE-2007-4559
Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.
If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

Hi security researchers from the Advanced Research Center at [Trellix]
I would appreciate your security patch.
Thank you.


npm install doesn't have any js files

When I install via npm like so:
npm install pixi-filters
I don't get any js files. Just the following:
.npmignore
package.json
README.md
Am I missing a step here?

it feels like npm run build hasn't been run before publishing, could someone quickly check that?

Interesting, what do ya think @bigtimebuddy ?

Confirmed this is an bug with releasing. Should be an easy fix.

Could use a prepublish script in package.json?

Sorry I didn't mean that last comment to sound short. I was replying quickly while managing some other tasks. Is the only thing that needs to be run npm run build?
If so adding "prepublish": "npm run build" to the package.json would mean you don't have to worry about it next time.

Fixed in v1.0.6 release.

thanks!

Thanks everyone :-)


Migrate to 3.6

@priyankarani LGTM except revert the fields.depends change, I dont think you need to update that!


undefined method `neo4j' for #<Rails::Application::Configuration:0x00000271c086cf98

I am attempting to follow the instructions from documentation here: http://neo4jrb.io/#getting-started
I added these gems and ran bundle install
gem 'activegraph'
gem 'neo4j-ruby-driver'

and in my config/application.rb I have:
config.neo4j.driver.url = ENV['NEO4J_URL'] || 'neo4j://localhost:7687'
    config.neo4j.driver.username = 'neo4j'
    config.neo4j.driver.password = '<my password>'

My error message is:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/railtie/configuration.rb:96:in method_missing': undefined method neo4j' for #<Rails::Application::Configuration:0x00000271c086cf98
coming from my config/application.rb, specifically on this line:
config.neo4j.driver.url = ENV['NEO4J_URL'] || 'neo4j://localhost:7687'
I attempted to use the 'neo4j' gem and to add a require 'activegraph/railtie' in my application.rb but that did not solve the problem. I also added my neo4j information in a config/neo4j.yml file, and that did not work either.
When I set up my project, I made it in API only mode and skipped ActiveRecord setup
Runtime information:
neo4j (9.6.2)
neo4j-core (9.0.0)
neo4j-rake_tasks (0.7.19)
neo4j-ruby-driver (4.4.4)
activegraph (11.3.1)

We're seeing this error occasionally too


Unity Panel not working in Grafana

Hi Team. We've been trying to use your Unity Plugin in Grafana. The installation of the plugin was fine, but there's no surety that the plugin is fully developed. Please find the error below, along with the error image attached, for your reference:

logger=local.finder t=2024-05-06T14:09:53.5001337+05:30 level=debug msg="Loading plugin" path="C:\Program Files\GrafanaLabs\grafana\data\plugins\unity-plugin-for-grafana\dist\plugin.json"
logger=plugin.loader source=external t=2024-05-06T14:09:53.5001337+05:30 level=debug msg="Plugin source loaded, though no plugins were found"

Hi,
What version of Grafana are you using? At the moment we haven't signed the plugin, maybe that's the problem. To use it you need to include its identifier in the allow_loading_unsigned_plugins field of the grafana.ini. Here you have an example of how it would look like using the Helm installation.
Regards :)

Hi  Julia,
Thank you for reaching out. We've tried your suggestion of adding ertis-unity-panel in allow unsigned plugins, but the issue still persists. Also, to answer your question, we've tried it in both versions of grafana: v10.2.3 and v10.4.2
We would like to explore this plugin so any suggestions to solve the above issue, would be greatly appreciated.
Thanks & Regards,
Yuktarth Trehan

From: Julia Robles @.>
Sent: Tuesday, May 7, 2024 5:19 PM
To: ertis-research/grafana-panel-unity @.>
Cc: Yuktarth Trehan @.>; Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
Hi,
What version of Grafana are you using? At the moment we haven't signed the plugin, maybe that's the problem. To use it you need to include its identifier in the allow_loading_unsigned_pluginshttps://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#allow_loading_unsigned_plugins field of the grafana.ini. Herehttps://github.com/ertis-research/Helm-charts/blob/main/OpenTwins/values.yaml#L214 you have an example of how it would look like using the Helm installation.
Regards :)
—
Reply to this email directly, view it on GitHubhttps://github.com/ertis-research/grafana-panel-unity/issues/1#issuecomment-2098218662, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIKKRE4SFMFMWDJ3NQARDILZBC5TLAVCNFSM6AAAAABHKIZVESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGIYTQNRWGI.
You are receiving this because you authored the thread.Message ID: @.***>

Hi Julia,
Hope you are well. Please let me know if you have any suggestions to resolve the issue that we are having. Waiting for your response.
Regards,
Yuktarth Trehan

From: Yuktarth Trehan @.>
Sent: Wednesday, May 8, 2024 10:04 AM
To: ertis-research/grafana-panel-unity @.>; ertis-research/grafana-panel-unity @.>
Cc: Author @.>; Anup Sharma @.>; Deep K @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
Hi  Julia,
Thank you for reaching out. We've tried your suggestion of adding ertis-unity-panel in allow unsigned plugins, but the issue still persists. Also, to answer your question, we've tried it in both versions of grafana: v10.2.3 and v10.4.2
We would like to explore this plugin so any suggestions to solve the above issue, would be greatly appreciated.
Thanks & Regards,
Yuktarth Trehan

From: Julia Robles @.>
Sent: Tuesday, May 7, 2024 5:19 PM
To: ertis-research/grafana-panel-unity @.>
Cc: Yuktarth Trehan @.>; Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
Hi,
What version of Grafana are you using? At the moment we haven't signed the plugin, maybe that's the problem. To use it you need to include its identifier in the allow_loading_unsigned_pluginshttps://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#allow_loading_unsigned_plugins field of the grafana.ini. Herehttps://github.com/ertis-research/Helm-charts/blob/main/OpenTwins/values.yaml#L214 you have an example of how it would look like using the Helm installation.
Regards :)
—
Reply to this email directly, view it on GitHubhttps://github.com/ertis-research/grafana-panel-unity/issues/1#issuecomment-2098218662, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIKKRE4SFMFMWDJ3NQARDILZBC5TLAVCNFSM6AAAAABHKIZVESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGIYTQNRWGI.
You are receiving this because you authored the thread.Message ID: @.***>

Hi,
I really don't know why this happens to you. We haven't tested it yet with version 10 of grafana (we use 9.5.1), but I just tested it and with version 10.4.2 it works correctly.
Maybe the problem is when installing the plugin. Instead of using the yarn build you can unzip the zip file in the release, which is already compiled and we know it works. Add this to the plugin folder that you have configured in Grafana. It is very important that in the plugins folder the plugin code is directly inside a folder with the name "ertis-unity-panel". If not, Grafana will not be able to understand it, although I am surprised that it appears in the list of plugins.
If it doesn't work, you can also try to put Grafana in development mode or change the default plugin folder to another one.
Let me know if any of that works for you.
Regards :)

Hi,
Thank you for your response. I have tried your suggestions but the issue still persists. If possible, can you show screenshots of the steps you are doing? Also, what is the data source you are using to paste the unity files?
Regards,
Yuktarth Trehan

From: Julia Robles @.>
Sent: Monday, May 13, 2024 1:38 PM
To: ertis-research/grafana-panel-unity @.>
Cc: Yuktarth Trehan @.>; Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
Hi,
I really don't know why this happens to you. We haven't tested it yet with version 10 of grafana (we use 9.5.1), but I just tested it and with version 10.4.2 it works correctly.
Maybe the problem is when installing the plugin. Instead of using the yarn build you can unzip the zip file in the releasehttps://github.com/ertis-research/grafana-panel-unity/releases/tag/latest, which is already compiled and we know it works. Add this to the plugin folder that you have configured in Grafana. It is very important that in the plugins folder the plugin code is directly inside a folder with the name "ertis-unity-panel". If not, Grafana will not be able to understand it, although I am surprised that it appears in the list of plugins.
If it doesn't work, you can also try to put Grafana in development modehttps://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#app_mode or change the default plugin folderhttps://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins to another one.
Let me know if any of that works for you.
Regards :)
—
Reply to this email directly, view it on GitHubhttps://github.com/ertis-research/grafana-panel-unity/issues/1#issuecomment-2106915818, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIKKRE5DYZZO366AMSNMFX3ZCBYIDAVCNFSM6AAAAABHKIZVESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWHEYTKOBRHA.
You are receiving this because you authored the thread.

How did you install Grafana? Helm? Docker? on which operating system? We just unzip the file in the plugins folder and add its identifier in the grafana.ini. In our platform you can see how we install it using an initContainer.
Unity files are not collected by datasource yet. Right now you have to add it to the Grafana public folder inside the “unitybuild” directory (public/unitybuild). If the “unitybuild” folder does not exist, it must be created first. Here you have to add a folder with any name and the 4 files that Unity generates in WebGL (all must have the same name, even if they have different extensions). Then, in the panel configuration you have to put the name of the folder that contains the unity files and the name of the files.
For example, here the name of the folder would be "pivot" and of the files "pivot-3d":

Anyway, your error seems to be an installation error, but I need more information about the environment and how you have installed it.

Hi,
I have installed grafana directly from the web, on my windows system.

From: Julia Robles @.>
Sent: Monday, May 13, 2024 4:27 PM
To: ertis-research/grafana-panel-unity @.>
Cc: Yuktarth Trehan @.>; Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
How did you install Grafana? Helm? Docker? on which operating system? We just unzip the file in the plugins folder and add its identifier in the grafana.ini. In our platform you can see how we install it using an initContainerhttps://github.com/ertis-research/Helm-charts/blob/main/OpenTwins/values.yaml#L232.
Unity files are not collected by datasource yet. Right now you have to add it to the Grafana public folder inside the “unitybuild” directory (public/unitybuild). If the “unitybuild” folder does not exist, it must be created first. Here you have to add a folder with any name and the 4 files that Unity generates in WebGL (all must have the same name, even if they have different extensions). Then, in the panel configuration you have to put the name of the folder that contains the unity files and the name of the files.
For example, here the name of the folder would be "pivot" and of the files "pivot-3d":
image.png (view on web)https://github.com/ertis-research/grafana-panel-unity/assets/48439828/72641960-da8f-4ef2-b40d-eff9edb2feb3
image.png (view on web)https://github.com/ertis-research/grafana-panel-unity/assets/48439828/4454d6cd-8d4d-4180-856d-49511e5f489a
Anyway, your error seems to be an installation error, but I need more information about the environment and how you have installed it.
—
Reply to this email directly, view it on GitHubhttps://github.com/ertis-research/grafana-panel-unity/issues/1#issuecomment-2107266835, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIKKRE7UZX25SCH7ULXFE3DZCCMAHAVCNFSM6AAAAABHKIZVESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBXGI3DMOBTGU.
You are receiving this because you authored the thread.Message ID: @.***>

Hi Julia,
Hope you're well. We have been constantly trying to resolve this issue, but we are unable to. Please let us know if we are missing out somewhere. Also, it would be really helpful if you can spare some time to arrange a call so the issue can be resolved.
Thanks and Regards,
Yuktarth Trehan

From: Yuktarth Trehan @.>
Sent: Monday, May 13, 2024 5:07 PM
To: ertis-research/grafana-panel-unity @.>; ertis-research/grafana-panel-unity @.>
Cc: Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
Hi,
This is the error that is being displayed on the UI:
A
Status: 500. Message: Get "query?db=&epoch=ms&q=SELECT++FROM+%22%22+WHERE+time+%3E%3D+1715578572318ms+and+time+%3C%3D+1715600172318ms": unsupported protocol scheme ""

From: Julia Robles @.>
Sent: Monday, May 13, 2024 4:27 PM
To: ertis-research/grafana-panel-unity @.>
Cc: Yuktarth Trehan @.>; Author @.>
Subject: Re: [ertis-research/grafana-panel-unity] Unity Panel not working in Grafana (Issue #1)
How did you install Grafana? Helm? Docker? on which operating system? We just unzip the file in the plugins folder and add its identifier in the grafana.ini. In our platform you can see how we install it using an initContainerhttps://github.com/ertis-research/Helm-charts/blob/main/OpenTwins/values.yaml#L232.
Unity files are not collected by datasource yet. Right now you have to add it to the Grafana public folder inside the “unitybuild” directory (public/unitybuild). If the “unitybuild” folder does not exist, it must be created first. Here you have to add a folder with any name and the 4 files that Unity generates in WebGL (all must have the same name, even if they have different extensions). Then, in the panel configuration you have to put the name of the folder that contains the unity files and the name of the files.
For example, here the name of the folder would be "pivot" and of the files "pivot-3d":
image.png (view on web)https://github.com/ertis-research/grafana-panel-unity/assets/48439828/72641960-da8f-4ef2-b40d-eff9edb2feb3
image.png (view on web)https://github.com/ertis-research/grafana-panel-unity/assets/48439828/4454d6cd-8d4d-4180-856d-49511e5f489a
Anyway, your error seems to be an installation error, but I need more information about the environment and how you have installed it.
—
Reply to this email directly, view it on GitHubhttps://github.com/ertis-research/grafana-panel-unity/issues/1#issuecomment-2107266835, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIKKRE7UZX25SCH7ULXFE3DZCCMAHAVCNFSM6AAAAABHKIZVESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBXGI3DMOBTGU.
You are receiving this because you authored the thread.Message ID: @.***>


Add static api documentation page creation.

While the xml is built with ThreeLib, there is nothing to publish these to html.

Need to style this documentation so that it works with the jekyll site.


Allow little-endian for ST7789

I found that I can insert
{ST7789_DISPON, {0}, 0x80}, //existing line
#if LV_COLOR_16_SWAP == 0            // Test: enable little endian.
{ST7789_RAMCTRL, {0, 8}, 2}, // Test: enable little endian.
#endif                               //DL:  enable little endian.
{0, {0}, 0xff}, //existing line
to st7789_init_cmds in st7789.c
and now I can build with CONFIG_LV_COLOR_16_SWAP=n
and make LVGL code 500 bytes smaller and more efficient.
Note that ST7789VW doc says "Note: Little Endian only can be supported in 65K 8-bit and 9-bit interface.", so this trick may not work for everyone, but it seem to work for me (I am using SPI, of course).
Also, it will be nice to remove "static" from "static void st7789_send_cmd(uint8_t cmd)" and "static void st7789_send_data(void * data, uint16_t length)"
so I can experiment with register programming from my own code.
Thank you

Hi, I will try to add support for it and remove the static from the functions so you can add custom configuration, this weekend I might be free.

Yes
I added
#if LV_COLOR_16_SWAP==0
//CONFIG_LV_COLOR_16_SWAP=n is more efficient for little endian platforms
st7789_send_cmd(ST7789_RAMCTRL);
st7789_send_data( (uint8_t[]) {0, 8}, 2);
#endif
to guiTask in main.c
and it works OK for both
CONFIG_LV_COLOR_16_SWAP=n
and
CONFIG_LV_COLOR_16_SWAP=y
I recommend CONFIG_LV_COLOR_16_SWAP=n

code is smaller and more efficient.

Also, I suggest you add
#if LV_COLOR_16_SWAP == 0
{ST7789_RAMCTRL, {0, 8}, 2},
#endif
to st7789_init


Client Side Validation

There are a number of interactions we may wish to validate on client-side before sending to Starknet/Ethereum, and will likely become more important/complex as the multicall is developed.

[ ] Adequate resource balance before adding buildings, troops
[ ] Have grid space available for constructing building
[ ] Food resource management (both troops and storehouse construction)
[ ] Have attacking army before initiating raid
[ ] Defending Realm is not the same Orders

....

Good to point out that we need to keep in mind what transactions are queued in the TransactionQueueContext. For example, if a claim_resources (harvest) tx is added to the transaction queue, the wallet will have an adequate balance for transactions after that.

Attacking army cooldown is expired before raiding


TypeError: Object # has no method 'indexOf'

I've configured webcat but if I try and initiate a session with another user I get this error
/Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/index.js:24
  return key.indexOf('-----BEGIN ') > -1 ? key : sshKeyToPEM(key)
             ^
TypeError: Object #<Object> has no method 'indexOf'
    at toPEM (/Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/index.js:24:14)
    at Array.map (native)
    at signer (/Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/index.js:42:32)
    at /Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/index.js:95:20
    at identitiesAnswer (/Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/node_modules/ssh-agent/lib/ssh_agent_client.js:179:12)
    at Socket.<anonymous> (/Users/owen/.nvm/v0.10.36/lib/node_modules/webcat/node_modules/ghsign/node_modules/ssh-agent/lib/ssh_agent_client.js:279:12)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:765:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)

The only thing about my account that might be different is I have two factor auth on, but not sure if that's meaninful or not.

Just published a new version that might contain a fix for this, Could you try upgrading and trying again?

No exception any more, but is it possible it's now just silently failing? I can't actually get it to work with another user.

but awesome on the quick fix for the exception :+1: to that. :)

If you're up for it try connecting do someone again and run it with
DEBUG=* webcat {your-friend}

and post the output in this thread. That might help us figure out whats wrong :)

here's my end of the output
DEBUG=* webcat mejamiewilson
  webcat new instance +0ms mejamiewilson { _: [ 'mejamiewilson' ], username: 'buildmaster' }
  webcat signing message +8ms { type: 'syn', nounce: 0.39185924432240427 }
hello
  webcat received message +29s [ 'Dp52peGxEAbeJHftOKJZtDrG5eCdi2Ou6qznklqQPBoiyEfkItTASTbBy3YsVzQ02Jhzm+PASY/cCsW5TyfxK6OPbWulyYQ074WFx5k3sYqbCtp5z6yv4vUbWsDuyaot+BnNJoGxszRr65oJgQyKAKRKU1iqpPnXxN2bBEvf4EbYd0JCuDVskj9JUlO1ypw6Bi9vZeGtp+M8UYwd+CEd+XNQqGxICEIWdtvSrLTWellDk0wFb0nBYC/fW/G+aM7SpBJvgqTEVgzBSjBICxx1ML15UfAqxKvWm7AmUpqX3scDDDSdPF2VDx7zXcpvmBz+mWNK87oqD6AYgnEU4dUSFA==',
  '{"type":"syn","nounce":0.27673072554171085}' ]
  webcat verifying message +0ms [ 'Dp52peGxEAbeJHftOKJZtDrG5eCdi2Ou6qznklqQPBoiyEfkItTASTbBy3YsVzQ02Jhzm+PASY/cCsW5TyfxK6OPbWulyYQ074WFx5k3sYqbCtp5z6yv4vUbWsDuyaot+BnNJoGxszRr65oJgQyKAKRKU1iqpPnXxN2bBEvf4EbYd0JCuDVskj9JUlO1ypw6Bi9vZeGtp+M8UYwd+CEd+XNQqGxICEIWdtvSrLTWellDk0wFb0nBYC/fW/G+aM7SpBJvgqTEVgzBSjBICxx1ML15UfAqxKvWm7AmUpqX3scDDDSdPF2VDx7zXcpvmBz+mWNK87oqD6AYgnEU4dUSFA==',
  '{"type":"syn","nounce":0.27673072554171085}' ]
  webcat message verified? +2s null true
  webcat signing message +0ms { type: 'syn', nounce: 0.39185924432240427 }
hello
hi hi hi

the messages were what I was typing into the console, seems like one connect message or something and nothing after that. @mejamiewilson was sending me a number of messages

Hi all, this is what I got:
  webcat new instance +0ms buildmaster { _: [ 'buildmaster' ], username: 'mejamiewilson' }
  webcat signing message +8ms { type: 'syn', nounce: 0.12988391635008156 }
  webcat sendSyn +15ms [ 'Bj2zmcbSEhd6yu1o62RDi/m66SE+5EiycP6XWeQTeo8HQjmZYtQtVSeLbxTWsmz+T9yhuivP/OOjaq0bVc2kvQS/FeDz1ns7U8Rr2NKzxSjRPA3J3lgrHFkR1E8tE4RSYKNVYIZ4Snv60dz+YXqKYYocna8OCYEhekFY3l2Z9YTuD8d4xyrylnTM5LDg9o6W+8dNQ/tJmuLrbRCp28cUhz0P/QouNLPZObArq++YVm6rNLS2olZhvd/QBjPGHYE0WmDkKpMny8NK7UsxLDpI17FEsFFJ93GIZwBinJmMSaADrlktp21fkucN73MFXsGa7i090Q3nx/cyrfnt1DPq3Q==',
  '{"type":"syn","nounce":0.12988391635008156}' ]
asdf
asfd```


the name ApplyPlanningScene is defined multiple times ApplyPlanningScene must be defined only once in the type namespace of this modulerustcClick for full compiler diagnostic

Hi, I am using roslibrust to send data from a system that is having ROS install with moveit and gazebo. Following is the example I am following, however, I am getting the following error
the name `ApplyPlanningScene` is defined multiple times
`ApplyPlanningScene` must be defined only once in the type namespace of this modulerustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B1%5D?1#file%3A%2F%2F%2Fhome%2Fakumar%2FTargetArm_Project%2Ftargetarm%2Fmessage_broadcaster%2Fsrc%2Fmain.rs)
the name `ChangeControlDimensions` is defined multiple times
`ChangeControlDimensions` must be defined only once in the type namespace of this modulerustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B2%5D?2#file%3A%2F%2F%2Fhome%2Fakumar%2FTargetArm_Project%2Ftargetarm%2Fmessage_broadcaster%2Fsrc%2Fmain.rs)
the name `ChangeDriftDimensions` is defined multiple times
`ChangeDriftDimensions` must be defined only once in the type namespace of this modulerustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B3%5D?3#file%3A%2F%2F%2Fhome%2Fakumar%2FTargetArm_Project%2Ftargetarm%2Fmessage_broadcaster%2Fsrc%2Fmain.rs)

use log::*;
use roslibrust::ClientHandle;

roslibrust_codegen_macro::find_and_generate_ros_messages!("/opt/ros/noetic/share/std_msgs");

#[tokio::main(flavor = "multi_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    simple_logger::SimpleLogger::new()
        .with_level(log::LevelFilter::Debug)
        .without_timestamps() // required for running wsl2
        .init()
        .unwrap();

let client = ClientHandle::new("ws://localhost:9090").await?;
let publisher = client.advertise::<std_msgs::String>("talker").await?;
let val = "Hello World"; // sending example string to ros node working on another computer
loop {
    let msg = std_msgs::String {data: val.to_string()};
    info!("About to publish");
    publisher.publish(msg).await.unwrap();
    info!("Published msg...");
    tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
}

}

Hey @Akumar201 I've been working on some better logs for the code generation, although it requires using the runtime method. In order to debug this I need you to try out my open branch: git clone -b better-logs-for-duplicate-msgs https://github.com/Carter12s/roslibrust.git.
Then you can modify the paths under roslibrust/roslibrust_test/src/main.rs in the variable ROS_1_PATHS to be:
static ref ROS_1_PATHS: Vec<PathBuf> = vec!["/opt/ros/noetic/share/std_msgs".into()];

Finally, run with RUST_LOG=debug cargo run --bin roslibrust_test and you'll be able to see where the library is discovering packages, and if we've found any duplicates. This will help us narrow down the problem. We do look for duplicates currently, but somehow your environment is defeating the mechanism (we de-duplicate by package name).

Should be resolved by #81 next released version will contain fix, master branch can be used for now.


[Question] Enable an extractor at runtime for embedded youtube-dl

Checklist

[x] I'm asking a question
[x] I've looked through the README and FAQ for similar questions
[x] I've searched the bugtracker for similar questions including closed ones

Question
I use youtube-dl in one of my projects (moodle-dl). I can understand that with so many PR requests and so few team members, it can take a long time until an extractor gets merged.
I wonder if I can simply add extractors in an embedded youtube-dl instance externally?
For example, if I want to add the Extractor for zoom.us (https://github.com/ytdl-org/youtube-dl/pull/24751) at runtime, is that possible?

Read developer instructions.

If someone tries to do the same, I suppose it works like this:
ydl.add_info_extractor(YourExternalExtractor(ydl))

Nope, this does not work, because Generic Extractor will raise an error as soon as it is tested... Generic Extractor is last in the Extractor list so you have to add your external extractor before the generic one, like this:
    additional_extractors = [
        OpencastIE(ydl),
        OpencastPlaylistIE(ydl),
    ]

    for extractor in additional_extractors:
        ydl._ies.insert(0, extractor)
        ydl._ies_instances[extractor.ie_key()] = extractor


Mouse Scrolling - Run as administrator

Hello,
I have an issue with the scrolling functionality using the mouse wheel while running vs code as administrator.
Running version 1.73.0 on windows 11

I am able to scroll by dragging the scrollbar.
I am able to scroll with my laptop's touchpad.
Mouse wheel scroll works everywhere else than vs code.
Mouse wheel scroll also works on vs code when out of focus (for example If I click on windows taskbar and then hover vs code window, it will work. If I click on vs code window again, it stops working).
Running vs code without admin privileges will let me scroll with the mouse wheel.

Any ideas?

What make of mouse? Does it require its own driver?

What make of mouse? Does it require its own driver?

I am using Lenovo Y gaming precision mouse and yes it requires its own driver
This one: https://support.lenovo.com/us/en/solutions/acc100211-lenovo-y-gaming-precision-mouse-overview

Uninstalling mouse drivers would not fix the issue.

Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


fix azure pipeline

[x] figure out how to create DB dir & start cluster when running tests with conda
(essentially look into what pgtest does and copy that)
[ ] make the homebrew build with MacOS work

taken care of in #5 for github actions


SNOW-1653121: Support some Timedelta aggregations on axis=0.

Fixes SNOW-1653121
Test and support aggregation on axis=0. We still raise NotImplementedError if:

the aggregation requires concatenating a frame with timedelta types
the aggregation requires transposing a row containing a timedelta type and other types.

To facilitate this change, introduce the class SnowparkPandasAggFunc, which represents a Snowpark pandas aggregation, together with the bool preserves_snowpark_pandas_type. We can use SnowparkPandasAggFunc instead of the separate mappings GROUPBY_AGG_PRESERVES_SNOWPARK_PANDAS_TYPE and GROUPBY_AGG_WITH_NONE_SNOWPARK_PANDAS_TYPES.
This change also fixes the bug that timedelta aggregations like mean would produce the wrong type (and the wrong result) by truncating the float result if preserves_snowpark_pandas_type.

marking as draft till I fix SNOW-1654730


⚠ haccp has degraded performance

In 0a480b1, haccp (https://www.haccp.or.kr) experienced degraded performance:

HTTP code: 400
Response time: 5585 ms

Resolved: haccp performance has improved in 99dd6d7 after 11 minutes.


ERROR: Invalid requirement: 'pywin32~=304' (from line 1 of requirements.txt)

ERROR: Invalid requirement: 'pywin32~=304' (from line 1 of requirements.txt)
it is from BAT file, I assume it should work on windows then?

The project is a Windows project.
I started originally in Linux, then supported both Linux and Windows, but finally moved to support Windows only.
The reason was that the tools provided by most of the FPGA vendors support Windows and sometimes Linux Ubuntu (I had Linux Mint).
I still suspect that the performance in Linux is much better, e.g. I noticed 1 to 4ms delays in windows for file management, whereas in Linux that was much much faster!
Check here:
https://pypi.org/project/pywin32/  -> Environment: Win32


Allow specification of 2nd color

Right now you can specify the "on" color, but it always fades to the same "off" color: transparent. I would like to be able to specify the "off" color, so I can make a spinner that for instance fades from #ccc to #333, and will therefore be visible over a wide variety of backgrounds (without having to use a shadow).

Would also like to see this added to spin.js.

I was looking for this too.

Hm, a minOpacity setting would be much easier to implement than a second color. Would that work for you too?

Isn't the existing opacity option actually a minopacity?
No, it wouldn't do the trick in my case. I want to fade from opaque red to mostly transparent white. Having "active" and "inactive" colours would do it, if they can be specified in rgba format. Spin.js would just interpolate between the two, or leave that up to a CSS transition if practical.

You're right, the opacity setting already does exactly that. Unfortunately
the feature you're looking for can't be done in spin.js as one of our main
design goals is to deliver the same visual result, no matter if rendered
via VML or DIVs. The amount of code needed to interpolate rgba colors and
map them back to #rrggbb + opacity for VML would conflict with our second
goal: to have a file size not larger than an animated gif.
This would better fit into a project that offers a CSS-only solution. Such
a project could also offer to output static CSS/Sass code. Not sure if a
tool like this already exists – if you find one, please post the link here
so that we can refer to it whenever people ask for similar features.
Bart Nagel<EMAIL_ADDRESS>schrieb am Do., 1. Okt. 2015 um 08:55:

Isn't the existing opacity option actually a minopacity?
No, it wouldn't do the trick in my case. I want to fade from opaque red to
mostly transparent white. Having "active" and "inactive" colours would do
it, if they can be specified in rgba format. Spin.js would just interpolate
between the two, or leave that up to a CSS transition if practical.
—
Reply to this email directly or view it on GitHub
https://github.com/fgnass/spin.js/issues/30#issuecomment-144638017.

It is now possible to specify a fadeColor option in spin.js v3.1.0.
For example, using a fade color of "violet" with a light blue line color produces an effect like this:


Cannot convert undefined or null to object

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
4.45.2
What operating system are you using?
MacOS
Amplify Categories
Not applicable
Amplify Commands
push
Describe the bug
when amplify push this shown up:
Cannot convert undefined or null to object
An error occurred during the push operation: Cannot convert undefined or null to object

Is there any way to show the stack traces? The info above can't give me any useful hints to what happened there.
or if there is a way to push only one category at a time? so I can narrow down what's the category causes the error..
Expected behavior
x
Reproduction steps
x
GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line

Additional information
No response

Hi @akshbhu @jhockett , I was able to narrow down the issue to here
https://github.com/aws-amplify/amplify-cli/blob/856fdf7d226c8a6dc47a8e2278b13dd793fee22a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/getDependentFunction.ts#L27
where permissions is undefined in my environment, because the content of my function-parameters.json is like this
{}

I don't know if this is a bug or something.. could you guide me how to fix this?

Hey @yaquawa thanks for raising this and including the details! This is an issue we are actively tracking and have a PR open to fix!
I'll close this issue as a duplicate in favor of tracking https://github.com/aws-amplify/amplify-cli/issues/7466, and PR https://github.com/aws-amplify/amplify-cli/pull/7594


Bug with compareAttribute

What steps will reproduce the problem?
<?php

namespace app\models;

use yii\base\Model;

class Test extends Model
{
    public $a;
    public $b;

    public function rules()
    {
        return [
            [['a', 'b'], 'safe'],
            [['a'], 'compare', 'compareAttribute' => 'b'],
        ];
    }
}

<?php

use app\models\Test;
use yii\widgets\ActiveForm;

$model = new Test();

$form = ActiveForm::begin();
echo $form->field($model, 'a')->textInput();
echo $form->field($model, 'b')->textInput();
ActiveForm::end();

What is the expected result?
Error if fields not compare and no error if they are compare
What do you get instead?
Error anyway
Additional info

Q
A

Yii version
2.0.15

PHP version
7.2.7

Operating system

If you add some extra rules, like:
public function rules()
    {
        return [
            [['a', 'b'], 'safe'],
            [['a', 'b'], 'string'],
            [['a'], 'compare', 'compareAttribute' => 'b'],
        ];
    }

It's work fine

#15826

@mgrechanik okay, thank you :ok_hand:

check your issue with the current developer version

@mgrechanik I see your pull request and understand about bug fix in 2.0.16


Flutter support

Hi,
First, thanks a lot for these great tools!
I just wanted to share a set of custom transformers I did for my own needs with Flutter, which could be interesting to improve your official transformer package.
Everything is available here : style-dictionary-figma-flutter.
It basically outputs tokens as a Flutter theme widget with a few helpers.
I also added a custom-icon type to export vector paths from Figma too (I made a custom plugin that clones my icon frames, flattens them as a single path, and then exports it as json).

Hey @aloisdeniel,
this is great. Sadly the link seems to be broken.
Would you be willing to add it to this package? If you could send a PR with a build.js here:
https://github.com/lukasoppermann/design-token-transformer/tree/main/examples
Maybe /flutter/build.js
And the custom transformers in src/flutter? (https://github.com/lukasoppermann/design-token-transformer/tree/main/src)
If you have anything for the readme, that would also be interesting.

Oh sorry, I forgot to change the repository visibility. It should be accessible now!
I've followed the same logic/structure as the style-dictionary code base which is a bit different from this repository  (lodash template, ...). I'll see if I can adapt it to create a PR.

If you need any support, please let me know. 🙏

And what is your thought about adding icon vector tokens into Design Tokens as well?

@aloisdeniel this is definitely interesting. However I am currently not sure how this would best work. What is your approach here?

It is very specific to Flutter, but I'm outputting a path like that from json entries like this one.  It is lot more performant than SVG assets for example.
Theoretically, I could also do a similar generation from SVG assets, but SVG is so permissive that it is not possible. I find it great to have a design standard for glyphs like that.

While an interesting idea, I currently don't have time to look into this.


Add Maven

Adds Maven and Maven Wrapper, to allow:
./mvnw test

Feel free to delete gradle equivalent files +1

I was thinking about this after we tune the onboarding, like a follow-up step.


Iascable binary does not launch on M1

I have previously installed and used iascable on my Apple M1, although I have not updated it in quite some time, possibly before you started shipping arm specific binaries.
Today I installed the latest with command:
curl -sL https://iascable.cloudnativetoolkit.dev/install.sh | sh

or by downloading the latest release from:
https://github.com/cloud-native-toolkit/iascable/releases/download/2.24.0/iascable-macos-arm64
In both cases, launching iascable fails with error:
zsh: killed     ./iascable-macos-arm64

I have also tried launching in Finder, or launching in Finder with cmd+click to permit unsigned binaries.
Fortunately the x86 version works on M1 (presumably via Rosetta), but obviously this is not what the install.sh script will install.

@seansund after some testing with Brian, we believe the iascable-macos-arm64 is not a valid binary.
We were however successful with installing the latest arm iascable with npm install -g @cloudnativetoolkit/iascableble


Update Showcase to include light/dark toggle and ToggleButtonGroup for density

Vuu Showcase currently has a  ToggleButton that allows user to switch between No Theme, Salt theme and Vuu theme
Add additional components to toolbar to allow user to switch between light/dark mode and density


Target Users of the Format?

This ties back into the scope. Who do we expect to be consumers of our format?

IoT sources and destinations? (need accuracy and precision as well as geo-data)
The science community? (needs accuracy and precision, some may need historical timestamps [negative epochs] or future timestamps)
Financial trading systems? (probably not but?)
or just systems and application monitoring? (can get away will low precision and accuracy for the most part)

I expect the primary users to be systems and applications monitoring. If others find it useful that's great, but they're not the target audience.

There's overlap, but it's the bits that don't overlap that would concern me. Particularly for scientific usage.

No limit on target audience; put something about roots in pre-amble


Add NNJR, a resume template

Repo URL:
https://github.com/tzx/NNJR
Wanted to add my newly created resume template :). Takes heavy inspiration from Jake's Resume, which is pretty popular.

Thanks for the awesome contribution @tzx !


Treat errors unmarshaling from cache as cache miss

Prior to this patch any error unmarshaling from the cache would cause
the request to fail until the item dropped out of cache. This change
simply treats a bad entry as a miss, so it will re-fetch from origin
Fixes #39

Thanks for fixing this!
Will test it asap


[PERF]: speed up get_target_block_id()

Description of changes
Fixes get_target_block_id() to run in O(log n) instead of O(n). Shaves around 2.6s off total compaction time for 26k documents.
get-target-block-id.trace.zip
Test plan
How are these changes tested?
Covered by existing tests.
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
n/a

nice, good change. @sanketkedia can you TAL as well?


Module: Rancher rke2 vsphere cluster

Module Repository
https://github.com/aditya-tanwar/terraform-rancher2-rke2-vsphere-cluster
DCO

[X] I sign this project's DCO

This is a rancher module to create and deploy / manage ( autoscaling ) rke2 rancher cluster on vsphere platform.

Please ignore the issues created before this .

Handled by #650 . Thanks for your submission!


Add a simple cache of computed styles

Tests incoming

We set it up once at the start and that's it. In the future I'm not sure if we will do that exactly i.e. if we add dark mode support

@deanWombourne we had some issues in the app where a list with several styled components was dropping frames while scrolling. Happy to add debugging metrics but not sure what exactly you want to measure?

I was just thinking an average time to find a match, things like that. Just so you could easily see if/where slowdowns were occurring. Nor in this pr, but maybe add as an issue?
Anyway, if you've profiled it in your app and identified this is slow, and this fix fixes it then I'm happy 👍
And if you don't dynamically add styles, let's not optimise for that. If this becomes a slowdown when you add dark mode then we can fix it then :)

Oh, just thought, do we care how big this cache gets?

@deanWombourne we're still dropping some frames, but profiler shows much less 👍
This is a profiler screen from before this change while scrolling:

And this is after (notice I scrolled twice as long this time):

In the above, count is the number of times a body of a view was called, and the Total Duration is the number of seconds the app spent on those bodies. It's about 90% more efficient (if I've not made any mistakes measuring).
Next step is to somehow try to remove the double-executing in the body of Stylable if you have any ideas on how to tackle that :)

re size of the cache - I haven't measured but I don't think it'll be a problem. I'll take a look at measuring 100s and 1000s of styles and see what comes up in the profiler. Any ideas for a test to measure that?


docs: Fixes broken link on the hall of fame section of the  readme

On the readme, there is a broken link to Adam Korcz's GitHub address. There is a / missing on the URL.
This PR fixes it. 😄

@laurentsimon 👍 alright, it should be done


Try-catch errors with misspelling in SQL

@mathiasrw Check it out. You can fork it to see the error messages.
The server breaks when there's no such function. Ideally it should be caught by the try block.
<EMAIL_ADDRESS>

maybe we should add some try catch here?

I used a proxy now to hack it. But there will be concurrency issues later.
        // TODO: concurrency issue here when multiple requests?
        alasql.fn = new Proxy(originalAlasqlFn, {
          get(target, name, receiver) {
            try {
              if (Reflect.has(target, name)) {
                return Reflect.get(target, name, receiver);
              } else {
                throw new Error(
                  "Function " + name.toString() + " not implemented."
                );
              }
              return "missing";
            } catch (e) {
              reject(e);
            }
          },
        });

Hmm. I cant replicate this. Any chance you can make a jsfiddle with it? https://jsfiddle.net/8brvex4f/
I dont understand where use median - and what is wrongFuncName(email_domain)?

Bonus info
Alasql is async and returns a promise if you call alasql.async or if you put the first argument in an array, or if you engage with a file like CSV or excel. So instead of the function in the second parameter you can do something like
app.use(async ctx => {
  ctx.body = 'Hello World';
  const { columns, data: objects } = await alasql.promise("SELECT RECORDSET wrongFuncName(`email_domain`) FROM CSV('some.csv') AS `temp`")
  });
});

Might be related to https://github.com/AlaSQL/alasql/issues/1491 - try v2.1.5 and see if that helps

Ahhhhhh

Hi, Seems like issue is not yet resolved. Can you assign it to me?

I found a way to catch the error and due to this, the server will not go down. But I am unable to return the error through the callback function. As "cb" is not available in the scope of the function. Any ideas ??

What function does not have the callback avaliable?

yy.Select.prototype.compileSelect2 This Function. Where the error is actually occurring

Fix released as part of v4.1.5


Add a coverage tests for MsgNoBlock and in-flight stats

The only remaining part of #1116 is to check that the tests involve MsgNoBlock.  Quickcheck's cover can fit this purpose quite nicely.

I think the ideas was to check for this in the ouroboros-consensus:test:test-consensus suite.


Create SECURITY.md

Seems like a good idea to add, but don't think this template is worth merging in its current state.


Fix IsRarFile() StreamingMode

IsRarFile() no longer assumes seekable stream. This caused IsRarFile()
to break RewindableStreams when testing certain files, causing
ReaderFactory to fail to open certain tars.
Fixes https://github.com/adamhathcock/sharpcompress/issues/130

Problem with decompression winrar5.5 in c#. Please  suggest us any solution for this.


[path_provider] Path provider windows updates

Description

Adds missing iOS podspec to path_provider_windows, which was necessary to publish it (since path_provider doesn't require 1.20+)
Requires path_provider_windows 0.0.2, not 0.0.1, in path_provider endorsement.

Related Issues
flutter/flutter#41715
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

Added a version bump since the repo tooling requires it. (The previous version wasn't published, but it was checked in, and that's enough apparently.)


feat: CachedRedisStorage will now default to flushing a batch ASAP to…

… reduce the length of time the cache is out of sync with Redis counters.
Setting a flushing_period is still supported to have a delay before flushing which can be useful to reduce the load on the Redis server in exchange for having staler counters in limitador.

yep not need any more.


segfault when iterating over a vec with python 2.7

shortest script to reproduce the problem:
import glm

while True:
    for _ in glm.vec4(1.0):
        pass

This fragment of code segfault after a few iteration with python 2.7, backtrace is:
#0  0x00007f8b342d59c0 in PyCode_Type () from /usr/lib64/libpython2.7.so.1.0
#1  0x00007f8b3405dedf in ?? () from /usr/lib64/libpython2.7.so.1.0
#2  0x00007f8b33fcb3d6 in ?? () from /usr/lib64/libpython2.7.so.1.0
#3  0x00007f8b3405e187 in ?? () from /usr/lib64/libpython2.7.so.1.0
#4  0x00007f8b3405f0db in _PyObject_GC_Malloc ()
   from /usr/lib64/libpython2.7.so.1.0
#5  0x00007f8b3405f176 in _PyObject_GC_NewVar ()
   from /usr/lib64/libpython2.7.so.1.0
#6  0x00007f8b33fcbc6f in PyTuple_New () from /usr/lib64/libpython2.7.so.1.0
#7  0x00007f8b34041bde in ?? () from /usr/lib64/libpython2.7.so.1.0
#8  0x00007f8b3404107f in ?? () from /usr/lib64/libpython2.7.so.1.0
#9  0x00007f8b340420f7 in Py_BuildValue () from /usr/lib64/libpython2.7.so.1.0
#10 0x00007f8b2f308ac9 in tvec4_geniter (self=<optimized out>)
    at type_vec4.h:986
#11 0x00007f8b33f6a1fe in PyObject_GetIter ()
   from /usr/lib64/libpython2.7.so.1.0
#12 0x00007f8b340195cf in PyEval_EvalFrameEx ()
   from /usr/lib64/libpython2.7.so.1.0
#13 0x00007f8b34021d4c in PyEval_EvalCodeEx ()
   from /usr/lib64/libpython2.7.so.1.0
#14 0x00007f8b34021e69 in PyEval_EvalCode ()
   from /usr/lib64/libpython2.7.so.1.0
#15 0x00007f8b3404601a in PyRun_FileExFlags ()
   from /usr/lib64/libpython2.7.so.1.0
#16 0x00007f8b340473a7 in PyRun_SimpleFileExFlags ()
   from /usr/lib64/libpython2.7.so.1.0
#17 0x00007f8b3405d89e in Py_Main () from /usr/lib64/libpython2.7.so.1.0
#18 0x00007f8b3323e7d0 in __libc_start_main () from /lib64/libc.so.6
#19 0x0000000000400779 in _start ()

with python3 I only see a rare segfault when killing the script with Ctrl-C, the backtrace is:
#0  0x00006465736f6c63 in ?? ()
#1  0x00007fa222f3339f in ?? () from /usr/lib64/libpython3.6m.so.1.0
#2  0x00007fa222e625b6 in ?? () from /usr/lib64/libpython3.6m.so.1.0
#3  0x00007fa222f32707 in ?? () from /usr/lib64/libpython3.6m.so.1.0
#4  0x00007fa222f33769 in PyGC_Collect () from /usr/lib64/libpython3.6m.so.1.0
#5  0x00007fa222f10643 in Py_FinalizeEx () from /usr/lib64/libpython3.6m.so.1.0
#6  0x00007fa222f31663 in Py_Main () from /usr/lib64/libpython3.6m.so.1.0
#7  0x0000000000400b92 in main ()

A part of the python 2.7 backtrace is not reliable, sometime the bt does not contains tvec4_geniter nor any glm function but near the top of the bt there is always some python runtime call related to memory alloc/dealloc or garbage collection. Look like the vec4 iterator interface mess up the python memory allocator.

See also issue https://github.com/Zuzu-Typ/PyGLM/issues/6 as with python3 this simple script leak very quickly.

Thanks for your report!
The reason for this memory leak are a few non-Py_DECREF-d tuples.
I'll release a fix very soon.


Polish Airplane model

Output

in the preview there was no figure shown.

Yes, I just saw that as well. I fixed it already. I will address the comments soon.


split s3 static configuration and dynamic configuration

What problem are we solving?
If the s3 server is using a static configuration, then give an error message when the weed administrator tries to execute s3.configure in the weed shell.
How are we solving the problem?
In the static configure situation, where the s3 server is started with the command weed s3 -config=config.json, the server writes the content of config.json to /etc/iam/static.conf. The s3.configure command will check if the /etc/iam/static.conf is existed. If the file does exist, which shows that it's a static configure situation, the proper error message is printed. Otherwise, the s3.configure will be executed correctly.
In the dynamic configure situation, the s3 server tries to remove /etc/iam/static.conf when it starts so that the s3.configure could do its job.
Checks

[√] I have added unit tests if possible.
[√] I will add related wiki document changes and link to this PR after merging.

Creating static.conf is not a good idea. What if there are multiple S3 instances? The static configurations could even be different.

OK, you are right. Could you give some hint about this problem?

No quick solution here.


Roadmap for a stable release which includes #334, #346

We would like to publish a release version of a package which has a dependency on NerdBank.Streams to NuGet.
But, our package currently depends on the features implemented in #334 and #346 (and to a lesser extent, #345).
The only version of NerdBank.Streams which includes these fixes is 2.8.22-alpha (which, by the way, is missing a tag in GitHub 😄). But non-preprelease NuGet packages cannot depend on prerelease NuGet packages, so this is preventing us from publishing our package to NuGet as a released version.
As it stands, I see these options:

We copy the relevant parts of NerdBank.Streams to our codebase (doable, but I'd really like to avoid this, if possible)
#334, #346 and possibly #345 are backported to the 2.7 branch (happy to open a PR for this)
There's a stable release of 2.8 (which I assume is not planned for the immediate future)

So any chance 2 or 3 could happen? Happy to assist where needed.

We can make 3 happen.

And I published the release notes for the last couple of nuget.org releases that were missing. Thanks for calling my attention to that.

Watch for 2.8.46 to show up on nuget.org within the hour.


About the issue of loading dicom files

What feature or change would you like to see made?
Now we can only double-click the left thumbnail to load the right file, which is not good for physical examination. When there are many images, double clicking can load them, which can affect usage. Is there any configuration? After the first thumbnail is loaded, it can be automatically loaded backwards until all the loading is completed
Why should we prioritize this feature?
Now we can only double-click the left thumbnail to load the right file, which is not good for physical examination. When there are many images, double clicking can load them, which can affect usage. Is there any configuration? After the first thumbnail is loaded, it can be automatically loaded backwards until all the loading is completed

We are working on background caching here; I will close this issue.
https://github.com/OHIF/Viewers/issues/3363

 Which version is expected to solve my problem？
------------------ 原始邮件 ------------------
发件人:                                                                                "OHIF/Viewers"                                                                                @.>;
发送时间: 2024年5月24日(星期五) 晚上10:21
@.>;
<EMAIL_ADDRESS>主题: Re: [OHIF/Viewers] About the issue of loading dicom files (Issue #4166)
Closed #4166 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

follow 3363 please

Hello, using the example on our website, a sequence of over 200 images, clicking on the MPR will cause the browser to freeze and black screen. Is there a good solution for this

------------------ 原始邮件 ------------------
发件人:                                                                                "OHIF/Viewers"                                                                                @.>;
发送时间: 2024年5月27日(星期一) 晚上11:17
@.>;
<EMAIL_ADDRESS>主题: Re: [OHIF/Viewers] About the issue of loading dicom files (Issue #4166)
follow 3363 please
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Why does it take so long to download the orthanc dicom service directly configured on my local computer

------------------ 原始邮件 ------------------
发件人:                                                                                "OHIF/Viewers"                                                                                @.>;
发送时间: 2024年5月27日(星期一) 晚上11:17
@.>;
<EMAIL_ADDRESS>主题: Re: [OHIF/Viewers] About the issue of loading dicom files (Issue #4166)
follow 3363 please
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Yolo v5 support

Hi,
I've been trying to enable object detection on flutter using a custom trained yolov5n model. I have been using the https://pub.dev/packages/flutter_vision package. It currently has support only for android, not sure when (if ever) iOS support will be added for it. Anyhow, the inference was painfully slow and not really usable for my use case. I have been trying to integrate my app with the flutter-tflite library directly, however I am having issues with setting up the output tensors I think. I have been trying to tweak the 'live_object_detection_ssd_mobilenet' example to get it work with my model but it doesn't work. I understand that this is because both models are very different, I just wish there was an example with YOLOv5 so I'd know how to do it.

This is the netron properties info of my model, can anyone guide me on how to get this working? If there is an example, I could follow that as well.
Also, will the inference time be fast enough as well?
I went through several threads and pages online before posting that issue so as to not waste anyone's time. Hope I can finally put these struggles behind me now.
Thanks!
I'm also attaching the snippet from the example where inference happens for reference.
// Copyright 2023 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:io';
import 'dart:isolate';

import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:image/image.dart' as image_lib;
import 'package:gods_eye/models/recognition.dart';
import 'package:gods_eye/utils/image_utils.dart';
import 'package:tflite_flutter/tflite_flutter.dart';

///////////////////////////////////////////////////////////////////////////////
// **WARNING:** This is not production code and is only intended to be used for
// demonstration purposes.
//
// The following Detector example works by spawning a background isolate and
// communicating with it over Dart's SendPort API. It is presented below as a
// demonstration of the feature "Background Isolate Channels" and shows using
// plugins from a background isolate. The [Detector] operates on the root
// isolate and the [_DetectorServer] operates on a background isolate.
//
// Here is an example of the protocol they use to communicate:
//
//  _________________                         ________________________
//  [:Detector]                               [:_DetectorServer]
//  -----------------                         ------------------------
//         |                                              |
//         |<---------------(init)------------------------|
//         |----------------(init)----------------------->|
//         |<---------------(ready)---------------------->|
//         |                                              |
//         |----------------(detect)--------------------->|
//         |<---------------(busy)------------------------|
//         |<---------------(result)----------------------|
//         |                 . . .                        |
//         |----------------(detect)--------------------->|
//         |<---------------(busy)------------------------|
//         |<---------------(result)----------------------|
//
///////////////////////////////////////////////////////////////////////////////

/// All the command codes that can be sent and received between [Detector] and
/// [_DetectorServer].
enum _Codes {
  init,
  busy,
  ready,
  detect,
  result,
}

/// A command sent between [Detector] and [_DetectorServer].
class _Command {
  const _Command(this.code, {this.args});

  final _Codes code;
  final List<Object>? args;
}

/// A Simple Detector that handles object detection via Service
///
/// All the heavy operations like pre-processing, detection, ets,
/// are executed in a background isolate.
/// This class just sends and receives messages to the isolate.
class Detector {
  // static const String _modelPath = 'assets/models/ssd_mobilenet.tflite';
  // static const String _labelPath = 'assets/models/labelmap.txt';
  static const String _modelPath = 'assets/models/yolov5n.tflite';
  static const String _labelPath = 'assets/models/yolov5n_labels.txt';

  Detector._(this._isolate, this._interpreter, this._labels);

  final Isolate _isolate;
  late final Interpreter _interpreter;
  late final List<String> _labels;

  // To be used by detector (from UI) to send message to our Service ReceivePort
  late final SendPort _sendPort;

  bool _isReady = false;

  // // Similarly, StreamControllers are stored in a queue so they can be handled
  // // asynchronously and serially.
  final StreamController<Map<String, dynamic>> resultsStream =
      StreamController<Map<String, dynamic>>();

  /// Open the database at [path] and launch the server on a background isolate..
  static Future<Detector> start() async {
    final ReceivePort receivePort = ReceivePort();
    // sendPort - To be used by service Isolate to send message to our ReceiverPort
    final Isolate isolate =
        await Isolate.spawn(_DetectorServer._run, receivePort.sendPort);

    final Detector result = Detector._(
      isolate,
      await _loadModel(),
      await _loadLabels(),
    );
    receivePort.listen((message) {
      result._handleCommand(message as _Command);
    });
    return result;
  }

  static Future<Interpreter> _loadModel() async {
    final interpreterOptions = InterpreterOptions();

    // Use XNNPACK Delegate
    if (Platform.isAndroid) {
      interpreterOptions.addDelegate(XNNPackDelegate());
    }

    return Interpreter.fromAsset(
      _modelPath,
      options: interpreterOptions..threads = 4,
    );
  }

  static Future<List<String>> _loadLabels() async {
    return (await rootBundle.loadString(_labelPath)).split('\n');
  }

  /// Starts CameraImage processing
  void processFrame(CameraImage cameraImage) {
    if (_isReady) {
      _sendPort.send(_Command(_Codes.detect, args: [cameraImage]));
    }
  }

  /// Handler invoked when a message is received from the port communicating
  /// with the database server.
  void _handleCommand(_Command command) {
    switch (command.code) {
      case _Codes.init:
        _sendPort = command.args?[0] as SendPort;
        // ----------------------------------------------------------------------
        // Before using platform channels and plugins from background isolates we
        // need to register it with its root isolate. This is achieved by
        // acquiring a [RootIsolateToken] which the background isolate uses to
        // invoke [BackgroundIsolateBinaryMessenger.ensureInitialized].
        // ----------------------------------------------------------------------
        RootIsolateToken rootIsolateToken = RootIsolateToken.instance!;
        _sendPort.send(_Command(_Codes.init, args: [
          rootIsolateToken,
          _interpreter.address,
          _labels,
        ]));
      case _Codes.ready:
        _isReady = true;
      case _Codes.busy:
        _isReady = false;
      case _Codes.result:
        _isReady = true;
        resultsStream.add(command.args?[0] as Map<String, dynamic>);
      default:
        debugPrint('Detector unrecognized command: ${command.code}');
    }
  }

  /// Kills the background isolate and its detector server.
  void stop() {
    _isolate.kill();
  }
}

/// The portion of the [Detector] that runs on the background isolate.
///
/// This is where we use the new feature Background Isolate Channels, which
/// allows us to use plugins from background isolates.
class _DetectorServer {
  /// Input size of image (height = width = 300)
  static const int mlModelInputSize = 300;

  /// Result confidence threshold
  static const double confidence = 0.5;
  Interpreter? _interpreter;
  List<String>? _labels;

  _DetectorServer(this._sendPort);

  final SendPort _sendPort;

  // ----------------------------------------------------------------------
  // Here the plugin is used from the background isolate.
  // ----------------------------------------------------------------------

  /// The main entrypoint for the background isolate sent to [Isolate.spawn].
  static void _run(SendPort sendPort) {
    ReceivePort receivePort = ReceivePort();
    final _DetectorServer server = _DetectorServer(sendPort);
    receivePort.listen((message) async {
      final _Command command = message as _Command;
      await server._handleCommand(command);
    });
    // receivePort.sendPort - used by UI isolate to send commands to the service receiverPort
    sendPort.send(_Command(_Codes.init, args: [receivePort.sendPort]));
  }

  /// Handle the [command] received from the [ReceivePort].
  Future<void> _handleCommand(_Command command) async {
    switch (command.code) {
      case _Codes.init:
        // ----------------------------------------------------------------------
        // The [RootIsolateToken] is required for
        // [BackgroundIsolateBinaryMessenger.ensureInitialized] and must be
        // obtained on the root isolate and passed into the background isolate via
        // a [SendPort].
        // ----------------------------------------------------------------------
        RootIsolateToken rootIsolateToken =
            command.args?[0] as RootIsolateToken;
        // ----------------------------------------------------------------------
        // [BackgroundIsolateBinaryMessenger.ensureInitialized] for each
        // background isolate that will use plugins. This sets up the
        // [BinaryMessenger] that the Platform Channels will communicate with on
        // the background isolate.
        // ----------------------------------------------------------------------
        BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken);
        _interpreter = Interpreter.fromAddress(command.args?[1] as int);
        _labels = command.args?[2] as List<String>;
        _sendPort.send(const _Command(_Codes.ready));
      case _Codes.detect:
        _sendPort.send(const _Command(_Codes.busy));
        _convertCameraImage(command.args?[0] as CameraImage);
      default:
        debugPrint('_DetectorService unrecognized command ${command.code}');
    }
  }

  void _convertCameraImage(CameraImage cameraImage) {
    var preConversionTime = DateTime.now().millisecondsSinceEpoch;

    convertCameraImageToImage(cameraImage).then((image) {
      if (image != null) {
        if (Platform.isAndroid) {
          image = image_lib.copyRotate(image, angle: 90);
        }

        final results = analyseImage(image, preConversionTime);
        _sendPort.send(_Command(_Codes.result, args: [results]));
      }
    });
  }

  Map<String, dynamic> analyseImage(
      image_lib.Image? image, int preConversionTime) {
    var conversionElapsedTime =
        DateTime.now().millisecondsSinceEpoch - preConversionTime;

    var preProcessStart = DateTime.now().millisecondsSinceEpoch;

    /// Pre-process the image
    /// Resizing image for model [300, 300]
    final imageInput = image_lib.copyResize(
      image!,
      width: mlModelInputSize,
      height: mlModelInputSize,
    );

    // Creating matrix representation, [300, 300, 3]
    final imageMatrix = List.generate(
      imageInput.height,
      (y) => List.generate(
        imageInput.width,
        (x) {
          final pixel = imageInput.getPixel(x, y);
          return [pixel.r, pixel.g, pixel.b];
        },
      ),
    );

    var preProcessElapsedTime =
        DateTime.now().millisecondsSinceEpoch - preProcessStart;

    var inferenceTimeStart = DateTime.now().millisecondsSinceEpoch;

    final output = _runInference(imageMatrix);

    // Location
    final locationsRaw = output.first.first as List<List<double>>;

    final List<Rect> locations = locationsRaw
        .map((list) => list.map((value) => (value * mlModelInputSize)).toList())
        .map((rect) => Rect.fromLTRB(rect[1], rect[0], rect[3], rect[2]))
        .toList();

    // Classes
    final classesRaw = output.elementAt(1).first as List<double>;
    final classes = classesRaw.map((value) => value.toInt()).toList();

    // Scores
    final scores = output.elementAt(2).first as List<double>;

    // Number of detections
    final numberOfDetectionsRaw = output.last.first as double;
    final numberOfDetections = numberOfDetectionsRaw.toInt();

    final List<String> classification = [];
    for (var i = 0; i < numberOfDetections; i++) {
      classification.add(_labels![classes[i]]);
    }

    /// Generate recognitions
    List<Recognition> recognitions = [];
    for (int i = 0; i < numberOfDetections; i++) {
      // Prediction score
      var score = scores[i];
      // Label string
      var label = classification[i];

      if (score > confidence) {
        recognitions.add(
          Recognition(i, label, score, locations[i]),
        );
      }
    }

    var inferenceElapsedTime =
        DateTime.now().millisecondsSinceEpoch - inferenceTimeStart;

    var totalElapsedTime =
        DateTime.now().millisecondsSinceEpoch - preConversionTime;

    return {
      "recognitions": recognitions,
      "stats": <String, String>{
        'Conversion time:': conversionElapsedTime.toString(),
        'Pre-processing time:': preProcessElapsedTime.toString(),
        'Inference time:': inferenceElapsedTime.toString(),
        'Total prediction time:': totalElapsedTime.toString(),
        'Frame': '${image.width} X ${image.height}',
      },
    };
  }

  /// Object detection main function
  List<List<Object>> _runInference(
    List<List<List<num>>> imageMatrix,
  ) {
    // // Set input tensor [1, 300, 300, 3]
    // Set input tensor [1, 640, 640, 3]
    final input = [imageMatrix];

    // Set output tensor
    // Locations: [1, 10, 4]
    // Classes: [1, 10],
    // Scores: [1, 10],
    // Number of detections: [1]
    final output = {
      0: [List<List<num>>.filled(10, List<num>.filled(4, 0))],
      1: [List<num>.filled(10, 0)],
      2: [List<num>.filled(10, 0)],
      3: [0.0],
    };

    _interpreter!.runForMultipleInputs([input], output);
    return output.values.toList();
  }
}

As part of this, I got it working. I modified the tensors and it works, but the inference time is extremely slow.
I tried exporting my yolov5 model to tflite using non-maximum suppression. However, on starting up the interpreter then I get this error:
Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter.
I'm not sure what to update, how to update and where all. The documentation step has quite a few steps which are confusing me. Can anyone help?

For faster tensor operation on images you can use this library. Its discontinued but still works(just fork it in your personal github) with images 3.0.0.
I have done a speed comparison here https://github.com/tensorflow/flutter-tflite/issues/171 which shows almost 8X speed up on CPU(could be higher on GPU)
Regarding your second question, this happens when you go from torch to onnx to tflite. I am not sure why, but some operations become unsupported while converting.
So please find a tensorflow model, convert it to tflite and use it, you shouldn't face this issue.

For faster tensor operation on images you can use this library. Its discontinued but still works(just fork it in your personal github) with images 3.0.0.
I have done a speed comparison here https://github.com/tensorflow/flutter-tflite/issues/171 which shows almost 8X speed up on CPU(could be higher on GPU)
Regarding your second question, this happens when you go from torch to onnx to tflite. I am not sure why, but some operations become unsupported while converting.
So please find a tensorflow model, convert it to tflite and use it, you shouldn't face this issue.

Thanks for the reply @saurabhkumar8112 . Since MediaPipe might take a while I think this might be my best shot. Have to see how that goes! Any idea how to have these inferences make use of the GPU? Does it use the GPU by default?

@mp051998 Thinking of what you mentioned, I recognized a same issue was mentioned in #167. To be honest, try another model that can be converted to tflite. If you still want to use the same model, would you mind trying to containerize the model and then deploy it to the app in another way instead of using tflite and flutter-tflite?

Can you give my your code work?

I ditched YOLO altogether. After months of trying to make YOLO work (and how their licensing for even v5 is a pain), I decided to switch to SSD. SSD works much better, it's a lot faster as well. Accuracy might take a hit, but training a better model and employing multiple levels of inference can help.
Also, just wanted to add this for more context:
The YOLO inference would take ~5+ seconds sometimes, while the SSD one would take an avg of 100-200ms.