Make CommandMethod inheritable

It would be very helpful for command systems that acts on polymorfic objects.
Example: Permissions where you have users and groups. Both have permissions, names, etc... but a group may have a weight for permission resolution and the users may have an id.
This PR aims to reduce the amount of code needed to accomplish that kind of task.

Ok, see the above commits. I fixed the problem you mentioned my using an intermediate class to store the method signatures so I am able to use getDeclaredMethods while climbing the class hierarchy, without having duplicates.

After some time and tinkering with this feature, I think it's not worth it. It's easier to create a annotation command for the shared commands and build the specific commands with a builder than keeping track of a class hierarchy of inherited methods.


Enable prettier

This sets up Prettier (with its default settings) and formats the code.
(on hold since it's a controversial change..)

It might be better to decouple prettier from eslint since it can also be used for non-js files.


add-PR-Fork-guide

:white_check_mark: Checklist

[x] This pull request has a meaningful title.
[x] If your changes are not yet ready to merge, you have marked this pull request as a draft pull request.

:ballot_box_with_check: Maintainers' checklist

[x] This pull request has had the appropriate labels assigned
[x] This pull request has been added to the SATRE backlog project board
[x] This pull request has been assigned to one or more maintainers

:arrow_heading_up: Summary

This Pull Request extends the Walthrough guide to include Pull Requests from Forks.
:closed_umbrella: Related issues

:raising_hand: Acknowledging contributors

[x] All contributors to this pull request are already named in the table of contributors in the README file.
[x] The following people should be added to the table of contributors in the README file:

Is docs/Walkthrough.md meant to be a standalone file, or do you want it to appear on https://satre-specification.readthedocs.io/en/latest/ (will need to be moved to under docs/source/Walkthrough.md along with the images).
Also, although not strictly essential it would be good to make sure all filenames are lowercase- this helps avoids problems if someone is using Windows which is case-insensitive.

@manics from my perspective this was intended to be a standalone document, but adding a section to the specification sounds quite good to me.

Same, @arronlacey can you amend?

I've fixed the outstanding issues on this PR and I'm merging it now.


solves the windows issue (with symlinks)

Instead of symlinking to the hook in node-modules/pre-commit, this injects a new pre-commit hook (in .git/hooks) that takes care of launching the hook in node-modules/pre-commit.
This avoids the whole hassle with symlink creation in windows, which up to now prevented using this module when users could not gain elevated privileges (very frequent in enterprise environments).

Coverage remained the same at 95.413% when pulling 0d7f290f87976bb1077814b274d0b4660828b34e on barroudjo:solve_windows_issue into 7154dee93f2c38ef46f807f21cc9ce73848d7396 on observing:master.

How does the pre-commit file update on changes made inside of package.json?

It doesn't update the pre-commit file, and it didn't either before this pull request. In both cases the pre-commit hook (directly before, indirectly with this pull request) launches the JS script from this module, which itself launches the scripts defined in the "pre-commit" section of your package.json.

Duh yeah okay makes plenty of sense, thanks for the clarification.

Coverage remained the same at 95.413% when pulling 1a662e672031a99f9ce2e8ad8dbc8bf0568f511f on barroudjo:solve_windows_issue into 7154dee93f2c38ef46f807f21cc9ce73848d7396 on observing:master.

Can the committers please take a look ? This will make life easier for a lot of people.

👍  Could really do with a working solution on windows

I very much need this as well, could this be looked at ?

It's in master, can other windows users confirm that it's working for them? Once I get a few +1's i'll release it.

Hey sorry it took so long to get back to you. Just tested master on windows and its working for me now!

@3rd-Eden Any idea when release might be?

On my mac, it looks like the pre-commit file generated is not executable, so the hook isn't firing. Anyone else have this issue? Maybe need to specify mode in options here? https://github.com/observing/pre-commit/pull/84/files#diff-f16acefe4b6553580c43edab685f50f3R68


[Bug] Add note about breaking change (version upgrade 1.4.3 to 2)

Congrats to version 2! 🎉
I'd just like to throw in that a note somewhere would be useful that the new version breaks sites written for the "old" logic of v1.4.3.
This
<script<EMAIL_ADDRESS>doesn't work anymore but instead you need to specify the version with
<script src="https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>This fixed my broken sites ad-hoc. Else, people will probably be able to find this issue and fix it themselves :)

I think the best option would be to provide versioned examples/links, so that when users copy-paste example code, nothing should break.
I'll write a script that will update those links on each release.


Integrate Elzar in the main app

This probably should be splat into smaller issues, but this issue can work as a high view of the work ahead.

[ ] Identify things still missing in Elzar, we can check other styleguides like here or checking a good one like Buffer's for example, create issues for each element missing.
[x] Decide what to do with the grid system and implement the solution.
[ ] Move Already coded react components into spice weasel the idea is to keep pure styles in elzar and more custom components and javascript requiring ones in this new repo.
[ ] Identify components in the app that rely on bootstrap and look for alternatives to them.
[ ] Create a new branch of the main app and start working on the new views.
[ ] Recreate the main layout first (navbar and content section).
[ ] Go section by section and create an issue for each of them.
[ ] Implement the sections, deal with the alternatives to bootstrap plugins as they show up.
[ ] Find a way to Modularise Css in spice weasel so every component is self contained in a javascript file.

Feel free to add, remove or comment on stuff, maybe we can even make a kickoff meeting once we decide to start with this.
Resources
List with tons of resources, great for lunch pause
In Deep Article about component based styleguides

Checking the ones that are moved to a new issue, not necessarily solved

This is on hold for now, first we are going to make elzar work as a sass library


mk_GEOSldasRestart can take restart hour and restart name now

@weiyuan-jiang , I completed the coupled model simulation with this branch (and the associated branches) and the science results from them look good too. Note, that my experiments used restart files at the correct resolution. Please let me know if you would also like me to test the restart regridding in the context of GCM simulations.


fix(#4297): flaky report spec

Changes the test to explicitly create all the items needed. This removes flakiness surrounding potential situations where generated items get counted as disposable.

Nice, thanks!


Fix unstable unittest ThreadedWorker.ErrorInWorkerWithNonEmptyQueue

What problem does this PR solve?
Issue Number: close https://github.com/pingcap/tiflash/issues/7653
Problem Summary: ThreadedWorker.ErrorInWorkerWithNonEmptyQueue is not stable
What is changed and how it works?
Because the test workers concurrency is 2, there could be a chance that some new result is pushed into the result_queue before exception cancel all the wokers.
As long as the queue is cancelled before all elements are handled, consider this test passed.
Check List
Tests

[ ] Unit test
[ ] Integration test
[x] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-all-tests

/run-all-tests


Support for Serilog.Sinks.File

We are using Serilog.Sinks.File package. Does the UI support reading from Files instead of DB?

Thanks


debugging helm chart errors on app reconcile

i'm having trouble installing the aerospike helm chart even though the manual helm template ... output looks fine
here's repro instructions on Ubuntu 21.10 using kind version 0.12.0
kind create cluster

kapp deploy -a kapp-controller -f https://github.com/vmware-tanzu/carvel-kapp-controller/releases/latest/download/release.yml -y

cat <<EOF | kapp deploy -a namespace -f- -c -y
apiVersion: v1
kind: Namespace
metadata:
  name: aerospike
EOF

cat <<EOF | kapp deploy -a rbac -f- -c -y
apiVersion: v1
kind: ServiceAccount
metadata:
  name: aerospike-ns-sa
  namespace: aerospike
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: aerospike-ns-role
  namespace: aerospike
rules:
- apiGroups:
  - '*'
  resources:
  - '*'
  verbs:
  - '*'
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: aerospike-ns-role-binding
  namespace: aerospike
subjects:
- kind: ServiceAccount
  name: aerospike-ns-sa
  namespace: aerospike
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: aerospike-ns-role
EOF

cat <<EOF | kapp deploy -a app -f- -c -y
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: aerospike
  namespace: aerospike
spec:
  serviceAccountName: aerospike-ns-sa
  syncPeriod: 24h
  fetch:
  - helmChart:
      name: aerospike
      version: 5.5.0
      repository:
        url: https://aerospike.github.io/aerospike-kubernetes/
  template:
  - helmTemplate: {}
  deploy:
  - kapp: {}
EOF

from the last command i get this output
kapp: Error: waiting on reconcile app/aerospike (kappctrl.k14s.io/v1alpha1) namespace: aerospike:
  Finished unsuccessfully (Reconcile failed:  (message: Deploying: Error (see .status.usefulErrorMessage for details)))

and here's the output of kapp inspect -a app --status
Target cluster 'https://<IP_ADDRESS>:42159' (nodes: kind-control-plane)

Resources in app 'app'

Namespace  aerospike
Name       aerospike
Kind       App
Status     conditions:
           - message: 'Deploying: Error (see .status.usefulErrorMessage for details)'
             status: "True"
             type: ReconcileFailed
           consecutiveReconcileFailures: 5
           deploy:
             error: 'Deploying: Error (see .status.usefulErrorMessage for details)'
             exitCode: 1
             finished: true
             startedAt: "2022-03-28T06:47:10Z"
             stderr: 'kapp: Error: invalid Yaml document separator: apiVersion: v1'
             stdout: Target cluster 'https://<IP_ADDRESS>:443'
             updatedAt: "2022-03-28T06:47:10Z"
           fetch:
             exitCode: 0
             startedAt: "2022-03-28T06:47:10Z"
             stdout: |
               apiVersion: vendir.k14s.io/v1alpha1
               directories:
               - contents:
                 - helmChart:
                     appVersion: <IP_ADDRESS>
                     version: 5.5.0
                   path: .
                 path: "0"
               kind: LockConfig
             updatedAt: "2022-03-28T06:47:10Z"
           friendlyDescription: 'Reconcile failed: Deploying: Error (see .status.usefulErrorMessage
             for details)'
           inspect:
             exitCode: 0
             stdout: |-
               Target cluster 'https://<IP_ADDRESS>:443'
               Resources in app 'aerospike-ctrl'
               Namespace  Name  Kind  Owner  Conds.  Rs  Ri  Age
               Rs: Reconcile state
               Ri: Reconcile information
               0 resources
               Succeeded
             updatedAt: "2022-03-28T06:47:10Z"
           observedGeneration: 2
           template:
             exitCode: 0
             updatedAt: "2022-03-28T06:47:10Z"
           usefulErrorMessage: 'kapp: Error: invalid Yaml document separator: apiVersion: v1'

1 resources

Succeeded

any tips for how to debug this? thanks :)

my general suggestion would be to try to use tools directly to replicate the steps (we have plans to make this easier via kctrl but havent gotten there yet). another idea would be to throw in ytt: {} step after helm template to see if you get a nicer error message.

