App creation fails if yarn isn't installed, even if yarn isn't selected or used for running create-relay-app

Here's the error log:
Command "npm install --save-exact --save-dev relay-compiler@latest @types/react-relay@latest @types/relay-runtime@latest babel-plugin-relay@latest vite-plugin-relay@https://github.com/tobias-tengler/vite-plugin-relay#tte/fix-plugin" failed

npm ERR! code 127
npm ERR! git dep preparation failed
npm ERR! command /home/dev/.nvm/versions/node/v16.16.0/bin/node /home/dev/.nvm/versions/node/v16.16.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/dev/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! ><EMAIL_ADDRESS>prepare
npm ERR! > husky install && yarn build
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! fatal: not a git repository (or any of the parent directories): .git
npm ERR! sh: line 1: yarn: command not found
npm ERR! npm ERR! code 127
npm ERR! npm ERR! path /home/dev/.npm/_cacache/tmp/git-cloneUKSqXM
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c husky install && yarn build
npm ERR!
npm ERR! npm ERR!  A complete log of this run can be found in:
npm ERR!     /home/dev/.npm/_logs/2022-09-07T18_54_31_413Z-debug-0.log

Seems like probably the command sh -c husky install && yarn build is making the whole thing fail.
Looking at the README, the first step is only using yarn:

Scaffold a new project using the toolchain of your choice (as long as it's supported)

Next.js: yarn create next-app --typescript
Vite.js: yarn create vite --template react-ts
Create React App: yarn create react-app <new-project-directory> --template typescript

But the 3rd steps shows that any package manager can be used:

Run the script inside of the scaffolded directory:

npm/yarn/pnpm create @tobiastengler/relay-app@latest

I think there maybe should be a clearer note in the docs that a yarn installation is also required for running the command in the 3rd step.

Thanks for reporting!
Looking at the log ouput this seems to come from the vite-plugin-relay package.
You can see the prepare script here: https://github.com/oscartbeaumont/vite-plugin-relay/blob/042c343c91527ff9f4946ad5d665387b91cabef2/package.json#L32
You should get the same error just trying to install that package using npm install vite-plugin-relay (haven't confirmed).
If this is true you should raise an issue with the repo of vite-plugin-relay. But the owner of the package is pretty unresponsive. I have sent a PR that adds Vite 3 support, but it hasn't been reviewed in almost a month now...
I'm closing this issue since there's nothing I can do about it.
If what I said above is in fact not true, feel free to re-open :)

Okay this seems to actually be my fault. Since I'm installing the vite-plugin-relay package from the branch where I added Vite 3 support, the package is built on your system, which probably causes this issue.
I'll remove the install from branch and instead provide guidance on how to add Vite 3 support manually until my PR is merged. But now it's 💤 time for me, so I'll try to get a fix out tomorrow :)

I just published v0.0.6, which should address this issue.
You can simply re-run the script:
npm create @tobiastengler/relay-app@latest`

and the error should no longer happen.
Now you have to add the fixed Vite plugin to your code manually, which is detailed here: https://github.com/tobias-tengler/create-relay-app/blob/main/docs/vite-plugin-setup.md (It will also be shown in the console)
Let me know if you have any other issues :)

Thanks. It might be worth adding to the docs that you also need to modify tsconfig.node.json to add the lib field to something es6+. Even though you already have this note:

If you are using an ECMAScript standard below ES6 you need to replace the src.includes("graphql") with src.indexOf("graphql") !== -1

Since the default is having lib unset, I think having an explicit note of the change would be good since it's a change from the bootstrapped app that the tool creates (and falls into the vite plugin setup imo).

Yep, that's true. I'll just change the code to match the default and remove the note :)

My vite-plugin-relay PR was merged today and I published version 0.0.7 of this package which now will install the vite-plugin-relay package properly. So no more workaround is required. :)

I'm unsure if I'm wrongfully drudging this up but I've been having trouble getting the script this to work on a new Vite.js project.
I installed Vite.js, and then ran the standard npm script npm create @tobiastengler/relay-app and it fails after "Add RelayEnvironmentProvider". It doesn't seem to be installing the "vite-plugin-relay" in the package.json and from that point on my attempts to fix the problems hasn't worked. Curious if you have a similar issue with a fresh install.

If you are creating a new Vite.js App using the Vite CLI and run this package afterwards, everything should work. This is also covered by an integration test on our side.
Can you please

tell me how you setup your Vite.js project
send me a copy of the log output of the failed create-relay-app command
attach your current project files as a .zip for me to investigate

Everything worked! In my particular scenario on the existing project it added in "babel-plugin-relay": "^15.0.0" as well as adjusting react-relay/relay-runtime to be version "^15.0.0".
Thanks for the fast response @tobias-tengler :)


chore(datasets): Fix ManagedTableDataset docstrings to valid RST

Description
Title
Development notes

Checklist

[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[ ] Updated the documentation to reflect the code changes
[ ] Added a description of this change in the relevant RELEASE.md file
[ ] Added tests to cover my changes

Thank you for looking into this.


QA pass

License info is already at the root of the repo so I removed it from files, this is not a normal convention for open source projects anymore.
Added a .gitignore to make sure node_modules is ignored.
Added an npm version badge to display version & provide quick link to package on npm.
Updated package.json description to be more terse.

@chelm pong


WSL2 networking issue: unable to connect to localhost for dev server

Environment
Windows build number: Microsoft Windows [Version 10.0.19041.746]
Your Distribution version: Ubuntu 18.04
Whether the issue is on WSL 2 and/or WSL 1: WSL2

Steps to reproduce
To reproduce the issue, set up the project and development server for the TEAMMATES project.
Set up project (Complete instructions here)

Run git clone https://github.com/TEAMMATES/teammates.git
Run npm ci

Set up dev server (Complete instructions here)
There are two ways to set up the development server, both methods run into the same issue.
A) First method

Run npm run build. This enables the backend dev server to serve frontend files
Run ./gradlew appengineStart. This command starts the backend dev server on localhost:8080
View localhost:8080 on your browser

B) Second method

Run npm run start. This command starts the frontend dev server on localhost:4200
Run ./gradlew appengineStart. This command starts the backend dev server on localhost:8080
View localhost:4200 on your browser. Click on sign in button at the top right of the page.

WSL logs:
I'm unable to pinpoint what the issue is. Hence, I'm unsure about which command I should be recording logs for.
Other logs:
After running ./gradlew appengineStart, there is a process on port 8080 as expected, but it cannot be accessed on localhost:8080 (see next section)

Expected behavior

The expected behavior is displayed on a regular linux VM (using VMware workstation player).
First method
localhost:8080 should serve the frontend together with the backend. Upon clicking the login button, the login page is shown.

Second method
localhost:4200 should serve the frontend. Upon clicking the login button, the login page is shown.
Actual behavior

First method
Unable to connect to localhost:8080. No errors logged in console.

Second method
localhost:4200 is accessible, but it cannot use backend functionality (e.g. Authentication). So, the user is redirected back to the static home page.
Summary
I am unable to set up the frontend and backend development server together with WSL2. When localhost:8080 is accessed, I receive a 404 error with no other errors logged in the console. On the other hand, I am able to set up the dev server properly on a linux VM with the exact same steps. I am unable to pinpoint the specific issue in WSL2 that is causing this problem.

Try replacing localhost:8080 in your application with <IP_ADDRESS>:8080
Maybe here: https://github.com/TEAMMATES/teammates/blob/a5cad8417129abd6bb223b35e396047358d1c17e/src/web/environments/environment.ts

Try replacing localhost:8080 in your application with <IP_ADDRESS>:8080
Maybe here: https://github.com/TEAMMATES/teammates/blob/a5cad8417129abd6bb223b35e396047358d1c17e/src/web/environments/environment.ts

Try replacing localhost:8080 in your application with <IP_ADDRESS>:8080

I just tried this, but the outcome is the same - 404 error received on http://localhost:8080

Try replacing localhost:8080 in your application with <IP_ADDRESS>:8080

I just tried this, but the outcome is the same - 404 error received on http://localhost:8080

When it's up and running are you able to hit it with curl http://localhost:8080 from inside WSL2?

When it's up and running are you able to hit it with curl http://localhost:8080 from inside WSL2?

When it's up and running are you able to hit it with curl http://localhost:8080 from inside WSL2?
Yes I am able to hit it with curl http://localhost:8080, it returns the following result:

When it's up and running are you able to hit it with curl http://localhost:8080 from inside WSL2?
Yes I am able to hit it with curl http://localhost:8080, it returns the following result:

Merging into similar /dupe #4885. These are often variation #4851.

Merging into similar /dupe #4885. These are often variation #4851.

Thanks @therealkenc and @rlabrecque for the help!
Just in case anyone faces a similar issue, here is the link to the comment that resolved my issue: https://github.com/microsoft/WSL/issues/5298#issuecomment-695181844.

Thanks @therealkenc and @rlabrecque for the help!
Just in case anyone faces a similar issue, here is the link to the comment that resolved my issue: https://github.com/microsoft/WSL/issues/5298#issuecomment-695181844.


change humididy

Checks

[ ] Debugging completed
[x] Please debug me

Related Issue
This PR closes #225

Codecov Report
Base: 92.82% // Head: 92.82% // No change to project coverage :thumbsup:

Coverage data is based on head (7d51c70) compared to base (3d7398a).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #226   +/-   ##
=======================================
  Coverage   92.82%   92.82%
=======================================
  Files          73       73
  Lines        3277     3277
=======================================
  Hits         3042     3042
  Misses        235      235

Impacted Files
Coverage Δ

neclib/devices/weather_station/tr73u.py
59.09% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


make scrollFire usable with function references

Hello all,
I've wanted scrollFire to be able to consume a function reference as an addition to the current implementation so I've made this PR to share with you.
It's simple: the callback option can take a function reference in addition to a string.
I've also updated the docs accordingly..
It's used like this:
window.scrollFireCallback = function() {
          // for #function-reference-test
          Materialize.toast("ScrollFire with a function reference!", 1500);
          Materialize.showStaggeredList("#staggered-test-2");
          $("#call-5").velocity({ backgroundColor: "#333", color: "#ef5350" }, {duration: 500});
      }
      var options = [
        {selector: '#staggered-test', offset: 50, callback: 'Materialize.toast("This is our ScrollFire Demo!", 1500); $("#call-1").velocity({ backgroundColor: "#333", color: "#ef5350" }, {duration: 500}); ' },
        {selector: '#staggered-test', offset: 205, callback: 'Materialize.toast("Please continue scrolling!", 1500); $("#call-2").velocity({ backgroundColor: "#333", color: "#ef5350" }, {duration: 500});' },
        {selector: '#staggered-test', offset: 500, callback: 'Materialize.showStaggeredList("#staggered-test"); $("#call-3").velocity({ backgroundColor: "#333", color: "#ef5350" }, {duration: 500});' },
        {selector: '#image-test', offset: 500, callback: 'Materialize.fadeInImage("#image-test"); $("#call-4").velocity({ backgroundColor: "#333", color: "#ef5350" }, {duration: 500});' },
        {selector: '#function-reference-test', offset: 400, callback: window.scrollFireCallback }
      ];
      Materialize.scrollFire(options);

Regards

Apparently, @acburst did something similar here: https://github.com/Dogfalo/materialize/commit/b7a1803a524650a0f2bc53991920b64627c07c9b
Thanks for this change. Closing this so you don't have to.. :smile:


Visual update for menu flyout

Most big "deletions" in this PR are not deletions - I moved legacy styles to the bottom of the file in order to clean up a bit without removing them (to avoid possible regressions if there are custom styles existing based off of the legacy styles).
Actual changes include:

Moving non-theming resources to static section
Updating the padding/margins accordingly: spacing between items, spacing for the separator (extending it edge to edge required negative margins)
Adding rounded corners on menu items to show up in interaction states
Updating brushes
Updating chevron sizes
Updating the accelerator text margins to make the text base line the same for item text and accelerator text (both were vertically aligned center and text looked off at the bottom)
Redirect default item style from Reveal to default

Note: not fixing the selected item alignment to the selected item in opened submenu. Followed the thread where the decision was to not change the flyout positioning, and the margins change here is not quite possible to work in all scenarios.

/azp run

/azp run

/azp run

/azp run

Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

Wow, looks great!
Question:
Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

As of right now, none of the reveal styles have been changed with these visual updates.
There was a discussion that @chigy posted some time back, where they are considering changes to the Reveal effect. #1126
So I'm hoping they will update the Reveal Button Styles and other styles when they have it ready.
WinUI 3 won't support reveal at launch, but I assume these new visual styles will come to WinUI 2.6 and onwards

Wow, looks great!
Question:
Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

As of right now, none of the reveal styles have been changed with these visual updates.
There was a discussion that @chigy posted some time back, where they are considering changes to the Reveal effect. #1126
So I'm hoping they will update the Reveal Button Styles and other styles when they have it ready.
WinUI 3 won't support reveal at launch, but I assume these new visual styles will come to WinUI 2.6 and onwards

Wow, looks great!
Question:
Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

As of right now, none of the reveal styles have been changed with these visual updates.
There was a discussion that @chigy posted some time back, where they are considering changes to the Reveal effect. #1126
So I'm hoping they will update the Reveal Button Styles and other styles when they have it ready.
WinUI 3 won't support reveal at launch, but I assume these new visual styles will come to WinUI 2.6 and onwards

Glad you like it. :)
Yes, we are going away with reveal effect. With the new styles of visuals, reveal just does not work as an effective visual effect to express interaction. We are looking into micro-animations or other types effects (you might have seen in some other controls we are working on) to ensure controls get the interaction communicated. That said, I would say, consider this as we are halting on reveal. We may find a good use for it in the future (or not...). We just haven't found effective one at the moment...

Wow, looks great!
Question:
Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

As of right now, none of the reveal styles have been changed with these visual updates.
There was a discussion that @chigy posted some time back, where they are considering changes to the Reveal effect. #1126
So I'm hoping they will update the Reveal Button Styles and other styles when they have it ready.
WinUI 3 won't support reveal at launch, but I assume these new visual styles will come to WinUI 2.6 and onwards

Glad you like it. :)
Yes, we are going away with reveal effect. With the new styles of visuals, reveal just does not work as an effective visual effect to express interaction. We are looking into micro-animations or other types effects (you might have seen in some other controls we are working on) to ensure controls get the interaction communicated. That said, I would say, consider this as we are halting on reveal. We may find a good use for it in the future (or not...). We just haven't found effective one at the moment...

@chigy  Will you be considering effects for the borders of controls, most of the controls have borders now with the visual refresh (except those using Ghost ThemeResources) - if not Reveal as it is, but some kind of visual or colour flare for hover approaches?

@chigy  Will you be considering effects for the borders of controls, most of the controls have borders now with the visual refresh (except those using Ghost ThemeResources) - if not Reveal as it is, but some kind of visual or colour flare for hover approaches?

@chigy Will you be considering effects for the borders of controls, most of the controls have borders now with the visual refresh (except those using Ghost ThemeResources) - if not Reveal as it is, but some kind of visual or colour flare for hover approaches?

@mdtauk , no not at this time. We try to be thoughtful on adding effects or visual feedback and be systematic about it. We are currently busy with the visual refresh this is not something we are focused on at the time.

@chigy Will you be considering effects for the borders of controls, most of the controls have borders now with the visual refresh (except those using Ghost ThemeResources) - if not Reveal as it is, but some kind of visual or colour flare for hover approaches?

@mdtauk , no not at this time. We try to be thoughtful on adding effects or visual feedback and be systematic about it. We are currently busy with the visual refresh this is not something we are focused on at the time.

Why does this projection look so close to the appearance of macOS...

Wow, looks great!
Question:
Does this change imply that reveal isn't recommended anymore on MenuFlyout Items?

Reveal isn't the default style anymore, that's correct.

The rounded corners seem to have too much of a corner radius. Hopefully it reduces to 1px or 2px in the final implementation. A subtle rounded corner is much more comfortable for mouse pointer users, while also staying intuitive for touch users.

The rounded corners seem to have too much of a corner radius. Hopefully it reduces to 1px or 2px in the final implementation. A subtle rounded corner is much more comfortable for mouse pointer users, while also staying intuitive for touch users.

Please don't put drop shadows or reveal effects. Artifacts are bad design. The corners are too rounded too. This looks awful. More of the same awful. The same gaudy effects.  The border should be a lighter grey, since it's a highlight. Crap like this for eight years since Windows 8. Windows 8 with it's horizontal apps and off-screen chrome. I could go into the OneDrive app on Windows 10X and why it is a nightmare to look at. Since I brought it up, Windows 10X has a lot of problems just with the opening screen. You can't put anything on the desktop background, So it's just an empty background for a picture. The taskbar still resides on the edge of the screen, instead of hovering off it which would make it easier for touch targets. Also, that brand new taskbar is bad design as well. What is all of that space in the taskbar that doesn't have apps in it going to be used for anyway? Especially, since this has a Start Menu. Uck, and instead of the system tray icons lined up on the right, they are stacked. Uck. Between this and the app layout of apps like the new OneDrive app on Windows 10X.
Here's a post on the Your Phone app.

Please don't put drop shadows or reveal effects. Artifacts are bad design. The corners are too rounded too. This looks awful. More of the same awful. The same gaudy effects.  The border should be a lighter grey, since it's a highlight. Crap like this for eight years since Windows 8. Windows 8 with it's horizontal apps and off-screen chrome. I could go into the OneDrive app on Windows 10X and why it is a nightmare to look at. Since I brought it up, Windows 10X has a lot of problems just with the opening screen. You can't put anything on the desktop background, So it's just an empty background for a picture. The taskbar still resides on the edge of the screen, instead of hovering off it which would make it easier for touch targets. Also, that brand new taskbar is bad design as well. What is all of that space in the taskbar that doesn't have apps in it going to be used for anyway? Especially, since this has a Start Menu. Uck, and instead of the system tray icons lined up on the right, they are stacked. Uck. Between this and the app layout of apps like the new OneDrive app on Windows 10X.
Here's a post on the Your Phone app.

Pull，The projection of the area where the menus are stacked looks too strange

macOS

Pull，The projection of the area where the menus are stacked looks too strange

macOS

Is it just me that I can hardly see the current highlighted item? Is this contrast insufficient for recognition?

Is it just me that I can hardly see the current highlighted item? Is this contrast insufficient for recognition?

Is it just me that I can hardly see the current highlighted item? Is this contrast insufficient for recognition?

Agreed. Perhaps it should use the system accent colour? Unless that's not possible.

Is it just me that I can hardly see the current highlighted item? Is this contrast insufficient for recognition?

Agreed. Perhaps it should use the system accent colour? Unless that's not possible.


Dollar Quoting not working when reading from file

The issue reported in #43 is still (or again?) an issue in v0.7.7. Reproducible using @modax's example from the original issue.  The only difference is the PG version (I'm targeting PG 11.2 rather than 9.6.6).
I get the "unterminated dollar-quoted string" error when

calling usql ... -f dollar-bug.sql
using \i dollar-bug.sql when using usql interactively

But when using usql interactively I can paste the contents of the file at the prompt, and it works correctly.

Can you share the actual contents please? And what version of usql are you using?

Here's a script that downloads usql v0.7.7 and then demonstrates the issue using the same example as in #43:
set -x;
cd /tmp;
wget https://github.com/xo/usql/releases/download/v0.7.7/usql-0.7.7-linux-amd64.tar.bz2;
tar jvxf usql*bz2;
rm usql*.bz2;
chmod +x usql;
mv usql ~/bin;
~/bin/usql --version;
cat <<'EOF' > dollar-bug.sql;
DO
$$
BEGIN
PERFORM 1;
END
$$;
EOF
cat dollar-bug.sql;
~/bin/usql pg://postgres@postgis?sslmode=disable -f dollar-bug.sql;

and this is the output on my system:
+ cd /tmp
+ wget https://github.com/xo/usql/releases/download/v0.7.7/usql-0.7.7-linux-amd64.tar.bz2
--2020-01-11 12:26:01--  https://github.com/xo/usql/releases/download/v0.7.7/usql-0.7.7-linux-amd64.tar.bz2
Resolving github.com (github.com)... <IP_ADDRESS>
. . . snip . . .
2020-01-11 12:26:04 (4.31 MB/s) - ‘usql-0.7.7-linux-amd64.tar.bz2’ saved [10853998/10853998]

+ tar jvxf usql-0.7.7-linux-amd64.tar.bz2
usql
+ rm usql-0.7.7-linux-amd64.tar.bz2
+ chmod +x usql
+ mv usql /home/bill/bin
+ /home/bill/bin/usql --version
usql 0.7.7
+ cat
+ cat dollar-bug.sql
DO
$$
BEGIN
PERFORM 1;
END
$$;
+ /home/bill/bin/usql pg://postgres@postgis?sslmode=disable -f dollar-bug.sql
Connected with driver postgres (PostgreSQL 11.2 (Debian 11.2-1.pgdg90+1))
error: pq: 42601: unterminated dollar-quoted string at or near "$$
BEGIN
PERFORM 1;"
error: pq: 42601: unterminated dollar-quoted string at or near "$$;"

And here's a demonstration using usql interactively.  First, pasting the dollar-bug contents which works as expected, and second executing the commands from within the file which results in the same "unterminated dollar-quoted string" error as above:
bill@nix-nice:~$ ~/bin/usql pg://postgres@postgis?sslmode=disable
Connected with driver postgres (PostgreSQL 11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.

pg:postgres@postgis=> DO
pg:postgres@postgis-> $$
pg:postgres@postgis$> BEGIN
pg:postgres@postgis$> PERFORM 1;
pg:postgres@postgis$> END
pg:postgres@postgis$> $$;
DO
pg:postgres@postgis=> \i dollar-bug.sql
error: pq: 42601: unterminated dollar-quoted string at or near "$$
BEGIN
PERFORM 1;"
error: pq: 42601: unterminated dollar-quoted string at or near "$$;"

The issue is that in usql's handler.Handler.Include func, I have forgotten to pass the driver's configuration to the statement parser. A fix will be available shortly.

Fixed.
$ go build
ken@ken-desktop:~/src/go/src/github.com/xo/usql$ ./usql pg://postgres:P4ssw0rd@localhost < dollar-bug.sql
Connected with driver postgres (PostgreSQL 12.0 (Debian 12.0-2.pgdg100+1))
WELCOME TO THE JUNGLE Sun 12 Jan 2020 07:48:58 AM WIB
DO
ken@ken-desktop:~/src/go/src/github.com/xo/usql$ ./usql pg://postgres:P4ssw0rd@localhost -f dollar-bug.sql
Connected with driver postgres (PostgreSQL 12.0 (Debian 12.0-2.pgdg100+1))
WELCOME TO THE JUNGLE Sun 12 Jan 2020 07:49:01 AM WIB
DO
ken@ken-desktop:~/src/go/src/github.com/xo/usql$


TAJO-1526: Investigate the frequent failures of Travis CI

This PR is to find the origin of the problem.

+1

Thanks @jinossy.
The problem seems the memory overflow, especially related to the permanent generation space.
So, I increased the permSize from 128 MB to 152 MB in this patch.
Additionally, I reduced the number of test tuples  of TestExternalSortExec from 3,000,000 to 100,000.
If there are any objections, I'll commit soon.

Right. So, I also decreased the sort buffer size to test external sort.

ah, good.


Microsoft.Web/Sites

Bicep version
0.4.1
Describe the bug
The property "metadata" is not allowed on objects of type "SiteConfig".
To Reproduce
resource site 'Microsoft.Web/sites@2021-01-01' = {
  name: 'site'
  location: 'west europe'
  kind: 'app'
  properties: {
    enabled: true
    siteConfig: {
      metadata: [
        {
          name: 'CURRENT_STACK'
          value: 'dotnetcore'
        }
      ]
    }
  }
}

It compiles and works but it does give a warning: Warning BCP037

Do you happen to know how/where that metadata array is consumed? It looks like the web/sites resource type understands what to do with that.
You are getting this warning because this property is not declared in this resource type's swagger, so I'm wondering if it should be or if this is arbitrary metadata.

that last part I figured out thnx.
but it looks like web/sites or web/sites/config. but its not very clear to me either. We were looking for a way to specify dotnetcore on a windows app service. Not much is documented about this.
https://github.com/MicrosoftDocs/azure-docs/issues/43963

Were you able to verify that the website is in fact running dotnet core? I'm worried it may be silently failing.
If it is working, then it looks like the right fix is to add it to the swagger spec.

Hi Alex, i can confirm that setting the metadata stack, changes the stack to dotnetcore and back to framework (tested on existing deployment). Also the stack option is generated in the azure portal, when deploying a new webapp and choosing the Download a template for automation option.
@Plork: Thanks for this snippet, i waisted a day figuring this out ;)

Hi @alex-frankel ,  Any update on this.  In Azure Pipelines, it is being surfaced as a warning and the build shows as partially succeeded.  It compiles correctly and the corresponding ARM template is compiled correctly.  Need to remove the warning.

No update on resolution of the issue unfortunately. It is part of a larger list of swagger fixes that I hope the team will be able to resolve soon. cc @seligj95

This doesn't work. Here's my template for a .NET Core 3.1 web app.
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
  name: 'MyAppServicePlan'
  location: resourceGroup().location
  properties: {
    reserved: true
  }
  sku: {
    name: 'P1v2'
  }
  kind: 'linux'
}

resource appService 'Microsoft.Web/sites@2021-02-01' = {
  name: 'MyApp'
  location: resourceGroup().location
  kind: 'app,linux'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    enabled: true
    serverFarmId: appServicePlan.id
    siteConfig: {
      linuxFxVersion: 'dotnet|3.1'
      appCommandLine: 'dotnet MyUI.dll'
      netFrameworkVersion: 'v4.0'
      metadata: [
        {
          name: 'CURRENT_STACK'
          value: 'dotnetcore'
        }
      ]
    }
  }
}

When it gets deployed it gives the warning mentioned above and the app service is set up with an empty server stack.

I was given a solution for this on stackoverflow
https://stackoverflow.com/questions/69897663/setting-azure-app-service-server-stack-on-a-bicep-template?noredirect=1#comment123566981_69897663
The trick is using linuxFxVersion: 'DOTNETCORE|3.1'
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
  name: 'MyAppService'
  location: resourceGroup().location
  properties: {
    reserved: true
  }
  sku: {
    name: 'P1v2'
  }
  kind: 'linux'
}
resource appService 'Microsoft.Web/sites@2021-02-01' = {
  name: 'MyApp'
  location: resourceGroup().location
  identity: {
    type: 'SystemAssigned'
  }
  kind: 'app'
  properties: {
    enabled: true
    serverFarmId: appServicePlan.id
    siteConfig: {
      linuxFxVersion: 'DOTNETCORE|3.1'
      appCommandLine: 'dotnet MyApp.dll'
    }
  }
}

I was given a solution for this on stackoverflow https://stackoverflow.com/questions/69897663/setting-azure-app-service-server-stack-on-a-bicep-template?noredirect=1#comment123566981_69897663
The trick is using linuxFxVersion: 'DOTNETCORE|3.1'
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
  name: 'MyAppService'
  location: resourceGroup().location
  properties: {
    reserved: true
  }
  sku: {
    name: 'P1v2'
  }
  kind: 'linux'
}
resource appService 'Microsoft.Web/sites@2021-02-01' = {
  name: 'MyApp'
  location: resourceGroup().location
  identity: {
    type: 'SystemAssigned'
  }
  kind: 'app'
  properties: {
    enabled: true
    serverFarmId: appServicePlan.id
    siteConfig: {
      linuxFxVersion: 'DOTNETCORE|3.1'
      appCommandLine: 'dotnet MyApp.dll'
    }
  }
}

Apologies, didn't see this yesterday. For reference, you can use  az webapp list-runtimes --linux to see the supported runtimes/linuxFxVersions. As you found out, dotnet|3.1 is not supported while dotnetcore|3.1 is.

@seligj95 -- is there a possibility to validate when the linuxFxVersion is not valid? I know this is not a strict list of enum values, so it may not be feasible, but presumably the property value could be compared w/ what is returned by the list-runtimes command?

The core issue is that the metadata property is one - but not the only - way to set the Stack Settings (from the Azure Portal) programmatically:

For different stacks an app setting/environment variable is used.
I don't know if it's the ARM team or the App Service team that adamantly refuses to document this, but it's been going on for years and there are dozens of StackOverflow questions about it. The closest thing to a Microsoft official answer is "manually create what you want in the portal, then dump the ARM template before actually initiating the deploy", which is pretty much the definition of half-assing it.
This is complicated by the fact that apparently it isn't necessary to configure Stack Settings at all for any version of .NET Core/Framework running on a Windows App Service Plan because all the runtimes are just there and magically work, but that's not documented clearly anywhere either.

@cpdohert -- have you seen this reference before? Wondering if it is helpful at all, or if we need to edit/expand it:
https://docs.microsoft.com/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet

For anyone else who stumbles across this issue, for ASP.NET you can use this to set:
      windowsFxVersion: 'ASPNET|4.8'
      metadata: [
        {
          name: 'CURRENT_STACK'
          value: 'dotnet'

        }
      ]


Finetuning Questions

Thanks so much for this work!

What is the minimum GPU requirement to fine-tune the model? Will 2xV100 (32gb) be enough?
Is it possible to run inference via OpenAI API on the peft-finetuned model?

its not enough， need 70G memory to tune

Fore Sure， just change load model function to merge peft ckpt

Just for reference, I have tried the finetuning code on a setup with 4 x 24 GB GPUs and it didn't work either, even loading the newly released 4-bit model as base. It loads the model (occupies like 50% of each GPU), but as soon as it tries to load the first batch of data it OOMs.

With default config in (finetune_demo/peft_lora.py), ONLY the lm_head (final classification layer) is trained. This works with 2x A100 80GB GPUs (likely also with just one).
IFF training vision_expert_query_key_value layers, it OOMs on my setup even with LoRA rank 1, despite fewer params being trained that when lm_head is tuned.
(trainable params: 327,680 || all params: 19,503,432,960 || trainable%: 0.0017). Any fix?
Probably using zero-3 would help. Just changing the config however doesn't split the model to two GPUs. Will try to debug next week. Issue shown in:
https://github.com/microsoft/DeepSpeed/issues/5575
Any fix to allow finetuning of vision_expert_query_key_value layers without zero3?

Hello. I tried some Zero 3 configs yesterday, no luck either.
The finetuning process doesn't OOM with just 1 x A100, the problem is the VRAM per GPU. With 4 x 3090 it doesn't work, zero2, zero3 and event trying to start from the new 4-bit model.

Hello. I tried some Zero 3 configs yesterday, no luck either.
The finetuning process doesn't OOM with just 1 x A100, the problem is the VRAM per GPU. With 4 x 3090 it doesn't work, zero2, zero3 and even trying to start from the new 4-bit model.

Sad to tell the model is not support zero3 as I mention in ReadME

It's a pity that the fine-tuning of the CogVLM2 model does not support Zero3. However, I would like to know the difference between a model that supports Zero3 and one that does not, or how I should modify the model to support Zero3. I hope someone can answer this question. I would be very grateful.

its not enough， need 70G memory to tune

Fore Sure， just change load model function to merge peft ckpt

Excuse me but, 70G do you mean total or each GPU? I just tried to run finetune_demo/peft_lora on a 8 x V100 (32GB each, 256GB in total) machine with no luck, OOM still.
Then I switched to int4 version but it threw me the error below:
[rank7]: Traceback (most recent call last):
[rank7]:   File "/raid/cogvlm2/finetune_demo/peft_lora.py", line 346, in <module>
[rank7]:     main()
[rank7]:   File "/raid/cogvlm2/finetune_demo/peft_lora.py", line 279, in main
[rank7]:     outputs = model(
[rank7]:               ^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/deepspeed/utils/nvtx.py", line 15, in wrapped_fn
[rank7]:     ret_val = func(*args, **kwargs)
[rank7]:               ^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/deepspeed/runtime/engine.py", line 1855, in forward
[rank7]:     loss = self.module(*inputs, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/peft/peft_model.py", line 1430, in forward
[rank7]:     return self.base_model(
[rank7]:            ^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/peft/tuners/tuners_utils.py", line 179, in forward
[rank7]:     return self.model.forward(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/modeling_cogvlm.py", line 620, in forward
[rank7]:     outputs = self.model(
[rank7]:               ^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/modeling_cogvlm.py", line 389, in forward
[rank7]:     images_features = self.encode_images(images)
[rank7]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/modeling_cogvlm.py", line 361, in encode_images
[rank7]:     images_features = self.vision(images)
[rank7]:                       ^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/visual.py", line 130, in forward
[rank7]:     x = self.transformer(x)
[rank7]:         ^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/visual.py", line 94, in forward
[rank7]:     hidden_states = layer_module(hidden_states)
[rank7]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/visual.py", line 79, in forward
[rank7]:     attention_output = self.input_layernorm(self.attention(attention_input))
[rank7]:                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
[rank7]:     return self._call_impl(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
[rank7]:     return forward_call(*args, **kwargs)
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/accelerate/hooks.py", line 166, in new_forward
[rank7]:     output = module._old_forward(*args, **kwargs)
[rank7]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chat-19B-int4/visual.py", line 40, in forward
[rank7]:     out = xops.memory_efficient_attention(
[rank7]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 268, in memory_efficient_attention
[rank7]:     return _memory_efficient_attention(
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 387, in _memory_efficient_attention
[rank7]:     return _memory_efficient_attention_forward(
[rank7]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 403, in _memory_efficient_attention_forward
[rank7]:     op = _dispatch_fw(inp, False)
[rank7]:          ^^^^^^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 125, in _dispatch_fw
[rank7]:     return _run_priority_list(
[rank7]:            ^^^^^^^^^^^^^^^^^^^
[rank7]:   File "/root/anaconda3/envs/cogvlm2_finetune_3.11/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 65, in _run_priority_list
[rank7]:     raise NotImplementedError(msg)
[rank7]: NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs:
[rank7]:      query       : shape=(2, 9217, 16, 112) (torch.bfloat16)
[rank7]:      key         : shape=(2, 9217, 16, 112) (torch.bfloat16)
[rank7]:      value       : shape=(2, 9217, 16, 112) (torch.bfloat16)
[rank7]:      attn_bias   : <class 'NoneType'>
[rank7]:      p           : 0.0
[rank7]: `decoderF` is not supported because:
[rank7]:     attn_bias type is <class 'NoneType'>
[rank7]:     bf16 is only supported on A100+ GPUs
[rank7]<EMAIL_ADDRESS>is not supported because:
[rank7]:     requires device with capability > (8, 0) but your GPU has capability (7, 0) (too old)
[rank7]:     bf16 is only supported on A100+ GPUs
[rank7]: `cutlassF` is not supported because:
[rank7]:     bf16 is only supported on A100+ GPUs
[rank7]: `smallkF` is not supported because:
[rank7]:     max(query.shape[-1] != value.shape[-1]) > 32
[rank7]:     dtype=torch.bfloat16 (supported: {torch.float32})
[rank7]:     has custom scale
[rank7]:     bf16 is only supported on A100+ GPUs
[rank7]:     unsupported embed per head: 112

Does this mean that V100 is sentenced to death for int4? d0_0b

each GPU 70G For BF16 finetune. Need use. 8xA100 or 8xH100, int4 method finetune is not work


Return mindsk to low-ish number please

I've been running an old Essential Phone as my dash, which is running Android 10 (SDK 29)
The current minsdk at head of 33 is really remarkably modern for an app that is targeting secondary/spare phones. I was able to return the minsdk to 24 locally without problem.

Wilco. Updated version sent to play store, should roll out in a few days.
Sorry about that!
On Sun, Oct 29, 2023 at 9:32 PM Remulasce @.***> wrote:

I've been running an old Essential Phone as my dash, which is running
Android 10 (SDK 29)
The current minsdk at head of 33 is really remarkably modern for an app
that is targeting secondary/spare phones. I was able to return the minsdk
to 24 locally without problem.
—
Reply to this email directly, view it on GitHub
https://github.com/nmullaney/candash/issues/67, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAD72K2LBROBM454P5NRBJTYB4UW3AVCNFSM6AAAAAA6VMSTC6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DONBXHEYDAOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


test(hits): first pass at widgets testing

@redox, here's how I did it.
I removed the pre-bound Template component because it in fact
complexifies a lot testing and is not more easy to understand than
what I did here I believe.
What do you think?
(And no, it seems react contexts will not be more easy to use than
what we have here).

cc @algolia/javascript what do you think? I propose a new way to pass templateProps down the line.
The previous version is fun but really hard to test because it requires more and more mocking while not providing a code that is easier to understand.

LGTM :+1:

Ok I have updated the PR @redox with even more separation. Have a look for your own tests.

:+1: Go!

Oh thanks. The prebound template was really hard to grasp and ugly


Limit users access to other profile information

Limit users access to other profile information
A user (let's say user_id = 58) can access to all other users and their profile information by changing the id like http://cultidate.herokuapp.com/api/user/59
I am not sure if we talked about this before but I think it shouldn't return all the information for other users. We can either return a simpler response with name, surname, and profile picture or do not return any info at all.

It is doable, but at this scale, we don't need such feature in my opinion since not only it requires extra effort  for backend but also makes frontend's tasks complicated.

I think that request will be used when a user visits another user's profile, so we have to return some information. Also, we planned the platform such that all profiles are public, since there is no such feature as 'add friend' etc. Maybe, we can filter out some of the fields in the future if there is a problem with the response data, but it doesn't seem like a priority at this point if you don't have any other arguments.


GELU does not appear to support approximate tanh

The optional algorithm for GELU is to internally use tanh
See more here:
https://pytorch.org/docs/stable/generated/torch.nn.GELU.html#torch.nn.GELU
I was expecting this to just work:
var gelu = nn.GELU(approximate: "tanh");
When the approximate argument is ‘tanh’, GELU is estimated differently. The default is rather different.
Is it possible, since this is supported natively, to include the "approximate" property for TorchSharp's GELU?
Is there a way for me to do it without requiring the difficulty of pushing new versions of the library?

I'm guessing perhaps this could be an option
[DllImport("LibTorchSharp")]
internal static extern IntPtr THSNN_GLU_ctor(string approximate, out IntPtr pBoxedModule);

Two options:

Fix the code and send us a much-appreciated PR. The approximate argument should be an enumeration instead of a string.
Implement your own GELU module using the available mathematical primitives in TorchSharp.

Sorry if this seems obvious, just trying to make sure it's right.
I'm definitely willing to try the PR approach for this (and anything else I could help with).

I am unsure what naming conventions for enums are used within TorchSharp, and what the appropriate namespace or scope would be.
I forked the repo, but I am new to issuing PR's so any guidance would be appreciated (or if the CONTRIBUTING.md explanation fully applies I will just try that approach)

Would then enum reside within the same GELU.cs file? Perhaps the changes could look like:
PInvoke change:
[DllImport("LibTorchSharp")]
internal static extern IntPtr THSNN_GELU_ctor(TorchSharp.Modules.ApproxType approximate, out IntPtr pBoxedModule);

GELU.cs change:
(within the Modules namespace)
    public enum ApproxType
    {
            none,
            tanh
    }

the updated constructor:
    public static GELU GELU(ApproxType approximate = ApproxType.none)
    {
            var handle = THSNN_GELU_ctor(approximate, out var boxedHandle);
            if (handle == IntPtr.Zero) { torch.CheckForErrors(); }
            return new GELU(handle, boxedHandle);
    }

I tried this, but it causes an exception when calling the ctor. If I use string instead of the enum it works, so perhaps the implicit conversion of ApproxType.tanh to 1 is causing the problem. Unsure how or where the enum would be brought back to a string to satisfy the approximate parameter.


How to fix the windows position and size? my screen resolution is too low

How to fix the windows position and size?
The window is always incompelete cause my pc is of low resolution. And the window position seems not fixed.
Part of the setting panel window will be blocked by the taskbar. The window can be adjusted to a suitable size but, it seems that powertoys couldn't remember the window size.

@devindang  Windows size of which window. Can you add a image or explain it more?

If you have screen lower than 1366x768, I guess this is the standard resolution nowadays. If so, I would recommend you to do an upgrade.

it exactly is 1366*768, and part of the setting panel window will be blocked by the taskbar. The window can be adjusted to a suitable size but, it seems that powertoys couldn't remember the windows size.
获取 Outlook for Androidhttps://aka.ms/ghei36

From: gczark<EMAIL_ADDRESS>Sent: Saturday, September 5, 2020 8:01:53 PM
To: microsoft/PowerToys<EMAIL_ADDRESS>Cc: devindang<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/PowerToys] How to fix the windows position and size? my screen resolution is too low (#6398)
If you have screen lower than 1366x768, I guess this is the standard resolution nowadays. If so, I would recommend you to do an upgrade.
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerToys%2Fissues%2F6398%23issuecomment-687600283&data=02|01||bd875bf479c94d653fdc08d851937bd0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637349041158193413&sdata=fs%2BxKxChwE11ShuiFqUe5MBxq9HaMgLnXY43h7x%2FQBQ%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJNP42K6L55PH6KS7S6Z5K3SEISDDANCNFSM4Q2RRRYA&data=02|01||bd875bf479c94d653fdc08d851937bd0|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637349041158203407&sdata=QPW8qcAbjw6P21RkKuBkX5WTmRfqVAJCvO5mmzNnyIc%3D&reserved=0.

I have the same monitor, and I have not encountered this before.
Could you provide a screenshot, so that we can help you more of this problem.

I have the same monitor, and I have not encountered this before.
Could you provide a screenshot, so that we can help you more of this problem.

The default

And, when I drag it up, it seems higher than my screen...

The ideal

Everytime I adjust it to the ideal size and position, the next time I open the setting panel it turns to the default state.

ok now i understand

Settings doesn't remember its position and size before closing. And when reopening, the window seems to have height higher than the screen.

Tracked by https://github.com/microsoft/PowerToys/issues/3685 and https://github.com/microsoft/PowerToys/issues/3612


Release native resources from Java via AutoCloseable

Reading #100, it seems that by design OR-Tools does not provide a way to explicitly close solvers and release native resources created by the JNI calls. Finalizers are supposed to take care of this, AFAIU.
This is rather unusual in Java, and, if I dare to say, is usually considered incorrect. Bloch’s Effective Java explains it in detail in Item 8 (of the 3rd edition).
As a summary: “Finalizers are unpredictable, often dangerous, and generally unnecessary. Their use can cause erratic behavior, poor performance, and portability problems. Finalizers have a few valid uses, which we’ll cover later in this item, but as a rule, you should avoid them. (…) C++ programmers are cautioned not to think of finalizers or cleaners as Java’s analogue of C++ destructors.”
The normal mechanism is to implement AutoCloseable and let your users close resources when they know they don’t need them any more.

actually, we do not implement anything. Swig does.
I would not think that swig is incorrect.
#100 was about the destructor not being wrapped by swig, which was fixed.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le ven. 1 févr. 2019 à 03:56, Olivier Cailloux<EMAIL_ADDRESS>a
écrit :

Reading #100 https://github.com/google/or-tools/issues/100, it seems
that by design OR-Tools does not provide a way to explicitly close solvers
and release native resources created by the JNI calls. Finalizers are
supposed to take care of this, AFAIU.
This is rather unusual in Java, and, if I dare to say, is usually
considered incorrect. Bloch’s Effective Java
https://www.amazon.com/Effective-Java-Joshua-Bloch/dp/0134685997
explains it in detail in Item 8 (of the 3rd edition).
As a summary: “Finalizers are unpredictable, often dangerous, and
generally unnecessary. Their use can cause erratic behavior, poor
performance, and portability problems. Finalizers have a few valid uses,
which we’ll cover later in this item, but as a rule, you should avoid them.
(…) C++ programmers are cautioned not to think of finalizers or cleaners as
Java’s analogue of C++ destructors.”
The normal mechanism is to implement AutoCloseable and let your users
close resources when they know they don’t need them any more.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1040, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17fP61h2Zq6a6fl-UxN_Rhy6Sn7qXks5vI6zBgaJpZM4adj6c
.

I do not know.
I do not write anything related to memory management in my swig code.
Please tell me what I should do.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le ven. 1 févr. 2019 à 14:25, Olivier Cailloux<EMAIL_ADDRESS>a
écrit :

Swig only does what the developer tells it to do. My arguments have not
been answered or even considered.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1040#issuecomment-459721658,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17UJ7DQMzcAahv57K-LMcUhdF0eEUks5vJEBggaJpZM4adj6c
.

I am afraid I do not have a ready made solution for you… I only wanted to draw attention to this possible problem, not claim that I am ready to solve it. Solving it would require, I think, not huge time and effort, but still, probably some significant time and effort and some planning and thinking about a few API changes.
I am sure that at Google you do have very experimented developers in Java that will be able to help. (I am a happy user of Guava.)

Actually, I am mimicking java swig usage at Google.
I have not seen any complex memory management code, and I search the web
for "java swig autocloseable" and did not find any reference.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le ven. 1 févr. 2019 à 15:11, Olivier Cailloux<EMAIL_ADDRESS>a
écrit :

I am afraid I do not have a ready made solution for you… I only wanted to
draw attention to this possible problem, not claim that I am ready to solve
it. Solving it would require, I think, not huge time and effort, but still,
probably some significant time and effort and some planning and thinking
about a few API changes.
I am sure that at Google you do have very experimented developers in Java
that will be able to help. (I am a happy user of Guava
https://github.com/google/guava/wiki.)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1040#issuecomment-459734606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17WLglTqID-TvnoUfHzvM8yY9lMDdks5vJEsZgaJpZM4adj6c
.

Indeed the SWIG doc itself suggests to leave the GC mechanism reclaim memory automatically. That runs exactly counter the advice of Bloch (which, I think, has good arguments to defend his point of view, whereas SWIG does not argue on that topic). Perhaps the SWIG people would consider Bloch too perfectionist on that topic? (Or perhaps they simply didn’t think about his arguments.) OTOH, LP is precisely a domain where performance and good memory management matter. I’d suggest you to read the item I cited in my first post and decide.
If you opt for explicit possibility of releasing resources, I think you simply have to add explicit method calls that release resources and that your users can call through a method called “close” (by convention and because it allows the object to implement AutoCloseable). I don’t think any of this would be special to SWIG, that would just be normal method calls through JNI (wrapped by SWIG, of course). Perhaps this can help? I don’t know much about SWIG so I may be wrong.
FWIW, CPLEX allows to close resources from Java. But as it’s not open source, I’m not sure how much you can learn from this. At least the high level API is available for study.

Thanks for the insight.
Unless someone come with a compelling example that demonstrates this is the only solution, I will not complexify my swig code. This is already too much of a burden.


Fix shape robustness

This PR makes handling of scalar and 0-dimensional arrays more robust in Model.likelihood. In particular, call_count and pr0_to_likelihood_array should both now accept scalars and 0-dim arrays without errors.

Since this is a fairly small change, but is important in expanding the inputs that can be handled safely, I'll go on and merge this in now.


merge package from arlac77/npm-package-template

.travis.yml

chore(travis): merge from template .travis.yml

Codecov Report

Merging #404 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #404   +/-   ##
=======================================
  Coverage   33.33%   33.33%
=======================================
  Files           5        5
  Lines          93       93
=======================================
  Hits           31       31
  Misses         62       62

Continue to review full report at Codecov.

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

Coverage remained the same at 29.204% when pulling 1a89b879ffc43ca180976943db6d79f18e6b44c4 on template-sync-1 into ba52aacea204d870987735ab7e8e52c355b6f7e5 on master.


Add missing branches to make exhaustiveness check happy

Followup to #8678

Now when I'm looking at it there's still a when nil branch missing but compiler doesn't seem to complain...
Using compiled compiler at /Users/sija/Code/crystal/.build/crystal
In /Users/sija/Code/crystal/src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4835757792'

Called macro defined in /Users/sija/Code/crystal/src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - false

Is nil passed in your calling code? Otherwise the compiler won't complain. The compiler checks actual values. If you specify a default value but it's not used, the compiler doesn't use it.

I guess we need to handle nil too, even if the compiler (correctly) doesn't complain about it.

I wonder why we didn't see this warning before... I think a change to this file was merged after we merge the exhaustiveness check. When I compile the specs for http client I get this:
In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4640824944'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - Nil

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4678149552'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - Nil

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4678181648'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - false

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4678825280'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - false

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4713403040'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - false

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4714974048'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - Nil

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4734511408'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - Nil

In src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}
       ^
Warning: expanding macro

There was a problem expanding macro 'macro_4711526624'

Called macro defined in src/http/client.cr:132:5

 132 | {% if flag?(:without_openssl) %}

Which expanded to:

   1 |
 > 2 |       @tls = case tls
   3 |              when true
   4 |                OpenSSL::SSL::Context::Client.new
   5 |              when OpenSSL::SSL::Context::Client
   6 |                tls
   7 |              end
   8 |
Warning: case is not exhaustive.

Missing cases:
 - Nil

A total of 8 warnings were found.

It's a bit of a mess but it's fine: in the release after 0.34.0 you'll get an error for these, and you'll only see one of them (like all other errors). Then you'll have to add nil, then false and you'll be done.

@asterite I've added an else branch which handles both of those cases.

I think we should add the explicit cases false and nil. Then if we decide to add new cases the compiler will tell us. That's the benefit of the change. So we should try to avoid adding else if possible

@asterite ok, done

@asterite I rebased master yesterday, but I didn't notice the warnings since the CI was green.

@j8r It's fine :-)
I was worried for a minute that the check was working correctly, but it was just that this was merged after I merged my PR.


Make stuck on checking submodule Nuttx

Describe the bug
Building PX4 for a Pixhawk with make px4_fmu-v2_default hangs on bash Tools/check_submodules.sh platforms/nuttx/NuttX/nuttx. However this command runs instantly in a fresh shell. Waiting 30+ minutes doesn't help issue.
Expected behavior
Make builds PX4 and uploads it to the pixhawk board
Log Files and Screenshots
 $ make px4_fmu-v2_default
-- PX4 version: v1.10.0-beta4-158-ge3964d5150
-- PX4 config file: /opt/drone/PX4/boards/px4/fmu-v2/default.cmake
-- PX4 config: px4_fmu-v2_default
-- PX4 platform: nuttx
-- PX4 lockstep: disabled

$ bash Tools/check_submodules.sh platforms/nuttx/NuttX/nuttx; echo $!
0

htop output

Drone (please complete the following information):

APM Copter detected as PX4 FMU V2 by QGC

Additional context
Add any other context about the problem here.

Add any other context about the problem here.

Fresh source code from PX4/Firmware repo
Similar issue to https://github.com/PX4/Firmware/issues/3181
I can run make px4_sitl_default jmavsim and all other SITL make commands perfectly fine

Hi @iwishiwasaneagle , try running git submodule update --init --recursive first, and allow some time for it to complete the nuttx step. I've seen your issue on my machine a handful of times and also had it take 20min+ on occasion even with a good download speed, I'm not sure what causes it to hang.  Report back if that doesn't solve the issue!

Can you try make distclean followed by make submodulesclean?

Can you try make distclean followed by make submodulesclean?

$ make distclean
Cleared directory 'Tools/jMAVSim'
Submodule 'Tools/jMAVSim' (https://github.com/PX4/jMAVSim.git) unregistered for path 'Tools/jMAVSim'
Cleared directory 'Tools/sitl_gazebo'
Submodule 'Tools/sitl_gazebo' (https://github.com/PX4/sitl_gazebo.git) unregistered for path 'Tools/sitl_gazebo'
Cleared directory 'boards/atlflight/cmake_hexagon'
Submodule 'boards/atlflight/cmake_hexagon' (https://github.com/PX4/cmake_hexagon.git) unregistered for path 'boards/atlflight/cmake_hexagon'
Cleared directory 'cmake/configs/uavcan_board_ident'
Submodule 'cmake/configs/uavcan_board_ident' (https://github.com/PX4/uavcan_board_ident.git) unregistered for path 'cmake/configs/uavcan_board_ident'
Cleared directory 'mavlink/include/mavlink/v2.0'
Submodule 'mavlink/include/mavlink/v2.0' (https://github.com/mavlink/c_library_v2.git) unregistered for path 'mavlink/include/mavlink/v2.0'
Cleared directory 'msg/tools/gencpp'
Submodule 'msg/tools/gencpp' (https://github.com/PX4/gencpp.git) unregistered for path 'msg/tools/gencpp'
Cleared directory 'msg/tools/genmsg'
Submodule 'msg/tools/genmsg' (https://github.com/PX4/genmsg.git) unregistered for path 'msg/tools/genmsg'
Cleared directory 'platforms/nuttx/NuttX/apps'
Submodule 'platforms/nuttx/NuttX/apps' (https://github.com/PX4/NuttX-apps.git) unregistered for path 'platforms/nuttx/NuttX/apps'
Cleared directory 'platforms/nuttx/NuttX/nuttx'
error: could not lock config file .git/modules/platforms/nuttx/NuttX/nuttx/config: No such file or directory
warning: Could not unset core.worktree setting in submodule 'platforms/nuttx/NuttX/nuttx'
Submodule 'platforms/nuttx/NuttX/nuttx' (https://github.com/PX4/NuttX.git) unregistered for path 'platforms/nuttx/NuttX/nuttx'
Cleared directory 'src/drivers/gps/devices'
Submodule 'src/drivers/gps/devices' (https://github.com/PX4/GpsDrivers.git) unregistered for path 'src/drivers/gps/devices'
Cleared directory 'src/drivers/uavcan/libuavcan'
Submodule 'src/drivers/uavcan/libuavcan' (https://github.com/PX4/uavcan.git) unregistered for path 'src/drivers/uavcan/libuavcan'
Cleared directory 'src/lib/DriverFramework'
Submodule 'src/lib/DriverFramework' (https://github.com/PX4/DriverFramework.git) unregistered for path 'src/lib/DriverFramework'
Cleared directory 'src/lib/ecl'
Submodule 'src/lib/ecl' (https://github.com/PX4/ecl.git) unregistered for path 'src/lib/ecl'
Cleared directory 'src/lib/matrix'
Submodule 'src/lib/matrix' (https://github.com/PX4/Matrix.git) unregistered for path 'src/lib/matrix'
Cleared directory 'src/modules/micrortps_bridge/micro-CDR'
Submodule 'src/modules/micrortps_bridge/micro-CDR' (https://github.com/PX4/micro-CDR.git) unregistered for path 'src/modules/micrortps_bridge/micro-CDR'
Removing Tools/px4airframes/__pycache__/
Removing build/
Removing msg/tools/__pycache__/
Removing src/lib/parameters/px4params/__pycache__/

and it gets stuck on git submodule update --init --recursive (from htop) when i run make submodulesclean

After make distclean what if you just do git submodule update --init --recursive --force platforms/nuttx/NuttX/nuttx/ to try and update NuttX directly?

Hi @iwishiwasaneagle , try running git submodule update --init --recursive first, and allow some time for it to complete the nuttx step. I've seen your issue on my machine a handful of times and also had it take 20min+ on occasion even with a good download speed, I'm not sure what causes it to hang. Report back if that doesn't solve the issue!

$ git submodule update --init --recursive
Submodule 'boards/atlflight/cmake_hexagon' (https://github.com/PX4/cmake_hexagon.git) registered for path 'boards/atlflight/cmake_hexagon'
Submodule 'cmake/configs/uavcan_board_ident' (https://github.com/PX4/uavcan_board_ident.git) registered for path 'cmake/configs/uavcan_board_ident'
Submodule 'src/drivers/uavcan/libuavcan' (https://github.com/PX4/uavcan.git) registered for path 'src/drivers/uavcan/libuavcan'
Submodule 'src/modules/micrortps_bridge/micro-CDR' (https://github.com/PX4/micro-CDR.git) registered for path 'src/modules/micrortps_bridge/micro-CDR'
Cloning into '/opt/drone/PX4/boards/atlflight/cmake_hexagon'...
Cloning into '/opt/drone/PX4/cmake/configs/uavcan_board_ident'...
Cloning into '/opt/drone/PX4/platforms/nuttx/NuttX/apps'...
Cloning into '/opt/drone/PX4/platforms/nuttx/NuttX/nuttx'...
^Berror: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/PX4/NuttX.git' into submodule path '/opt/drone/PX4/platforms/nuttx/NuttX/nuttx' failed
Failed to clone 'platforms/nuttx/NuttX/nuttx'. Retry scheduled
Cloning into '/opt/drone/PX4/src/drivers/uavcan/libuavcan'...
Cloning into '/opt/drone/PX4/src/modules/micrortps_bridge/micro-CDR'...
Cloning into '/opt/drone/PX4/platforms/nuttx/NuttX/nuttx'...
 error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/PX4/NuttX.git' into submodule path '/opt/drone/PX4/platforms/nuttx/NuttX/nuttx' failed
Failed to clone 'platforms/nuttx/NuttX/nuttx' a second time, aborting

I managed to run git clone git@github.com:PX4/NuttX.git successfully, albeit very slowly. I think it might actually be a network issue...

After make distclean what if you just do git submodule update --init --recursive --force platforms/nuttx/NuttX/nuttx/ to try and update NuttX directly?

$ git submodule update --init --recursive --force platforms/nuttx/NuttX/nuttx/
Cloning into '/opt/drone/PX4/platforms/nuttx/NuttX/nuttx'...

and then stays like that for a while... I managed to run git clone git@github.com:PX4/NuttX.git successfully, albeit very slowly

I just ran a fresh clone, then git submodule update --init --recursive, and it stalled on Nuttx for about 8 minutes but the completed, and then make px4_fmu-v2_default and it completes successfully for me, but the Nuttx module took about 8 minutes to complete.
In the past I have stopped the git submodule update --init --recursive process and restarted it a few times in a row until it went more quickly, or have waited it out successfully as well.  As long as your terminal responds to enter key presses with newlines, you keep waiting for the submodule update to complete, or stop the process (ctrl-C), and restart again.  I've had both work.  Let us know if allowing longer to complete the submodule update step for Nuttx works out.

I just ran a fresh clone, then git submodule update --init --recursive, and it stalled on Nuttx for about 8 minutes but completed, and then make px4_fmu-v2_default and it completed successfully for me.
In the past I have stopped the git submodule update --init --recursive process and restarted it a few times in a row until it went more quickly, or have waited it out successfully as well. As long as your terminal responds to enter key presses with newlines, you keep waiting for the submodule update to complete, or stop the process (ctrl-C), and restart again. I've had both work. Let us know if allowing longer to complete the submodule update step for Nuttx works out.

Yup spot on! I'm nut used to processes running for 15 minutes + with zero feedback... Cheers for the help!

Great! Glad it worked!


No longer in CRAN?

Hi! I'm using your package quite a lot as a requirement for a small package I use at my company, I was wondering if you were planning to submit again to CRAN as at the moment I need to force install from GitHub.
Thanks for the great work!

Should we be advertising for a new maintainer/developers?  This is a valuable package ...

If there is somebody who would like to take it over, I'm happy to pass it off. I really don't have the time for it these days, unfortunately.
With that said, I can try to find some time to at least get it back up on CRAN for now.

Any volunteer to maintain this package? I could do it (and I really need this package). However, I am not a mathematician and may not be the best person to discuss pure mathematical stuff. However, I maintain a dozen packages on CRAN. So, I am qualified for the "technical" aspects.

I would be happy if you wanted to take on maintainership - I'd be willing to help with mathier stuff. (If you wanted you could modify the README etc. to indicate that the package is in "maintenance mode", i.e. you will try to fix bugs but make no commitment to adding features ...)

Would be happy to pass it off. I'm sorry again. I made progress and was just about ready to submit to CRAN and then it fell through the cracks again for me. I think it is basically ready to submit.

Thanks @bbolker and @datalorax for your positive feedbacks. I will look at the bugs that have to be corrected. I will first see if I can make it a workable version for CRAN again with a reasonable amount of work. Anything at the top of the list?
By the way, I just did a pull request to clean up the Remotes entry in the DESCRIPTION file.

The only thing that came up in an R CMD check --as-cran/devtools::check() was
Found the following (possibly) invalid URLs:
 URL: https://tinyurl.com/y43gpto4 (moved to https://github.com/datalorax/equatiomatic/tree/master/tests)
    From: README.md
    Status: 200
    Message: OK

presumably the tinyurl link should be changed to a direct link to the Github info.
Everything else seems to be administrative:

[ ]  bump version number (to 0.3.2?)

[ ] let CRAN know about the maintainer switch: from the CRAN policies,

When a new maintainer wishes to take over a package, this should be accompanied by the written agreement of the previous maintainer (unless the package has been formally orphaned).

Presumably an e-mail from @datalorax to<EMAIL_ADDRESS>would suffice ...

[ ] modify the DESCRIPTION file appropriately

[ ] decide on the development mode going forward (i.e., does @datalorax give @phgrosjean push access to this repository, or does @phgrosjean make a fork and make that the new development location?  (If so, the README in the original repo should get modified so people don't get confused.) (Given stuff like the list of existing issues etc. it seems better to keep the reference copy on this repo ...?) (This might also require an edit to the DESCRIPTION file)

I am comfortable with any of the development directions forward you proposed, @bbolker.

Also on CRAN check you can see that there are missing ... for several methods, but that seems to be already corrected in the code.
I'll make a pull request with the required changes.
Regarding pull access on 'datalorax' or fork into 'SciViews' (the GitHub organization that collects together all the R packages I develop), I am OK with both approaches. With the fork we need to be explicit in the original README file indeed. May be it is better to leave the package where it currently is?

That works for me. If down the line you want to move it to SciViews I'm okay with that too.
Thank you for taking this on! I'm happy it will still be developed. I just ran out of steam and had a career change that left this type of work less motivating.

I had to rewrite a part of the doc and to homogenize calls to methods. As usual, CRAN people are very picky, but they remarks were correct. Version 0.3.3 is now available again from CRAN!

Thank you so much!


🐛 BUG: astro check reports false positive unused variable when variable is used in Astro.redirect

Describe the Bug
astro check reports false positive when using import in return Astro.redirect( --> here <-- ).
For example here, it will report that MyObject is unused:
---
import { MyObject } from '../object';

return Astro.redirect(
    MyObject.asdfasdf,
);
---

This works as expected though (astro check recognizes MyObject as being used):
---
import { MyObject } from '../object';

let value = MyObject.asdfasdf;
return Astro.redirect(value);
---

A real-world example can be found in https://github.com/GenSpectrum/dashboards/blob/09e505a0bd82a87cf2d460dd3d70fff063eb1b0d/website/src/pages/covid/index.astro
Steps to Reproduce

npm create astro@latest, npx astro check to install @astrojs/check - yields ATM:

  "dependencies": {
    "@astrojs/check": "^0.9.4",
    "astro": "^5.0.4",
    "typescript": "^5.7.2"
  }

src/pages/index.astro:

---
import { MyObject } from '../object';

return Astro.redirect(
    MyObject.asdfasdf, // access a key that does not exist
);
---

src/object.ts:

export const MyObject = {
    helloWorld: 'Hello World!',
}

npx astro check:

$ npx astro check
11:12:10 [content] Syncing content
11:12:10 [content] Synced content
11:12:10 [types] Generated 26ms
11:12:10 [check] Getting diagnostics for Astro files in .../dashboards/astro/square-series...
src/pages/index.astro:2:1 - warning ts(6133): 'MyObject' is declared but its value is never read.

2 import { MyObject } from '../object';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Result (4 files):
- 0 errors
- 0 warnings
- 1 hint

It reports a false positive on an unused variable (it is used - obviously). But it doesn't report the access to the non-existent key.

Link to Minimal Reproducible Example
https://github.com/GenSpectrum/dashboards/commit/c209e4476fed55560a514c41a432487dd9f753a1

Duplicate of https://github.com/withastro/language-tools/issues/476


[Question] Does a test module provide access to the container?

I'd like to use this.container in tests (ember-qunit) does this. I'm not sure if ember-mocha does the same.
Using Ember Mocha how can I access the container in an unit test?
This is the Unit test I have as a blueprint for an addon: https://github.com/pixelhandler/ember-jsonapi-resources/blob/master/blueprints/model-test/files/tests/unit/path/test.js however a consuming app may not use QUnit but ember-mocha instead. So I'd like to provide an example for testing with ember-mocha (addon and app not using ember-data).
cc/ @oliverbarnes

All of the context props from ember-test-helpers are setup here. That should include this.container and this.registry (though both of those are technically private).

Can you provide an example scenario, where this.container is not setup properly?

@oliverbarnes can you link to your test here?

sure, here it is - it's the same one I posted on slack: https://github.com/oliverbarnes/participate/blob/supporting-a-proposal/tests/unit/models/proposal-test.js

Right now I'm hitting an error previous to the missing container one, though:
TestLoader Failures
client/tests/unit/models/proposal-test: could not be loaded ‣
TypeError: ember_mocha.describe is not a function
    at http://localhost:7357/assets/client.js:2616:15
    at mod.state (http://localhost:7357/assets/vendor.js:150:29)
    at tryFinally (http://localhost:7357/assets/vendor.js:30:14)
    at requireModule (http://localhost:7357/assets/vendor.js:148:5)
    at Object.TestLoader.require (http://localhost:7357/assets/test-loader.js:29:9)
    at Object.TestLoader.loadModules (http://localhost:7357/assets/test-loader.js:21:18)
    at Function.TestLoader.load (http://localhost:7357/assets/test-loader.js:40:24)
    at http://localhost:7357/assets/test-support.js:14840:16

ember-mocha does not export describe.  describe is the default mocha describe, and if you want the vanilla version you can import it as import { describe } from 'mocha';, but it looks like you actually want describeModule which is exported by ember-mocha (and should have this.container set properly on the context).

thanks @rwjblue that's good to know. I'm now trying
describeModule('model:proposal', 'Unit | Model| Proposal',{}, function() {

  // describe('#toggleSupport', function() {
    before(function() {
      subject = Proposal.create();
    });

    // describe('when proposal is not supported yet', function() {
      it('adds a support to it', function() {
        // expect(this.subject().get('supports')).to.eql([]);
        expect(subject.toggleSupport()).to.be.true;
      });
    // });
  // });
});

And the test seems to load. I'm avoiding using the container and creating the resource directly, I'll keep you both posted

Actually there's a loading problem again, but with before and beforeEach:
TestLoader Failures
client/tests/unit/models/proposal-test: could not be loaded ‣
TypeError: ember_mocha.beforeEach is not a function

Though I'm importing both:
import {
  describeModule,
  before,
  beforeEach,
  it
} from 'ember-mocha';

@pixelhandler is cloning my repo and taking this for a drive, let's se what comes up. I'm probably doing something not that bright somewhere ;)

@oliverbarnes so this.container does work with describeModule see https://github.com/oliverbarnes/participate/pull/101  but I was not able to figure out how to use before/after or beforeEach/afterEach with describeModule.


Stop/Start Preview

Hi
Is there a way to stop/start the preview of the camera?
The methods are implemented on the CameraView class but they are private.
Thanks.

Please use Stack Overflow for questions, as is noted in the project documentation.
No, the basic assumption is that if there is a CameraView, the point is to be either showing a preview or taking a picture. The sole exception is in single-shot mode, where the preview remains stopped after taking a picture until you elect to restart it (via restartPreview() IIRC).

Thanks.
I will use Stack Overflow for the future questions.


[stable/nginx-ingress] Add support for controller SA annotations

In order to use AWS EKS IAM Roles for Service Accounts feature, one must annotate the service account to specify what IAM role admin wants to grant to that service account.
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME

Signed-off-by: Tam Mach<EMAIL_ADDRESS>Is this a new chart

NOTE: We're experiencing a high volume of PRs to this repo and reviews will be delayed. Please host your own chart repository and submit your repository to the Helm Hub instead of this repo to make them discoverable to the community. Here is how to submit new chart repositories to the Helm Hub.

No, this is existing chart
What this PR does / why we need it:
In order to use AWS EKS IAM Roles for Service Accounts feature, one must annotate the service account to specify what IAM role admin wants to grant to that service account.
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME

Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

@taharah @ChiefAlexander for your review and inputs, thanks a lot.

/ok-to-test

@taharah @ChiefAlexander seems like the build is passing, please let me know if there is anything else required. Thanks.

/lgtm
Thanks for the PR!


Unknown problem

22:46:27: Fatal error encountered:
22:46:27:
22:46:27: Traceback (most recent call last):
22:46:27:   File "main.py", line 158, in main
22:46:27:   File "twitch.py", line 765, in run
22:46:27:   File "twitch.py", line 784, in _run
22:46:27:   File "twitch.py", line 1455, in get_auth
22:46:27:   File "twitch.py", line 516, in validate
22:46:27:   File "twitch.py", line 525, in _validate
22:46:27:   File "contextlib.py", line 204, in aenter
22:46:27:   File "twitch.py", line 1480, in request
22:46:27:   File "gui.py", line 2050, in coro_unless_closed
22:46:27:   File "aiohttp\client.py", line 1125, in send
22:46:27:   File "aiohttp\client.py", line 536, in _request
22:46:27:   File "aiohttp\connector.py", line 540, in connect
22:46:27:   File "aiohttp\connector.py", line 901, in _create_connection
22:46:27:   File "aiohttp\connector.py", line 1178, in _create_direct_connection
22:46:27:   File "aiohttp\connector.py", line 980, in _wrap_create_connection
22:46:27:   File "asyncio\base_events.py", line 1069, in create_connection
22:46:27:   File "asyncio\base_events.py", line 973, in _connect_sock
22:46:27:   File "asyncio\proactor_events.py", line 726, in sock_connect
22:46:27: RuntimeError: await wasn't used with future
22:46:27:
22:46:27: 正在退出...
22:46:28:
22:46:28: 应用程序已终止，请关闭窗口以退出应用程序。

https://github.com/DevilXD/TwitchDropsMiner/issues/80

This is a duplicate of #80.


What is the gpu requirement to run MEMIT on llama7b?

I got OOM on 46GB A40 GPU. Is it expected? how should I solve it? Thank you.

What editing method did you choose?
What's the model to be edited?

Around 50 GB VRAM. You can use accelerate (https://github.com/huggingface/accelerate) for the model parallel.

Thank you!
Do you have an example to support accelerate? or is this built in the library already

Thank you! Do you have an example to support accelerate? or is this built in the library already

Sorry, we don't support Model Parallel yet. Model editing requires modifying the weights of internal parameters, which is a complex process combined with accelerate.
My suggestion is that you can use device_map='auto', using the native model parallel of huggingface. You can refer here(https://huggingface.co/docs/accelerate/usage_guides/big_modeling) for learning device_map.

For example, to edit the llama, you should modify the code here. https://github.com/zjunlp/EasyEdit/blob/main/easyeditor/editors/editor.py#L73


[Bug]: fatal: Need to specify how to reconcile divergent branches.

Prerequisites

[X] I have written a descriptive issue title.
[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.
[X] I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name
None
Expected/Current Behaviour
Scoop should update normally.
Steps to Reproduce
❯ scoop update
Updating Scoop...
Updating '404NetworkError' bucket...
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
Updating 'extras' bucket...
Updating 'games' bucket...
Updating 'java' bucket...
Updating 'main' bucket...
Updating 'nerd-fonts' bucket...
Updating 'nonportable' bucket...
Updating 'versions' bucket...
Scoop was updated successfully!

Possible Solution
Not sure, I don't understand the error  itself.
Scoop and Buckets Version
❯ scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'404NetworkError' bucket:
18d7d5d (HEAD -> main) yumi-exfat: Update to version <IP_ADDRESS>

'extras' bucket:
9e2a539c3 (HEAD -> master, origin/master, origin/HEAD<EMAIL_ADDRESS>Fix hash (Closes #9881)

'games' bucket:
b60cfc0f (HEAD -> master, origin/master, origin/HEAD) yuzu: Update to version 0-1256

'java' bucket:
abecb92d (HEAD -> master, origin/master, origin/HEAD) temurin17-nightly-jre: Update to version 17.0.6-4.0.202211292347

'main' bucket:
2410508d5 (HEAD -> master, origin/master, origin/HEAD) trid: Update to version 2.24-22.11.30

'nerd-fonts' bucket:
1c2737c (HEAD -> master, origin/master, origin/HEAD) ProggyClean-NF: Update to version 2.2.2

'nonportable' bucket:
9ab0673 (HEAD -> master, origin/master, origin/HEAD) office-365-apps-np: Update to version 18.12.1

'versions' bucket:
20c1d47d (HEAD -> master, origin/master, origin/HEAD) kde-dolphin-nightly: Update to version 823

Scoop Config
❯ scoop config

last_update         scoop_branch scoop_repo
-----------         ------------ ----------
30/11/2022 15:40:44 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version
Name                           Value
----                           -----
PSVersion                      7.3.0
PSEdition                      Core
GitCommitId                    7.3.0
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Additional Softwares
Maybe git?

Sorry about this. I forced pushed the main branch because the GitHub Actions that auto update don't know how to preserve scoop's download name.
git reset --hard origin/main in your scoop\buckets\404NetworkError\ folder should fix the problem. Be aware that if you have any local commits to the main branch, they will be overwritten with this command.
In the future, I'll try to do better about force pushes.

I removed and added the bucket again, it worked and the error is gone.


Complete demo branch not working at all ?

For me with node 10, express 6.9 and chrome 74 this Demo doesn't appear to be working at all anymore, had to fix 12 ERROR [ERR_HTTP_HEADERS_SENT] before actually being able to try running it, then seems to randomly bug simply for registration when getting the response from client, either when checking the results or when comparing challenges.
On top of that there’s no other reliable example that would actually show you how to use webauthn with Node...

Same problem here.

same problem here ypeError: navigator.credentials is undefined.
The demo branch runs for me but it does not do what it supposed to do

Also had that error, it seems to appear randomly 1 time out of 3, I couldn’t figure out the reason why.
It’s pretty lame that there is no actual documentation for a complete integration and only the client side code available on the official webauthn website, seems like the “future of authentication” is not ready to be used yet...  Refresh after REFRESH it's 76. So all Webauthn needs to do is agree on a size and then it dosent matter what the message is as long as it ends up being the size.
Size matters.
So in the UBIkey senario all keys are made with an internal message 7 characters in size and then will always produce a size 76.
The browsers can all look for the size 76 because the UBIkey delivers a 7 character message. Of course you can do hugh messages and get hugh sizes

same problem here, new computer, just installed fresh node and git.
I can run the project. but nothing happens when I click "Login" button on the website.

same problem here, new computer, just installed fresh node and git.
I can run the project. but nothing happens when I click "Login" button on the website.

I actually figured out I didnt have the complete demo. After I got that then everything started working locally. But if I try to connect from my phone or laptop to my local server then I get the error "cannot read property 'create' of undefined"

This demo is not finished code as i just found out:
https://github.com/fido-alliance/webauthn-demo/issues/21

Branch complete-demo works fine.
Just do git checkout completed-demo
The problem is that both javascript files webauthn.js and webauthn.auth.js is missing content.