CSS Modules - composed styles are duplicated

Describe the bug
Importing a css module that's been composed ends up duplicating styles.
In the reproduction linked below, our App.tsx has 2 div elements with texts that have different styles. The styles are under the styles folder. The first text is styled using originalText style from original.module.css, and should have a 32px font size. The second one should have a 14px font size, since it's styled using smallText from small.module.css, which composes originalText and then overrides the font size. However, it doesn't work as expected.
The originalText style from original.module.css is imported first, then smallText style is imported, then the originalText style is imported once again, overriding the font size provided by smallText.
You can see this in action if you inspect the div element in dev tools and check out the styles applied.
Reproduction
https://codesandbox.io/s/vite-react-ts-forked-dy91of?file=/src/App.tsx
System Info
System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
    Memory: 127.45 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.2 - /usr/local/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Chrome: 99.0.4844.83
    Firefox: 97.0.1
    Safari: 15.3
  npmPackages:
    @vitejs/plugin-react: ^1.2.0 => 1.2.0
    vite: ^2.8.6 => 2.8.6

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I'm not particularly familiar with CSS Modules, but it works fine when you change their import order.
import originalStyles from './styles/original.module.css';
import smallStyles from './styles/small.module.css'; // import later for higher priority

I'm not particularly familiar with CSS Modules, but it works fine when you change their import order.
import originalStyles from './styles/original.module.css';
import smallStyles from './styles/small.module.css'; // import later for higher priority

I'm not particularly familiar with CSS Modules, but it works fine when you change their import order.
import originalStyles from './styles/original.module.css';
import smallStyles from './styles/small.module.css'; // import later for higher priority

In this small example it does have a workaround. But when I'm composing classes across many different css modules in my actual project, I have no way of controlling the import order myself. That's entirely in vite territory.

@desmond-tuiyot You are right, I tested it in the webpack project with no problems

I also have the same problem

css-modules indicates that the order is not granted when composing from multiple files. So maybe the best practice is to split the properties into different files. https://github.com/css-modules/css-modules#composing-from-other-files

Note that when composing multiple classes from different files the order of appliance is undefined. Make sure to not define different values for the same property in multiple class names from different files when they are composed in a single class.

css-modules indicates that the order is not granted when composing from multiple files. So maybe the best practice is to split the properties into different files. https://github.com/css-modules/css-modules#composing-from-other-files

I think that that disclaimer applies to situations when you're composing multiple classes into one style rule. For example
 a {
    composes: b from './b.module.css';
    composes: c from './c.module.css';
  }
}

My case is different. And also in my actual project, I'm not importing 2 different css module into one file. This example is set up that way for simplicity

I think this problem cannot be solved with Vite due to the architecture.
Vite processes each css import individually.

original.module.css will include .originalText
small.module.css will include .originalText and .smallText

To dedupe .originalText, it will need to process all css files at once because it needs to know depency graph.
One way it may solve this is to rewrite composes into a import with JS. But I feel this is no longer "CSSModules".

FYI, https://github.com/madyankin/postcss-modules/issues/32

In https://github.com/vitejs/vite/issues/5185, I reported an ordering issue that @sapphi-red rightfully identified as a consequence of this duplication issue.
In my case, I was looking at a compiled CSS output, which did not have duplicated styles. I assume this is because cssnano removes the duplicated styles at build time?
If so, then my ordering issue was most likely caused by cssnano keeping only the last occurrence of a duplicated style. Am I wrong in thinking that by keeping only the first occurrence, the issue would be resolved for the most part? This solution probably has edge cases, but it could be a decent way forward.
If the deduplication behaviour cannot be changed in cssnano, could it be done by a dedicated Vite plugin? Maybe this plugin could even work in development to remove duplicated styles dynamically?

Ah, I noticed there's two issues around this one.
The first one is the duplication issue. This cannot be solved as I described https://github.com/vitejs/vite/issues/7504#issuecomment-1106675158.
The second one is the ordering issue. I noticed this can be solved by leaving the duplication issue. By including the output filename in hash calculation (or changing the meaning of filename argument of generateScopedName), I guess this can be solved. But this will be a breaking change so it won't be possible to include until next major.

In my case, I was looking at a compiled CSS output, which did not have duplicated styles. I assume this is because cssnano removes the duplicated styles at build time?

Yes, this should be because cssnano (or other css minifier) is removing the duplicated ones.

Am I wrong in thinking that by keeping only the first occurrence, the issue would be resolved for the most part?

This is not correct and will cause other issues (and maybe this ordering issue will also happen).

I stumbled upon both these issues as soon as I implemented second route/page of the first app where I use these features. I am very surprised this issue isn't reported way more often.
For posterity: the solution to ordering issue is to change architecture of your css modules to never overwrite css properties declared on the base class. You should only build upon base class with new/unique properties but never overwrite. For complex cases you will have a tree of classes where only leaf nodes are actually used as classNames for HTML elements (you will also have plenty of mixins). Of course this only applies if you compose from other files - in the context of one file you can do whatever you want.
It feels to me that this is just a trait of CSS Modules in their current form and can not be fixed. To depend on ordering of CSS declarations feels fragile and prone to being mishandled by post processing plugins.

To dedupe .originalText, it will need to process all css files at once because it needs to know depency graph.

Is this hard to do with Vite plugins architecture? I think Vite can be very awesome in this field.

I think this issue should be fixable without processing all CSS files at once.
The problem here is that when a CSS Module is imported and it has a composes, Vite outputs all CSS to a single style element. This is the bug. Vite should output multiple style elements, one for each module. And, if a module of the same name has already been injected then simply do not output it again. After this there would be no more duplication of selectors.
I would like to see this fixed since I'm moving to Storybook 7 with Vite. This issue breaks our current code architecture. Many of our CSS Modules have zero specificity selectors in order to have no issues on consumer side of component library, avoiding potential issues with CSS file loading order. The existence of this bug forces me to increase specificity selectively based on whether a CSS Module uses composes or not. This will also force me to release a new major version of the library as increasing specificity is a potential breaking change. Also, working around this Vite composes issue will be extra mental load that nobody should be dealing with.
I think one of the reasons this issue does not come up that often is that you will mostly notice this issue if you are a veteran CSS Module user, or if you're moving existing code to use Vite. If you are less experienced with CSS Modules and/or are working on new code then you probably think CSS Modules is limited, and continue on.
For some humor to the ending, I will not be using Webpack for Storybook 7 because it will error with "out of memory" and debugging that would be worse than this issue in Vite... 😅

I've implemented a fix via https://github.com/privatenumber/vite-css-modules (which is getting integrated into Vite core via https://github.com/vitejs/vite/pull/16018).
Testing and feedback will be appreciated!

This is awesome to get this fixed. If it's helpful to anyone else, I've previously overcome any ordering issues by making sure anything that is shared/composed is put in a css layer so that you can then control how it will be stacked in the cascade and then get rid of any duplicates with css nano. (If you have the luxury of only supporting browser that have css layers)

Since browser support can be an issue with @layer, I've personally started documenting/implementing a dev guideline that forbids composing from another (React) component's CSS Module. If composition is needed, the base styles have to be moved to a "utility" CSS Module that must never be imported into a component:
/* utils.module.css (never imported directly) */
.baseBtn {
  color: blue;
}

/* OtherComponent.module.css (imported from `OtherComponent.jsx`) */
.otherBtn {
  composes: baseBtn from './utils.module.css';
}

/* ThisComponent.module.css (imported from `ThisComponent.jsx`) */
.thisBtn {
  /*composes: otherBtn from './OtherComponent.module.css';*/ /* FORBIDDEN */
  composes: baseBtn from './utils.module.css'; /* ALLOWED */
  color: red;
}

With @privatenumber's plugin, this guideline seems to remove any remaining ordering issue.
If multiple components import the same CSS module, you still get duplicated styles in development, but if multiple components' modules compose from the same utility module, this utility modules' styles are no longer duplicated and now always come before the components' modules.
The guideline could be enforced by a linting rule to avoid mistakes. It could be as simple as checking that the filename of the composed module starts with a lower case letter (since other linting rules enforce that React component files start with an uppercase letter).


requiring angular causes phantomJS to crash without help on debugging.

Starting from https://github.com/sjrd/scala-js-example-app, upgrading to latest scalajs (0.6.7) and adding this to the build.sbt:
jsDependencies ++= Seq(
    RuntimeDOM
    ,"org.webjars.bower" % "angular" % "1.4.9" / "angular.js"
  )

scalaJSUseRhino in Global := false

Causes sbt test to fail:
akovanm0:scala-js-example-app avandra$ sbt test
[info] Loading project definition from projects/scala-js-example-app/project
[info] Set current project to Example (in build file:projects/scala-js-example-app/)
org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2
	at org.scalajs.jsenv.ExternalJSEnv$AbstractExtRunner.waitForVM(ExternalJSEnv.scala:110)
	at org.scalajs.jsenv.ExternalJSEnv$ExtRunner.run(ExternalJSEnv.scala:159)
	at org.scalajs.sbtplugin.FrameworkDetector.detect(FrameworkDetector.scala:66)
	at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$56.apply(ScalaJSPluginInternal.scala:705)
	at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$56.apply(ScalaJSPluginInternal.scala:688)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:235)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] (test:loadedTestFrameworks) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2
[error] Total time: 6 s, completed Mar 6, 2016 11:02:16 AM

With debug enabled:
[debug] > test
[debug] Evaluating tasks: test:test
[debug] Running task... Cancel: Null, check cycles: false, forcegc: true
[debug]
[debug] Initial source changes:
[debug] 	removed:Set()
[debug] 	added: Set()
[debug] 	modified: Set()
[debug] Invalidated products: Set()
[debug] External API changes: API Changes: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug] 	product: Set()
[debug] 	binary dep: Set()
[debug] 	external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings:
[debug]
[debug]
[debug] Initial source changes:
[debug] 	removed:Set()
[debug] 	added: Set()
[debug] 	modified: Set()
[debug] Invalidated products: Set()
[debug] External API changes: API Changes: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug] 	product: Set()
[debug] 	binary dep: Set()
[debug] 	external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings:
[debug]
[debug] Loading JSEnv with linked file projects/scala-js-example-app/target/scala-2.11/example-test-fastopt.js
[trace] Stack trace suppressed: run last test:loadedTestFrameworks for the full output.
[error] (test:loadedTestFrameworks) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2
[error] Total time: 6 s, completed Mar 6, 2016 11:05:14 AM