@cppforlife thanks for the suggestion, adding ytt: {} has given me some extra clues (and i was getting a similar error when attempting to install kind ingress nginx with kapp controller)
usefulErrorMessage: |-
             kapp: Error: Validation errors:
             - Expected 'apiVersion' on resource 'serviceaccount/aerospike-aerospike () namespace: aerospike' to be non-empty (stdin doc 2)
             - Expected 'apiVersion' on resource 'clusterrole/aerospike-aerospike () cluster' to be non-empty (stdin doc 3)
             - Expected 'apiVersion' on resource 'clusterrolebinding/aerospike-aerospike () cluster' to be non-empty (stdin doc 4)

the templates are here for reference https://github.com/aerospike/aerospike-kubernetes/tree/master/helm/templates
any idea what is causing this to happen? doesn't this suggest that the apiVersion line in the template is getting eaten by something? again i just want to note that the manual helm template ... output is fine and as expected

ok so after inspecting each file it looks like the problem is the double - in the initial {- ... -} in the template. Out of all the template files, only the ones corresponding to those in the usefulErrorMessage have this, which seems to be eating the apiVersion line at some point, but this does not happen with a helm template a aerospike/aerospike (<- should be repro)
@cppforlife could this be a bug somewhere in the carvel stack?

i've confirmed that the double - was the problem with a fork of the aerospike helm chart
cat <<EOF | kapp deploy -a app -f- -c -y
apiVersion: v1
kind: ConfigMap
metadata:
  name: aerospike-helm-values
  namespace: aerospike
data:
  values.yaml: |+
    rbac:
      create: false
---
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: aerospike
  namespace: aerospike
spec:
  serviceAccountName: aerospike-ns-sa
  syncPeriod: 24h
  fetch:
  - git:
      url: https://github.com/databasedav/aerospike-kubernetes
      ref: origin/master
      subPath: helm
  template:
  - helmTemplate:
      valuesFrom:
      - configMapRef:
          name: aerospike-helm-values
  deploy:
  - kapp: {}
EOF

also something similar is happening with https://github.com/kubernetes/ingress-nginx/blob/main/deploy/static/provider/kind/1.23/deploy.yaml
usefulErrorMessage: |-
             kapp: Error: Validation errors:
             - Expected 'kind' on resource '/ () cluster' to be non-empty (stdin doc 20)
             - Expected 'apiVersion' on resource '/ () cluster' to be non-empty (stdin doc 20)
             - Expected 'metadata.name' on resource '/ () cluster' to be non-empty (stdin doc 20)

but this one isn't a template, it's just yaml ...

This looks like the Aerospike Helm chart problem is being caused by it using a v1 Chart, which kapp-controller decides to use helmv2 for.
When you template it with Helm v3, it works fine, but with Helm v2 it seems to get quite broken.
❯ helmv2 template ./ -name foo --namespace aerospike  | kapp deploy -a aerospike -f-
Target cluster 'https://<IP_ADDRESS>:34819' (nodes: kind-control-plane)

kapp: Error: invalid Yaml document separator: apiVersion: v1

❯ helm template foo ./ --namespace aerospike --include-crds  | kapp deploy -a aerospike -f- -y
Target cluster 'https://<IP_ADDRESS>:34819' (nodes: kind-control-plane)

Changes

Namespace  Name           Kind                Conds.  Age  Op      Op st.  Wait to    Rs  Ri
(cluster)  foo-aerospike  ClusterRole         -       -    create  -       reconcile  -   -
^          foo-aerospike  ClusterRoleBinding  -       -    create  -       reconcile  -   -
aerospike  foo-aerospike  Service             -       -    create  -       reconcile  -   -
^          foo-aerospike  ServiceAccount      -       -    create  -       reconcile  -   -
^          foo-aerospike  StatefulSet         -       -    create  -       reconcile  -   -
^          foo-conf       ConfigMap           -       -    create  -       reconcile  -   -

Op:      6 create, 0 delete, 0 update, 0 noop, 0 exists
Wait to: 6 reconcile, 0 delete, 0 noop

10:03:38AM: ---- applying 3 changes [0/6 done] ----
10:03:38AM: create clusterrole/foo-aerospike (rbac.authorization.k8s.io/v1) cluster
10:03:38AM: create configmap/foo-conf (v1) namespace: aerospike
10:03:39AM: create serviceaccount/foo-aerospike (v1) namespace: aerospike
10:03:39AM: ---- waiting on 3 changes [0/6 done] ----
...

It's not just a kapp problem, kubectl also fails with helmv2 templating that chart:
❯ helmv2 template ./ -name foo --namespace aerospike  | kubectl apply -f-
configmap/ame-conf created
error: error validating "STDIN": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --validate=false

I'm not sure who is to blame here, the chart does support Helm v2 still, but the helmv2 template seems broken with it.

@benmoss thanks for digging into this, is there any way to force kapp-controller to use helm3? can i overlay the Chart.yaml with ytt to replace the version or can ytt only hit the templates? also this explains the templating issue but what about for https://github.com/vmware-tanzu/carvel-kapp-controller/issues/589#issuecomment-1082748152? here's the corresponding app manifest
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
spec:
  serviceAccountName: ingress-nginx-ns-sa
  syncPeriod: 24h
  fetch:
  - git:
      url: https://github.com/kubernetes/ingress-nginx
      ref: origin/main
      subPath: deploy/static/provider/kind/1.23
  template:
  - ytt: {}
  deploy:
  - kapp: {}

Unfortunately not, but in the latest release helm v2 has been removed so this should cease to be a problem for you then!

It looks like your problem there is that kustomization.yaml file is not a valid resource.
I tried using subPath: deploy/static/provider/kind/1.23/deploy.yaml but it seems that subPath only works with directories.
This seems to work, though still doesn't come up on my kind cluster (the ingress-nginx-controller pod says 1 node(s) didn't match Pod's node affinity/selector.)
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: ingress-nginx
spec:
  serviceAccountName: cluster-admin-sa
  syncPeriod: 24h
  fetch:
  - http:
      url: https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/1.23/deploy.yaml
  template:
  - ytt: {}
  deploy:
  - kapp: {}

closing due to no activity. feel free to reopen.


Introduce ScaledJob & ScaledDeployment

We've discussed this topic a few times before but I think we have reached a point where ScaledObject needs to be split in ScaledJob & ScaledDeployment.
While they share a lot of same functionality, I think they are different by nature:

Jobs are typically used to run one-off processes
Deployments are more long-running demons who are constantly processing a resource

These also have different scaling needs which tend to be confusing people or give unexpected results:

Job are typically scaled on a per-message basis to drain a queue, "serverless scaling" let's say
Deployments are constantly polling messages from the queue and require a maximum instance count to fan out. This is more of a traditional fan-out scaling without any knowledge of total message count but more "enough messages to add an instance"

An example of this confusion is https://github.com/kedacore/keda/issues/652.
Next to that, it would make the CRDs a lot cleaner given the properties are all focused on one type rather than one or two, depending on the property.
Now I am curious to know what others think but it feels like we need a bigger seperation in this and that every trigger will need to define if they support jobs, deployments or both as they typically need different information (message count > X rather than total message count == instance count).

I have pretty much the same opinion on this, I have shared the same concerns when there was the initial discussion on including Jobs some time ago, so I incline to separate both options.
I am looking at the Duck typing concept (which should allow us to scale any scalable resource), so I think we should stick to ScaledObject and just add ScaledJob, since we will be able to not scale just Deployments, but ReplicaSets and other CRDs, that implements scale subresource, eg. Argo Rollouts #595
I'll add more details on the Duck typing later in #591, once I have all data and full picture.

That's also fine for me, only problem I have is that ScaledObject is a bit vague so I'd suggest to call it ScaledWorker instead or so which covers both maybe? Similar to how OAM defines Workers.

We should try to gather requirements and features that we would like to see from ScaledJob. Then we can try to design ScaledJob API.

Changed the title to contain ScaledObject as it is the direction we are moving

ScaledObject is implemented, I have opened a separate issue for ScaledJob #789


Differentiate between press and hold

Hi,
It would be great if the library would provide a function to see if a button is only pressed for a short period of time or for a longer one.
BR

Hi,
I only noticed this issue today, sorry for the inconvenience.
Will look at your question if it is easy to implement or not.

Thinking out loud
Reading the PCF8574 only gives the state at the moment of reading the chip. In a polling implementation it must at least buffer the last state and optionally keep a time stamp to compare current state with the previous one. If state stays pressed one can interpret it as a long press.

@geeks-r-us
Have given it some thoughts and implementing it is almost trivial, however the existing semantics of lastKey would break.
in pseudoCode you could do almost this
int lastKey = KP.getLastKey();
int newKey = KP.getKey();

bool longPress = (lastKey == newKey);
// process further.

However the internal getLastKey() is not reset when getKey() returns I2C_KEYPAD_NOKEY / I2C_KEYPAD_FAIL.
E.g. if you press 8, then release and press 8 again, lastKey() will keep the value 8 and 'fakes' a long press.
As I do not want to break the getLastKey() semantics I need a way to unambiguous detect the long press.
To be continued (might take a few days).

@geeks-r-us
just to let you know I merged develop branch, so I can create a clean PR for this issue.

@geeks-r-us
Can you test / verify the example below if it meet your needs?
Should work with the latest version of the library.
It will be added as example in a next release if you can confirm it works.
It differentiates between PRESS HOLD RELEASE and NOKEY (+ FAIL) states.
Only thing needed is a state variable and the previous key pressed (or not).
//
//    FILE: I2Ckeypad_long_press.ino
//  AUTHOR: Rob Tillaart
// PURPOSE: demo
//     URL: https://github.com/RobTillaart/I2CKeyPad
//
//  PCF8574
//    pin p0-p3 rows
//    pin p4-p7 columns
//  4x4 or smaller keypad.

#include "Wire.h"
#include "I2CKeyPad.h"

const uint8_t KEYPAD_ADDRESS = 0x38;
I2CKeyPad keyPad(KEYPAD_ADDRESS);

uint32_t lastKeyPressed = 0;
uint32_t interval = 100;  //  milliseconds.
//  keep previous key value to detect long keypresses.
uint8_t  prevKey = I2C_KEYPAD_NOKEY;

enum STATE
{
  FAIL    = 0,
  PRESS   = 1,
  HOLD    = 2,
  RELEASE = 3,
  NOKEY   = 4,
};
STATE state = NOKEY;

void setup()
{
  Serial.begin(115200);
  Serial.println(__FILE__);
  Serial.println("I2C_KEYPAD_LIB_VERSION: ");
  Serial.println(I2C_KEYPAD_LIB_VERSION);
  Serial.println();

  Wire.begin();
  Wire.setClock(400000);
  if (keyPad.begin() == false)
  {
    Serial.println("\nERROR: cannot communicate to keypad.\nPlease reboot.\n");
    while (1);
  }
}

void loop()
{
  uint32_t now = millis();
  char keys[] = "123A456B789C*0#DNF";  //  N = NoKey, F = Fail

  //  read the keypad every interval.
  if (now - lastKeyPressed >= interval)
  {
    lastKeyPressed = now;
    //  read the keypad
    uint8_t key = keyPad.getKey();
    switch (key)
    {
      case I2C_KEYPAD_FAIL: state = NOKEY;
        break;

      case I2C_KEYPAD_NOKEY:
        if (key == prevKey) state = NOKEY;
        else                state = RELEASE;
        break;

      default:
        if (key == prevKey) state = HOLD;
        else                state = PRESS;
        break;
    }
    Serial.print("STATE:\t ");
    Serial.print(state);
    Serial.print("\t");
    Serial.println(keys[key]);
    prevKey = key;
  }
}

//  -- END OF FILE --

@RobTillaart
Thx you very much that works great.
Here is an example which allows a more natural input.
#include "Wire.h"
#include "I2CKeyPad.h"

const uint8_t KEYPAD_ADDRESS = 0x20;
I2CKeyPad keyPad(KEYPAD_ADDRESS);

uint32_t keyPressStartTime = 0;
uint32_t shortPressThreshold = 200;  // Threshold for short key press
uint32_t longPressThreshold = 1000;  // Threshold for long key press

uint8_t prevKey = I2C_KEYPAD_NOKEY;

enum STATE
{
  FAIL    = 0,
  PRESS   = 1,
  HOLD    = 2,
  RELEASE = 3,
  NOKEY   = 4,
};
STATE state = NOKEY;

void setup()
{
  Serial.begin(115200);
  Serial.println(__FILE__);
  Serial.println("I2C_KEYPAD_LIB_VERSION: ");
  Serial.println(I2C_KEYPAD_LIB_VERSION);
  Serial.println();

  Wire.begin();
  Wire.setClock(400000);
  if (!keyPad.begin())
  {
    Serial.println("\nERROR: cannot communicate with keypad.\nPlease reboot.\n");
    while (1);
  }
}

void loop()
{
  uint32_t now = millis();
  char keys[] = "123A456B789C*0#DNF";

  uint8_t key = keyPad.getKey();

  switch (key)
  {
    case I2C_KEYPAD_FAIL:
      state = FAIL;
      break;

    case I2C_KEYPAD_NOKEY:
      if (key == prevKey)
      {
        // Key release
        state = RELEASE;
        keyPressStartTime = 0;  // Reset the key press start time
      }
      else
      {
        // No key is pressed
        state = NOKEY;
      }
      break;

    default:
      if (key != prevKey)
      {
        // New key press
        state = PRESS;
        keyPressStartTime = now;  // Record the key press start time
      }
      else
      {
        // Key is being held
        if (now - keyPressStartTime >= longPressThreshold)
        {
          // Long key press
          state = HOLD;
        }
        else if (now - keyPressStartTime >= shortPressThreshold)
        {
          // Short key press
          // You can add a delay here if needed
        }
        else
        {
          // Key is being held but not yet a long press
          // You can add additional logic here if needed
        }
      }
      break;
  }

  Serial.print("STATE:\t ");
  Serial.print(state);
  Serial.print("\t");
  Serial.println(keys[key]);
  prevKey = key;
}

The state machine is not 100% yet as the code has a grey area between the two thresholds.
Thinking out loud:

a short keypress is detected when a key is released before the threshold. So when NOKEY and duration < threshold.. This implies a conditional transition state SHORTPRESS between PRESS and RELEASE.
a long keypress is detected when a key is hold longer than the threshold. This implies a transition state LONGPRESS between HOLD  and a new state LONGHOLD.

@geeks-r-us
Wrote an example that differentiates between SHORT, MEDIUM and LONG presses.
Please have a look and let me know what you think of it.
the state FAIL is removed as it was not used (and it gave a conflict on my ESP32 compiler)
//
//    FILE: I2Ckeypad_long_HOLD.ino
//  AUTHOR: Rob Tillaart
// PURPOSE: demo
//     URL: https://github.com/RobTillaart/I2CKeyPad
//
//  PCF8574
//    pin p0-p3 rows
//    pin p4-p7 columns
//  4x4 or smaller keypad.

#include "Wire.h"
#include "I2CKeyPad.h"

const uint8_t KEYPAD_ADDRESS = 0x38;
I2CKeyPad keyPad(KEYPAD_ADDRESS);

uint32_t lastKeyChecked = 0;
uint32_t startKey = 0;
uint32_t interval = 100;  //  milliseconds.
//  keep previous key value to detect long keypresses.
uint8_t  prevKey = I2C_KEYPAD_NOKEY;

#define  SHORT_THRESHOLD     300
#define  MEDIUM_THRESHOLD    600
#define  LONG_THRESHOLD      1200

enum STATE
{
  PRESS        = 1,
  SHORT_PRESS,
  MEDIUM_PRESS,
  LONG_PRESS,
  RELEASE,
  NOKEY,
};
STATE state = NOKEY;

void setup()
{
  Serial.begin(115200);
  Serial.println(__FILE__);
  Serial.println("I2C_KEYPAD_LIB_VERSION: ");
  Serial.println(I2C_KEYPAD_LIB_VERSION);
  Serial.println();

  Wire.begin();
  Wire.setClock(400000);
  if (keyPad.begin() == false)
  {
    Serial.println("\nERROR: cannot communicate to keypad.\nPlease reboot.\n");
    while (1);
  }
}

void loop()
{
  uint32_t now = millis();
  char keys[] = "123A456B789C*0#DNF";  //  N = NoKey, F = Fail

  //  read the keypad every interval.
  if (now - lastKeyChecked >= interval)
  {
    lastKeyChecked = now;
    //  read the keypad
    uint8_t key = keyPad.getKey();
    switch (key)
    {
      case I2C_KEYPAD_FAIL: state = NOKEY;
        break;

      case I2C_KEYPAD_NOKEY:
        if (key == prevKey)
        {
          state = NOKEY;
        }
        else
        {
          state = RELEASE;
        }
        break;

      default:
        if (key == prevKey)
        {
          if (now - startKey < SHORT_THRESHOLD)
          {
            state = SHORT_PRESS;
          }
          else if (now - startKey < MEDIUM_THRESHOLD)
          {
            state = MEDIUM_PRESS;
          }
          else
          {
            state = LONG_PRESS;
          }
        }
        else
        {
          state = PRESS;
          startKey = now;
        }
        break;
    }
    Serial.print("STATE:\t ");
    Serial.print(state);
    Serial.print("\t");
    Serial.println(keys[key]);
    prevKey = key;
  }
}

//  -- END OF FILE --

Published the example in master and closed the issue.
Feel free to reopen if needed.


ZO can be released to GitHub by tagging a commit

[ ] When a developers tags a commit, TravisCI will build and release it to GitHub

Closed with dcfadc2eb45b31128392e324f1e1e4d2815d7c20


[App]: Chart shows 'No data for selected run'

Current Behavior
No data is shown in any charts in the web view for current runs.
This is in contrast to last week, also the old runs still show data as expected.
There haven't been any changes in my code since the last week.

I tried multiple runs, tried changing x-axis from step to wall time etc. and tried multiple browsers, the results are all as shown in the screenshot above.

I can access the step of the wandb run and log data just fine.

Expected Behavior
Show the charts as shown in the screenshot.

Steps To Reproduce
No response
Screenshots
No response
Environment
OS:
Mac OS 13.5.1
Browsers:
Firefox, Safari and Chrome
Version:
0.15.10
Additional Context
No response

Same here. Just opened issue #6336

Same issue here. Interestingly, the logged values appear correctly in the summary table but not in the plots.

WandB Internal User commented:
carstenstukenborg commented:
Same here. Just opened issue #6336

Same here. An hour ago and the same code was working.

Seems either somehow resolved, or the root cause is that there seems to be a long latency of around 10 mins between table and charts so charts are not displayed at beginning of run.

WandB Internal User commented:
khdlr commented:
Same issue here. Interestingly, the logged values appear correctly in the summary table but not in the plots.

WandB Internal User commented:
eliphatfs commented:
Same here. An hour ago and the same code was working.

WandB Internal User commented:
eliphatfs commented:
Seems either somehow resolved, or the root cause is that there seems to be a long latency of around 10 mins between table and charts so charts are not displayed at beginning of run.

WandB Internal User commented:
maxw1489 commented:
Same here :/

Hello all!
This morning we experienced a Ingestion delay for run metrics which caused many runs to have no data. This has been fixed and we appreciate your patience. Feel free to let me know if there are still some outstanding issues. Latency for data showing up in workspaces should be back to normal times.

Seems to be working just fine now, so I will close this


Upgrade SwipeOpenItemTouchHelper to use newer Android support libs?

I am working on a project right now where we just upgraded our gradle files to import the latest v26 android support libraries. Unfortunately, this breaks SwipeOpenItemTouchHelper because it currently does not have its own v4 import, and at the same time, files still import android.support.v4.animation.* which does not exist anymore.
Do you have plans to upgrade this libraries methods to be compliant with the newer android support libraries?

Sure thing, I'll try to get to that sometime today.

Thanks!!

@javajared should be available with 1.4.0, which should be up on jitpack in a few minutes.

@alex-townsend amazing, thank you very much

Closing, please open another issue if you find anything else.


Plan for migrating helm chart?

Whats your plans for migrating the helm chart from opendistro-es ?
Or are there things about it you're unhappy with, so you'd rather "have something else" ?
Can I help - f.ex. by taking a stab at migrating helm chart and https://github.com/opendistro-for-elasticsearch/opendistro-build/pull/693 ? or is opensearch a bit from "being ready for first runnable release" ?

@KlavsKlavsen We just created a public repo to host the devops-related code, that includes Helm charts as well. Please feel free to take a stab for migrating the existing helm chart code and raise a PR for review. Thanks a lot for your contribution!


Log lock cleanup

Removes some no-op macros and a duplicated validity check

Cherry-picked to 8.0.x


net: lwm2m: add max device power source config option

The code in the LwM2M "Device" object was checking for this max
power source config value, except that it was never added as a
Kconfig option.  Let's go ahead and add it so apps can set the
value appropriately.
Signed-off-by: Michael Scott<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master    #6042   +/-   ##
=======================================
  Coverage   52.63%   52.63%
=======================================
  Files         410      410
  Lines       40041    40041
  Branches     7779     7779
=======================================
  Hits        21074    21074
  Misses      15767    15767
  Partials     3200     3200

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 40c1556...43d2542. Read the comment docs.


Cannot run the server with default requirements

Issue
Trying to run the server with the provided instructions may not work if aioredis version 1.X is installed. The error is "ImportError: cannot import name 'create_reconnecting_redis'". Aioredis dropped support for create_reconnecting_redis in version 1 so I modified the requirements file to install aioredis<1 and that seem to work.
In my case I tested this on Arch linux, maybe on other distros such as Ubuntu, aioredis versions 1 is not yet available.
diff --git a/requirements.txt b/requirements.txt
index 8d29872..e245521 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
Kyoukai>=2.1.4,<=2.3.0
-aioredis>=0.3.0,<=1.0.0
+aioredis>=0.3.0,<1.0.0
aiohttp>=2.2.0,<=2.2.5
This is how I solved it for me.