Now this may be a bug with the angular library, however I'd like to see at least some help on what causes phantomjs to exit (such as the javascript console output)
Poking around in the scalajs sbt plugin it seems that exit code 2 is caused by the webpage calling onError:
https://github.com/scala-js/scala-js/blob/f27a42c6aa83833bb44e9efe8d58b426131893f9/js-envs/src/main/scala/org/scalajs/jsenv/phantomjs/PhantomJSEnv.scala#L443
Thanks for the help,

@sjrd?

sbt run prints out "Syntax Error"

> myproject-js/run
[debug]
[debug] Initial source changes:
[debug]     removed:Set()
[debug]     added: Set()
[debug]     modified: Set()
[debug] Removed products: Set()
[debug] External API changes: API Changes: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug]     product: Set()
[debug]     binary dep: Set()
[debug]     external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings:
[debug]
[debug] Loading JSEnv with linked file myproject/scalajs/target/scala-2.11/myproject-js-fastopt.js
[info] Running JSBoot
[debug] with JSEnv ExternalJSEnv for PhantomJS
[debug] PhantomJS using webpage launcher at: /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher-webpage2601653425101094794.html
[debug] PhantomJS using launcher at: /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher7773494781003381759.js
[debug] Starting process: phantomjs /var/folders/r9/y97n1_g56jq76xcgv2d9n8jm000___/T/phantomjs-launcher7773494781003381759.js
SyntaxError: Parse error
org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2
    at org.scalajs.jsenv.ExternalJSEnv$AbstractExtRunner.waitForVM(ExternalJSEnv.scala:107)
    at org.scalajs.jsenv.ExternalJSEnv$ExtRunner.run(ExternalJSEnv.scala:156)
    at org.scalajs.sbtplugin.ScalaJSPluginInternal$.org$scalajs$sbtplugin$ScalaJSPluginInternal$$jsRun(ScalaJSPluginInternal.scala:640)
    at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$57$$anonfun$apply$40$$anonfun$apply$41.apply(ScalaJSPluginInternal.scala:700)
    at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$57$$anonfun$apply$40$$anonfun$apply$41.apply(ScalaJSPluginInternal.scala:694)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[trace] Stack trace suppressed: run last myproject-js/compile:run for the full output.
[error] (myproject-js/compile:run) org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: PhantomJS exited with code 2
[error] Total time: 4 s, completed Jun 4, 2016 6:33:02 PM

sbt definition is:
  lazy val scalajs = Project(id = s"$projectName-js", base = file("scalajs"))
    .enablePlugins(ScalaJSPlugin)
    .settings(
      libraryDependencies ++= Seq(
         "com.lihaoyi"      %%%!  "utest"       % "0.4.3"   % "test"
        ,"org.scala-js"     %%%!  "scalajs-dom" % "0.9.0"
        ,"com.greencatsoft" %%%! "scalajs-angular"   % "0.6"

      )

      ,jsDependencies ++= Seq(
         RuntimeDOM
        ,"org.webjars.bower" % "angular" % "1.5.6" / "angular.js"
      )

      ,scalaJSUseRhino in Global := false

      ,testFrameworks += new TestFramework("utest.runner.Framework")
      ,persistLauncher in Compile := true
      ,persistLauncher in Test := false
      ,emitSourceMaps := true
    )

Just figured this out. The angular.js contains comments that contain code examples, which contain

The string could occur as a string literal as well, probably should escape that somehow...

Adding
<script type="text/javascript">
//<![CDATA[
...code...
//]]>
</script>

Wouldn't solve the problem entirely, but would surely solve most of the occurences.

fixed by commit f552597d086a5ac924001e79e2e733355aea07aa via #2377

Hey @axos88. I'm sorry we forgot to follow up on this issue.  Since you're saying it's fixed by #2377, I'll close this one as duplicate of #2376.


Clean up FileDownload read to EOF / progress / zOS

Unclean progress when z/OS FileDownload with ASCII,  because size is not retrieved (even if it is unneeded due to read to EOF)
When progress is requested, you should ALWAYs get the file size.
Then, when reading to EOF is to be decided, one can use:
Read to EOF when:
Server has not provided a length
or
Transfer is ASCII
or
Transfer is to z/OS
This issue of "Size getting" needs to be cleaned up. See #805

Again, I did not understand the need for this. Apart from z-OS, in all other cases we cannot / should not get the file size for progress reports on ASCII types because ASCII reading means we are reading till EOF. So wasting time fetching the size does nothing, as many times the server fails to get the file size. File size only accurately reads in binary mode (iirc). If this is a z-OS specific change, please add appropriate if/else logic.

It is really just a refactor plus a z/OS specific change.
Apart from this:
"When progress is requested, you should ALWAYs (try to) get the file size".

Ok, lets add this in, if there is an issue, we will have to fix it later.
Sadly as this is an integration library and I don't have dozens of ready to use FTP servers for testing, integration testing is impossible. It would be nice to have, perhaps using docker. So that way we can run automated tests at least for critical behaviours.

Oh wait its closed...


Document behaviour changes introduced #1784

🦟 Bug fix
Summary
The PR in #1784 claimed not to introduce behavior changes, but actually ended up introducing behavior changes. Specifically, it would break a lot of marine simulation code that runs on our tools. The issue in question is a matter of naming parameters. In the past <xUU> used to refer to the quadratic drag term in the diagonal axis. This term would be multiplied by the absolute velocity. After #1784 this term was multiplied by the velocity (no absolute). An equivalent term of <xUabsU> This behavior change likely breaks all previous maritime simulations that rely on our hydrodynamics plugin.
There are several options:

Revert #1784
Make <xUU> mirror <xUabsU>
Document the change and mark it as breaking.

This PR goes with option 3 as there are already code bases using <xUabsU> nota tion instead of <xUU>. We also add a warning if someone does use the <xUU> term that points to this PR for details.
Checklist

[ ] Signed all commits for DCO
[ ] Added tests
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

This is an important and good thing to document quickly.
I had to find (through the source code) that the new parameter to use are  instead of .
This also begs the question: in which scenario would you need  ? Basically, it would make the drag dependent on the direction of the movement. For example, in a forward movement, the drag slows down the link, but in a backward movement it would accelerate it. Which is weird, no?
Shouldn't the quadratic term always be multiplied the absolute velocity?

@quarkytale @mabelzhang pinging again for :heavy_check_mark: .

I think tests aren't accounting for the range of weight typically the use-cases have. Lower weights might be preventing large translations.

Lower weights might be preventing large translations

Doesn't quite make sense. Since F = ma won't m and a

This also begs the question: in which scenario would you need ? Basically, it would make the drag dependent on the direction of the movement. For example, in a forward movement, the drag slows down the link, but in a backward movement it would accelerate it. Which is weird, no?

For diagonal terms this is true. Cross terms add forces due to motion in one axis along another axis.

Well you are right. Refining that, the range of added mass and drag terms. The sim crashed for me when I had those values in range of 10^3 and more, less than that kept the sim running (but incorrect behavior of accelerating in backward motion). In the test's world we should probably have another model with higher values.

BTW Might be worth adding an assertion on the following line to check direction of motion.
https://github.com/gazebosim/gz-sim/blob/c03c43261094d3d78a3706df46d10dbede80a918/test/integration/hydrodynamics.cc#L136


Feature request：Optimize the icon

Is your feature request related to a problem? Please describe.
LocalSend‘s icon is monochrome, it may not be visible clearly under some wallpapers.
Describe the solution you'd like
It is recommended to add a white background. （like the right icon)

Describe alternatives you've considered
No response
Additional context
No response

What do you think about these logos?

@Tienisto

Closing this in favor of #738


Support in PDF Expert?

Can Excerptor support in PDF Expert?

Sorry, I'm not see the closed issue.


Program gives different outputs if interpreted or compiled

When I run this program
(Append_2 Nil ys) = ys
(Append_2 (Cons x xs) ys) = let b = (Cons x xs); (Cons x (Append_2 xs ys))

(Main) = (Append_2 (Cons 0 (Cons 1 (Cons 2 (Nil)))) (Cons 0 (Cons 1 (Cons 2 (Nil)))))

with the latest version of hvm on master the output is
[0, 1, 2, 0, 1, 2]

in interpreted mode which makes a lot of sense.
But if I try to compile it I get
(Nil)

And if I change the program to
(Append_2 Nil ys) = ys
(Append_2 (Cons x xs) ys) = let b = (Cons x Nil); (Cons x (Append_2 xs ys))

(Main) = (Append_2 (Cons 0 (Cons 1 (Cons 2 (Nil)))) (Cons 0 (Cons 1 (Cons 2 (Nil)))))

I get the right result both in interpreted mode and compiled. What is going on? The two programs are equivalent I shouldn't get different outputs...

Here is a reduced test case:
(Last Nil) = Error
(Last (Cons x Nil)) = x
(Last (Cons x xs)) = let b = xs; (Last xs)

Main = (Last (Cons 0 (Cons 1 (Cons 2 (Nil)))))

Breaks with the compiler (even with --single-thread, so probably unrelated to #119):
$ hvm c tests/debug.hvm --single-thread && gcc tests/debug.c && ./a.out
Compiled to 'tests/debug.c'.
(Cons 1 (Cons 2 (Nil)))

Rewrites: 8 (0.00 MR/s).
Mem.Size: 16 words.

Reduces OK with the interpreter:
$ hvm r tests/debug.hvm
2

Rewrites: 14 (inf MR/s)
Mem.Size: 25

Removing the let b = xs also fixes the program.
Tested on current master, commit 0bcbae286f995bc14895b0774914b1e19cf5e34e

Fortunately the C target is being replaced by a Rust only compiled runtime, so this will be solved on the upcoming version (around next month), together with the correct parallel version and hopefully a GPU target.

We now compile to Rust, so this should be fixed on Master!


Use tide for PR merging

This is a SIG repository.  As such, it needs to use the same merge automation we use on the rest of the project
I have a PR open to address this, I'd like an /lgtm from someone here, ref: https://github.com/kubernetes/test-infra/pull/9304
Alternatively, if I hear no objections by 3pm PT Tue 2018-09-11 I'll merge the PR

Done, thanks!

Done.  Looking forward to letting tide  do more work for me!


Fix false positive on no-switch-case-fall-through

Fix #509
NoSwitchCaseFallThroughWalker didn't realize continue statements
would break out of case block.

Review status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.

test/files/rules/switchdefault.test.ts, line 57 [r1] (raw file):
It still passes, I've update the test case to look more like the example.

Comments from the review on Reviewable.io

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from the review on Reviewable.io

Meh, sorry I forgot about continue when I created this. Thanks for fixing! :) :+1:


Inject customizable beaming algorithm

Currently, RhythmSpelling shoots out a default beaming. There is not yet any configurability to this algorithm, though there should be.

Components could add up something like:
protocol BeamingStrategy {
    ...
}

struct DefaultBeamingStrategy: BeamingStrategy {
    ...
}

extension RhythmSpelling {
    init(rhythmTree: RhythmTree, strategy: BeamingStrategy) {
        ...
    }
}

func makeJunctions(
    _ leaves: [MetricalDuration],
    strategy: BeamingStrategy = DefaultBeamingStrategy
) -> [RhythmSpelling.BeamJunction]
{
    ...
}


Question: Mac acceleration for https://hub.docker.com/r/ollama/ollama

Ollama continues to be one of the most user-friendly local model serving libraries out there.
https://hub.docker.com/r/ollama/ollama has great instructions for attaining GPU optimizations.
I am wondering, is there a similar optimization attainable for Mac Metal?
From reading around, it seems there isn't, but I thought it was at least worth the ask

I think when you set num_gpu to 1, it will automatically use Mac's metal acceleration.  Performance is pretty good on macs

Does it support apple silicon gpu

Does it support apple silicon gpu

Yes it does. You can refer here for details.

Seems it is using just cpu when running directly from docker , i see no gpu usage when running llama2
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker exec -it ollama ollama run llama2

@SabareeshGC I think your command doesn't have num_gpu=1 in it anywhere. To get num_gpu, you have to make your own Modelfile like suggested here: https://github.com/jmorganca/ollama/issues/618#issuecomment-1737547046
Running these (my Mac uses ~/.ollama):
> docker run --detach --volume ~/.ollama:/root/.ollama --publish 11434:11434 --name ollama ollama/ollama
> docker exec -it ollama ollama show --modelfile llama2:13b
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM llama2:13b

FROM /root/.ollama/models/blobs/sha256:f79142715bc9539a2edbb4b253548db8b34fac22736593eeaa28555874476e30
TEMPLATE """[INST] {{ if and .First .System }}<<SYS>>{{ .System }}<</SYS>>

{{ end }}{{ .Prompt }} [/INST] """
SYSTEM """"""
PARAMETER stop [INST]
PARAMETER stop [/INST]
PARAMETER stop <<SYS>>
PARAMETER stop <</SYS>>

We can see the default llama2:13b doesn't have num_gpu.  So to use num_gpu, it's actually required to make your own Modelfile.

Trying to use docker run --gpus=all on my Mac:
> docker run --gpus=all --rm --volume ~/.ollama:/root/.ollama --publish 11434:11434 --name ollama ollama/ollama
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

So I think on Mac, there is no --gpus=all equivalent.

I think in conclusion:

Run the docker run command as if using CPU (no --gpus=all)
Use a Modelfile with PARAMETER num_gpu 1 set inside

The built-in Ollama models don't have this configured automatically

If you guys agree, I will make a docs PR for this

Let me test this out, I am fairly new to this

I created following model but unfortunately still i dont see any gpu usage at all.  At this point i am not even sure Docker desktop gpu supports it , I am also using virtualization framework which should provide access to gpu. I am using M1 Macbook pro
FROM mistral
# set the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 1
PARAMETER num_gpu 1

Fwiw @SabareeshGC, M1 chips aren't considered "GPU"s, so I wouldn't expect there to be printing about GPUs. If hardware acceleration is present, I would expect it to print "Metal" or "MPS" somewhere

Okay, running ollama create llama2:james with the following Modelfile:
FROM llama2:13b
PARAMETER num_gpu 1

A subset of the Ollama server (NOTE: not running through docker) logs:
> ./ollama serve
...
2023/10/06 16:33:17 images.go:317: [model] - llama2:13b
2023/10/06 16:33:22 images.go:317: [num_gpu] - 1
[GIN] 2023/10/06 - 16:33:22 | 200 |  4.835199917s |       <IP_ADDRESS> | POST     "/api/create"

Next, ollama run llama2:james:
2023/10/06 16:33:43 llama.go:313: starting llama runner
2023/10/06 16:33:43 llama.go:349: waiting for llama runner to start responding
{"timestamp":1696624423,"level":"INFO","function":"main","line":1191,"message":"build info","build":1,"commit":"9e232f0"}
{"timestamp":1696624423,"level":"INFO","function":"main","line":1196,"message":"system info","n_threads":8,"total_threads":10,"system_info":"AVX = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 0 | VSX = 0 | "}
llama.cpp: loading model from /Users/user/.ollama/models/blobs/sha256:abc123
llama_model_load_internal: format     = ggjt v3 (latest)
llama_model_load_internal: n_vocab    = 32000
llama_model_load_internal: n_ctx      = 2048
llama_model_load_internal: n_embd     = 5120
llama_model_load_internal: n_mult     = 256
llama_model_load_internal: n_head     = 40
llama_model_load_internal: n_head_kv  = 40
llama_model_load_internal: n_layer    = 40
llama_model_load_internal: n_rot      = 128
llama_model_load_internal: n_gqa      = 1
llama_model_load_internal: rnorm_eps  = 5.0e-06
llama_model_load_internal: n_ff       = 13824
llama_model_load_internal: freq_base  = 10000.0
llama_model_load_internal: freq_scale = 1
llama_model_load_internal: ftype      = 2 (mostly Q4_0)
llama_model_load_internal: model size = 13B
llama_model_load_internal: ggml ctx size =    0.11 MB
llama_model_load_internal: mem required  = 6983.72 MB (+ 1600.00 MB per state)
llama_new_context_with_model: kv self size  = 1600.00 MB
ggml_metal_init: allocating
ggml_metal_init: loading '/var/folders/78/lm6p91s90fx99cshsxqz_19w0000gn/T/ollama596427202/llama.cpp/ggml/build/metal/bin/ggml-metal.metal'
ggml_metal_init: loaded kernel_add                            0x1537097c0
ggml_metal_init: loaded kernel_add_row                        0x15370a010
ggml_metal_init: loaded kernel_mul                            0x15370a550
ggml_metal_init: loaded kernel_mul_row                        0x15370aba0
ggml_metal_init: loaded kernel_scale                          0x15370b0e0
ggml_metal_init: loaded kernel_silu                           0x15370b620
ggml_metal_init: loaded kernel_relu                           0x15370bb60
ggml_metal_init: loaded kernel_gelu                           0x15370c0a0
ggml_metal_init: loaded kernel_soft_max                       0x15370c770
ggml_metal_init: loaded kernel_diag_mask_inf                  0x15370cdf0
ggml_metal_init: loaded kernel_get_rows_f16                   0x15370d4c0
ggml_metal_init: loaded kernel_get_rows_q4_0                  0x15370dd00
ggml_metal_init: loaded kernel_get_rows_q4_1                  0x15370e3d0
ggml_metal_init: loaded kernel_get_rows_q2_K                  0x15370eaa0
ggml_metal_init: loaded kernel_get_rows_q3_K                  0x15370f170
ggml_metal_init: loaded kernel_get_rows_q4_K                  0x15370f840
ggml_metal_init: loaded kernel_get_rows_q5_K                  0x15370ff10
ggml_metal_init: loaded kernel_get_rows_q6_K                  0x1537105e0
ggml_metal_init: loaded kernel_rms_norm                       0x153710cc0
ggml_metal_init: loaded kernel_norm                           0x153711500
ggml_metal_init: loaded kernel_mul_mat_f16_f32                0x102b04530
ggml_metal_init: loaded kernel_mul_mat_q4_0_f32               0x102b04dd0
ggml_metal_init: loaded kernel_mul_mat_q4_1_f32               0x102b05550
ggml_metal_init: loaded kernel_mul_mat_q2_K_f32               0x153711ce0
ggml_metal_init: loaded kernel_mul_mat_q3_K_f32               0x153712580
ggml_metal_init: loaded kernel_mul_mat_q4_K_f32               0x153712d00
ggml_metal_init: loaded kernel_mul_mat_q5_K_f32               0x153713480
ggml_metal_init: loaded kernel_mul_mat_q6_K_f32               0x153713e00
ggml_metal_init: loaded kernel_mul_mm_f16_f32                 0x153714820
ggml_metal_init: loaded kernel_mul_mm_q4_0_f32                0x153714fe0
ggml_metal_init: loaded kernel_mul_mm_q4_1_f32                0x102b05bf0
ggml_metal_init: loaded kernel_mul_mm_q2_K_f32                0x153715680
ggml_metal_init: loaded kernel_mul_mm_q3_K_f32                0x153715d20
ggml_metal_init: loaded kernel_mul_mm_q4_K_f32                0x153605150
ggml_metal_init: loaded kernel_mul_mm_q5_K_f32                0x153606d70
ggml_metal_init: loaded kernel_mul_mm_q6_K_f32                0x153607530
ggml_metal_init: loaded kernel_rope                           0x153716140
ggml_metal_init: loaded kernel_alibi_f32                      0x153716b40
ggml_metal_init: loaded kernel_cpy_f32_f16                    0x1537173f0
ggml_metal_init: loaded kernel_cpy_f32_f32                    0x153717ca0
ggml_metal_init: loaded kernel_cpy_f16_f16                    0x153718550
ggml_metal_init: recommendedMaxWorkingSetSize = 10922.67 MB
ggml_metal_init: hasUnifiedMemory             = true
ggml_metal_init: maxTransferRate              = built-in GPU
llama_new_context_with_model: compute buffer total size =  211.35 MB
llama_new_context_with_model: max tensor size =    87.89 MB
ggml_metal_add_buffer: allocated 'data            ' buffer, size =  6984.06 MB, ( 6984.50 / 10922.67)
ggml_metal_add_buffer: allocated 'eval            ' buffer, size =     1.36 MB, ( 6985.86 / 10922.67)
ggml_metal_add_buffer: allocated 'kv              ' buffer, size =  1602.00 MB, ( 8587.86 / 10922.67)
ggml_metal_add_buffer: allocated 'alloc           ' buffer, size =   210.02 MB, ( 8797.88 / 10922.67)

llama server listening at http://<IP_ADDRESS>:64106

We can see a bunch of ggml_metal_init!  So that means Metal backend is being used.