Changed, thanks.


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2731

Questions ?
Please refer to the Backport tool documentation


queryClient not available in beforeLoad on client side loading

Which project does this relate to?
Router
Describe the bug
Following the Tanstack start + query example from the official page the following beforeLoad function successfully runs when I open the URL directly in a new browser tab, but fails, when I navigate to the URL by clicking a button on the website. This also fails in loader FWI
The difference is obviously server vs. client side loading.
Server-side loading succeeds and it can be observed through server side console logs that the queryClient is indeed set.
Client-side loading fails due to the following error:
context.queryClient.ensureQueryData is not a function
chunk-YPUWNOAE.js?v=91255f7a:3299 Uncaught TypeError: context.queryClient.ensureQueryData is not a function
    at Object.beforeLoad (events.$eventId._event.tsx:12:31)
    at chunk-YPUWNOAE.js?v=91255f7a:1953:113

Route Code:
import { createFileRoute, Outlet } from '@tanstack/react-router'
import { api } from '@/lib/api/api'

export const Route = createFileRoute('/_app/app/events/$eventId/_event')({
  beforeLoad: async ({ context, params }) => {
    // The following request fails
    const event = await context.queryClient.ensureQueryData({
      queryKey: ['event', params.eventId],
      queryFn: () => api.events.events.get({ eventId: params.eventId }),
    })
    return { ...context, event }
  },
  component: EventLayout,
})

function EventLayout() {
  return <Outlet />
}

Note: Accessing the queryClient using the corresponding useQueryClient() hook within the Component works without any issues.
For debugging sake here is the rest of my setup:
// router.tsx
import { DefaultCatchBoundary } from '@/components/DefaultCatchBoundary'
import { NotFound } from '@/components/NotFound'
import { QueryClient } from '@tanstack/react-query'
import { createRouter as createTanStackRouter } from '@tanstack/react-router'
import { routerWithQueryClient } from '@tanstack/react-router-with-query'
import { routeTree } from './routeTree.gen'

export function createRouter() {
    const queryClient = new QueryClient()
    return routerWithQueryClient(createTanStackRouter({
        routeTree,
        defaultPreload: 'intent',
        context: { queryClient },
        defaultErrorComponent: DefaultCatchBoundary,
        defaultNotFoundComponent: () => <NotFound />,
    }), queryClient)
}

declare module '@tanstack/react-router' {
    interface Register {
        router: ReturnType<typeof createRouter>
    }
}

// client.tsx
import { StartClient } from '@tanstack/start'
import { hydrateRoot } from 'react-dom/client'
import { createRouter } from './router'

const router = createRouter()

hydrateRoot(document.getElementById('root')!, (
    <StartClient router={router} />
))

// __root.tsx
import { QueryClient } from '@tanstack/react-query'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { createRootRouteWithContext, Outlet, ScrollRestoration } from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import { Body, Head, Html, Meta, Scripts } from '@tanstack/start'
import * as React from 'react'
import appCss from './global.css?url'

export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()({
    meta: () => [
        {
            charSet: 'utf-8',
        },
        {
            name: 'viewport',
            content: 'width=device-width, initial-scale=1',
        },
    ],
    links: () => [
        { rel: 'stylesheet', href: appCss },
    ],
    component: RootComponent,
})

function RootComponent() {
    return (
        <RootDocument>
            <Outlet />
        </RootDocument>
    )
}

function RootDocument({ children }: { children: React.ReactNode }) {
    return (
            <Html>
                <Head>
                    <Meta />
                </Head>
                <Body>
                    {children}
                    <ScrollRestoration />
                    <Scripts />
                    <TanStackRouterDevtools position="bottom-right" />
                    <ReactQueryDevtools buttonPosition="bottom-right" />
                    <Toaster />
                </Body>
            </Html>
    )
}

Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
See above
Expected behavior
Independent whether the load is client- or server-side, it should succeed.
Screenshots or Videos
No response
Platform

OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]

Additional context
No response

FYI I can call the server function directly instead of using the queryClient which is a good enough work around for the time being.


Go away senpai!

No more black senpai portrait covering spirit (fixes #1022)

WRONG REPO AGAIN AAAA

Did that so I could pull request earlier


chore: round 2 of gts fixing

Codecov Report

Merging #106 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
+ Coverage   98.29%   98.29%   +<.01%
==========================================
  Files          15       15
  Lines        2814     2815       +1
  Branches      165      165
==========================================
+ Hits         2766     2767       +1
  Misses         25       25
  Partials       23       23

Impacted Files
Coverage Δ

test/operation.ts
99.44% <100%> (ø)
:arrow_up:

src/util.ts
96.56% <100%> (ø)
:arrow_up:

src/operation.ts
97.87% <100%> (+0.04%)
:arrow_up:

test/service-object.ts
97.87% <100%> (ø)
:arrow_up:

src/service-object.ts
98.36% <100%> (ø)
:arrow_up:

src/service.ts
93.22% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

@stephenplusplus @googleapis/node-team someone mind taking a gander?


Fix #23194

This change uses uri.with to get a new version which has the same fields except no scheme. It also removes paths.normalize because the uri may be a URL, not a path, and that causes it to have \ on windows. I don't know if that's safe or if paths.normalize is needed in some case. I also don't know whether the if (resource.scheme === 'debug') check is necessary.
I think that embedding a URL or path or made up path like <node_internals>/... into a URI might be unsafe in other cases too, but I don't really know. Another approach would be to just encodeURIComponent the entire thing from the debugger, instead of trying to interpret it in vscode, and only decode it for display. I don't know whether there's anywhere that we need it to work like an actual URI?

@roblourens thanks!
Looks good and we can start with that and see if something breaks (I forgot why I have a normalize there unfortunetely).
The check for schema === debug is unnecessery, since the DebugContentProvider only gets resources which have that schema. https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/browser/debugContentProvider.ts#L26
You will also need to remove the unused import paths as well. It is good we are getting rid of this since we should use node path api instead if needed.
Once that is done feel free to merge in.


Translate the queries

Explore open source models/tools to translate the topics for MT runs.
Explore models like GMT, NLLB, etc

Currently being tracked in https://docs.google.com/spreadsheets/d/1eqP799jMElL0HiRG3-OgAV4UiGofDv_Onu9qQFb053U/edit#gid=636267705


Ribbon: Replace icon for button "Info"

Replace the icon for the "Info"-button.
Should show "i" in a circle

Released with version <IP_ADDRESS>


Decentralize project registration & Beacon deletion responsibilities

RTM is being overwhelmed with support requests regarding beacon deletion issues; I understand that there are substantial beacon fixes in the recent/upcoming client releases, but how could we go about relying on the network rather than trusted third parties?
Vote on trusted CPIDs (witnesses/delegates/represenatives) to provide the project registration/maintenance responsibility?
Thoughts?

interesting. cpid issues are always an issue however in a dream would there would be no beacon issues :p Would be nice if a user could send there own beacon deletion themselves however that's dangerous in a sense as you'd have to hope that it is in fact there own beacon (leaves room for exploiting.)
I would lean towards a few things:

A second person or rather a consensus of respected user(s)s (1 or more) whom could potentially be given the responsibility to take these tasks as they come.
A change where a consensus of vote between known high balance trusted users can vote to vouch for the beacon removal after a checklist of circumstances be completed (verifying the transaction for deletion came from the grc address associated to the cpid, etc.)

The beacon fixes have been vast and solve a lot of problems however people with issues in the past have issues.
I know there is possibly another beacon issue i suspect but not confirmed just yet.
We can always have a vote.

This is more relying on the network then specific to beacons:
Decentralization can contain centralization within it so long as those given power are under constant threat of having that power revoked.  I like the idea of having a set number of "admins" or "witnesses" or whatever so long as there is a list of people lined up to be admin behind them and the barrier to being replaced as an admin is minimal.  Also, the opportunity to administrate should not be reserved to "whales."
Let's say the community creates x admins.  They have earned the respect and votes of the community by adhering to a set of principals -- currently unwritten -- agreed upon by the community and by going beyond the minimum.  With the x, we also have 10x potential admins ready to take their place should they
A. Dishonor the power they have been given.  or
B. Resign
And the ability to at least freeze the actions of an admin requires a minimal vote: say 25%.  When an admin is frozen, one from the list of potentials takes their spot until further action is decided upon.  Freeze protocols could potentially also be written into the network.

I think that a two level delegate scheme should be used for Administration tasks.
Currently there is a Master Project key and restricted operations require message to be signed by this key.
With 2LDS, holder of the master key, signs public key of delegate, and this permission is then published as message on the blockchain. Similarly he can also revoke such permission. Delegates than use their own key to perform the administrative tasks.
Delegates could be voted in, but the granting and revoking permission by results of a poll can, for simplicity reasons, stay manual.

What is the benefit of having these delegates instead of controlling beacon deletion oneself? If a beacon registration would always take two transactions, it would just lay dormant if you chose to delete one key, until you have added another key back again.

I am talking about the Administrative tasks, like deleting beacon, adding project, @TheCharlatan, not actually sending the beacon! Also user requested beacon deletion already takes two (or three?) transactions.

This is closed by #1695.


Cannot reuse uploaded file as attachment

I'm trying to implement a simple cache for regularly used files in slash command responses:
const SlashCommandName string = "poster"

// ...

func (i *Interaction) ServeInteraction(session *discordgo.Session, event *discordgo.InteractionCreate) {
	if event.Type != discordgo.InteractionApplicationCommand {
		return
	}

	data := event.ApplicationCommandData()
	if data.CommandType != discordgo.ChatApplicationCommand || !strings.EqualFold(data.Name, SlashCommandName) {
		return
	}

	go session.InteractionRespond(event.Interaction, &discordgo.InteractionResponse{
		Type: discordgo.InteractionResponseDeferredChannelMessageWithSource,
	})

	poster, err := i.chooser.Reveal(context.Background(), language.Make(string(event.Locale)))
	if err != nil {
		log.Fatalln(err)
	}
	defer poster.Release()

	// NOTE(toby3d): check what this poster is uploaded early, reuse it.
	if cachedMessageAttachment, cached := i.cache.Load("poster:" + poster.Name()); cached {
		if _, err = session.InteractionResponseEdit(event.Interaction, &discordgo.WebhookEdit{
			Attachments: &[]*discordgo.MessageAttachment{
				cachedMessageAttachment.(*discordgo.MessageAttachment),
			},
		}); err != nil {
			log.Fatalln("cannot send cached poster by URL:", err)
		}

		return
	}

	// NOTE(toby3d): it's a first time: upload poster as file, then store attachment in cache
	message, err := session.InteractionResponseEdit(event.Interaction, &discordgo.WebhookEdit{
		Files: []*discordgo.File{{
			Name:        poster.Name(),
			ContentType: poster.ContentType(),
			Reader:      poster.Image(),
		}},
		Attachments: &[]*discordgo.MessageAttachment{{
			ID:  "0",
			URL: "attachment://" + poster.Name(),
		}},
	})
	if err != nil {
		log.Fatalln(err)
	}

	i.cache.Store("poster:"+poster.Name(), message.Attachments[0])
}

But sending data from the cache regularly results in an error:
cannot send cached poster by URL: HTTP 400 Bad Request, {"message": "Invalid Form Body", "code": 50035, "errors": {"attachments": {"0": {"_errors": [{"code": "ATTACHMENT_NOT_FOUND", "message": "Attachment data not found"}]}}}}
exit status 1

If I use just attachment URL, then I got error about "Invalid attachment ID".
If I use the URL of the uploaded file as an image, however, it embeds with a border that I want to avoid:

However, if I use the URL of the uploaded file as is, using it in Content, it uploads at a smaller size than the original in the client interface:

If I remember correctly, you'd have to upload the file each time. Or host it on a public URL.
The attachment:// is message scoped.


added functionality to filter results by keys in _list.py

Description of changes: Added the ability to filter out results by specifying a keyword for keys/prefix in wr.s3.list_objects()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@igorborgest
Now list_objects works by breaking down the key after bucket into parts and, if excluded _keys is not None, it filters out the objects that have a key from the excluded keys (either a String or List of Strings).
This is an example of parse_path behaves when excluded_keys is not None:
paths = [
    's3://bucket/prefix/archive',
    's3://bucket/prefix/my-foo-archive',
]

excluded_keys = [
    'archive',
    'logs',
]

paths_to_keep = []
for p in paths:
    _, prefix, keyparts = parse_path(p, multipart=True)
    if not any(key in keyparts for key in excluded_keys):
        paths_to_keep.append(p)

paths_to_keep

paths_to_keep becomes ['s3://bucket/prefix/my-foo-archive']
Mypy is throwing some errors for how the tuple resulting from parse_path is unpacked in list_objects: the way is implemented is checking if a multipart argument is True (default False).
Maybe another way to go about it it might be to separate the functions e.g. creating something like list_and_filter_objects, but I tried to keep the change minimal, what do you think?

Yeah, unfortunately mypy will only consider this two different possibilities of return types safe if you check it before unpack for ALL usages. But event tough I don't think this is the best way. A new parse_path function specialized to return all the parts would be better.
But before this change I would like to take a step back and understand better the final goal. The idea is to filter by black listed filenames in the end of the object key OR black listed directories in the middle of the object key?

closing by inactivity


add PssFreeSnapshot

What does this PR do?
Frees the memory that is allocated when PssCaptureSnapshot is called.
Why is it important?
memory leak
Checklist

[x] My code follows the style guidelines of this project
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added an entry in CHANGELOG.md

Author's Checklist

[ ] Written by hand.  Need to figure out what needs to happen for "go generate" to work.  Does not work from Mac.

Related issues

Testing

run metricbeat 8.11.0 or 8.11.1 on Windows, notice memory consumption of metricbeat continually climbs
rebuild metricbeat using this path
memory consumption rises in first 10min or so, but is steady after that

Thank you @leehinman

Hi @pierrehilbert
We have revalidated this PR on latest 8.11.0 BC1 kibana cloud environment and found it working fine :
Observations:

We observe 3 windows agents and 1 metricbeat on different hosts.
We didn't observe any memory leaks under windows Performance Monitor for keeping them over 18 hours .

Build details:
VERSION: 8.11.2 BC1
BUILD: 68299
COMMIT: 92746356b61c3e3ac62b6d7045727f8d737fa4b5
Artifact link: https://staging.elastic.co/8.11.2-c2650cf6/downloads/beats/elastic-agent/elastic-agent-8.11.2-windows-x86_64.zip
Screen Recording:
https://github.com/elastic/elastic-agent-system-metrics/assets/77374876/fce155e0-a4db-4d66-9362-37e1e7bf1c32
https://github.com/elastic/elastic-agent-system-metrics/assets/77374876/37bf9077-7a61-446e-9039-a19f1f4d3ea5
https://github.com/elastic/elastic-agent-system-metrics/assets/77374876/a6a15e4c-9290-4e87-9f1c-e180b53f75d6
Hence we are marking this as [QA:Validated].
Please let us know if we are missing anything here.
Thanks!


Export language tags to RDF

This involved switching to using iso639-1 language codes because these are required for language tags per RFC 5646.
Fixes #666

note that ^^ is exactly the sort of integration test I would want to see accompany this PR, once we have that stuff in place.


Gradient fill?

Is it possible to have a gradient as the fill color of the progress bar? For instance I want the left part to be blue and the right part to be white. I know I can 'transition' the color from blue to white, but I want to have a gradient color.

Hi @Tsury,
Piecing together the readme example and a gradient example from the main progressbar.js project, a simple addition to options works to create a gradient from green to red:
render() {
    var options = {
      strokeWidth: 2,
      from: { color: '#7ED321'  },
      to: { color: '#FF0000' },
      step: (state, bar) => {
        bar.path.setAttribute('stroke', state.color);
      }
    };

    // For demo purposes so the container has some dimensions.
    // Otherwise progress bar won't be shown
    var containerStyle = {
      width: '200px',
      height: '200px'
    };

    return (
      <Line
        progress={this.state.progress}
        text={'test'}
        options={options}
        initialAnimate={true}
        containerStyle={containerStyle}
        containerClassName={'.progressbar'} />
    );
  }

Thanks!


Viewports are layered on top of UI in 2.1

godot 2.1.2 stable official from website, linux kubuntu 16.10 x64
When using viewports THIS happens

Project: https://github.com/godotengine/godot/files/448339/Viewport.Example.zip
(change root node to canvas layer)
Connected to #6356 somehow.

Duplicate of #1840 probably, though the latter was fixed in 3.0..

Now, what exactly you mean by "fixed"? Because sprite just doesn't appear with viewport for me in 3.0.
Two screenshots. Sprite not in viewport and sprite under viewport.

that's the way it is in 2.1.2 too. You don't see what's inside a viewport node in the editor, but if you play the scene you can see it.

That's kinda against WYSIWYG paradigm though. Viewports worked in 2.2

Not saying it's a feature though^^ I'm not sure wether it's normal behaviour or not

2.1.2 official shows things inside viewport just fine by the way https://lut.im/70OdMZhMM3/E1ubXFheXilIv8Pb.png

I'm not sure what was on the screen above and how this should work in the end, but I can confirm the behavior is still the same in 3.0.2


feat: ota device firmware updates

Ref: https://github.com/zwave-js/node-zwave-js/pull/4758
cc @AlCalzone

https://user-images.githubusercontent.com/11502495/176726882-2d79cc0f-6860-40b1-86ec-ac406f4ad2ea.mp4

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 54 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.08%) to 24.805%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/ZwaveClient.ts
0
54
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.08%

Covered Lines:
3682

Relevant Lines:
15680

💛  - Coveralls


update health-check path to /mysfits

Issue #, if available:
current healthcheck path of the NLB is "/" which results in timeout for the NLB
Description of changes:
when creating the NLB, change the health-check path to point to "/mysfits" which is the correct path the app is responding on
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

the underlying problem with the failing healthcheck on / should be fixed by https://github.com/aws-samples/aws-modern-application-workshop/pull/183


Upgrade to Avalonia 11.0.0-preview7

Pretty self explanatory.
Preview7 now has Items read only and they want you to switch to ItemsSource as Items is now a read only view of ItemsSource.
This is outlined in their breaking change document here (the bottom text of the section): https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes#itemscontrol-changes-including-all-itemscontrol-inherited-controls-like-listbox-or-menus

Forgot to mention, but this closes #136

will update nuget in weekends

Hey, thanks for the fix :) Any updates on when we can expect Nuget packages for preview 7?


Log Warning "State *** has no existing object, this might lead to an error in future versions"

Contact Details
No response
What happened?
Following Warning in Logfile:
deconz.0 | 2022-03-30 22:31:02.473 | warn | State "deconz.0.Gateway_info.alive" has no existing object, this might lead to an error in future versions
deconz.0 | 2022-03-30 22:31:00.153 | warn | State "deconz.0.info.connection" has no existing object, this might lead to an error in future versions

Adapter Version
1.3.20
deConz (Phoscon) Version
2.14.01 / 6.2.2022
JS-Controller Version
4.0.21
Node JS Version
14.19.1
NPM Version
6.14.16
Operating System
Debian
Relevant log output
No response
Anything else?
No response

Is this warning still there?
If yes is the js-controller version still the same?


New version of airzone cloud breaks the plug-in

Describe The Bug:
airzone is not logging in correctly. A new version of the mobile app has been released and it seems the api has changed.
To Reproduce:
Log in to the new app. Restart homebridge and the log in error appears in the log.
Expected behavior:
A correct log in in airzone cloud
Logs:

[7/23/2021, 9:19:12 PM] [AirzoneCloud ] Unable to login to AirzoneCloud. Request: {"url":"https://www.airzonecloud.com/users/sign_in","method":"POST","mode":"cors","headers":{"Content-Type":"application/json;charset=utf-8","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15"},"body":"{\"email\":\"xxxxxxxxx@xxx.xxx\",\"password\":\"xxxxxxx\"}"} {"size":0,"timeout":0}
[7/23/2021, 9:19:12 PM] [AirzoneCloud] Unable to login to AirzoneCloud. Request: {"url":"https://www.airzonecloud.com/users/sign_in","method":"POST","mode":"cors","headers":{"Content-Type":"application/json;charset=utf-8","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15"},"body":"{\"email\":\"xxxxxxo@xxx.xx\",\"password\":\"xxxxxxx\"}"} {"size":0,"timeout":0}

Plugin Config:
Default config

Screenshots:

Environment:

Plugin Version: 0.1.4
Homebridge Version: 1.3.4
Node.js Version:
NPM Version:
Operating System: synology nas

Hello, I’m working on it, but they change the whole api 😓

It is not going to be quick. Take it easy.
The new url is m.airzonecloud.com, but as you say, api has changed. Changing the url in the settings of the plug-in is not enough.

Yes, now the authenticator is oauth2 and the rest of the api implement the standards and become a bit different

Hi
I have the same issue.

Hi there,
I don't know if that can help but do you know that you can access to the local API of the AirZone WebServer ?
Here is the doc : https://doc.airzone.es/producto/Gama_AZ6/Airzone/Comunes/Manuales/MI_AZ6_WSCLAPI_A4_FR.pdf
I think that il will be more efficient to directly talk with the local API.
Mathieu

Hi, local api is only available on wire webserver or new versions of wifi, and to have full compatibility is why I use cloud api

Hi, local api is only available on wire webserver or new versions of wifi, and to have full compatibility is why I use cloud api

Understood. Will be very great that we can use local API as an option.

Hi @fjhorrillo,
Do you need some help to implement new API ?
I can help if needed.
Mathieu