Now, running the same model with docker run:
> docker run --rm --volume ~/.ollama:/root/.ollama --publish 11434:11434 --name ollama ollama/ollama
2023/10/06 20:37:41 images.go:996: total blobs: 8
2023/10/06 20:37:41 images.go:1003: total unused blobs removed: 0
2023/10/06 20:37:41 routes.go:572: Listening on [::]:11434
2023/10/06 20:37:41 routes.go:592: Warning: GPU support may not enabled, check you have installed install GPU drivers: nvidia-smi command failed
...
2023/10/06 20:37:57 llama.go:313: starting llama runner
2023/10/06 20:37:57 llama.go:349: waiting for llama runner to start responding
CUDA error 35 at /go/src/github.com/jmorganca/ollama/llm/llama.cpp/ggml/ggml-cuda.cu:4883: CUDA driver version is insufficient for CUDA runtime version
2023/10/06 20:37:57 llama.go:323: llama runner exited with error: exit status 1
2023/10/06 20:37:57 llama.go:330: error starting llama runner: llama runner process has terminated
2023/10/06 20:37:57 llama.go:313: starting llama runner
2023/10/06 20:37:57 llama.go:349: waiting for llama runner to start responding
{"timestamp":1696624677,"level":"WARNING","function":"server_params_parse","line":845,"message":"Not compiled with GPU offload support, --n-gpu-layers option will be ignored. See main README.md for information on enabling GPU BLAS support","n_gpu_layers":0}
{"timestamp":1696624677,"level":"INFO","function":"main","line":1190,"message":"build info","build":1009,"commit":"9e232f0"}
{"timestamp":1696624677,"level":"INFO","function":"main","line":1192,"message":"system info","n_threads":5,"total_threads":10,"system_info":"AVX = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 0 | VSX = 0 | "}
llama.cpp: loading model from /root/.ollama/models/blobs/sha256:abc123
llama_model_load_internal: format     = ggjt v3 (latest)
llama_model_load_internal: n_vocab    = 32000
llama_model_load_internal: n_ctx      = 2048
llama_model_load_internal: n_embd     = 5120
llama_model_load_internal: n_mult     = 256
llama_model_load_internal: n_head     = 40
llama_model_load_internal: n_head_kv  = 40
llama_model_load_internal: n_layer    = 40
llama_model_load_internal: n_rot      = 128
llama_model_load_internal: n_gqa      = 1
llama_model_load_internal: rnorm_eps  = 5.0e-06
llama_model_load_internal: n_ff       = 13824
llama_model_load_internal: freq_base  = 10000.0
llama_model_load_internal: freq_scale = 1
llama_model_load_internal: ftype      = 2 (mostly Q4_0)
llama_model_load_internal: model size = 13B
llama_model_load_internal: ggml ctx size =    0.11 MB
llama_model_load_internal: mem required  = 6983.72 MB (+ 1600.00 MB per state)
llama_new_context_with_model: kv self size  = 1600.00 MB
llama_new_context_with_model: compute buffer total size =  191.35 MB

llama server listening at http://<IP_ADDRESS>:64294

We see no mention of Metal backend.

Conclusion: the Metal backend is accessible when running with a local build, but not when running through Docker

Alright I renamed this issue to be a request for Metal backend somehow being accessible when running through Docker.  Please let me know if I am missing anything 👍

It's been a while since I used a Mac, but doesn't Docker on Mac actually run a Linux kernel under the hood, and then attach run Docker on Linux? That might make this more difficult, since you're looking at Mac --> Linux --> Ollama, which would mean Linux would need to expose Metal somehow to Ollama, which is likely not really possible (yet?): see https://github.com/pytorch/pytorch/issues/81224

Docker on MacOS does not support Metal acceleration so it's not possible for Ollama to use it. If you're interested in running Ollama on MacOS, the Mac app provides the best experience.

Though GPU with Apple Metal is supported, Apple neural engine ANE is not currently utilized
https://github.com/ollama/ollama/issues/3898


Got An Error after downloading the code model with SIP disable.

After the download was finished the error showed when installing. The SIP was disabled. Then I shutdown and enabled SIP and downloaded again. This time it worked.
So maybe this should be mentioned on ReadMe.

Thanks for your sharing. But I can't reproduce your issue on my dev machine.
I try to delete the model and download it again but due to cache related, the download is always complete within seconds.
I'll hold the issue to see if there are more reports to confirm it.
I can also confirm it myself when it is ready for me to upgrade my main machine to macOS 15 Beta.

I'm facing the same problem but have SIP enabled

re-run the entire script can solve this problem.

Solution: run the script or Method 1 again, then re-enable SIP and remove the boot-args.
@Kyle-Ye close this issue pls.
Thanks @Kyle-Ye and @owenzhao .

Closed via d64581e0517505f70af2a932e250588b4a6800d0


Added styling for disabled state on select dropdowns (#1316)

This is adding the styling to match with changes in the #1489 PR which changes the template to display but disable the dropdown on the categorized listing page. It will appear as:
@rbbeeston the category selection dropdown will now appear with text with the same orange as the version dropdown. Let me know if you want that changed or prefer them to be consistent.
Enabled dark/light:

Disabled dark/light:

Enabled
Thanks Rob, after discussing it, here's what I went with. Let me know if you want them adjusted.
I thought they looked best if they matched the category links.

Disabled
Here I went with slate instead of blue, even sky blue 900 stood out a little too much, tended to draw the eye.

That looks good we need to be sparse on the use of the mustard.


[Feature Request]: Anchoring tag enhancement in navbar

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
I want to enhance the anchoring tags in navbar.
Use Case
Navbar becomes attractive.
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

assign me this issue under gssoc24

add some screenshots @harikasayani

Hi @PSS2134
I want to do it like this.
https://github.com/HimanshuNarware/CareerZunction_Intern/assets/143275265/6e89dd16-af62-43e5-b931-b54194952625

@HimanshuNarware

@PSS2134 someone is already working on same issue #162


DB Seeds

@ansigroup I need to seed the db with some accounts and at least one node to so that the current version doesn't crash.
Do you have any recommendation for this task ?
The other approach to fix the server side JavaScript that it works without an initial node.
This is related to #6

nevermind


Relax the Python version to run the Invoke tasks

What does this PR do?

Relax the Python version to run the Invoke tasks
Motivation

It was a bit overkill and will be a pain for people to use the exact patch version of Python. Using the right minor version (e.g py3.11) is already enough since no major changes are added in patches and it does not change anything for the linters since they target the minor version
Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


Bug: can't use NuGet for Xamarin Studio 5.4 environment

I've tryed to use SQLite.Net.Platform.XamarinIOS NuGet with a newest version of Xamarin.iOS (that's Xamarin Studio 5.4 environment and supports iOS 8 development) but got an error that my iOS class library isn't comaptible with the NuGet. I can guess the reason: the NuGet looks for MonoTouch assembly and don't find it 'cause currently this assembly has a name Xamarin.iOS. I'd like to know about plans to fix this bug.

This should be fixed with the new unified ios platform implementation.


main.cpp contains too much information for application developers

main.cpp seems to have been created to test NVSTORE with many combinations and report information on multiple errors.
This seems great at first look. However, this example is targeted to application developers that need to see just an example.
I'd suggest simplifying the application and:

Point on documentation for detail information
Rely on automated tests to fully cover multiple use cases

FYI @davidsaada @adbridge

@MarceloSalazar Thanks. I guess you refer to the display_return_code function, right? I can remove it and display the return code only. Other than that, the application demonstrates the usage of NVStore APIs. Do you see any other places in in this file where your comment is relevant?

To be more precise, I'd suggest:

remove display_return_code, and use strerror
For example:
https://github.com/ARMmbed/mbed-os-example-filesystem/blob/master/main.cpp#L18

remove NVSTORE_ENABLED ifdef. You can just detect that NVSTORE was not enabled and exit.

Thanks!

remove NVSTORE_ENABLED ifdef. You can just detect that NVSTORE was not enabled and exit.

That won't work. The code won't compile that way, as non of the APIs are accessible when not enabled, hence the ifdef.
But I agree that this is a bit exaggerated. I can just remove that whole disabled scenario, including the json file and the explanation in the md file. Guess that engineers can understand what happens when a feature is disabled.

Did just that - Removed configuration for disabled scenario and eliminated the return code display function. I just print the integer return code. strerror won't do here, as it's used for system errors, which is not the case here.

Thanks! We may need to think what message should be displayed if someone attempts to build/run on another platform.
For now, I consider this done. Thanks!

It should work pretty much the same way (unless Flash is not supported for that platform, and then it won't compile).


Comptrans

Add composition and summation of transformations; Add possibility to select input dimension of each boosting model at model creation


DataBindings should handle null values more gracefully

Currently throws exception if Owner is null. Should propagate null instead

better option for structs/classes would be to return default(T) I think...


NewFilteredDynamicSharedInformerFactory ignores namespace argument

The code at: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/dynamic/dynamicinformer/informer.go#L45
ignores the namespace argument, and instead overrides it with metav1.NamespaceAll.
I'm sure this is just an oversight, and easy to fix, but it's causing me some trouble when trying to create a dynamic informer on a cluster where I can only have RBAC access to a few namespaces.

@liggitt, just picking you out of the air for this one.  It's a really trivial change... do you want a PR from me, or can it land before #581?

a PR to kubernetes/kubernetes would be great. client-go#v11.0.0 is already tagged

Thanks for the quick reply.  I'll do that.


Vtol fw trim

This allows to adjust the neutral pose of the elevons for a vtol in fw mode.

Yes, please :-)

Yes, please :-)

Yes, the idea was it to be percent. But I agree, we should stick to -1, +1. Let me open a new PR please, i want to fix some comments.

Yes, the idea was it to be percent. But I agree, we should stick to -1, +1. Let me open a new PR please, i want to fix some comments.


Initial VM Components

Initial implementation of the types VM depends on.

Can we close this as well @ansermino

Can we close this as well @ansermino

Can probably close now, but still needs a valid runtime impl (only trait exists now because spec was incomplete before)


Look into listening history saving

I've noticed my listening duration on an episode lags a bit from when I remember I was when opening the app back up again and starting up a podcast I was previously listening to. Anyone else experience this issue?

i've left the app open on my phone overnight and then it doesn't save the listening history at all, not sure if that's the same issue though


Refactor test suite

You need to rebase this PR, parts of are already merged isn't it?

bors merge


chore(SPV-1054) remove synctx model and unused constants

This pull request focuses on removing the SyncTransaction model and related code, along with simplifying the transaction status handling. The most important changes include the deletion of the SyncTransaction model, updates to tests, and removal of associated constants and fields.
Removal of SyncTransaction Model and Related Code:

Deleted the SyncTransaction model and its associated methods and fields from the engine package. (engine/model_sync_transactions.go, engine/model_sync_results.go, engine/model_sync_status.go) [1] [2] [3]
Removed the SyncTransaction model from the BaseModels slice and AllModelNames slice. (engine/definitions.go) [1] [2]