Hello @matnoublanche,
Base on the analysis on the new web I have gotten some information.
Login is with oauth but it is easy:
POST https://m.airzonecloud.com/api/v1/auth/login
{ "email": "{{email}}", "password": "{{password}}" }
From the response get token
Get Installations:
GET https://m.airzonecloud.com/api/v1/installations
HEADER authorization=Bearer {{token}}
From the response get installations[0].installation_id (where 0 is the index of the installation you want, by default 0)
Get Installation detail:
GET https://m.airzonecloud.com/api/v1/installations/{{installationId}}
HEADER authorization=Bearer {{token}}
From the response get the Device List
Turn On/Off:
PATCH https://m.airzonecloud.com/api/v1/devices/{{deviceId}}
HEADER authorization=Bearer {{token}}
{ "param": "power", "value": true, "installation_id": "{{installationId}}" }
Set temperture:
PATCH https://m.airzonecloud.com/api/v1/devices/{{deviceId}}
HEADER authorization=Bearer {{token}}
{ "param": "setpoint_air_cool", "value": {{temerture}}, "installation_id": "{{installationId}}", "opts": { "units": 0 } }
Depend on the mode use: setpoint_air_cool, setpoint_air_heat, setpoint_air_vent or setpoint_air_dry
Set mode:
PATCH https://m.airzonecloud.com/api/v1/devices/{{deviceId}}
HEADER authorization=Bearer {{token}}
{ "param": "mode", "value": 0, "installation_id": "{{installationId}}" }
Modes: 0 (Stop), 2 (Cool), 3 (Heat), 4 (Fan) or 5 (Dry)
Get device info:
For this, it is necessary to use websocket
wss://m.airzonecloud.com/api/v1/websockets/conn/?jwt={{token}}&EIO=4&transport=websocket
After conect send the messages:
40
422["clear_listeners"]
421["listen_installation","{{installationId}}"]
You will get the device status for all systems and zones
Now I'm working on adapting the plugin to implement it, but I need to understand the messages over websocket to keep it connected.

Hi again,
I also follow another issue that you replied on
https://github.com/max13fr/AirzoneCloud/issues/7
You find all this by reverse engineering or someone finally respond on the Airzone team ?

Hi again,
I also follow another issue that you replied on
max13fr/AirzoneCloud#7
You find all this by reverse engineering or someone finally respond on the Airzone team ?

Hi, I’ve finally started using reverse engineering.

Same issue with new version 0.1.5

Yes, this update was only a bug fixing for users with old api, I’m working on 0.2.0 for new api.

Same issue with new version 0.1.5
Thanks for the effort to update the plugin.

Hello
Any update on the issue ?

Hi! It’s on the oven!

Published v0.2.0

I'm testing the new version, but it's still unable to connect to the new API, any updates on this?
If you want I could help with the reverse engineering

I'm testing the new version, but it's still unable to connect to the new API, any updates on this?
If you want I could help with the reverse engineering

I've reinstall and it works

I'm testing the new version, but it's still unable to connect to the new API, any updates on this?
If you want I could help with the reverse engineering

I've reinstall and it works

that's the key. I was just upgrading to the new version, once you reinstall it, it lets you to set it to the new Airzone API.
Big thanks for the effort! 👏🏻

It works!! Great job!
it’s better to reinstall. You choose “new airzone cloud” on the plug in adjustments and goes straight forward.
just got an issue when I try to change a room’s temperature, so I will open a new issue, but it is great to have this plug in working again.


Updating from version 0.1.3 to 0.2

Changelist

Changed dependance on symcrypttestmodule.dll to symcrypt.dll
Updated symcrypt crate from 0.1.3 to 0.2
Updated symcrypt-sys crate from 0.1.0 to 0.2
Updated comments and READMEs to reflect change.
Changed API signature for symcrypt_random from a taking a Vec<u8> to taking a &mut [u8]

~/Your-Path-To-SymCrypt/SymCrypt/bin/module/oe_full/

Apologies, I said something incorrect when we talked yesterday. If you download the tar.gz archive from the SymCrypt GitHub, the .so files will indeed be in the lib directory. But if you build them locally, they'll be in <build output root>/module/generic
I think we should recommend downloading the files from GitHub rather than building locally.

In reply to:<PHONE_NUMBER>

Refers to: rust-symcrypt/BUILD.md:70 in 6093e70. [](commit_id = 6093e70ccaf942841d7ec284d1bc29fa7d165396, deletion_comment = False)


 Or else one would need to create an option like: matter(string, { language: 'json' }). Both are not ideal.
In order for 11ty to maintain a framework agnostic position, it should recognize front matter based on native syntax alone (something that Hugo got right in this case, at least in terms of recognizing JSON from {). Since Javascript is also viable for front matter in 11ty, there ought to be a way to detect the format behind the scenes--not in the front matter itself.

☺ Silly me. I moved this to the eleventy repo: https://github.com/11ty/eleventy/issues/465


On open, on close

Looking through source it doesnt look like theres a callback for when the menu opens or closes? Any suggestions of how to hook into this?

There is no direct hook for that at the moment. Could you please describe your use case for it?

Closing for now. Happy to discuss further if you could provide more info.


whisper: support batch inference, add librispeech WER test

Decided to try the bounty after all! This PR is the first step, with the goal of establishing a baseline

Support batch inference, with test
I ran the OpenAI LibriSpeech evaluation for the tiny.en model https://github.com/openai/whisper/blob/main/notebooks/LibriSpeech.ipynb , and got a WER of 5.66% (consistent with 5.6 reported in the paper)
Copied the LibriSpeech evaluation impl to tinygrad, and got WER 6.56%, so there's clearly some more work to be done

Interestingly, then OpenAI eval runs on my M2 Max CPU around 2x faster than tinygrad on METAL... The memory utilization of the tinygrad impl was significantly worse.

My methodology for trying to match the paper's results was to go line-by-line, comparing the differences in values between the tinygrad/OpenAI impls on test.wav. I fixed prep_audio to be as consistent as possible with OpenAI's. Here are the new WERs:
tiny.en
ACTUAL: 0.056629001883239174
DESIRED: 0.05655609406528749

base.en
ACTUAL: 0.041412520064205455
DESIRED: 0.04271408904897505

I believe the remaining discrepancies are due to precision differences between tinygrad and torch. I noticed it in many places, such as computing stft, the AudioEncoder's output, and other convolution operations.
eg below is self.conv1(x) when running the tiny.en model on test.wav:
tinygrad:
https://github.com/tinygrad/tinygrad/blob/881fd7c141d5ebe7414396fc78e76169c82d7eb8/examples/whisper.py#L71
conv1 float32 (1, 384, 3000) [[[ 0.24158688  0.3777641   0.298241   ...  0.3777641   0.3777641
    0.4694541 ]
  [-1.0340188  -0.6114433  -0.61898446 ... -0.6114433  -0.6114433
   -0.39347035]
  [-0.9603274  -1.2275856  -1.1347731  ... -1.2275856  -1.2275856
   -1.1725734 ]
  ...
  [-3.3165843  -1.1532428  -0.37675124 ... -1.1532428  -1.1532428
    3.405168  ]
  [ 0.03932077  0.43085176  0.41909423 ...  0.43085176  0.43085176
    0.9091728 ]
  [ 0.2517326   0.1052122   0.11380655 ...  0.1052122   0.1052122
    0.05464094]]]

with np.set_printoptions(precision=8)
OpenAI:
https://github.com/openai/whisper/blob/b38a1f20f4b23f3f3099af2c3e0ca95627276ddf/whisper/model.py#L162
conv1 torch.float32 torch.Size([1, 384, 3000]) tensor([[[ 0.24158685,  0.37776405,  0.29824123,  ...,  0.37776411,
           0.37776411,  0.46945411],
         [-1.03401887, -0.61144298, -0.61898422,  ..., -0.61144328,
          -0.61144328, -0.39347035],
         [-0.96032721, -1.22758591, -1.13477325,  ..., -1.22758555,
          -1.22758555, -1.17257345],
         ...,
         [-3.31658435, -1.15324211, -0.37675190,  ..., -1.15324283,
          -1.15324283,  3.40516806],
         [ 0.03932036,  0.43085235,  0.41909471,  ...,  0.43085176,
           0.43085176,  0.90917277],
         [ 0.25173274,  0.10521224,  0.11380669,  ...,  0.10521220,
           0.10521220,  0.05464094]]])

with torch.set_printoptions(precision=8)
I think these disparities are accumulating such that we can never truly match the reference impl's performance.
One weird side effect of this is that sometimes the model will get into an infinite loop. Eg when testing small.en, on the 136th sample in the test set, the tinygrad model is predicting ['<|startoftranscript|><|notimestamps|> "I\'m sorry, I\'m sorry." "I\'m sorry. I\'m sorry." ...'] indefinitely, whereas the reference impl correctly transcribes it to "cried one of the women. He took no notice of her. He looked at me, but as if, instead of me, he saw what he spoke of.".
This is all to say that I think this is as far as I can go with this bounty, unfortunately

How can I reproduce those WERs on my computer?

How can I reproduce those WERs on my computer? Is running
python3 test/external/external_test_whisper_librispeech.py good?

Yeah, optionally append eg -k test_en_tiny to test a specific model

Cool, running eval overnight on 7900XTX, if it matches the bounty is yours!

There's a chance that GPU/backend is affected by the memory allocation issue described here - METAL would be more likely to succeed. Let's see 🤞

shouldn't this be jittable now that symbolic is merged?

shouldn't this be jittable now that symbolic is merged?

I can try this in a followup PR. Am I correct that the only jittable methods are __call__ of AudioEncoder and TextDecoder, after I move the .realize() to go in there?

Test failed
======================================================================
ERROR: test_en_small (__main__.TestWhisperLibriSpeech)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 25, in test_en_small
    run_evaluation("small.en", 0.030531615969223228)
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 37, in run_evaluation
    transcriptions = transcribe_waveform(model, enc, audio.numpy())
  File "/home/tiny/tinygrad/examples/whisper.py", line 245, in transcribe_waveform
    out = model.decoder(Tensor(tokens), dat).realize()
  File "/home/tiny/tinygrad/tinygrad/tensor.py", line 104, in realize
    run_schedule(self.lazydata.schedule())
  File "/home/tiny/tinygrad/tinygrad/realize.py", line 27, in run_schedule
    si.out.realized = Device[si.out.device].exec_ast(si.ast, output=si.out, inputs=si.inputs, var_vals=si.var_vals, **si.out._device_extra_args())
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 283, in exec_ast
    if ast not in self.method_cache: self.method_cache[ast] = get_program()
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 280, in get_program
    return self.to_program(k)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 233, in to_program
    display_name=k.display_name, runtime_args=runtime_args).build(self.runtime, self.batch_exec)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 194, in build
    self.clprg, self.batch_exec = runtime(self.name, self.prg, **self.runtime_args), batch_exec
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in __init__
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in <listcomp>
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 459, in __getattr__
    knl = Kernel(self, attr)
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 811, in kernel_init
    kernel_old_init(self, prg, name)
pyopencl._cl.RuntimeError: clCreateKernel failed: OUT_OF_HOST_MEMORY

======================================================================
ERROR: test_en_tiny (__main__.TestWhisperLibriSpeech)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 16, in test_en_tiny
    run_evaluation("tiny.en", 0.05655609406528749)
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 37, in run_evaluation
    transcriptions = transcribe_waveform(model, enc, audio.numpy())
  File "/home/tiny/tinygrad/examples/whisper.py", line 242, in transcribe_waveform
    dat = model.encoder(Tensor(log_spec)).realize()
  File "/home/tiny/tinygrad/tinygrad/tensor.py", line 104, in realize
    run_schedule(self.lazydata.schedule())
  File "/home/tiny/tinygrad/tinygrad/realize.py", line 27, in run_schedule
    si.out.realized = Device[si.out.device].exec_ast(si.ast, output=si.out, inputs=si.inputs, var_vals=si.var_vals, **si.out._device_extra_args())
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 283, in exec_ast
    if ast not in self.method_cache: self.method_cache[ast] = get_program()
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 280, in get_program
    return self.to_program(k)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 233, in to_program
    display_name=k.display_name, runtime_args=runtime_args).build(self.runtime, self.batch_exec)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 194, in build
    self.clprg, self.batch_exec = runtime(self.name, self.prg, **self.runtime_args), batch_exec
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in __init__
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in <listcomp>
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 459, in __getattr__
    knl = Kernel(self, attr)
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 811, in kernel_init
    kernel_old_init(self, prg, name)
pyopencl._cl.RuntimeError: clCreateKernel failed: OUT_OF_HOST_MEMORY

======================================================================
ERROR: test_tiny (__main__.TestWhisperLibriSpeech)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 19, in test_tiny
    run_evaluation("tiny", 0.07558413638335187)
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 37, in run_evaluation
    transcriptions = transcribe_waveform(model, enc, audio.numpy())
  File "/home/tiny/tinygrad/examples/whisper.py", line 242, in transcribe_waveform
    dat = model.encoder(Tensor(log_spec)).realize()
  File "/home/tiny/tinygrad/tinygrad/tensor.py", line 104, in realize
    run_schedule(self.lazydata.schedule())
  File "/home/tiny/tinygrad/tinygrad/realize.py", line 27, in run_schedule
    si.out.realized = Device[si.out.device].exec_ast(si.ast, output=si.out, inputs=si.inputs, var_vals=si.var_vals, **si.out._device_extra_args())
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 283, in exec_ast
    if ast not in self.method_cache: self.method_cache[ast] = get_program()
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 280, in get_program
    return self.to_program(k)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 233, in to_program
    display_name=k.display_name, runtime_args=runtime_args).build(self.runtime, self.batch_exec)
  File "/home/tiny/tinygrad/tinygrad/ops.py", line 194, in build
    self.clprg, self.batch_exec = runtime(self.name, self.prg, **self.runtime_args), batch_exec
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in __init__
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/tinygrad/tinygrad/runtime/ops_gpu.py", line 71, in <listcomp>
    self.clprgs = [clprg.__getattr__(name) for clprg in self._clprgs]
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 459, in __getattr__
    knl = Kernel(self, attr)
  File "/home/tiny/.local/lib/python3.10/site-packages/pyopencl/__init__.py", line 811, in kernel_init
    kernel_old_init(self, prg, name)
pyopencl._cl.RuntimeError: clCreateKernel failed: OUT_OF_HOST_MEMORY

======================================================================
FAIL: test_en_base (__main__.TestWhisperLibriSpeech)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 22, in test_en_base
    run_evaluation("base.en", 0.04271408904897505)
  File "/home/tiny/tinygrad/test/external/external_test_whisper_librispeech.py", line 46, in run_evaluation
    np.testing.assert_almost_equal(wer, target_wer)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tiny/.local/lib/python3.10/site-packages/numpy/testing/_private/utils.py", line 537, in assert_almost_equal
    raise AssertionError(_build_err_msg())
AssertionError:
Arrays are not almost equal to 7 decimals
 ACTUAL: 0.041412520064205455
 DESIRED: 0.04271408904897505

----------------------------------------------------------------------
Ran 4 tests in 3093.705s

FAILED (failures=1, errors=3)

So test_en_base 'worked' in the sense that it reproduced my results. Note that all the test cases are expected to fail with AssertionError because none of tinygrad's WERs match perfectly with the OpenAI results - let me know if you'd rather I just print the WER difference instead.
The other 3 tests errored out due to the OOM issue I mentioned above. This should not happen on METAL, if you'd like to try it there. Otherwise I can try to look into what's happening with these large allocations

I think these OOMs are a victim of the O(N^2) behavior mentioned in https://github.com/tinygrad/tinygrad/issues/1612 - I observed it in both the Emebdding vocab_counter initialization and the argmax

@geohot This CI run confirms that the O(N^2) perf from #1612 is likely what caused the OOMs - by not using tinygrad's impl of arange, I got the whisper tests to pass on all backends but LLVM (for some reason the model is still really slow, maybe JIT will help?).
Did you make any progress on coming up with a clever solution? Is having an iterative O(N) arange too non-idiomatic?

Ready for another review, but:

I don't know if this change to Tensor.arange is acceptable
I fixed the OOMs that I observed in CI, but I don't know if that will definitely solve the OOM you saw while running your test - if possible could I get access to the box to test it myself?

I really doubt the arange cause the OOM, likely something not being cleaned up. My GPU has 24GB of ram.

FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_en_base - AssertionError:
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_en_small - pyopencl._cl.RuntimeError: clCreateKernel failed: OUT_OF_HOST_MEMORY
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_en_tiny - OSError: [Errno 12] Cannot allocate memory
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_tiny - OSError: [Errno 12] Cannot allocate memory

I really doubt the arange cause the OOM, likely something not being cleaned up. My GPU has 24GB of ram. (btw, getting the JIT working might both fix this and be fast)
Rerunning started.

I will look further into what might be causing these OOMs. In the meantime, if you're still willing to try stuff, setting batch_size in external_test_whisper_librispeech.py to something lower like 4 might prevent OOMs at the expense of speed.

Progress update: I suspect the high memory usage is due to not reusing allocated buffers between model invocations. As you mentioned, JIT will probably address that. I got JIT working on the AudioEncoder and am now working on kv_caching, which is necessary to enable JIT on the TextDecoder.

Yea the JIT should fix this and make it faster at the same time.

Why is reset_jit_cache needed?

The WER test script evaluates different models in a single Python invocation causing shape mismatches due to cached nodes from previous runs. eg, without the reset call, I get failures like this (where test_en_base runs first and works correctly)
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_en_small - AssertionError: Input Tensor shapes (16, 1500, 512) and (768, 768) cannot be multiplied (512 != 768)
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_en_tiny - AssertionError: Input Tensor shapes (16, 1500, 512) and (384, 384) cannot be multiplied (512 != 384)
FAILED test/external/external_test_whisper_librispeech.py::TestWhisperLibriSpeech::test_tiny - AssertionError: Input Tensor shapes (16, 1500, 512) and (384, 384) cannot be multiplied (512 != 384)

Got decoder JIT caching working. Still need to cleanup the tests and confirm if memory utilization was solved

@geohot Ready for another attempt. However, even with JIT, I suspect you might still run into OOMs on GPU if running multiple models in a single execution (it seems like Mac OS gracefully compresses & swaps buffers from previous models instead of throwing OOM errors). I was hoping that del model + gc would automatically free the buffers, but it doesn't seem to be the case. So I think you'll need to run each model separately like so:
#!/bin/sh
python3 -m pytest -s test/external/external_test_whisper_librispeech.py -k test_en_tiny
python3 -m pytest -s test/external/external_test_whisper_librispeech.py -k test_tiny
python3 -m pytest -s test/external/external_test_whisper_librispeech.py -k test_en_base
python3 -m pytest -s test/external/external_test_whisper_librispeech.py -k test_en_small

I reworked the tests to pass if they get the expected tinygrad WERs that I originally posted, so these should all pass if you successfully repro my results.

Testing started on a brand new tinybox!

================================================================= 4 passed, 4 warnings in 3191.44s (0:53:11) =================================================================
Congrats, bounty is yours! Send either PayPal or USDC address to<EMAIL_ADDRESS>to claim


Bring versions current

@paulbygrave please review

@gliptak You also need to update the Makefile within this repo, otherwise the new container won't be built and pushed correctly. Happy to do it, or leave to you if you'd like to try it yourself?

@paulbygrave thank you for the pointer. Update Makefile
PS Maybe one of those version numbers are to be removed?

@gliptak There's probably a better way to do it (if this were GitLab I'd just declare a single project variable) but not sure myself how to do that neatly in GitHub. I'll just update the README for future people who may want to update this,


chart: add image digest option

What this PR does / why we need it:
Add digest option for images.
Also add "registry/repository" option.
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged):
Impossible to use a digest reference for a docker image.
It's needed for some security purpose.
Special notes for your reviewer:
Release note:
Helm chart: add image digest option

Thanks for this PR!
/lgtm
/approve
/ok-to-test
/kind feature


Document elsewhere talking about Schnorr under secp256k1

We have posted an advance reading for a designshop on the topic of "Rebooting the Web of Trust" which talks about moving over to Schnorr signatures, and specifically refers to this library. Can someone involved in this library read over and post issues there about any inaccuracies, or other comments about using Schnorr signatures under secp256k1? Thanks!
https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust/blob/master/topics-and-advance-readings/Schnorr-Signatures--An-Overview.md
-- Christopher Allen