Updates to Tests:

Updated various test functions to remove references to SyncTransaction and adjust expected lengths of model name slices. (engine/client_options_test.go, engine/models_test.go) [1] [2] [3] [4] [5]

Simplification of Transaction Status Handling:

Removed the Status field from the Transaction struct and updated related mappings. (engine/model_transactions.go, mappings/transaction.go, mappings/transactions_old.go) [1] [2] [3]

Removal of Unused Constants and Fields:

Deleted unused constants and fields related to SyncTransaction and its statuses. (engine/definitions.go, engine/spverrors/definitions.go) [1] [2]

Code Cleanup:

Removed redundant status fields and constants from the engine/definitions.go file. (engine/definitions.go)

These changes streamline the codebase by removing deprecated models and simplifying transaction status management.

Pull Request Checklist

[ ] 📖 I created my PR using provided  : CODE_STANDARDS
[ ] 📖 I have read the short Code of Conduct: CODE_OF_CONDUCT
[ ] 🏠 I tested my changes locally.
[ ] ✅ I have provided tests for my changes.
[ ] 📝 I have used conventional commits.
[ ] 📗 I have updated any related documentation.
[ ] 💾 PR was issued based on the Github or Jira issue.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.90%. Comparing base (bb70ae8) to head (361d3b5).

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
+ Coverage   46.81%   46.90%   +0.09%
==========================================
  Files         309      306       -3
  Lines       13279    13219      -60
==========================================
- Hits         6217     6201      -16
+ Misses       6465     6423      -42
+ Partials      597      595       -2

Flag
Coverage Δ