secp256k1-zkp is a fork of libsecp256k1 (https://github.com/bitcoin/secp256k1). I think that only the Borromean signatures are a relevant feature for you. For the rest, the original library (which I'm the primary author of as well) probably should be the focus.

Closing as our messaging around "Schnorr signatures" has changed to focus on Taproot (and has changed from being a -zkp project to being a Bitcoin-wide thing that hopefully will land upstream soon).


The Carbon Grid component

Tasks

[x] #641
[x] #642

Closing for now. The missing features will be implemented eventually but in the context of a new issue.

carbon.gridWide(
    carbon.gridColumns(Carbon.ALL, 1, Carbon.MD, 4, Carbon.MAX, 4),

    carbon.tile(
          Carbon.ASPECT_1X1
    ),

    carbon.tile(
          Carbon.ASPECT_1X1
    )
)

Allow rendering a grid as another HTML element other than DIV.


How can |a|²+|b|²+|c|²+|d|²=1?

Hi! I am not super deep into all the maths, so I might just overlook some crucial detail, but I stumbled over the |a|²+|b|²+|c|²+|d|²=1 bit and can't wrap my head around it. Don't |a|²+|b|² and |c|²+|d|² both have to equal 1? So shouldn't the entire sum be 2? Did you mean to write |ac|²+|ad|²+|bc|²+|bd|²=1? Or what am I missing? Thanks!

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: feb830cc-7d9b-c13e-4652-115352ea1e29
Version Independent ID: f9484b57-1dc8-06a9-ac6d-cdc7c4769981
Content: Linear algebra for quantum computing - Microsoft Quantum
Content Source: articles/overview/algebra-for-quantum-computing.md
Product: quantum
GitHub Login: @Bradben
Microsoft Alias: bradben

Hi @ms-maxvollmer, you're right! The correct formula should be:
´|ac|²+|ad|²+|bc|²+|bd|²=1´
since for a given orthogonal basis all probabilities should sum up to one. We are working on a remake of the linear algebra section, so I'll close this issue when we submit that.

Thanks for the quick reply and confirming! That puts my mind at ease xD

Closing since it's solved by #861


pointcloud.calculate and points.export_to_ply in C#

Required Info

Camera Model
D415

Firmware Version
<IP_ADDRESS>

Operating System & Version
Win 10

Platform
PC

SDK Version
2.0

Language
C#

Issue Description
I am trying to do two things with the C# wrapper:

Retrieving a Points object from a DepthFrame.
Saving this data (Points) to a pointcloud file (.ply for example).

In C++ that would look like:
// Retrieve the data.
auto frames = pipe.wait_for_frames();
auto depthFrame = frames.get_depth_frame();
auto colorFrame = frames.get_color_frame();
pointcloud pc = pointcloud();
pc.map_to(colorFrame);
points points= pc.calculate(depthFrame);

// Save to pointcloud file.
points.export_to_ply("1.ply", colorFrame);

However, the PointCloud.Calculate method is obsolete ("This method is obsolete. Use Process method instead") and the export_to_ply does not seem to be included in the C# wrapper.
What exactly is meant by "Use Process method instead"?
How can I create the above code in C#?

The obsolete warning in this case is harmless, just means you should use the common Process interface method instead.
Sorry about missing PLY export, will be handled in the next PR.

@ogoshen The problem is that is not clear what is meant by "Use Process method instead". How would this be implemented in C#? Are there (or could someone provide) code examples of how to use this process method in order to retrieve a pointcloud?

Here's a sample for running the PointCloud processing block, getting the Points frame as well as getting the raw point cloud data.
Also, Points.ExportPLY is now merged to development branch.

@ogoshen I always get a stable release from https://github.com/IntelRealSense/librealsense/releases/latest.
When can I (approximately) expect the changes to be in the latest release?

@jacobusp The latest stable release v2.20.0 has included the changes. Please have a check.  Thanks! https://github.com/IntelRealSense/librealsense/blob/v2.20.0/wrappers/csharp/Intel.RealSense/Frames/Points.cs#L116

@jacobusp Did you get the chance to have a try with v2.20.0? Any other questions about this ticket? Looking forward to your update. Thanks!

I have added the new version to my project and I can confirm the export to ply functionality was added. Thanks for helping me out.

How to interprete the vertices converted from the points? For a 640480 depth image, I got 6404803 float numbers, which is reasonable. However, I found that there are 40k non-zero values at position i3, 70k non-zero values at positions i3+2 and only one 24 value at i3+1.  This realy confused me. Can anyone explain?


Refresh / Returning Support

Refresh / Returning Support
Related Issues:

#425
#497
#507
#711
#754
#796
#800
#803
#876
#888
#967
#1002
#1007
#1045
#1059
#1065
#1076
#1078
#1141
#1263
#1615

Introduction
Refreshing a model from the database is currently supported, as of #805.
Returning a model after save / update may not be supported. I'm still piecing together whether we actually support this, but it looks like it isn't supported. Plenty of issues related to this feature.
Issue Description
Save/Update with returning values is not supported in all SQL databases. In these cases, we will probably want to do an implicit refresh operation after save / update to get the same effect for users of this library.

I would like this to work:
/*
 * user schema:
 *   email: string not null
 *   name: string
 */

const user = await User.forge({email: 'email@domain.com'}).save()
console.log(user.toJSON())
// this is what I get: { "email"<EMAIL_ADDRESS>}
// this is what I want: { "email"<EMAIL_ADDRESS>name: null }

My question is: Is this issue about this feature?

Not sure. Are you saying that any attributes that are not set to a value by the user will be set to null? But that value isn't from the database?

Yes, because my schema doesn't say that it is a not null field, so in the database it is set to null and I want to know this after the save call
Same applies for defaults, imagine that a table has a integer that defaults to 0
/*
 * user schema
 *   email: string not null
 *   name: string
 *   age: integer defaults 0
 */

const user = await User.forge({email: 'email@domain.com'}).save()
console.log(user.toJSON())
// this is what I get: { "email"<EMAIL_ADDRESS>}
// this is what I want: { "email"<EMAIL_ADDRESS>"name": null, "age": 0 }

Currently I would need to call refresh after save
But I want to avoid going two times to the database if possible.

This feature is only going to avoid two trips to the database with PostgreSQL (and MSSQL?) anyway. The thing is that Bookshelf doesn't know you schema, so that isn't going to work. I think there's a plugin with schema support, so it may work with that plugin.

Yeah, but as the issue suggests, can we support it and fallback to calling refresh?
Maybe like this:
const user = await User.forge({email: 'email@domain.com'}).save({ withRefresh: true })

And this will avoid two trips when PostgreSQL but fallback to calling refresh before resolving the Promise

I'll take a look at the plugin

...can we support it and fallback to calling refresh?

I think that's the idea here.

May I try to work on this and perhaps send a PR?

Of course :) Good luck. Just remember that all the tests must pass and the PR must include tests for this feature.


Player should be notified if it has been moved by air

Because otherwise it is really confusing.
However, might be not that easy.

Notified with sound like "vzhuh"?

Maybe, but the main issue here to overall somehow notify Human object that it has been moved by air.

Something like a text notification would work in tandem with a sound.

You've been knocked down by a rush of air!


Creation of SG objects doesn't retry correctly

I noticed when working on another gem that Faraday doesn't reencode the JSON of a POST body if the retry is in the middleware stack.
I don't use this feature at all so I won't be fixing it; just marking this issue in case others run into this problem and want to fix it.
You'll see a bytesize not defined on object error when Net::HTTP tries to encode the pre-JSON encoded hash if you run into this.

Thanks, is this a bug in faraday or in our middleware stack ?

i think it's a bug in my implementation but i'm not sure.  you might be able to initialize the @app in the middleware and then do @app.call on a retry which might pass the request back through all the layers of middleware, but i'm not sure and i'm not going to figure it out because i don't use this feature.

actually nevermind; that's what we already do
the problem is that @app.call doesn't pass the request through the other middlewares, some of which are critical.
we could do the json encode/decode in our own middleware but... blech.  or maybe extend the JSON middleware - again, i dunno.
the other option is to move the retries out of the middleware altogether, but then that means you have to wrap the post, get, etc methods, which is kinda... blech.
i'm assuming there has got to be a good answer for this because it seems inconceivable that you can't get faraday to do a retry from within middleware - that's like half the point of middleware, to let you respond mid flow - but i just don't know what it is.
anyways the temporary workaround would be to set the number of retries to 1 in a situation where you are POSTing data.  it actually won't solve anything - you'll get an exception still, but at least it will be the right exception and not the .bytesize not defined one.

Ok interesting, it should work this way AFAIK.
What if we just move the json middleware up in the stack (above pester) ?
It may impact logging but maybe it'll work better ?

I think I tried this but I forgot.  Might work?
On Wed, Feb 3, 2016 at 3:08 PM, Adrien Jarthon<EMAIL_ADDRESS>wrote:

Ok interesting, it should work this way AFAIK.
What if we just move the json middleware up in the stack (above pester) ?
It may impact logging but maybe it'll work better ?
—
Reply to this email directly or view it on GitHub
https://github.com/jarthod/survey-gizmo-ruby/issues/60#issuecomment-179432901
.


Query isses when a tag is named group

i have the following series:
show series from "network.kpi"

_key	group	prefix	prefix_len
network.kpi,group=subnet,prefix=<IP_ADDRESS>,prefix_len=24	subnet	<IP_ADDRESS>	24

so queries like the following work fine:
select mean(count) from "network.kpi" where prefix='<IP_ADDRESS>'

however, this does not work:
select mean(count) from "network.kpi" where prefix='<IP_ADDRESS>' and group='subnet'
QueryERROR: {"error":"error parsing query: found GROUP, expected identifier, string, number, bool at line 1, char 70"}

i'm on v0.9.0.

GROUP is a reserved word in the query language. If you are using it in a context where you don't mean to start a GROUP BY clause, you must double-quote it so the parser knows it is an identifier and not a keyword. E.g.
`select mean(count) from "network.kpi" where prefix='<IP_ADDRESS>' and "group"='subnet'


Storybook-Vite-Builder: requested module does not provide an export

I'm attempting to use msw-storybook-addon with storybook-builder-vite, and running into the following error:

Any suggestions on how to resolve this?
I'll aim to get a code sandbox up if I get a chance

Hey @MIreland thanks for opening this issue! I haven't really used this addon with vite so it would be incredibly helpful if you could provide a repro for it! Let me know and I'll try to figure out what's going on :)

@yannbf, this may be related to the issue: https://github.com/mswjs/msw/issues/670
I'm running the reproduction repo above and get the same error:
Uncaught SyntaxError: The requested module './../node_modules/msw-storybook-addon/dist/mswDecorator.js' does not provide an export named 'initialize'

When inspecting the published msw-storybook-addon, I can also see that it doesn't export all the things properly from its main module (there's only mswDecorator variable, everything else must be accessed via 'msw-storybook-addon/dist/mswDecorator', which is not the intention).

This looks like a bundler issue at first glance. The module is installed, it does export the things I'm importing in .storybook/preview.js. The things that bundles preview.js throws the exception. It may be connected to virtually anything: wrong module resolution, incompatible targets, internal specifics of tools. We need to find a way to narrow the problematic surface down...

Vite, just like webpack 5, does not provide node polyfills.
There is some specific code to make it work for webpack 5, it may need to be extended to support other bundlers :/
cf https://github.com/mswjs/msw-storybook-addon/blob/361418ed803f0dbbbab13f864f29b62ffb71d518/packages/msw-addon/src/mswDecorator.ts#L32

This often happens for me the msw addon and vite builder but if I stop and start storybook it works again

If you are using Vite: 4.3.9, and version 1.8 of this plugin for Storybook 7.  I was able to get it to work by adding the following code to vite.config.ts
import replace from '@rollup/plugin-replace'

export const config: UserConfigExport = {
  plugins: [
    replace({
      '_globalThis$process.env.NODE_ENV': JSON.stringify('production'),
    }),
    react(),
// the rest

@CurtisHumphrey, what you are describing looks like a fix for graphql's issue about incorrectly relying on process.env.NODE_ENV in browser contexts. That has been since resolved in the graphql package (that issue leaks to you due to how MSW depends on GraphQL).
Update
We need to try to reproduce this with the latest version of everything.


Sparse matrix

Could be useful to introduce sparse matrices by adding a stride option to Matrix.prototype and performing operations with this in mind.

Check out https://github.com/ukrbublik/vectorious-plus

Superseded by #153