unittests
46.90% <ø> (+0.09%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines
Coverage Δ

engine/model_transactions.go
66.66% <ø> (-0.26%)
:arrow_down:

mappings/transaction.go
0.00% <ø> (ø)

mappings/transactions_old.go
0.00% <ø> (ø)

... and 1 file with indirect coverage changes

Continue to review full report in Codecov by Sentry.

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


Merge contacts by unique fields with custom operator

Related to https://github.com/mautic/mautic/pull/9452

Close and reopen for the linter to run


Multi platform app (iOS, WinPhone, Android, etc)

Hi,
i already started working on a AngularJS app with phonegap because i don't think a native app for each platform is needed and brings a huge workload for a open source project.
Because it's my first app i already tried to upload the app to the store and on windows phone (haven't tried if it works currently because i have no phone available) and android its already available. iOS is in progress but as i read it needs up to 14 days to get verified.
You could find the code here (https://github.com/web-mi/Zulip-Messenger).
I will progress on the app because its my first app and some things have to be fixed.
Some constructive feedback would be great!
Cheers
Marc

Hey Marc, thanks for the note about the AngularJS project you're working on.  Zulip's got an active (google-group)[https://groups.google.com/forum/#!forum/zulip-devel] that's a great place for this kind of announcement (sorry, I don't know JS!)


s/createBufferMappedAsync/createBufferMapped/g

WebGPU spec has removed createBufferMappedSync at https://github.com/gpuweb/gpuweb/pull/516. This PR makes sure we're using createBufferMapped instead of createBufferMappedSync in the GPU Compute article.
Note that all samples have been updated as well and tested in Chrome Canary.

@kangz Does that look good to you? If so, I'll ask @petele to merge and push live this change as well.

FYI, the only change to review is https://github.com/google/WebFundamentals/pull/8340/commits/7e3bbc5fea5f491a1555d47d0e49ba74d88313ae.

Whoops!
There were 3 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/updates/2019/08/get-started-with-gpu-compute-on-the-web.md#L72 - Common typo found: 'implicity' Should it be 'implicitly'?
src/content/en/updates/2019/08/get-started-with-gpu-compute-on-the-web.md#L222 - Common typo found: 'implicity' Should it be 'implicitly'?
src/content/en/updates/2019/08/get-started-with-gpu-compute-on-the-web.md#L229 - Line must be at most 100 characters

@petele Please merge this PR after https://github.com/google/WebFundamentals/pull/8300

:tada: This has been pushed live to https://developers.google.com/web/


missing shared library

building a shared library was removed in the next commit:
https://github.com/j123b567/scpi-parser/commit/6e73d8531ba409e513c2d491d473a7b593614733
We are attempting a migration from v1.2 to v2.1 and we are missing the shared library. Could you explain your reasoning behind this removal?
Support for shared libraries would be needed for example if libscpi was packaged for Debian or another distribution.

This library primarily targets bare metal systems using its own build system. The reason why are there any Makefiles are unit tests.
Building of shared library was broken and unmaintained. It was just a proof of concept but I never use it and I didn't test it if it at least works.
There is also missing install phase.
Supporting full blown systems like Linux was not a goal, but now it is good time to do it.
If you have some patches to Makefile or autotools/CMake/whatever build tool files, I can merge them, just create a pull request.

Thanks for the explanation.
I am not very good at writing Makefiles, so it will take me some time to write a reasonably good version and test it, but I already have an ugly version in a fork. We will start testing it soon, but it will take us some time.
https://github.com/RedPitaya/scpi-parser
For now I can tell you the shared library in version v1.2 was was compiled properly with the provided Makefile, at least using a cross compiler for ARM.

Ok, I can investigate it little bit.
btw, nice hardware :)

The Makefile fix from RedPitaya fork (actually reverted commit which removed shared lib support) works. But is not well structured, and -fPIC is used two times, due to some haste copy-paste-ing.
Actually I expected more trouble with porting our patches from 1.2 to 2.1, and was surprised when it worked.

I tried to fix this in 9196799, can you please test/comment it?

I tested it.
Compile seems to work fine, both a static and a dynamic library are created. Sources are compiled twice, once for the static lib and once for the dynamic, I do not know if this is how it should be.
But install performs another compile, which in my case fails, since I do not define the cross compiler for this step.

It is compiled twice because of dynamic is compiled with -fPIC but static not.
It is strange, that install performs another compile step. I will investigate this.

Ok, next try 3074d4b. Issue with install should be ok now.

Thanks, I already tried it and it works fine.
I also checked if it is possible to avoid recompiling object files for shared and static libraries. Apparently it is possible but not recommended.
I have no further comments now. This issue can be closed.


Volumes are ignored during conversion

The Volumes mount points are ignored so I need to patch the resulting ACI with correct mount points.
The problem is that docker doesn't name the volumes so I don't know if docker2aci should set arbitrarily a name or interactively asking for the name of each volume.

Maybe we can generate a name based on the path, for example  /var/lib/www -> volume-var-lib-www. Would that help?

That seems fine to me. We can also escape the dashes to avoid collisions :
/var/www/a => volume-var-www-a
/var/www-a => volume-var-www--a

Actually, slashes are allowed so we could name them volume-/var/www-a. I plan to use SanitizeACName so every not-valid char is replaced with a dash, I guess it should be fine.

I filed #43.
The only problem I see is discoverability: if the user doesn't know the volumes' paths and the way docker2aci converts them there's no way for her to know the the mountPoints' names without extracting and reading the manifest (or using actool cat-manifest).
Maybe we should output the generated volumes after the conversion? Thoughts?

output the generated volumes after the conversion really would help, without needs of using actool cat-manifest

I updated #43 to print the generated volumes. This only works when running the docker2aci command, it doesn't print anything if it's used as a library.

@iaguis cool, thanks for that

@iaguis so when #43 is merged it should allow in the same --volume "volume-/var/tmp" for docker2aci and rot, right?
But what about rkt run some docker_image which has no volume, e.g. in docker way we do:
docker run web1 -p 80:80 -v /home/core/share/nginx/html:/usr/share/nginx/html nginx:latest
How then we can use volumes in rkt?

Then you'll have to wait for coreos/rkt#761 to get resolved :smile:

@iaguis is this one way: rkt run --volume mount=/var/lib/postgresql/data,kind=host,source=/opt/data docker://posgres:9.4 going to work from rkt?

Perhaps not that exact syntax but something similar

@jonboulle That syntax will for the chapter's 1st draft.
I will change it to the proper one when we have it release

Closed #40 via #43


Update status-table-widget.js

Updated line 26 from 30 minutes ago to 1 minute ago for a faster response time

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Custom round name not working after clear the container's content

Hi, when i implement below code, i found that the custom round name is not working.
window.bracketsViewer.render({
  stages: data.stage,
  matches: data.match,
  matchGames: data.match_game,
  participants: data.participant,
}, {
  clear: true,
},{
   customRoundName: (info, t) => {
   if (info.fractionOfFinal === 1 / 2)
        return `${t(`abbreviations.${info.group}`)} Semi Finals`
 },);

You have 2 objects. This should be a single config object:
window.bracketsViewer.render({
  stages: data.stage,
  matches: data.match,
  matchGames: data.match_game,
  participants: data.participant,
}, {
  clear: true,
  customRoundName: (info, t) => {
    if (info.fractionOfFinal === 1 / 2)
      return `${t(`abbreviations.${info.group}`)} Semi Finals`
  }
});

Alright, thanks for the answer!


Should not force log4j as a dependency

asterisk-java is using slf4j(https://github.com/asterisk-java/asterisk-java/blob/master/pom.xml#L190) which makes it easy to user the logging framework by choice, but at the same time it forces the use of log4j(https://github.com/asterisk-java/asterisk-java/blob/master/pom.xml#L184).
This may cause issues in the application using the lib. For example a vanilla spring boot application will immediately complain during startup and logging will be broken. Fix is to exclude the log4j dependency, when depending on asterisk-java.

closing as I'm expecting the push to be accepted shortly.


fix(congregation): handle empty congregation persons

:tada: This PR is included in version 2.39.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Filter out non jupyter kernels

For #4423
This should be enough to fix the issue. Plan on doing something a bit more involved later on as a refactor. Refactor is here if you want to take a look:
https://github.com/microsoft/vscode-jupyter/pull/4901

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

Codecov Report

Merging #4902 (17a821f) into main (1efe0f4) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##            main   #4902   +/-   ##
=====================================
- Coverage     76%     76%   -1%
=====================================
  Files        407     407
  Lines      26807   26812    +5
  Branches    3872    3873    +1
=====================================
- Hits       20549   20527   -22
- Misses      4661    4684   +23
- Partials    1597    1601    +4

Impacted Files
Coverage Δ

src/client/datascience/notebook/kernelProvider.ts
77% <100%> (+<1%)
:arrow_up:

src/client/common/utils/misc.ts
62% <0%> (-5%)
:arrow_down:

src/client/common/cancellation.ts
82% <0%> (-4%)
:arrow_down:

src/client/datascience/jupyter/jupyterServer.ts
75% <0%> (-4%)
:arrow_down:

...rc/client/datascience/jupyter/debuggerVariables.ts
77% <0%> (-4%)
:arrow_down:

src/client/common/errors/errorUtils.ts
74% <0%> (-4%)
:arrow_down:

...rc/client/common/process/pythonExecutionFactory.ts
83% <0%> (-4%)
:arrow_down:

src/client/datascience/jupyter/jupyterExecution.ts
70% <0%> (-3%)
:arrow_down:

...datascience/editor-integration/codelensprovider.ts
85% <0%> (-2%)
:arrow_down:

src/client/datascience/raw-kernel/rawSocket.ts
84% <0%> (-2%)
:arrow_down:

... and 9 more


Update scala-native to 0.3.5

As per @densh  - https://github.com/twitter/reasonable-scala/issues/39
Before:
Result "rsc.bench.ColdRscNativeTypecheck.run":
N = 100
mean = 311.026 ms/op
After:
Result "rsc.bench.ColdRscNativeTypecheck.run":
N = 100
mean = 184.562 ms/op

0.3.5 regressed testing interface integration. Please bump to 0.3.6 to resolve this issue.

Superseded by https://github.com/twitter/reasonable-scala/pull/41.


CheckAndMutate silently ignores condition for null values

Extracted from https://github.com/GoogleCloudPlatform/google-cloud-go/issues/621.
It seems like https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/5c3ee47e208b4efbfaa5badceff8b403c02cb6d4/bigtable-hbase-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/CheckAndMutateUtil.java#L113
will replace the condition as always true for comparisons that involve null

GoogleCloudPlatform/google-cloud-go#621 talks about an operator other than '==' or '!=' with a null value.  We should run some tests to see what HBase does with other operators, and do the same.

I think that there is quite a fundamental issue at play here relating to the implementation of checkAndMutate that checks against a null value. I was trying to figure out what HBase does.  From the docs in the Table interface:

"If the passed value is null, the check is for the lack of column (ie: non-existance)"

HBase ignores the CompareOperator completely and always assumes that any null value means a non-existence check.  That's a bit counter intuitive if someone uses CompareOp.NOT_EQUALS, or really anything but CompareOp.EQUALS because HBase will always check for non-existence and ignore the CompareOperator.
In the CBT client, we implemented EQUALS null means non-existence and NOT_EQUALS null means existence.  I don't think that we can implement the HBase implementation exactly due to historical translation of NOT_EQUALS null to mean existence.  However, we can add a clause that all CompareOperators except NOT_EQUALS mean non-existence.
To make this a bit more complicated, HBase 2.0 introduced a new CheckAndMutateBuilder that has a ifNotExists() method.  It also has an ifMatches(CompareOperator op, byte[] value) method that will throw an exception if the value is null.  We probably should enforce HBase's semantics in any new HBase2 methods and give enough information about how to fix the problem in the exception message.
Existence can probably be checked with ifMatches(CompareOperator.GREATER, EMPTY_BYTES), but I'll confirm that.  If so, I'll implement HBase 2.0 that way.


Proposal: refactor actions in action_cc into standalone functions

Currently the code that actually executes nickel actions are intertwined with the menu/config code. However it could be useful to refactor them into standalone functions, such that they could easily be reused by other libraries.
From my look through the code, it looks like each segment of code is fairly self-contained already, so it doesn't look like the refactor would be too difficult.
I'm willing to take a stab at it if @geek1011 is open to the idea.

I did think of that idea before, but I ended up deciding against it, since many of them depend on being called from the main thread. In addition, they currently take a char* argument rather than something more structured.
Regarding usage in other libraries, my current stance on the best option for that is to copy the code itself where needed, but if anyone has any additional things to consider, I might change my mind.
How much would you need to re-use the actions standalone? Also, if you only need certain functionality have you considered just calling the functions directly with a string argument and ignoring the return value (it will return errors the usual way).

My main issue with copying the code is likelihood of introducing 'oopsies' during the process, and keeping the code up to date.
My main hesitance to call the code directly as-is, is wanting to avoiding pulling in the nm_action_result_t stuff. However I may end up doing that I suppose.

I don't think this is worth doing, at least for now. I might reconsider this once we figure out the details of geek1011/kobo-plugin-experiments#9.


Rosanto major updates

Overview/Summary
Including GUIDs from Advisor
Updating some Titles to better align to Advisor
Adding a new ARG for ExpressRoute Circuits
Adding file for ResourceTypes in Scope of Wara
Adding file for Locations with Availability Zones

Please also add a screenshot of your query outputs.

@oZakari

@ejhenry @ehaslett  - please review

@rodrigosantosms @oZakari - for the recommendations with updated wording in the description that have been PG verified, we should get approval on the change from the DRI.

@rodrigosantosms see above for changes requested from @pinyuko.


Don't use ienumerable stuff in body system

About the PR
according to the trace this is slow as balls

Also if you have a good idea of the number of mechanisms (i.e. the trygetcomp should succeed) then the list constructor should also pass in the expected capacity as well to save expanding the array.

ill just make it 3 or something since i dont think anything will reasonably go above that


SQLite: Warn when model has schema or sequence

Also updates Migrations to ignore EnsureSchema and DropSchema operations (fixes #6679)

👍 Feel free to do something similar.

Will do!


[ENH] Benchmarking Discussion

During the benchmarking meeting today, a number of topics was discussed regarding benchmarking. This issue summarizes/expands these discussions. This documents will be updated after meetings:
Three packages were among the discussions on 06/10/2022:

Benchmarking-wise, the Evaluator() class of gluonts requires about 3 adapters to make it work with sktime. I do recall exactly but one of the adapter would be for sktime's metrics. Need to consider additional options. There are 2 candidates: Kotsu and OpenML
Kotsu is a high level and light-weight package that performs benchmarking that has no dependency on specific packages. At a high level, it allows users to register a dataset with a predicting task and then apply estimators to that registration. Will need more investigation about application to sktime.
OpenML performs a similar task to kotsu. An additional plus is that such registration has a share-able ID that can be shared on the cloud, allowing other users to repeat the same task. At the moment, it has limited support for time series dataset. Will also need to investigate its application in sktime.

To do tasks (High priority):

[x] Investigate the implementation of kotsu into sktime - refer to Issue #2804
[x] Investigate implementation of OpenML into sktime - refer to Issue #2821
[ ] Compare available benchmarking approaches
[ ] May need to implement gluonts's estimators/functionalities later on. Make a converter that convert ListDataset into Hierarchical type in sktime.

Good to have (Lower priority):
N/A
Additional thoughts (Not action item)
If implemented,  the gluonts's adapter would look similar to statsmodel's adapter.

@DBCerigo - FYI for kotsu

@DBCerigo (also FYI @TNTran92, @ltsaprounis), we're basically tring to set up benchmarking functionality for things similar to "run the M4 or M5 competition with a specific set of estimators", or "perform rolling window backtesting with these estimators", or "replicate the time series classification bake-off with these estimators.
There is some historic work in sktime:

in 2019/2020, @mloning recreated the M4/M5 competition for the sktime paper with a few methods. I don't think he ever shared the code, though.
in 2019, @TonyBagnall also wanted to replicate his benchmarking studies from earlier papers, most prominently, the "time series classification bake-off". I think he never did that either, but there must be some code that his research group is using. I find it unlikely that we'll get access or that that moves into sktime. But being able to do sth similar would be a nice goal.
the benchmarking module of sktime, which I think still works but has run out of sync a bit, design-wise https://github.com/alan-turing-institute/sktime/tree/main/sktime/benchmarking. @ViktorKaz wanted to work on this but that also got abandoned.

In summary, it seems that benchmarking is a topic which seems at the same time hard design-wise, and a topic where people are either reluctant or unable to share or produce clean, reusable code.
The goals for me, though, would be clear:

few-liner to run M4/M5 like benchmarks for forecasting
few-liner to run bake-off like benchmarks for classification

TLDR:
In the order of most  to least work
OpenML -> gluon-ts -> kotsu
kotsu works straight out of the box - we do not have to worry about adapters and just on how to incorporate it into sktime
Both OpenML and gluon-ts require adapters for dataset, estimator and metrics. Gluonts may not help us as a benchmarking framework but it has DL models and other tool that willl be nice-to-have.

@fkiraly

@DBCerigo (also FYI @TNTran92, @ltsaprounis), we're basically tring to set up benchmarking functionality for things similar to "run the M4 or M5 competition with a specific set of estimators", or "perform rolling window backtesting with these estimators", or "replicate the time series classification bake-off with these estimators.

kotsu was designed exactly to do these things, with the following properties of minimizing bloat or overhead, allowing for any model interface/validation, and avoiding common pitfalls when aiming for fair benchmarks  ref.
"run the M4 or M5 competition", and "perform rolling window backtesting" would be a validations and each estimator would be a model. Register them and "hit" run.

In summary, it seems that benchmarking is a topic which seems at the same time hard design-wise, and a topic where people are either reluctant or unable to share or produce clean, reusable code. Maybe this is where kotsu (or openML etc) could help?

Again, we built kotsu specifically to solve those problems of benchmarking often becoming a messy, bloated, and even inaccurate (unfair comparisons) endeavours.

(and it should be flexible to change the data sets used, the metrics used, the estimators used)

Yep it is designed for such flexibility.
@TNTran92

kotsu works straight out of the box - we do not have to worry about adapters and just on how to incorporate it into sktime

Glad to hear that.
From https://github.com/TNTran92/sktime/blob/kotsu_application/sktime/benchmarking/kotsu_sktime_application.ipynb it looks like you already know what you're doing.
Myself and co (@ali-tny @alex-hh) would be interested in contributing to/supporting on implementing such benchmarking. We use it for all our projects and so can offer our usual patterns/structure for using it in a clean and unobtrusive way.
Are there any time constraints or aimed-for deadlines for this?

Are there any time constraints or aimed-for deadlines for this?

We have a summer programme, which just started, and a workstream lifetime until Sep or Oct.
We will have developer days in London, July 11-15 - you seem to be in London, too, would you like to join?
There are also community/research talk slots, you could have one if you like?
(could also do this on one of the earlier days since it likely influences the work)
https://github.com/sktime/community-org/blob/main/events/sktime-dev-days-2022.md

add kotsu into sktime (unobtrusively)
adds a generalised validation factory func (probably takes a dataset, a cv-splitter, and a list of metrics)
register a few validations that we think are relevant (based on your messages above + @TNTran92's spike PR)
register a few estimators
module/docs/example on how to run the estimators through the validations, and read the stored the results

@DBCerigo  That is very kind of you. I am trying to get sktime's benchmarking done over the summer, so greatly appreciate inputs from the authors themselves. Do you mind if I sit in when you and co discuss sktime integration? We can invite other people from sktime side too.

I run a session on benchmarking using kotsu at the dev days on July 12th at 2pm (I'm travelling back to UK on 11th so this slot is earliest I can do). I can be contributing code/being around during more of that week also.

I'm from the US 🙃, so I will join the dev days online only.

Good stuff! Pinged you all in the sktime slack to organise a call.

Hey @TNTran92 ,
I was wondering if I could help by taking on the fourth task

Need to implement gluonts's estimators/functionalities later on. Make a converter that convert ListDataset into Hierarchical type in sktime.

Maybe I can start of by making the converter if its not done?

Hey @TNTran92 , I was wondering if I could help by taking on the fourth task

Need to implement gluonts's estimators/functionalities later on. Make a converter that convert ListDataset into Hierarchical type in sktime.

Maybe I can start of by making the converter if its not done?

PR #2877 tackles the first part of this adapter. You can go ahead and use it while the merge is going through

in 2019/2020, @mloning recreated the M4/M5 competition for the sktime paper with a few methods. I don't think he ever shared the code, though. I don't think I have access to it, for instance.

FYI the code repo is referenced in the paper and publicly available here: https://github.com/mloning/sktime-m4

FYI the code repo is referenced in the paper and publicly available here: https://github.com/mloning/sktime-m4

Ah, there it is! Nice!!
I already feared it was lost.
FYI @DBCerigo


Feat/prettier note shortcut

Please read the Contribution Guidelines before opening a pull request.
Description
Can run prettier on active note using keyboard shortcut ctrl+alt+i
Closes #327
Browser Checklist
This PR has been tested in the following browsers:

[x] Chrome
[x] Firefox
[x] Safari

@all-contributors add @ggonza89 for code, idea, test


add HavenoDaemon api class and jest tests supporting version and balances

Relies on https://github.com/haveno-dex/haveno/pull/111


TypeScript: faster builds

This isn't a bug report - more a heads up.  There's a new feature been added to the fork-ts-checker-webpack-plugin (which I believe CRA uses for TypeScript builds).  This feature speeds up incremental compilation.
More details can be found here:
https://blog.johnnyreilly.com/2019/01/typescript-and-webpack-watch-it.html
Would you consider upgrading to this for the performance improvement?
See also: https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/198
And: https://github.com/Realytics/fork-ts-checker-webpack-plugin/issues/196

Hopefully this will happen here: https://github.com/facebook/create-react-app/pull/6406


Pagination page selector

It would be nice select a page or at least jump to the first or last page.

This would be cool. Maybe something like Angular UI Bootstrap has: http://angular-ui.github.io/bootstrap/#/pagination Note how it works when you limit the maximum visible buttons.

I'm against the way bootstrap does pagination by displaying the page numbers, this does not work well on mobile. Instead I was planing on adding another drop down menu to select the page like how the 'rows per page' is selected.
This of course will be opted into via an additional attribute. I plan on removing the first and last page links by default and making them opted into as well.

OK, I understand about the bootstrap thing.
I do have another idea, though. What about replacing the '10-15 of 24' with 'Page 3 of 5' and then making the 3 a select like it is for per-row. Essentially I'm talking about how pagination works here, but without the bootstrap-like thingy and the click on page counter is an md-select instead of a enter a page number. So '<<  < page 249 of 660 > >>'.

They might not know the page is selectable though unless we show a drop down arrow next to the current page number.

is this not the md-page-select? If it is, you can close this issue.

@leocaseiro yes, thanks.


The sign when hovering over elements

Should be consistent. Ideally with white background instead of green. And using the same font as the rest of the portal

since the portal has a white background, I don't think it's a good idea to make it look white as well

You can make the border light blue, keeping the background white


Could we get a linux-arm64 build?

I'd like to build c2patool into a multi-architecture amd64/arm64 Docker image but I see we only have linux amd64 right now - would be great to have both!

I'm not sure I have time in the near term to build this out and test it, but if you are willing to submit a PR I'd be happy to review it and merge it. The relevant part of our publish workflow is defined here: https://github.com/contentauth/c2patool/blob/main/.github/workflows/publish-and-release.yml#L121-L165

GitHub recently added Arm64 hosted runners:
https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/
https://www.youtube.com/watch?v=vrr_OgMk458


download dialog: need error checking

To go
https://www.patricbrc.org/view/Taxonomy/570#view_tab=genomes
select one -> download button on green bar,
No option has selected. Submit, cause error

We should add check mechanism to prevent this. At least one field should be selected.

this is fixed and PR submitted.

I verified this fix on alpha. close the ticket.


v1.1.5 Features & Fixes

Fixes bad file override for pfSense 2.5.0 that caused error on ARP Table UI page
Fixes call to missing/changed interface functions on pfSense 2.5.0
Fixes bug that sometimes prevented port forward port values from being updated
Fixes PHP warning when rotating API server key on pfSense 2.5.0
Adds ability to create firewall rules with 'This Firewall' destination
Adds ability to create Unbound host override/alias with both an IPv4 and IPv6 address
Adds additional validation to Unbound host override host and domain fields
Minor adjustments to package install scripts

Test builds are ready:
pfSense 2.5/2.6:
pkg add https://github.com/jaredhendrickson13/pfsense-api/files/6017209/pfSense-2.5-pkg-API-1.1_5test.zip
pfSense 2.4:
pkg add https://github.com/jaredhendrickson13/pfsense-api/files/6017208/pfSense-2.4-pkg-API-1.1_5test.zip
pfSense-2.4-pkg-API-1.1_5test.zip
pfSense-2.5-pkg-API-1.1_5test.zip


[Algo] Dijkstra

Algorithm

[x] I have gone through the repository and made sure this algorithm has not been implemented

Information about my new algorithm

Algorithm Name: Dijkstra

Programming Language: Python

Time complexity: O(v^2)

Is this your first contribution to this repository?
No

I can work on it.

I would like to work on this issue. Can you please assign it to me?


Inference speed on CPU - HF models

Hi,
I deployed pretrained HF models(speechbrain/asr-wav2vec2-commonvoice-en, speechbrain/lang-id-commonlanguage_ecapa) in Cloud Run(serverless cpu), the process time is slow (3 to 4 seconds).
Is it possible to compress these models in order to improve inference speed on CPU ? Any tips are welcome.
Thanks

Hi,
The asr-wav2vec2-commonvoice-en is a huge model and thus slow.  If you are
looking something faster, you can train the seq2seq CRDNN model with
CommonVoice-english data (
https://github.com/speechbrain/speechbrain/tree/develop/recipes/CommonVoice/ASR/seq2seq).
As an alternative, you can consider the available CRDNN model pretrained on
LibriSpeech (https://huggingface.co/speechbrain/asr-crdnn-rnnlm-librispeech).
Note that usually the price to pay for a more efficient model is
performance. So far, we did not focus too much on small-footprint models,
but we plan to work more on that in the future. The
lang-id-commonlanguage_ecapa, instead, is not a big model and it should be
able to run faster.
On Fri, 19 Nov 2021 at 17:27, amtam0 @.***> wrote:

Hi,
I deployed pretrained HF models(speechbrain/asr-wav2vec2-commonvoice-en,
speechbrain/lang-id-commonlanguage_ecapa) in Cloud Run(serverless cpu), the
process time is slow (3 to 4 seconds).
Is it possible to compress these models in order to improve inference
speed on CPU ? Any tips are welcome.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/speechbrain/speechbrain/issues/1145, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEA2ZVR6MQNS64AWACAG6OTUM3FN3ANCNFSM5INEOGIA
.

Thank you for your answer, the HF pre-trained CRDNN model seems ok for my use case.
Sorry I forgot to mention that I am also using this model https://huggingface.co/speechbrain/asr-wav2vec2-commonvoice-fr
I saw a Medium link about compressing wav2vec models. Do you think these methods may improve inference speed ? Are they compatible with speechbrain library?
Thanks

Yes, this and other methods towards small-footprint models are interesting.
We plan to work on this topic in the future and the help of the community
is welcome!
On Fri, 19 Nov 2021 at 18:42, amtam0 @.***> wrote:

Thank you for your answer, the HF pre-trained CRDNN model seems ok for my
use case.
Sorry I forgot to mention that I am also using this model
https://huggingface.co/speechbrain/asr-wav2vec2-commonvoice-fr
I saw a Medium link
https://medium.com/georgian-impact-blog/compressing-wav2vec-2-0-f41166e82dc2
about compressing wav2vec models. Do you think these methods may improve
inference speed ? Are they compatible with speechbrain library?
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/speechbrain/speechbrain/issues/1145#issuecomment-974542362,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEA2ZVWCA4FCS3UHK54ECO3UM3OETANCNFSM5INEOGIA
.

Hi @amtam0 , If you think that the issue is addressed, please, feel free to close the issue


Add Workspace Support

When using portman as part of my development workflow, I would like to have a new postman collection created if it does not already exist.  Currently, this is only supported for creating collections in My Workspace.  Even if I create an API key for a team workspace, the collection still only gets created in my private area.  In order to create a collection in a specific workspace, you need to provide a workspace id when creating the collection (as in the example below)
    const queryUrl = workspaceId? `${this.baseUrl}/collections?workspace=${workspaceId}`: `${this.baseUrl}/collections`
    const config = {
      method: 'post',
      url: queryUrl,
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': this.apiKey,
      },
      data: data,
    } as AxiosRequestConfig;

    try {
      const res = await axios(config);
    } catch { ... }

As part of this feature, I would like to identify the workspace either by name or by Id.  Finding the specific workspace id is not easy in Postman and requires calling the Postman API, so having the option to identify the workspace by name is very useful.

@jbrinkman  This is an interesting feature addition, that we will definitely look into.
We will look into the Postman API to better understand the behaviour with or without the workspace.
At first sight it seems a limited workload to bring this feature. We will keep you posted.

Just keep in mind that the Workspace Id is not easily discoverable.  Workspace name is much more use friendly.

So you suggest to use the CLI option 'postmanWorkspaceName"?

Yes.  The workspace Id is hidden in postman and the only way to access it is by calling the Postman Workspaces API.  So the postmanWorkspaceName is a much more friendly approach.  This would behave similar to how Collections are created today where the system looks for the postmanUid first and if it isn't available, then falls back to using the CollectionName.

@jbrinkman We gave the Workspace support a try.
There is one big blocker right now for us to move forward.
You can define the workspace ID when creating a collection, in the docs there is no method that allows us to filter collections per workspace.
While doing the investigation, could you explain us your use-case?

If the use-case is where you  define the Postman UID as CLI option, to update a collection, then the workspace is not needed.
If the use-case is where you, dont define the Postman UID, to create a collection based on the name, then the workspace can be relevant. The problem lies that we automatically, verify if a Postman collection with the same name exists, and use that to create OR update the Postman collection (based on the name). This is make it easier for users since the Postman UID is not so straightforward to find + it pins everything to this 1 UID. So if you remove the collection, the UID is invalid, while with the collection name, Portman is smart and will create or update appropriately.
If the use-case is where you, dont define the Postman UID, to update a collection based on the name, then the workspace is not needed.

It is for use-case (2), that we would need a way to filter the list of collections per workspace, which does not seem to exist in the API (but perhaps you have found a way?) and there is no workspace context in the collection data to filter on.

@jbrinkman
There is a way to get the collections per workspace, which was provided thanks to the Postman community forum:  https://community.postman.com/t/postman-api-filter-collections-by-workspace/3336
So I'll continue to investigate this path for bringing workspace support.

@jbrinkman The Workspace PR is ready and will be reviewed and will run some more manual tests to make sure all the use-cases remain working. If things stay positive, the workspace support option will land in one of the next releases.


GCE : Flatcar Linux Stable > Unable to SSH in when launching from gcloud CLI

Following the commands suggested in these docs are not sufficient , https://www.flatcar.org/docs/latest/installing/cloud/gcp/ , OS Login is not working. I have OS-Login setup and works fine on all other systems. I even added OS Login to the Gcloud CLI command and the config.ign . I have no idea how to SSH in using your docs. ( Note: this works fine in AWS and Azure, not GCP )
Gcloud CLI:
gcloud compute instances create flatcar \
    --image-project kinvolk-public \
    --image-family flatcar-stable \
    --zone us-east1-b \
    --machine-type e2-medium \
    --metadata-from-file user-data=config.ign \
    --metadata enable-os-login=true \
    --network netname \
    --subnet netname-subnet \
    --service-account<EMAIL_ADDRESS>\
    --scopes=https://www.googleapis.com/auth/cloud-platform \
    --tags=flatcar \
    --boot-disk-size 20GB \
    --boot-disk-type pd-standard \
    --boot-disk-device-name flatcar

Butane.bu ( Converted to IGN via butane ):
version: 1.0.0
variant: flatcar
storage:
  files:
    - path: /etc/flatcar/update.conf
      contents:
        inline: |
          SERVER=https://public.update.flatcar-linux.net/v1/update/
          GROUP=stable
          REBOOT_STRATEGY=off

    - path: /opt/.startup.sh
      contents:
        inline: |
          #!/bin/bash
          # Set hostname
          hostnamectl set-hostname decyphertek

          # Update Flatcar
          sudo systemctl daemon-reload
          sudo systemctl restart update-engine
          sudo systemctl restart locksmithd
          sudo update_engine_client -update

          # Install Docker and Vim
          sudo rpm-ostree install docker vim

          # Install Docker Compose
          sudo curl -SL https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 -o /opt/bin/docker-compose
          sudo chmod +x /opt/bin/docker-compose
          /opt/bin/docker-compose --version

          # Create .docker directory
          mkdir -p /root/.docker

    - path: /etc/systemd/system/startup.service
      contents:
        inline: |
          [Unit]
          Description=Startup Script

          [Service]
          User=root
          Type=oneshot
          ExecStart=/opt/.startup.sh

          [Install]
          WantedBy=multi-user.target

systemd:
  units:
    - name: startup.service
      enabled: true
    - name: oem-gce-enable-oslogin.service
      enabled: true
      mask: false

Install Butane on Debian 12:
# Install Butane
sudo apt update && sudo apt install -y curl
curl -LO https://github.com/coreos/butane/releases/download/v0.22.0/butane-x86_64-unknown-linux-gnu
sudo chmod +x butane-x86_64-unknown-linux-gnu
sudo mv butane-x86_64-unknown-linux-gnu /usr/local/bin/butane

# Convert Butane configuration to Ignition
butane butane.bu -o config.ign

GCP SSH Error:
Connection via Cloud Identity-Aware Proxy Failed
Code: 4003
Reason: failed to connect to backend

Connection to VM is refused.
Please ensure that:
- VM has a firewall rule that allows TCP ingress traffic from the IP range <IP_ADDRESS>/20, port: 22
- SSH daemon on target VM is up and running

You may be able to connect without using the Cloud Identity-Aware Proxy.

Note:
It does work when i launch it from the marketplace . They have a disclaimer and not sure why the glcoud cli version doesnt have that? When launching a GCP Compute instance , I only see Fedora CoreOS , they do not support OS Login. Also, when i launch it from the marketplace , it dont see a way to add the config.ign ? Can I run this directly from terminal, I cant find that anywhere in the docs, like reading hieroglyphs. A lot of info, nothing like a logical progression of how to get it working .  Quick start guide for those who dont want to spend a weekend reading tech docs only to find you just need to run a few commands.

Not sure why an open source distro requires a license? AWS & Azure , I am able to sell VMs on Flatcar Linux. Google appears to be a different story, maybe they are promoting their own Container OS and CoreOS ( Which doestn support OS Login ) ?

{
  "taskReports": [
    {
      "taskType": "CHECK_LICENSE_INFO",
      "createTime": "2024-10-23T16:25:26.741Z",
      "taskExecutionStatus": "ISSUES_FOUND",
      "digest": "One or more licenses are unhealthy.",
      "errorMessage": "Licenses: projects/kinvolk-public/global/licenses/flatcar-container-linux found in the deployment manifest. These licenses are not owned by this Listing and should not be attached to any GCE disks in the deployment"
    }
  ]
}

Google Solution:
"Thank you for your response, As noticed that the error is due to you have not configured the licensed image.Could you please configure the license image as per below link step-6.https://cloud.google.com/marketplace/docs/partners/vm/build-vm-image
gcloud compute images create CREATE_IMAGE_NAME \
--project PUBLIC_PROJECT_NAME \
--source-disk projects/DEV_PROJECT_NAME/zones/SOURCE_DISK_ZONE/disks/SOURCE_DISK_NAME \
--licenses LICENSE_NAME \
--description ADD_DESCRIPTION

Once the license image gets created, please use the licensed image during the validation of the deployment package."

Flatcar Linux CIS Benchmark:

How would SE Linux be installed on Flatcar Linux?
How I would make it immutable after I setup:
'''

System processes, Volumes, DB, & trusted user exceptions.
sudo chattr +i -R /
'''

ACL:

sudo setfacl -m u:username:rwx directoryname


"Incompatible mod set" attempting to use with 1.19

Describe the bug
After downloading MidnightControls (and the listed dependency on modrinth, MidnightLib), attempting to start the game fails with
Incompatible mod set!
net.fabricmc.loader.impl.FormattedException: Mod resolution encountered an incompatible mod set!
A potential solution has been determined:
- Install fabric, version 0.36.0 or later.
- Replace mod 'SpruceUI' (spruceui) 4.0.0+1.19 with version 3.2.0 or later that is compatible with:
- Other constraints that can't be automatically determined
Unmet dependency listing:
- Mod 'MidnightControls' (midnightcontrols) 1.1.0+1.19 requires version 0.36.0 or later of fabric, which is missing!
- Mod 'MidnightControls' (midnightcontrols) 1.1.0+1.19 requires version 3.2.0 or later of mod 'SpruceUI' (spruceui), which can't be loaded due to other constraints!
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:190)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:148)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
I have tried finding SpruceUI on modrinth, but it's missing, and I don't know where to look for it. (It's not listed as a dependency on the website either.) I also installed fabric just the other day, so I'd be surprised if it was really out of date.
To Reproduce
Steps to reproduce the behavior:

Go to https://modrinth.com/mod/midnightcontrols/version/1.1.0 and download it.
Click through to the listed dependencies (just the one) and download the latest versions of them as well.

Expected behavior
For Minecraft to properly load and function as normal.
Desktop (please complete the following information):

OS: Linux
Minecraft 1.19
Fabric fabric-loader-0.14.6-1.19
Mods Iris 1.2.5, MidnightControls 1.1.0, MidnightLib 0.5.2, Sodium 0.4.2build16
Version 1.1.0

It looks like you're missing Fabric API, which is required for basically every fabric mod.


Support yunmi.kettle.v12

I have finally upgraded my lumi.gateway.mgl03 (Gateway: ZNDMWG03LM, ZNDMWG02LM, YTC4044GL) to custom 1.5.6_0001 and my kettle (BLE: MJHWSHO2YM, yunmi.kettle.v12) now show this unknown sensors.
Is there any way to make them work please?
extra:
  cloud_fw: 4.1.0_0003
  cloud_name: Kettle
  did: blt.4.1bqt9mXXXg01
  mac: a4:c1:XXXX8:2b
  market_brand: Xiaomi
  market_model: MJHWSHO2YM, yunmi.kettle.v12
  market_name: Kettle Pro
  rssi_54ef44cd65bf: -71
  type: ble
last_seen:
  54eXXXd65bf: 2m19s
listeners: 5
model: 2528
params: {}
ttl: 1h5m
uid: a4c13XXX82b

It would be awesome if we could remotely enable the last keep warm setting (make it warm, not boil)

You need to collect debug logs for this device. If it sends some useful info.

Can you please tell me how and what you need?

https://github.com/AlexxIT/XiaomiGateway3

I've enabled the basic logs (1.) but I don't know what to send you and where 😅 sorry


Workaround serious throughput issue in Stetho's HTTP server

All communication between host and Stetho is done by a LocalSocket (a
UNIX abstract domain socket) which has a very heavy-handed
implementation of LocalSocketImpl#flush which polls/sleeps waiting for
the kernel buffer to become empty.  This behaviour in practice reduces
observed throughput of dumpapp (using either the buffered stdout or
stderr) to between 300 and 600KB/s despite adb being capable of ~5MB/s
on the same device.
This workaround involves blocking the final flush call to the socket
output stream.  This still drains the local Java buffer as originally
intended, but does not ask the kernel to drain its buffer (and block
doing so).  This kernel draining behaviour is entirely unnecessary for
our purposes and presumably for everyone else as it appears to be added
for some special purpose hack in the Bluetooh implementation.

lgtm

It wouldn't hurt to link to the clowny AOSP code.

Linked.