Can we directly deploy a Tensorflow2 Mask_RCNN model saved file (.pb format ) into Nuclio?

          Can we directly deploy a Tensorflow2 Mask_RCNN model saved file (.pb format ) into Nuclio?(We are configuring CVAT serverless on a Windows-GPU machine)

Do we need to convert  saved file (.pb format ) to openvino format ? or its not required?
Also i would appreciate if you could share any examples
Originally posted by @Abhirao024 in https://github.com/opencv/cvat/issues/6427#issuecomment-1635362477

You do not need to convert it to OpenVINO format.

Thank you for your help. I really appreciate it.
Also i cant see that Model tab after installing the Serverless CVAT, Are there any steps that I am missing?

You do not need to convert it to OpenVINO format.

Thank you for your help. I really appreciate it.
Also i cant see that Model tab after installing the Serverless CVAT, Are there any steps that I am missing?

Please, read the installation guide https://opencv.github.io/cvat/docs/manual/advanced/serverless-tutorial/

Thank you Boris,
In the below link the path it is pointing for a MASK_RCNN.h5 file, however in our case we are wanting to use a model that we have already trained and is in .pb (saved file) tensorflow2 model.
https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/model.py#L1820
Could you please guide us on what all changes we have to make?

Model format totally is not important. Just install Tensorflow and write inference script in the serverless container. I cannot help here, I am not DL expert


Re-enable desktop msbuild tests once we have a compatible dotnet-ci

VS \ MSBuild on the dotnet-ci Windows agents is an older version and we're currently waiting for an upgrade. In the meanwhile, we'll disable tests that run on desktop to unblock ourselves

Commit to undo: https://github.com/aspnet/Razor/commit/ac3065a9e16af31b0711d47287cda8d430b5e569

@pranavkm, please assign cost to this. Thanks!

This can be pushed to 2.2.0. We don't have confirmation of images as yet.

Thanks @pranavkm


bugfix: Move the last user's information to the end

When there are multiple repeated user inputs in the message history, there is a bug in this piece of code.
example
history
user: hello
assistant: hi
user: hello
after remove & append:
history
assistant: hi
user: hello
user: hello

Thanks for your PR. Can you add some unit tests for to_openai_messages ?

Thanks for your PR. Can you add some unit tests for to_openai_messages ?

done


ci: GitHub Action to sync file to project repositories

Uses https://github.com/BetaHuhn/repo-file-sync-action.

@Mergifyio refresh


Inconsistent Device Identifiers

Is your feature request related to a problem? Please describe.
Device identifiers are not consistent, for example I've seen a single G600 listed as "warbling-mara" and then as "singing-gundi" after rebooting. Unsure if this is actually a bug or just how libratbag works.
Describe the solution you'd like
Device identifiers should be deterministic and always unique to that device.
Hopefully there's some identifier you could pull to also uniquely determine the difference between two devices connected from the same model.

This is not a bug. You can use the device name as an identifier if you want, ex. ratbagctl 'Logitech G600' info.

This is not a bug. You can use the device name as an identifier if you want, ex. ratbagctl 'Logitech G600' info.
What if there's two Logitech G600s connected?

Then you need to use the normal identifier.

Then you need to use the normal identifier.

But the normal identifier is inconstant, if I wanted to write scripts to control multiple devices I'm limited here.

You shouldn't write scripts that invoke ratbagctl, that is not a use case we support. What you should do instead is talk directly to the daemon using DBus.
Having consistent device IDs would require us to read serial numbers, which not all devices support.

Could you provide an example of how to properly talk to the daemon using DBus in a way I could use in a script?
I was thinking the same thing about device IDs needing serial numbers but I wasn't sure. Would you consider supporting unique identifiers for devices with serial numbers when the device supports it, and less reliable identifier when they don't?


wallpaper doesn't change daily

App works fine whenever os boots but it doesn't change wallpaper daily or hourly

Manually run main.py at the start of the day can be a work around.

I am working on fixing that. Please check issue #12

I guess Bing releases wallpaper every 24 hrs. So we don't need to change that.
We can add an option for user for setting the interval for which the user wants to check for a new wallpaper. That may solve it to an extent.

@UtkarshGpta: I agree we don't need to change that. The application should be keep simple, it's only do the work once every 24 hours and thus should not be running as a daemon.
But for those who keep your machine running longer than 1 day, setting a timer to automatically start the application is the way to go, not changing the application.
I have been successfully set up a systemd.timer to run this application once the machine start and every day afterward. I will include detail instruction in READ.ME and make a pull request soon. That would close this issue I suppose.

Unless I'm somewhere mistaken, this does not seem to work with any of my Ubuntu 16.04's.

@Wtower: I have successfully use systemd.timer on my archlinux. Didn't have ubuntu to test on. You should start a new issue regards systemd.timer, you and I can tracking the problem down.


feat(Tactic/Prune + test/Prune): add prune tactic, for removing unnecessary hypotheses

This tactic removes very conservatively all local declarations that

do not appear in the main goal,
do not appear in a declaration that appears in the main goal,
... and so on recursively.

The main motivation for this tactic is that all available variables in the current namespace/section appear in the goal state, not just the ones that are needed for the statement to type-check.  Using prune mitigates this situation.
The tactic also admits an optional natural number argument: prune n removes all variables that have not appeared at the (n+1)-st stage in the above list.  Thus, prune 0 only leaves the variables needed for the statement to type-check.  Also, for sufficiently large n, prune n is a synonym for prune.
Zulip discussion

I read the long thread which is relevant to this tactic / PR. Personally, while I appreciate what you are trying to do with prune, it feels to me like this is not something we want because it is a band-aid, whereas we actually want variables to Just Workᵀᴹ.

I know this isn't the same as the dream you had for prune, but what do you think about making prune be a straightforward frontend for Lean.MVarId.cleanup? I'm imagining prune would have similar features as extract_goal, but instead of pretty printing a goal state it would have the effect of cleaning up the goal state. The prune tactic might want to expose the "indirect props" configuration option too, which if I understand correctly, is roughly related to what the "prune offset" is controlling, but it's either on or off and only affects Props.

Kyle, this seems like a good idea: I'd be happy to put prune to some use!
I'm not sure about your suggestion, though.  Should prune be an "interactive" version of Lean.MVarId.cleanu?  I.e., should it take similar inputs and have some "reasonable" defaults in case of no input?

I don't have a clear idea of the exact UI for prune, but, yeah, I was thinking it could be the interactive version of Lean.MVarId.cleanup. Maybe prune without arguments is Lean.MVarId.cleanup with the default arguments?
Maybe prune! is the version that turns off including indirect propositions? Maybe there's a better syntax. The mnemonic I was thinking is that prune! prunes more.

I agree with you:

prune should remove some hypotheses,
prune! should probably remove more hypotheses;
prune <some_syntax> should give some control over which hypotheses to remove/keep.

I'll think a little about situations in which you might want to remove a non-minimal/maximal subset of hypotheses, so as to tailor the tactic to that situation.


Issue with result from CONCAT expression when using Kafka streaming ingestion.

We are seeing issues when using Kafka Streaming Ingestion and then querying and invoking the CONCAT expression believing this could be due to the rows being in the aggregate heap memory and not yet being persisted to the segments.
We have witnessed the following behavior of the expression in the following circumstances which we believe are when the rows are still in the heap and yet to be persisted:

Using a scan query it's is wrapping [" and "] to the result of the expression when the rows are still within the heap.
Using an aggregate query it's not wrapping [" and "] to the result of the expression.
Using the result of the CONCAT function as the key to retrieve a value from the lookup in an aggregated query nested in the SUM function is not returning back the value of the lookup even though the key exists in the lookup

When using batch ingestion we do not witness the behaviors or when we set "maxRowsPerSegment" to 1 in the Kafka Tuning Config.
See below for more detail.
Affected Version
0.16and 0.17
Description
Cluster size
Single using the quickstart bin/start-single-server-small
Configurations in use
Using the default configuration located here:
conf/druid/single-server/small
However, using MySQL for the metadata storage and enabling globally cached lookups.
Steps to reproduce the problem
Setup a Kafka Supervisor
Note "maxRowsPerSegment":3 in tuningConfig, we will refer to this later
curl -X POST \
  http://localhost:8888/druid/indexer/v1/supervisor \
  -H 'Content-Type: application/json' \
  -d '{
  "type":"kafka",
  "dataSchema":{
    "dataSource":"items",
    "parser":{
      "type":"string",
      "parseSpec":{
        "format":"csv",
        "timestampSpec":{
          "column":"time",
          "format":"iso"
        },
        "columns":[
          "time",
          "currency",
          "value"
        ],
        "dimensionsSpec":{
          "dimensions":[
            "currency"
          ]
        }
      }
    },
    "metricsSpec":[
      {
        "name":"count",
        "type":"count"
      },
      {
        "name":"sum_value",
        "type":"doubleSum",
        "fieldName":"value"
      }
    ],
    "granularitySpec":{
      "type":"uniform",
      "segmentGranularity":"WEEK",
      "queryGranularity":"NONE",
      "rollup": true
    }
  },
  "tuningConfig":{
    "type":"kafka",
    "maxRowsPerSegment":3,
    "reportParseExceptions": true,
    "logParseExceptions": true
  },
  "ioConfig":{
    "topic":"debugitems",
    "consumerProperties":{
      "bootstrap.servers":"localhost:9092"
    },
    "taskCount":1,
    "replicas":1,
    "taskDuration":"PT1H"
  }
}'

Setup Lookups
Place the contents of below
2020-01-14:EUR,0.7
2020-01-14:GBP,0.9
2020-01-15:EUR,0.7
2020-01-15:GBP,0.9
2020-01-16:EUR,1.7
2020-01-16:GBP,1.9
2020-01-17:EUR,2.7
2020-01-17:GBP,2.9
2020-01-18:EUR,3.7
2020-01-18:GBP,3.9
2020-01-19:EUR,2.7
2020-01-19:GBP,4.9

into /tmp/currencies.csv
Then create the lookup:
curl -X POST \
  http://localhost:8888/druid/coordinator/v1/lookups/config \
  -H 'Content-Type: application/json' \
  -d '{
  "__default": {
    "currency_conversion": {
      "version": "2019-10-07T09:58:02.656Z",
      "lookupExtractorFactory": {
        "type": "cachedNamespace",
        "extractionNamespace": {
          "type": "uri",
          "uri": "file:/tmp/currencies.csv",
          "namespaceParseSpec": {
            "format": "csv",
            "columns": [
              "key",
              "value"
            ]
          },
          "pollPeriod": "PT5S"
        },
        "firstCacheTimeout": 0
      }
    }
  }
}
'

Running Through the Problem
Using Kafkacat execute the following two commands to produce the messages:
echo "2020-01-14T11:11:00.000Z,GBP,30.12" | kafkacat -b  <IP_ADDRESS>:9092  -t debugitems
echo "2020-01-15T11:11:00.000Z,EUR,30.12" | kafkacat -b  <IP_ADDRESS>:9092  -t debugitems

Then run the following query:
SELECT __time,  sum_value, CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency) as "concat_expression" FROM items

and you will see the results of below:
(Query 1 Result)
+--------------------------+-----------+--------------------+
|          __time          | sum_value | concat_expression  |
+--------------------------+-----------+--------------------+
| 2020-01-14T11:11:00.000Z |     30.12 | ["2020-01-14:GBP"] |
| 2020-01-15T11:11:00.000Z |     30.12 | ["2020-01-15:EUR"] |
+--------------------------+-----------+--------------------+

If you then run the following query which uses an aggregate function of SUM
SELECT
  __time,
  currency,
  SUM(sum_value) "sum value",
  CONCAT(
    TIME_FORMAT(__time, 'yyyy-MM-dd'),
    ':',
    currency
  ) as "concat_expression"
FROM
  items
GROUP BY
  1,
  2

You will see the results below:
(Query 2 Result)
+--------------------------+----------+-----------+-------------------+
|          __time          | currency | sum_value | concat_expression |
+--------------------------+----------+-----------+-------------------+
| 2020-01-14T11:11:00.000Z | GBP      |     30.12 | 2020-01-14:GBP    |
| 2020-01-15T11:11:00.000Z | EUR      |     30.12 | 2020-01-15:EUR    |
+--------------------------+----------+-----------+-------------------+

From the results of Query 1 the values in the column of concat_expression wrap the value with [" and "].  Using the LTRIM and RTRIM functions to trim ["  does not have any impact on the value from the expression.
From the results of Query 2 are not wrapped with [" and "].
As part of our query, we want to use the concat_expression result in a lookup. If we run the following query
select
__time,
currency,
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'EUR'), 'currency_conversion') as "Fixed EUR Lookup",
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'GBP'), 'currency_conversion') as "Fixed GBP Lookup",
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency), 'currency_conversion') as "Row Lookup",
SUM(sum_value) as "Total Value",
SUM((sum_value / CAST(LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency), 'currency_conversion') AS FLOAT)) * CAST(LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'EUR'), 'currency_conversion') AS FLOAT)) as "Converted Total Value"
from items
GROUP BY 1,2

We get the following result:
(Query 3 Result)
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+
|          __time          | currency | Fixed EUR Lookup | Fixed GBP Lookup | Row Lookup | Total Value | Converted Total Value |
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+
| 2020-01-14T11:11:00.000Z | GBP      |              0.7 |              0.9 |        0.9 |       30.12 |                     0 |
| 2020-01-15T11:11:00.000Z | EUR      |              0.7 |              0.9 |        0.7 |       30.12 |                     0 |
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+

With the Converted Total Value incorrectly returning 0 however the values of the lookups are being returned for the given currency when not being used in tandem with the SUM expression.

Moving on.
If you then produce another message of:
echo "2020-01-16T11:11:00.000Z,GBP,30.12" | kafkacat -b  <IP_ADDRESS>:9092  -t debugitems

And then rerun the below query
SELECT __time,  sum_value, CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency) as "concat_expression" FROM items

You will see:
(Query 4 Result)
+--------------------------+-----------+-------------------+
|          __time          | sum_value | concat_expression |
+--------------------------+-----------+-------------------+
| 2020-01-14T11:11:00.000Z |     30.12 | 2020-01-14:GBP    |
| 2020-01-15T11:11:00.000Z |     30.12 | 2020-01-15:EUR    |
| 2020-01-16T11:11:00.000Z |     30.12 | 2020-01-16:GBP    |
+--------------------------+-----------+-------------------+

From the results of Query 3 after 3 values have been ingested the values in the column of concat_expression are no longer wrapped with [" and "].
If we then re-run the query below
select
__time,
currency,
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'EUR'), 'currency_conversion') as "Fixed EUR Lookup",
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'GBP'), 'currency_conversion') as "Fixed GBP Lookup",
LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency), 'currency_conversion') as "Row Lookup",
SUM(sum_value) as "Total Value",
SUM((sum_value / CAST(LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', currency), 'currency_conversion') AS FLOAT)) * CAST(LOOKUP(CONCAT(TIME_FORMAT(__time, 'yyyy-MM-dd'), ':', 'EUR'), 'currency_conversion') AS FLOAT)) as "Converted Total Value"
from items
GROUP BY 1,2

We get the following
(Query 5 Result)
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+
|          __time          | currency | Fixed EUR Lookup | Fixed GBP Lookup | Row Lookup | Total Value | Converted Total Value |
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+
| 2020-01-14T11:11:00.000Z | GBP      |              0.7 |              0.9 |        0.9 |       30.12 |    23.426666666666666 |
| 2020-01-15T11:11:00.000Z | EUR      |              0.7 |              0.9 |        0.7 |       30.12 |                 30.12 |
| 2020-01-16T11:11:00.000Z | GBP      |              1.7 |              1.9 |        1.9 |       30.12 |    26.949473684210528 |
+--------------------------+----------+------------------+------------------+------------+-------------+-----------------------+

With Converted Total Value returning the expected results.
We believe this could be due to that when two rows have been ingested they are aggregated in heap memory however when the third row gets ingested it gets persisted to the segment due to setting "maxRowsPerSegment" to 3.
Any debugging that you have already done
The only debugging that has been carried out is changing the tuning config values, reducing intermediatePersistPeriod or maxRowsPerSegment to persist the rows to the segments.

I've done a little bit of digging on this and this bug applies to all string dimension columns in the IncrementalIndexStorageAdapter. It seems that regardless of whether a multi value was inserted into a column or not, this storage adapter sets all string columns to be multi value.
e.g. for the example above while it hasn't been persisted a query for segment metadata results in this:
           "currency": {                 "cardinality": 2,                  "errorMessage": null,                  "hasMultipleValues": true,                  "maxValue": "GBP",                  "minValue": "EUR",                  "size": 0,                  "type": "STRING"             }
Whereas the persisted data returns hasMultipleValues correctly as false, it seems this results in inconsistencies when using any kind of string function against a dimensional column that has not yet been persisted vs data that has been persisted. So I think this problem is bigger than just the above report.
I verified this by amending the following to return false and this then correctly returns just a string value instead of an array. However I'm aware this may break multi-values on ingestion?
https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexStorageAdapter.java#L166
Happy to take a look further if anyone can offer any advice as to how to tackle this problem. I believe @gianm wrote some of this code, I'm hoping you might be able to offer some advice?
Thanks

I noticed this same issue recently. @Synforge were you able to contribute to a solution for this?
At the moment we've just used the following work around (in native query), to ensure any "multi value" dimensions are flattened:
array_to_string(non_mv_dimension, '')


Make parsing from object public

It's only possible to parse from JSON but sometimes (like in express application with activated bodyParser) it could be helpful to have the opportunity to parse to a typed object from a objectwhich was already parsed by JSON.parse.

Yes, I was thinking maybe this could be useful. Now that it's requested, I'll make sure to include it in the next version when I have the time.

In the meantime, TypedJSON.parse(JSON.stringify(obj), Class) should work reliably in these cases.

This feature is now available in the latest version.


How to avoid javascript errors when new version is deployed

Maybe we can show a banner showing that the user needs to reload the page.
This is to prevent errors like #968.

reloading won't do much as long as the cache isn't busted. files are cached for 10 minutes by default so as long as they have an old version this will keep happening

#968 was a real error, unrelated to files being updated while user was in browser


Can it scan barcode ?

Or only QR code ?

@korrio It worked on both for me. You can test it let us know if there is any issue.

@korrio Let me know if you face any issue while scanning. Thanks

It worked on both for me. You can test it let us know if there is any issue.

@gokulkrishh Please which type of bar-codes were you able to scan?

@CharlesOkwuagwu It works with QR Code only. Library i am using support only QR Code.

ZBar is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code.

@gokulkrishh
I am able to scan both barcodes and QR-codes using this: https://gist.github.com/jazzido/9435670 which is base on https://github.com/yurydelendik/zbarjs, also derived from  ZBar


Fix cached tender initial data in singleItemTender

This change is

Retarget it to fix_initial_data_caching branch, please.
And make this fix work for all tests.

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Placement prop top/bottom is rendered reversed

When I set the placement prop on Popper to 'bottom' the html is rendered with 'top' and vice versa.
This
<Popper             id='news-popper'             className={classes.newsPaper}             placement='top-end'             anchorEl={this.state.newsPopperElement}             open={this.state.newsPopperOpen}>
renders this
<div role="tooltip" id="popper" class="some-class" style="position: absolute; transform: translate3d(989px, 72px, 0px); top: 0px; left: 0px; will-change: transform;" x-placement="bottom-end">
The x-placement is set to 'bottom-end' instead of 'top-end'.

@aupp The Popper placement might flip if it starts to overlap its reference element. You can observe this behavior in https://material-ui.com/utils/popper/#scroll-playground.
I'm sorry, we can't help more without a minimal reproduction example.

Yes, you're right! I disabled "flip" and now it behaves as expected. Thanks!


if UseEmulation is configured, checking kvm is non-essential

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

/test all

@lixuehui08 thank you for this PR!
Could you please add more content to the PR description?
Also, please make sure to add "Signed-off-by" to your commit message, as it's required by the project.
https://github.com/kubevirt/kubevirt/blob/master/CONTRIBUTING.md#contributor-compliance-with-developer-certificate-of-origin-dco

@lixuehui08 could you explain in the PR descrition what you try to fix?

Tanks for your request，in view of this problem, there are two aspects to consider：
Firstly，checking if the kvm device exists is redundant when i want to use software emulation，and it will take time and resource.
Secondly,checking kvm device every time and it's log confused me and made me feel like my configuration wasn't working.
Considering the above considerations，i want to optimize it and look forward to our products getting better and better.
Tanks again for your attention.
-----原始邮件-----
发件人:"Roman Mohr"<EMAIL_ADDRESS>发送时间:2020-12-04 20:11:49 (星期五)
收件人: kubevirt/kubevirt<EMAIL_ADDRESS>抄送: lixuehui08<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>主题: Re: [kubevirt/kubevirt] if UseEmulation is configured, checking kvm is non-essential (#4618)
@lixuehui08 could you explain in the PR descrition what you try to fix?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
78l

Firstly，checking if the kvm device exists is redundant when i want to use software emulation

Let me clarify this point: We only support kubevirt with kvm. You can only configure to allow a fallback to kvm. It should first check if kvm can be used. That part is intentional.

and it will take time and resource.

Hm, the kvm device can appear and disappear. We can probably base our check somehow on the deviceplugin which uses  inotify to check that. I think the check is done at the wrong place. The converter should not check anything, it should only get given inputs.

Secondly,checking kvm device every time and it's log confused me and made me feel like my configuration wasn't working. Considering the above considerations，

I can really understand that this is annoying. This may be one of the main problems.

i want to optimize it and look forward to our products getting better and better.

:+1:

Hi,
I'm sorry to disturb you again，cloud i confirm one question with you?
I want to confirm if kubevirt suuport injecting password through cloudbase-init for windows virtual machine, because there is less information on this aspect and i injected in failure.
Thanks，looking forward to your reply
-----原始邮件-----
发件人:"Roman Mohr"<EMAIL_ADDRESS>发送时间:2020-12-04 21:56:38 (星期五)
收件人: kubevirt/kubevirt<EMAIL_ADDRESS>抄送: lixuehui08<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>主题: Re: [kubevirt/kubevirt] if UseEmulation is configured, checking kvm is non-essential (#4618)
Firstly，checking if the kvm device exists is redundant when i want to use software emulation
Let me clarify this point: We only support kubevirt with kvm. You can only configure to allow a fallback to kvm. It should first check if kvm can be used. That part is intentional.
and it will take time and resource.
Hm, the kvm device can appear and disappear. We can probably base our check somehow on the deviceplugin which uses inotify to check that. I think the check is done at the wrong place. The converter should not check anything, it should only get given inputs.
Secondly,checking kvm device every time and it's log confused me and made me feel like my configuration wasn't working. Considering the above considerations，
I can really understand that this is annoying. This may be one of the main problems.
i want to optimize it and look forward to our products getting better and better.
👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


Monitoring Volume Changes on Wistia player.

I couldn't find a way to bind the volume changes in React player or the stand alone wistia player. I'm not sure if this will work for other players so I just made a minor change a local copy of the Wistia player.
I modified the Wistia.js component
I used the local storage to volume change by default (versus via a prop) since I didn't want to modify the code too much. Below shows the changes and below that, a full example of binding the 'videochange' event to react-player.
  load (url) {
    const _this = this
    const currentVolume = window.localStorage.getItem('currentVolume') || 1
   //
        options: {
         //
          volume: currentVolume,
          //
        },
        onReady: player => {
         ///
          this.player.bind('volumechange', _this.onVolumeChange)
          onReady()
        }
      })
    })
  }
  onVolumeChange = (event) => {
      window.localStorage.setItem('currentVolume', event)
  }

Full Example
I'm putting this as a simple way to copy and paste to your local project.
import React, { Component } from 'react'

import { callPlayer, getSDK } from 'react-player/lib/utils'
import createSinglePlayer from 'react-player/lib/singlePlayer'

const SDK_URL = '//fast.wistia.com/assets/external/E-v1.js'
const SDK_GLOBAL = 'Wistia'
const MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/

export class Wistia extends Component {
  static displayName = 'Wistia'
  static canPlay = url => MATCH_URL.test(url)
  static loopOnEnded = true

  callPlayer = callPlayer
  getID (url) {
    return url && url.match(MATCH_URL)[1]
  }
  load (url) {
    const _this = this
    const currentVolume = window.localStorage.getItem('currentVolume') || 1
    const { playing, muted, controls, onReady, onPlay, onPause, onSeek, onEnded, config } = this.props
    getSDK(SDK_URL, SDK_GLOBAL).then(() => {
      window._wq = window._wq || []
      window._wq.push({
        id: this.getID(url),
        options: {
          autoPlay: playing,
          silentAutoPlay: 'allow',
          muted: muted,
          controlsVisibleOnLoad: controls,
          volume: currentVolume,
          ...config.wistia.options
        },
        onReady: player => {
          this.player = player
          this.player.bind('play', onPlay)
          this.player.bind('pause', onPause)
          this.player.bind('seek', onSeek)
          this.player.bind('end', onEnded)
          this.player.bind('volumechange', _this.onVolumeChange)
          onReady()
        }
      })
    })
  }

  onVolumeChange = (volumeLevel) => {
      window.localStorage.setItem('currentVolume', volumeLevel)
  }
  play () {
    this.callPlayer('play')
  }
  pause () {
    this.callPlayer('pause')
  }
  stop () {
    this.callPlayer('remove')
  }
  seekTo (seconds) {
    this.callPlayer('time', seconds)
  }
  setVolume (fraction) {
    this.callPlayer('volume', fraction)
  }
  mute = () => {
    this.callPlayer('mute')
  }
  unmute = () => {
    this.callPlayer('unmute')
  }
  setPlaybackRate (rate) {
    this.callPlayer('playbackRate', rate)
  }
  getDuration () {
    return this.callPlayer('duration')
  }
  getCurrentTime () {
    return this.callPlayer('time')
  }
  getSecondsLoaded () {
    return null
  }
  render () {
    const id = this.getID(this.props.url)
    const className = `wistia_embed wistia_async_${id}`
    const style = {
      width: '100%',
      height: '100%'
    }
    return (

    )
  }
}

export default createSinglePlayer(Wistia)

You could also use getInternalPlayer() to access the internal Wistia player once onReady has been called:
class Player extends React.Component {
  state = {
    volume: 0.5
  }
  onReady = () => {
    const internalPlayer = this.rp.getInternalPlayer()
    internalPlayer.bind('volumechange', volume => {
      this.setState({ volume })
    })
  }
  render () {
    return (

        <ReactPlayer
          ref={rp => this.rp = rp}
          url='https://home.wistia.com/medias/e4a27b971d'
          width='400px'
          height='225px'
          playing
          onReady={this.onReady}
          volume={this.state.volume}
        />
        Volume: {this.state.volume.toFixed(2)}

    )
  }
}

See example jsFiddle

Great. Thank you.

New issue for this case.
If you are using firefox and trigger default button PiP of Firefox and click muted.
 internalPlayer.bind('volumechange', volume => {       this.setState({ volume })     })
The volume always return 1

@cookpete

@thanhnx9368 It looks like that is the standard behaviour, regardless of browser or PiP. Muting the player obviously mutes the sound and moves the volume slider to zero, but internally the volume is still stored as it was before, presumably so that when you unmute, it can set it to the same volume as before.
There is a mutechange event that you could also listen to:
https://wistia.com/support/developers/player-api#mutechange

mutechange not working for this case :(
It's seem to be not support in https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#events.
This is my code

@cookpete

@cookpete It's working. 🥳🥳🥳
Thank you for supporting!


docker node image version

It's better to pin a specific version and update it regularly rather than something generic like lts that will probably break when the next node LTS version will be released.
If validated I'll reflect that to all other docker files.

@Zeecka do you want me to open a PR for .dev and .test as well?

Fixed with https://github.com/pwndoc-ng/pwndoc-ng/pull/101


Glob with conditional file names

I'm trying to grab all spec files that end in "test.ts" and spec.ts".
The glob, /**/*.{test,spec}.ts isn't doing the trick and it's failing with "Error: Test file is not found".
Is it possible to pass a glob w/ a conditional match like this?

This CLI uses glob crate and it seems it doesn't support curly braces pattern.
https://github.com/rust-lang/glob/issues/2

BTW this CLI accepts multiple --tests-glob arg.
`split-test ... --tests-glob '//*.test.ts' --tests-glob '//*.spec.ts'
I've added a test for this just in case.
https://github.com/mtsmfm/split-test/commit/45ee4d430ebd16bc0fce7581b38f38d1bb23fbbb

forgot to follow up here, but thanks for the note! Very helpful 👍


Cannot log in DEMO with user<EMAIL_ADDRESS>

When trying to log into demo.lale.help with user<EMAIL_ADDRESS>/ "Lalehelp1" I should be taken to
https://demo.lale.help/circles/11. Instead I get an error, which I believe might have to do with an error in retrieving the Sponsor image for the circle from S3.

@mkristian This should be similar to the issues we had accessing the images before for documents. Maybe you can look if you have a minute...


NodeListOf#item should return TNode | null

Regarding this issue: https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1268
Real return type: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/item
It would be much better for item() in NodeListOf to match behaviour with at() for arrays. The small difference is that it can return null instead of undefined.

Given that the linked issue says that it cannot be changed upstream because of backwards compabitility, I would love to accept this change.

A fix has been released as v2.8.0. Thank you for reporting!


Create a page for each image that includes additional information

Rather than clicking directly through to the source image, create a page for each image that allows us to hang rich metadata and user interface options.

A lot more work to do here, but this page is now wired up to all the search result types.


217 implement sites page

Basic site selection functionality

Loading
Paging
Selection

Depending on Authorization (Using fake data generated at UI)

closes #217

@ParsaGachkar @TheHadiAhmadi please create a PR when you are done!

@ParsaGachkar @TheHadiAhmadi I am changing this to draft. It has many changes.


Publishing Joint Temperature and information

Hello all,
I'm in the process of developing a system with several UR robots and we are using the ur_modern_driver package to allow for us to move the robots with ros_control.
One of the things that has come up recently for our application was monitoring the health of the robots, and we were interested in logging the temperature of the joints of each robot with respect to time. On the UR pendant, on the "Log" tab, we see the temperature being displayed. Is there any way to use the ur_modern_driver package for us to be able to get that information published via ros? Or is there a way to get that data and log it?
Thanks in advance!

There should be a way, since that information is sent by the controller through the RT interface and unpacked by RobotStateRT (see the unpacking and the getter).
It should be a matter of reading these values in rosControlLoop and publishing them as desired (I suggest using a realtime_tools::RealtimePublisher, such as this one).

Do any of you have any suggestions as to what message type we should use for this? - preferably something that is already in ROS

sensor_msgs contains a Temperature msg: sensor_msgs/Temperature.
I would suggest to use that.
Perhaps a single publisher would suffice, if we set the frame_id to suitable values.

So should we set up 1 (or six) publishers that just publishes joint temperatures, or a more elaborate system state message overview?

A single publisher should be possible:

frame_id is the location of the temperature reading

if the TF frames for the joints are acceptable as 'locations' of the motors.

Probably covered by #120.

This was added in https://github.com/ros-industrial/ur_modern_driver/pull/120: motor temperatures for all joints are published.


gnucash: fix build issue with newer CMake

Motivation for this change
Fix gnucash's build break by incorporating a patch that has been accepted on upstream's maint branch.
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

This has been independently fixed in a slightly different way in master. Please check which fix is better, if this one is nicer you can revert the other change and apply this one.

the other fix is in #68026, FYI.


Implementation error

https://github.com/lucidrains/ema-pytorch/blob/d65f4e3031067055a944282583afc5702d8592ad/ema_pytorch/ema_pytorch.py#L112
I think it should be for name, buffer in model.named_buffers():.
A related hint for users: do not forget to call ema.eval() in your evaluation loop.

@sbl1996 ah yes, thank you :disappointed:


ESP-IDF FOTA via the webserver fails when increasing chunk size (IDFGH-7040)

I have picked up file_serving example from the esp-idf examples and modified it slightly.
This is the original upload handler that handles the file upload from the web to the SPIFFS.
// Handler to upload a file onto the server
static esp_err_t upload_post_handler(httpd_req_t *req)
{
    char filepath[FILE_PATH_MAX];
    FILE *fd = NULL;
    struct stat file_stat;

    // Skip leading "/upload" from URI to get filename
    // Note sizeof() counts NULL termination hence the -1
    const char *filename = get_path_from_uri(filepath, ((struct file_server_data *)req->user_ctx)->base_path,
                                             req->uri + sizeof("/upload") - 1, sizeof(filepath));
    if (!filename) {
        // Respond with 500 Internal Server Error
        httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Filename too long");
        return ESP_FAIL;
    }

    // Filename cannot have a trailing '/'
    if (filename[strlen(filename) - 1] == '/') {
        ESP_LOGE("UPLOAD", "Invalid filename : %s", filename);
        httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Invalid filename");
        return ESP_FAIL;
    }

    if (stat(filepath, &file_stat) == 0) {
        ESP_LOGE("UPLOAD", "File already exists : %s", filepath);
        // Respond with 400 Bad Request
        httpd_resp_send_err(req, HTTPD_400_BAD_REQUEST, "File already exists");
        return ESP_FAIL;
    }

    // File cannot be larger than a limit
    if (req->content_len > MAX_FILE_SIZE) {
        ESP_LOGE("UPLOAD", "File too large : %d bytes", req->content_len);
        // Respond with 400 Bad Request
        httpd_resp_send_err(req, HTTPD_400_BAD_REQUEST,
                            "File size must be less than "
                            MAX_FILE_SIZE_STR "!");
        //Return failure to close underlying connection else the
        // incoming file content will keep the socket busy
        return ESP_FAIL;
    }

    fd = fopen(filepath, "w");
    if (!fd) {
        ESP_LOGE("UPLOAD", "Failed to create file : %s", filepath);
        // Respond with 500 Internal Server Error //
        httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to create file");
        return ESP_FAIL;
    }

    ESP_LOGI("UPLOAD", "Receiving file : %s...", filename);

    //Retrieve the pointer to scratch buffer for temporary storage
    char *buf = ((struct file_server_data *)req->user_ctx)->scratch;
    int received;
    // Content length of the request gives
    // the size of the file being uploaded
    int remaining = req->content_len;
    while (remaining > 0) {
        ESP_LOGI("UPLOAD", "Remaining size : %d", remaining);
        // Receive the file part by part into a buffer
        if ((received = httpd_req_recv(req, buf, MIN(remaining, SCRATCH_BUFSIZE))) <= 0) {
            if (received == HTTPD_SOCK_ERR_TIMEOUT) {
                // Retry if timeout occurred
                continue;
            }

            // In case of unrecoverable error,
            // close and delete the unfinished file
            fclose(fd);
            unlink(filepath);

            ESP_LOGE("UPLOAD", "File reception failed!");
            // Respond with 500 Internal Server Error *
            httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to receive file");
            return ESP_FAIL;
        }

        // Write buffer content to file on storage
        if (received && (received != fwrite(buf, 1, received, fd))) {
            // Couldn't write everything to file!
            // Storage may be full?
            fclose(fd);
            unlink(filepath);

            ESP_LOGE("UPLOAD", "File write failed!");
            // Respond with 500 Internal Server Error //
            httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to write file to storage");
            return ESP_FAIL;
        }

        // Keep track of remaining size of
        // the file left to be uploaded
        remaining -= received;
    }

    // Close file upon upload completion
    fclose(fd);
    ESP_LOGI("UPLOAD", "File reception complete");

    // Redirect onto root to see the updated file list
    httpd_resp_set_status(req, "303 See Other");
    httpd_resp_set_hdr(req, "Location", "/");
#ifdef CONFIG_EXAMPLE_HTTPD_CONN_CLOSE_HEADER
    httpd_resp_set_hdr(req, "Connection", "close");
#endif
    httpd_resp_sendstr(req, "File uploaded successfully");

    return ESP_OK;
}

Instead of writing file to SPIFFS, I would like to directly upload the .bin file and write it to OTA.
I have modified the function accordingly:

// Handler to upload a file onto the server
static esp_err_t upload_and_flash_post_handler(httpd_req_t *req){
    printf("upload and flash handler \n");

    char filepath[FILE_PATH_MAX];
    const char *filename = get_path_from_uri(filepath, ((struct file_server_data *)req->user_ctx)->base_path,
                                             req->uri + sizeof("/upload") - 1, sizeof(filepath));

    // File cannot be larger than a limit
    if (req->content_len > MAX_FILE_SIZE) {
        ESP_LOGE("UPLOAD", "File too large : %d bytes", req->content_len);
        // Respond with 400 Bad Request
        httpd_resp_send_err(req, HTTPD_400_BAD_REQUEST,
                            "File size must be less than "
                            MAX_FILE_SIZE_STR "!");
        //Return failure to close underlying connection else the
        // incoming file content will keep the socket busy
        return ESP_FAIL;
    }

    ESP_LOGI("UPLOAD", "Receiving file : %s...", filename);

    //Retrieve the pointer to scratch buffer for temporary storage

    int received;

    esp_err_t ret;

    const esp_partition_t *update_partition;
    const esp_partition_t *configured = esp_ota_get_boot_partition();
    const esp_partition_t *running  = esp_ota_get_running_partition();
    esp_ota_handle_t well_done_handle = 0;  // Handler for OTA update.
    if (configured != running) {
        ESP_LOGW("UPDATE", "Configured OTA boot partition at offset 0x%08x, but running from offset 0x%08x",
                        configured->address, running->address);
        ESP_LOGW("UPDATE", "(This can happen if either the OTA boot data or preferred boot image become corrupted somehow.)"
                        );
    }
    ESP_LOGI("UPDATE", "Running partition type %d subtype %d (offset 0x%08x)",
                    running->type, running->subtype, running->address);

    ESP_LOGI("UPDATE", "Starting OTA example");
    // It finds the partition where it should write the firmware
    update_partition = esp_ota_get_next_update_partition(NULL);
    ESP_LOGI("UPDATE", "Writing to partition subtype %d at offset 0x%x",
                    update_partition->subtype, update_partition->address);
    assert(update_partition != NULL);

    // Reset of this partition
    ESP_ERROR_CHECK(esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &well_done_handle));

    char buf[SEND_DATA];
    // Init of the buffer
    memset(buf, 0, sizeof(buf));
    // Content length of the request gives
    // the size of the file being uploaded
    int remaining = req->content_len;
    while (remaining > 0) {
        uint16_t read_chunk_length = MIN(remaining, SEND_DATA);
        //vTaskDelay(40/portTICK_PERIOD_MS);
        ESP_LOGI("UPLOAD", "Remaining size : %d", remaining);
        // Receive the file part by part into a buffer
        if ((received = httpd_req_recv(req, buf, read_chunk_length)) <= 0) {
            if (received == HTTPD_SOCK_ERR_TIMEOUT) {
                continue;
            }
            ESP_LOGE("UPLOAD", "File reception failed!");
            httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to receive file");
            return ESP_FAIL;

        }

        ret = esp_ota_write(well_done_handle, buf, read_chunk_length);
        if(ret != ESP_OK){
            ESP_LOGE("UPDATE", "Firmware upgrade failed");
            while (1) {
                vTaskDelay(1000 / portTICK_PERIOD_MS);
            }
            return ESP_FAIL;
        }

    remaining -= received;
    }

    ESP_LOGI("UPLOAD", "File reception complete");

    // Redirect onto root to see the updated file list
    httpd_resp_set_status(req, "303 See Other");
    httpd_resp_set_hdr(req, "Location", "/");
#ifdef CONFIG_EXAMPLE_HTTPD_CONN_CLOSE_HEADER
    httpd_resp_set_hdr(req, "Connection", "close");
#endif
    httpd_resp_sendstr(req, "File uploaded successfully");

    // If you are here it means there are no problems!
    ESP_ERROR_CHECK(esp_ota_end(well_done_handle));

    // OTA partition configuration
    ESP_ERROR_CHECK(esp_ota_set_boot_partition(update_partition));
    ESP_LOGI("UPDATE", "Restarting...");
    // REBOOT!!!!!
    esp_restart();
    return ESP_OK;
}

The function above will receive chunks of data and store it in the buf :
        uint16_t read_chunk_length = MIN(remaining, SEND_DATA);
        ESP_LOGI("UPLOAD", "Remaining size : %d", remaining);
        if ((received = httpd_req_recv(req, buf, read_chunk_length)) <= 0) {

Then I use this buffer and write it to the OTA:
        ret = esp_ota_write(well_done_handle, buf, read_chunk_length);
        if(ret != ESP_OK){
            ESP_LOGE("UPDATE", "Firmware upgrade failed");
            while (1) {
                vTaskDelay(1000 / portTICK_PERIOD_MS);
            }
            return ESP_FAIL;
        }

Everything seems to be working fine. The SEND_DATA is set to 100 which means that I will receive 100byte chunks at a time and write it to the OTA. This seems too low and the firmware update takes long time.

logs...
upload and flash handler
I (32602) UPLOAD: Receiving file : _flash/firmware.bin...
I (32612) UPDATE: Running partition type 0 subtype 0 (offset 0x00010000)
I (32612) UPDATE: Starting OTA example
I (32612) UPDATE: Writing to partition subtype 16 at offset 0x1b0000
I (37562) UPLOAD: Remaining size : 1314912
I (37572) UPLOAD: Remaining size : 1314812
I (37572) UPLOAD: Remaining size : 1314712
I (37572) UPLOAD: Remaining size : 1314612
I (37572) UPLOAD: Remaining size : 1314512
I (37582) UPLOAD: Remaining size : 1314412
I (37582) UPLOAD: Remaining size : 1314312
...
...

I have decided to increase the SEND_DATA to 2048 (receiving 2MB chunks from the web and writing to the OTA) and hope that the FOTA is much faster. However, changing the SEND_DATA to anything higher than 100 seems to crash the FOTA and I cant fully understand why.  Is the wifi not able to keep up with reading 2MB chunks very fast from the webserver? How to make this as efficient as possible so that the OTA writes only when the ESP32 sucesfully read all the data from the webserver?

@krupis
Can you please check stack utilization of httpd task? Alternatively if you change SEND_DATA buffer to be static does it fix the problem?
Note: If this does not help, please share your example project along with sdkconfig

Hello. I think I have found a problem. It was a misunderstanding of how httpd_req_recv works from my side.
The issue is that I call
esp_ota_write(well_done_handle, buf, read_chunk_length);

passing the read_chunk_length parameter which is not correct.  It should be as following;
esp_ota_write(well_done_handle, buf, received );

That is because httpd_req_recv  may not be able to read the amount of data that is passed as a length parameter. The actual data that has been received will be returned and stored in parameter received.

Thanks for confirming. I will go ahead and close the issue then.


Adding existing extension via migration

Hello, my team and I use Contentful Migrations to manage our contentful space (in terms of creating new Content Types and editing these Content Types).
Via a Contentful Migration, is there a way to add an extension from Contentful's Extension Samples?
We don't use Contentful CLI directly in our project and would love to do something like this a migration. Thanks!

You cannot manage extensions themselves with the migration tool, only with the extension tooling.
What you can do is assign extensions to fields using changeFieldControl.
Probably the best thing for your use case would be to use Contentful CLI which has support for extension and migration commands.
Then you can something like
contenful extension create --id my-new-extension
contentful space migration ./migrations/use-new-extension.js

And have the migration assign the fieldControl where desired.


Android Basics: Viewmodel and State in Compose

fun resetGame() {
usedWords.clear()
_uiState.value = GameUiState(currentScrambledWord = pickRandomWordAndShuffle())
}
error in    usedWords.clear()
because it null
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Set.add(java.lang.Object)' on a null object reference
at com.example.unscramble.ui.GameViewModel.pickRandomWordAndShuffle(GameViewModel.kt:24)
at com.example.unscramble.ui.GameViewModel.resetGame(GameViewModel.kt:39)
at com.example.unscramble.ui.GameViewModel.(GameViewModel.kt:11)
... 101 more

In case anyone else comes across this, I had a similar NullPointerException and it was solved by moving the property initializers above the init block. So essentially, ensure you must declare usedWords and _uiState before the init block.
The codelab didn't explain that you need to do this and I come from a JavaScript background where you can declare a getter or a method further down in a class and then still call it in the constructor (because default JS behaviour is to hoist all declarations from the class first).
Here's a helpful article I found about execution order of initializers in Kotlin:
https://medium.com/keepsafe-engineering/an-in-depth-look-at-kotlins-initializers-a0420fcbf546


Enable multithreading in the HC controller

Tested: manual testing on GKE. I also instrumented the logs (removed in
this commit) to report the maximum actual concurrency when I started 100
threads; it peaked at about 15. However, the "startup time" (the time
from when the controller starts to when it stops making changes) didn't
change on my test cases and remained constant at about 30s. However,
think it's a good idea to turn this on now to flush out any problems.
Fixes #102

/assign @rjbez17

/test all

/approve
/lgtm


group by can not get count(*) count

struct :
type InspectReportMerge struct {
	InspectReportMergeId         string `xorm:"unique"`
	ParentProjectId              int
	HostHostId                   int
	HostHostName                 string
	HostHostIp                   string
	InspectReportMergeHostTag    string
	InspectReportMergeType       int
	InspectReportMergeReportTime time.Time
	InspectReportMergeValue      string
	DelFlag                      int
	Cnt                          int `xorm:"-"`
}

golang code：
var report []*report.InspectReportMerge
err = orm.In("parent_project_id", project_ids).Where(
		"inspect_report_merge_host_tag=?", tag).GroupBy("inspect_report_merge_type").Select(
		"inspect_report_merge_type,count(*) as cnt").Find(&report)

SELECT inspect_report_merge_type, count(inspect_report_merge_id) as cnt FROM `inspect_report_merge` WHERE `parent_project_id` IN (443) AND (inspect_report_merge_host_tag="linux") GROUP BY inspect_report_merge_type

has data：
inspect_report_merge_type	cnt
2	8

log:
[xorm] [info]  2019/06/27 11:53:22.583164 [SQL] SELECT inspect_report_merge_type,count(*) as cnt FROM inspect_report_merge WHERE parent_project_id IN (?) AND (inspect_report_merge_host_tag=?) GROUP BY inspect_report_merge_type []interface {}{443, "linux"}

but the struct Cnt is still 0
[0]:<*HostService/typesReport.InspectReportMerge>(0xc4202e0360)
:<HostService/typesReport.InspectReportMerge>
InspectReportMergeId:""
ParentProjectId:0
HostHostId:0
HostHostName:""
HostHostIp:""
InspectReportMergeHostTag:""
InspectReportMergeType:2
InspectReportMergeReportTime:<time.Time>
InspectReportMergeValue:""
DelFlag:0
Cnt:0

golang code :
func GroupByInspectHostReportsCntByProjectIdAndTag(project_ids []int32, tag, report_time string) ([]*report.InspectReportMerge, error) {
var report []*report.InspectReportMerge
var orm *xorm.Engine
var err error = nil
orm, err = GetEngine()
location, err := time.LoadLocation("Asia/Shanghai")
orm.TZLocation = location

if err != nil {
	logs.Error("mysqlEngine error:", err.Error())
	return report, err
}

// reportBeginStr, reportEndStr := common.TimeRangeOneDay2String(report_time, location)

// err = orm.In("parent_project_id", project_ids).Where(
// 	"inspect_report_merge_host_tag=?", tag).And(
// 	"inspect_report_merge_report_time>=?", reportBeginStr).And(
// 	"inspect_report_merge_report_time<?", reportEndStr).And("del_flag=?", 0).Distinct("host_host_id").Select(
// 	"inspect_report_merge_type, count(*) as cnt").GroupBy("inspect_report_merge_type").Find(&report)
err = orm.In("parent_project_id", project_ids).Where(
	"inspect_report_merge_host_tag=?", tag).GroupBy("inspect_report_merge_type").Select(
	"inspect_report_merge_type,count(*) as cnt").Find(&report)
if err != nil {
	logs.Error("orm error:", err.Error())
	return report, err
}
return report, err

}

`
func GroupByInspectHostReportsCntByProjectIdAndTag(project_ids []int32, tag, report_time string) ([]*report.InspectReportMerge, error) {
var report []*report.InspectReportMerge
var orm *xorm.Engine
var err error = nil
orm, err = GetEngine()
location, err := time.LoadLocation("Asia/Shanghai")
orm.TZLocation = location

if err != nil {
	logs.Error("mysqlEngine error:", err.Error())
	return report, err
}

// reportBeginStr, reportEndStr := common.TimeRangeOneDay2String(report_time, location)

// err = orm.In("parent_project_id", project_ids).Where(
// 	"inspect_report_merge_host_tag=?", tag).And(
// 	"inspect_report_merge_report_time>=?", reportBeginStr).And(
// 	"inspect_report_merge_report_time<?", reportEndStr).And("del_flag=?", 0).Distinct("host_host_id").Select(
// 	"inspect_report_merge_type, count(*) as cnt").GroupBy("inspect_report_merge_type").Find(&report)
err = orm.In("parent_project_id", project_ids).Where(
	"inspect_report_merge_host_tag=?", tag).GroupBy("inspect_report_merge_type").Select(
	"inspect_report_merge_type,count(*) as cnt").Find(&report)
if err != nil {
	logs.Error("orm error:", err.Error())
	return report, err
}
return report, err

}
`

func GroupByInspectHostReportsCntByProjectIdAndTag(project_ids []int32, tag, report_time string) ([]*report.InspectReportMerge, error) {
	var report []*report.InspectReportMerge
	var orm *xorm.Engine
	var err error = nil
	orm, err = GetEngine()

	location, err := time.LoadLocation("Asia/Shanghai")
	orm.TZLocation = location

	if err != nil {
		logs.Error("mysqlEngine error:", err.Error())
		return report, err
	}

	// reportBeginStr, reportEndStr := common.TimeRangeOneDay2String(report_time, location)

	// err = orm.In("parent_project_id", project_ids).Where(
	// 	"inspect_report_merge_host_tag=?", tag).And(
	// 	"inspect_report_merge_report_time>=?", reportBeginStr).And(
	// 	"inspect_report_merge_report_time<?", reportEndStr).And("del_flag=?", 0).Distinct("host_host_id").Select(
	// 	"inspect_report_merge_type, count(*) as cnt").GroupBy("inspect_report_merge_type").Find(&report)
	err = orm.In("parent_project_id", project_ids).Where(
		"inspect_report_merge_host_tag=?", tag).GroupBy("inspect_report_merge_type").Select(
		"inspect_report_merge_type,count(*) as cnt").Find(&report)
	if err != nil {
		logs.Error("orm error:", err.Error())
		return report, err
	}
	return report, err
}

With xorm:"-" flag, it will not be read from database.

With xorm:"-" flag, it will not be read from database.

i use:
type InspectReportMergeGroup struct {
	InspectReportMergeType int
	Cnt                    int
}
var groups []*report.InspectReportMergeGroup
 orm.Table("inspect_report_merge").In("parent_project_id", project_ids)..Where(
		"inspect_report_merge_host_tag=?", tag).GroupBy("inspect_report_merge_type").Select(
		"inspect_report_merge_type,count(*) as cnt").Find(&groups)

then, it's ok now.
but i consider it's not a good way using like this.
should be a better way. thanks.


Allow parameters to store the collection of TypeReaders for their type

After saying this I figured I might as well put my proverbial money where my mouth is and do it myself.

This is basically obsolete as I now think this is a very rare case that can be worked around in user code.
However, there should at least be some value in logging a Debug or something for when more than one type reader is registered for a given type, just to inform the user.


UIExample - Animated crashes on load

When I tap the Animated example I see the following crash:

Using latest iojs, upgraded watchman and flow. Just pulled from master.

Thanks for the report; cc @sahrens

fwiw I see this error here too: http://www.reactnative.com/uiexplorer/

I saw this awhile ago but I think it's fixed - can you try updating and see
if it still repros?
On Sep 2, 2015 6:20 PM, "Martin Cortez"<EMAIL_ADDRESS>wrote:

fwiw I see this error here too: http://www.reactnative.com/uiexplorer/
[image: animated]
https://cloud.githubusercontent.com/assets/420959/9648589/1d451128-519f-11e5-8575-1ea175533d7c.gif
—
Reply to this email directly or view it on GitHub
https://github.com/facebook/react-native/issues/2393#issuecomment-137294777
.

Just verified that the animation example works without issue on master.

thanks! @ide


[MLIR] Removes use of ValueRange after using sanitizers.

Context: Wheels did not pass because of memory issues. After looking into it with address sanitizers, ValueRange is the culprit.
Description of the Change: Do not use ValueRange.
https://github.com/PennyLaneAI/catalyst/actions/runs/6495027163

I'll leave this to @dime10 to decide how he wants to merge for the release. Merge with release candidate or merge with main and then with release candidate.

Just a note here for future reference. std::vectors should generally not be returned from such utility functions that merely provide access to existing data. ValueRange, TypeRange, and the like are used in MLIR precisely to have a lightweight way of passing around IR objects which are tied to a long-lived object.
In this case, the it's Operation object that owns the data (the operands) and there should be issue returning a range. The actual problem was the way the range was constructed (my bad)!
On the other hand, a common error I've made in the past is constructing a ValueRange locally to be passed into an MLIR function. This typically doesn't work because there is no underlying storage object when gathering various Value objects into a ValueRange in this manner. Here constructor a container that can hold the disparate Value objects (such as SmallVector<Value>) is necessary.

What about CustomOp? Is that safe because it already returns a range for getParams()?

When I run all the lit tests with sanitizers there are no more errors.

What about CustomOp? Is that safe because it already returns a range for getParams()?

When I run all the lit tests with sanitizers there are no more errors.

I guess that must be explanation then 😅 Sounds good 👍


fix(List): css principles

Using principles from #2295
Removing adChild on ListOrdered and ListUnordered as using other tags will break HTML validity and remove built in list-type styling
Removing the wrapping div caused by List.Root so root truly becomes a pure context provider and simplify DOM
In React, size is a prop on List.Root, while in pure HTML+CSS, this prop will be on the List itself - is this inconsistency a problem or is it okay? Keeping size at List.Root allows us to set size on context directly from there, but it is indeed possible to move it to List.Unordered/List.Ordered by adding a setSize to the useContext

I agree we should remove the wrapper div, but in that case, , you will also have to update ErrorSummaryRoot to use div instead of Slot.
See: https://storybook-pr-2348.dev.designsystemet.no/?path=/docs/komponenter-errorsummary--docs

API dependent on this conversation: https://designsystemet.slack.com/archives/C07K7NEKXEW/p1725267939270319 :)

Discussion on API: https://designsystemet.slack.com/archives/C05U1MNKYCX/p1725266296604279

Actually, I suggest we remove the aria-labelledby all together on lists. It is nice to have situationally, but we should not add any complexity or make this decision for the consumer.
Futhermore, a heading before a list makes aria-labelledby on the list itself redundant, as screen reader users mostly navigate by jumping to headings, and expect subsequent content to be related to the heading (just like we do visually) - this is also true for paragraphs, tables etc. where we do not use aria-label/aria-labelledby
Lastly, if a list is used for navigation and should have a label, it should anyway be wrapped in a <nav aria-label=""> to make sure the navigation area shows in screen reader rotor.
W3C actually mentions themselves that aria-label/aria-labelledby should not be used on ul: https://www.w3.org/TR/using-aria/#label-support

Actually, I suggest we remove the aria-labelledby all together on lists. It is nice to have situationally, but we should not add any complexity or make this decision for the consumer.
Futhermore, a heading before a list makes aria-labelledby on the list itself redundant, as screen reader users mostly navigate by jumping to headings, and expect subsequent content to be related to the heading (just like we do visually) - this is also true for paragraphs, tables etc. where we do not use aria-label/aria-labelledby
Lastly, if a list is used for navigation and should have a label, it should anyway be wrapped in a <nav aria-label=""> to make sure the navigation area shows in screen reader rotor.
W3C actually mentions themselves that aria-label/aria-labelledby should not be used on ul: https://www.w3.org/TR/using-aria/#label-support

Should we write mention this somewhere in the documentation or atleast a link under references as we have on some other stories (to the link you have posted). This feels like good to know information for our users and ourselves in the future 3 months from now asking why we left things like this 😂

Actually, I suggest we remove the aria-labelledby all together on lists. It is nice to have situationally, but we should not add any complexity or make this decision for the consumer.
Futhermore, a heading before a list makes aria-labelledby on the list itself redundant, as screen reader users mostly navigate by jumping to headings, and expect subsequent content to be related to the heading (just like we do visually) - this is also true for paragraphs, tables etc. where we do not use aria-label/aria-labelledby
Lastly, if a list is used for navigation and should have a label, it should anyway be wrapped in a <nav aria-label=""> to make sure the navigation area shows in screen reader rotor.
W3C actually mentions themselves that aria-label/aria-labelledby should not be used on ul: https://www.w3.org/TR/using-aria/#label-support

Should we write mention this somewhere in the documentation or atleast a link under references as we have on some other stories (to the link you have posted). This feels like good to know information for our users and ourselves in the future 3 months from now asking why we left things like this 😂

Godt poeng; Skrev litt om det her: https://github.com/digdir/designsystemet/pull/2348/files#diff-fc2317fe49f8cebcc8f4a7dbdf1c9b2ff55bbf14450ea7c05d93e1faa4b92943R116 😊


stop kata containers failed if the container share sandbox container's pid namespace

we can reproduce it like this,

create a sandbox and a container.
stop the container in another console.

untrusted-podsandbox-config.json and container-config.yaml ,
[root@centos1 kata-containerd]# cat examples/untrusted-podsandbox-config.json
{
  "metadata": {
    "name": "busybox-sandbox",
    "namespace": "default",
    "attempt": 1,
    "uid": "hdishd83djaidwnduwk28bcsb"
  },
  "annotations": {
    "io.kubernetes.cri.untrusted-workload": "true"
  },
  "log_directory": "/tmp",
  "linux": {
  }
}
[root@centos1 kata-containerd]# cat examples/container-config.yaml
metadata:
  name: busybox
image:
  image: dockerhub.jd.com/jrysk/stress-1
command:
- sleep
- 16881688
log_path: busybox.0.log
mounts:
- container_path: /home
  host_path: /root
linux:
  security_context:
    namespace_options:
      pid: 2

[root@centos1 kata-containerd]# crictl runp untrusted-podsandbox-config.json
ed9357f92197eb6e745a73af6217820e9987d3548ea58491144a3c215a615ebc
[root@centos1 kata-containerd]# crictl create ed9357f92197eb6e745a73af6217820e9987d3548ea58491144a3c215a615ebc container-config.yaml untrusted-podsandbox-config.json
4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584
crictl start 4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584
4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584
[root@centos1 kata-containerd]# crictl exec -ti  4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 sh

don't exit sh and in another console, run crictl stop.
[root@centos1 kata-containerd]# crictl stop 4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584
FATA[0000] Stopping the container "4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584" failed: rpc error: code = Unknown desc = failed to stop container "4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584": unknown error after kill: /kata/bin/kata-runtime did not terminate successfully: rpc error: code = Unknown desc = Failed to remove paths: map[net_cls:/sys/fs/cgroup/net_cls/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 net_prio:/sys/fs/cgroup/net_prio/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 cpuset:/sys/fs/cgroup/cpuset/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 cpu:/sys/fs/cgroup/cpu/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 cpuacct:/sys/fs/cgroup/cpuacct/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 blkio:/sys/fs/cgroup/blkio/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 freezer:/sys/fs/cgroup/freezer/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 devices:/sys/fs/cgroup/devices/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 memory:/sys/fs/cgroup/memory/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 pids:/sys/fs/cgroup/pids/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584 perf_event:/sys/fs/cgroup/perf_event/k8s.io/4d2a8f214d722311459d299fe1aea3508b432fa02651383bb0ad6feace8da584]

the root cause is that container exit , but it don't kill the processes in its cgroup, so the cgroup path is busy, and the cgroup path
cannot be deleted.
runc has fix the issue, details for https://github.com/opencontainers/runc/pull/2085

This issue is being automatically closed as Kata Containers 1.x has now reached EOL (End of Life). This means it is no longer being maintained.

Important:
All users should switch to the latest Kata Containers 2.x release to ensure they are using a maintained release that contains the latest security fixes, performance improvements and new features.

This decision was discussed by the @kata-containers/architecture-committee and has been announced via the Kata Containers mailing list:

http://lists.katacontainers.io/pipermail/kata-dev/2020-November/001601.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-April/001843.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-May/001896.html

If you believe this issue still applies to Kata Containers 2.x, please open an issue against the Kata Containers 2.x repository, pointing to this one, providing details to allow us to migrate it.


[proposal] Extract setting up an URLRequest into a separate library

I'd like to propose a structural refactoring of TinyNetworking.
It's a bit daring but I am using it already in one of my projects and I thought I'd write it up and share it with you. Maybe its helpful to you or not; in any case I'd be grateful for feedback about the idea.
My starting point was that while I'm excited about the Endpoint abstraction that TinyNetworking provides, I am not a fan of these very-many-parameters initializers like:
public init(_ method: Method, url: URL, accept: ContentType? = nil, contentType: ContentType? = nil, body: Data? = nil, headers: [String:String] = [:], expectedStatusCode: @escaping (Int) -> Bool = expected200to300, timeOutInterval: TimeInterval = 10, query: [String:String] = [:], parse: @escaping (Data?, URLResponse?) -> Result<A, Error>) {
   ...
}

I think TinyNetworking does two things at once here: a) providing the endpoint abstraction (URLRequest+how to validate/parse the response) and b) provide convenience to setup the URLRequest.
I suggest to separate out the code to setup a URLRequest conveniently into a separate tiny library which TinyNetworking could depend on/re-export (or maybe not).
This simplifies the Endpoint abstraction a lot. It's a tiny bit more to write because you always need to create an URLRequest but overall for me this feels a lot more clean and tiny.
I did a fork with a prototype implementation here:
https://github.com/ralfebert/tiny-networking/commits/urlrequest
https://github.com/ralfebert/sweeturlrequest
This could be backward-compatible, but I wanted to do a rough sketch at first. Here is an example what the usage of the URLRequest-only-based API could look like compared to what it looks like now.
I also extended Endpoint a bit to model the status code validation more generically as 'validate' function.
What do you think about such a separation?

Hey Ralf,
Thank you! I don't think this is such a good idea, mainly because it adds complication. I don't really see the benefit for users of tiny networking. In addition, it will make maintaining things more complicated, as we need to ship two libraries and keep them in sync.
I'm absolutely fine with you forking the library and making these changes (under a different name). But I'd like to keep tiny-networking a single self-contained library.
Closing the issue (just so it's out of the open issues list). Of course happy to discuss.


ENG-8942: Add token refresh mechanism

Description of the change
ENG-8942: Terraform Provider throws a token expiration error for large configuration scripts
This PR add a token source that provides a token refresh mechanism so that long terraform configuration scripts using our Provider do not run into token timeout issues. As a consequence, all the old code to retrieve the token was removed (for both auth0 and keycloak), since it was not needed anymore.
Type of change

[x] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklists
Development

[x] Lint rules pass locally
[x] The code changed/added as part of this pull request has been covered with tests
[x] All tests related to the changed code pass in development

Code review

[x] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
[x] Jira issue referenced in commit message and/or PR title

Testing
All automated tests are passing. Some manual tests were made with large configuration scripts and it was possible to confirm that the token was being automatically refreshed and the script was running correctly until the end.

@VictorGFM , we are targeting this fix to v2.7 and then I will cherry-pick it to main after that. Please rebase your branch and remove all the commits not related to your change as they came from main.


Settings "An error has occurred... Reload"

Hi there,
I have a EASUN inverter SMP-5k, 5kw hybrid Chinese. The code is working (latest release - but was similar on older ones as well), on live stats and on PV Generation I can see the data from /hidraw1, but if I go in Settings page, is not loading and I have an error: "An error has occurred... Reload".
If I check the service status I can see only this:
Apr 02 21:24:01 linux InverterMon.Server[1011]: info: Microsoft.Hosting.Lifetime[14]
Apr 02 21:24:01 linux InverterMon.Server[1011]:       Now listening on: http://<IP_ADDRESS>:80
Apr 02 21:24:01 linux InverterMon.Server[1011]: info: Microsoft.Hosting.Lifetime[0]
Apr 02 21:24:01 linux InverterMon.Server[1011]:       Application started. Press Ctrl+C to shut down.
Apr 02 21:24:01 linux InverterMon.Server[1011]: info: Microsoft.Hosting.Lifetime[0]
Apr 02 21:24:01 linux InverterMon.Server[1011]:       Hosting environment: Production
Apr 02 21:24:01 linux InverterMon.Server[1011]: info: Microsoft.Hosting.Lifetime[0]
Apr 02 21:24:01 linux InverterMon.Server[1011]:       Content root path: /inverter
Apr 02 21:24:01 linux InverterMon.Server[1011]: fail: InverterMon.Server.InverterService.CommandExecutor[0]
Apr 02 21:24:01 linux InverterMon.Server[1011]:       execution error: Format_InvalidStringWithValue, NAKs
Any idea what is wrong?

Inverter commands support is not universal.
link

Sure, thanks for quick reply. It is working with WatchPower, which works with many inverters, so I assumed it is the same protocol and should work out of the box.
I'll try to investigate it. Thanks!

Apr 02 21:24:01 linux InverterMon.Server[1011]: execution error: Format_InvalidStringWithValue, NAKs

this line means, the inverter didn't accept a command sent from the program. most likely the command needed to get charge current values which are needed to be displayed in the dropdown list for changing charging currents.
unfortunately, there's no way for me to add support for your specific inverter without actually having one to test.

unfortunately, there's no way for me to add support for your specific inverter without actually having one to test.

QID+QMN+QGMN = device set of supported commands.

If you have time/curiosity to look into this, I can facilitate you access to the linux machine where the inverter is connected (i can give you a user and ssh access. This way you can test/try anything.

@iboboc try the latest version. if it still gives trouble, update the appsettings.json file to read:
"TroubleMode" : "yes"

and run the app.
in "trouble mode", some commands such as getting charging ampere values or setting some inverter settings might not work and lock up the data retrieval. if that happens, restarting the app should get it going again.


fix: fix decimals of WETH on Optimism

It has 18 decimals, not 8: https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006

It's unbelievable we had this kind of mistake. 😄

I mean... We were just missing a 1.... You know what they say : 1 is none or something like that 🤐


Library working with iOS

That would be awsome if library could work with iPhones as well. If Android is in the plan then it seem very reasonable thing to have.
What do you think ?

Closed for lack of response.


Rs485

Sits on top of https://github.com/lowRISC/sonata-system/pull/306 and includes those commits, https://github.com/lowRISC/sonata-system/pull/313/commits/3e0434796d8c07e842673a15e801c39d582f0e27 is the only relevant one for reviewing.
Will need to be rebased on https://github.com/lowRISC/sonata-system/pull/309 when that's merged with the UART used adjusted at the same time (move from UART 4 to UART 2).

XDC changes look fine to me. Nice idea to constraint the number of cycles to the smallest number required by calculation.

Rebased on pinmux changes, now connected to UART 2.
Just realised I haven't updated the pinmux dotfile etc but can always do a follow-up for it

Timing looking good on this when rebased on main

Thanks for the review @marnovandermaas I believe I've addressed your comments. Also adjusted timing constraints to make timing easier on the RS485 transceiver IO
I running a local synthesis now with exactly the commit for this PR and will rerun the RS485 tests one last time (already checked after I fixed up the TransmitCooldownCount issues but best double check given I messed that up last time!).

Ok tests all looking good and with the timing constraint changes we have 22ns slack (positive) on the rs485_re and rs485_den outputs.

@marnovandermaas happy for this to go in?

Great thanks for your review @alees24


Remove OutOfDisk from node condition

OutOfDisk is no longer in node contidtion.Remove it from the doc.

@lojies What version of Kubernetes did this go live?

@lojies What version of Kubernetes did this go live?

This is the changelog from 1.16

The deprecated node condition type OutOfDisk has been removed. Use the DiskPressure condition instead. (#72420, @Pingan2017)

/assign @stewart-yu

/assign @sftim

@dchen1107 @caesarxuchao

/cc
/lgtm

/approve


RFC: Discover another way to handle validation outside of using Ansible

While Ansible works great for validation it's a bit much and with the addition of k0s and Talos Ansible isn't even really needed. I wonder if I could just support a python script to do this with using Pytest or some other CLI tool I've yet to discover.
If another tool is discovered it means I can template out the requirements for Ansible in the Ansible directory.

Done in https://github.com/onedr0p/flux-cluster-template/pull/1214


Cannot set python version to 3.11 with shared-env

Current Behavior
I am trying to use python 3.11 with shared-env, I have updated the pyproject and .python-version to use ~=3.11.5 but whenever I run nx generate @nxlv/python:migrate-to-shared-venv, it will change the version in pyproject.toml into   python = ">=3.9,<3.11" and .python-version to 3.9.5 and failed the command since I don't have 3.9.5 installed locally
Expected Behavior
To use 3.11.5 when running nx generate @nxlv/python:migrate-to-shared-venv
Steps to Reproduce
None
Nx Report
>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : darwin-arm64
   npm    : 9.5.1

   nx (global)  : 16.7.4
   nx           : 16.7.3
   @nx/devkit   : 16.7.4
   @nrwl/tao    : 16.7.3
   ---------------------------------------
   Community plugins:
   @nxlv/python : 16.1.2
   ---------------------------------------
   The following packages should match the installed version of nx
     -<EMAIL_ADDRESS>     -<EMAIL_ADDRESS>
   To fix this, run `nx migrate<EMAIL_ADDRESS>
Failure Logs
No response
Additional Information
No response

Hi @kennysliding thanks for opening this issue.
There are 2 ways you can generate projects with different Python versions.

Providing --pyenvPythonVersion and --pyprojectPythonDependency CLI commands in the npx nx g @nxlv/python:poetry-project command.

Example:
npx nx g @nxlv/python:poetry-project myapp --pyenvPythonVersion "3.11.5"  --pyprojectPythonDependency ">=3.9,<3.12"

NOTE: The same properties are available in the Nx VSCode extension.

Modifying the nx.json and changing the default values, so, when you run npx nx g @nxlv/python:poetry-project myapp the default values are going to be yours.

nx.json
{
  ...
  "generators": {
    "@nxlv/python:poetry-project": {
      "pyenvPythonVersion": "3.11.5",
      "pyprojectPythonDependency": ">=3.9,<3.12"
    }
  }
  ...
}

Reference: https://nx.dev/reference/nx-json#generators
The same with the migrate-to-shared-venv, you can provide --pyenvPythonVersion and --pyprojectPythonDependency CLI options or use the nx.json default values:
nx.json
{
  ...
  "generators": {
    "@nxlv/python:migrate-to-shared-venv": {
      "pyenvPythonVersion": "3.11.5",
      "pyprojectPythonDependency": ">=3.9,<3.12"
    }
  }
  ...
}

Please let me know if that solves the issue.
Thanks!

Thanks so much for the explanation, this has been a great help! @lucasvieirasilva
I have solved my issue by running
nx generate @nxlv/python:migrate-to-shared-venv --pyenvPythonVersion "3.11.5"  --pyprojectPythonDependency "~=3.11.5"
since I would like be to stricter on the version
Thanks so much for your help!

I partially setup an Nx workspace for python, but then hit some snags related to pushing the python version to ~=3.11.5. This discussion helped me, but I had to make one more change. In addition to modifying the nx.json, I had to modify a line in mypyproject.toml in the project root to read as follows:
  [tool.poetry.dependencies]
  python = "~=3.11.5"

Same here:

nx generate @nxlv/python:migrate-to-shared-venv

Overwrites the pyproject.toml settings to
  [tool.poetry.dependencies]
  python = ">=3.9,<3.11"

and then fails with

 NX  Generating @nxlv/python:migrate-to-shared-venv

UPDATE pyproject.toml
  Updating myproject poetry.lock...
Resolving dependencies... (1.2s)

  poetry.lock updated.

  Updating root poetry.lock...

Current Python version (3.11.9) is not allowed by the project (>=3.9,<3.11).
Please change python executable via the "env use" command.

 NX   poetry install command failed with exit code 1

Pass --verbose to see the stacktrace.


Service aren't added on iOS

I use this library to announce my service on a Windows 10 machine.
If i use an Android phone it works, while if i use an iPhone the service is never listed as "added", and i get a "removed" message after several minutes.

If i use an macOS machine to announce the service it works on both Android and iOS

I can see that other services are added, so this plugin seems to work in part.
Could you try another library to announce your service, just to make sure who's the culprit here.

I tried https://github.com/agnat/node_mdns and worked ¯_(ツ)_/¯

@fttx did you test this on native platforms as well?

@fttx how exactly did you include this in your project? You have this running on iOS and Android platforms? Are you using Ionic 1, 2 or 3?

Yes, i had it running on both iOS end Android, i don't remember exactly how i added it, but for sure the ionic-native module wasn't available yet, see here: https://github.com/fttx/barcode-to-pc-app/tree/ff1f125a8881a4146fa1ac99f8cc367baeb3bdce

I've the same problem...


      See also `tf.map_fn`.

      The simplest version of `scan` repeatedly applies the callable `fn` to a
      sequence of elements from first to last. The elements are made of the tensors
      unpacked from `elems` on dimension 0. The callable fn takes two tensors as
      arguments. The first argument is the accumulated value computed from the
      preceding invocation of fn, and the second is the value at the current
      position of `elems`. If `initializer` is None, `elems` must contain at least
      one element, and its first element is used as the initializer.

      Suppose that `elems` is unpacked into `values`, a list of tensors. The shape
      of the result tensor is `[len(values)] + fn(initializer, values[0]).shape`.
      If reverse=True, it's fn(initializer, values[-1]).shape.

      This method also allows multi-arity `elems` and accumulator.  If `elems`
      is a (possibly nested) list or tuple of tensors, then each of these tensors
      must have a matching first (unpack) dimension.  The second argument of
      `fn` must match the structure of `elems`.

      If no `initializer` is provided, the output structure and dtypes of `fn`
      are assumed to be the same as its input; and in this case, the first
      argument of `fn` must match the structure of `elems`.

      If an `initializer` is provided, then the output of `fn` must have the same
      structure as `initializer`; and the first argument of `fn` must match
      this structure.

      For example, if `elems` is `(t1, [t2, t3])` and `initializer` is
      `[i1, i2]` then an appropriate signature for `fn` in `python2` is:
      `fn = lambda (acc_p1, acc_p2), (t1, [t2, t3]):` and `fn` must return a list,
      `[acc_n1, acc_n2]`.  An alternative correct signature for `fn`, and the
       one that works in `python3`, is:
      `fn = lambda a, t:`, where `a` and `t` correspond to the input tuples.

      Args:
        fn: The callable to be performed.  It accepts two arguments.  The first will
          have the same structure as `initializer` if one is provided, otherwise it
          will have the same structure as `elems`.  The second will have the same
          (possibly nested) structure as `elems`.  Its output must have the same
          structure as `initializer` if one is provided, otherwise it must have the
          same structure as `elems`.
        elems: A tensor or (possibly nested) sequence of tensors, each of which will
          be unpacked along their first dimension.  The nested sequence of the
          resulting slices will be the first argument to `fn`.
        initializer: (optional) A tensor or (possibly nested) sequence of tensors,
          initial value for the accumulator, and the expected output type of `fn`.
        parallel_iterations: (optional) The number of iterations allowed to run in
          parallel.
        back_prop: (optional) True enables support for back propagation.
        swap_memory: (optional) True enables GPU-CPU memory swapping.
        infer_shape: (optional) False disables tests for consistent output shapes.
        reverse: (optional) True scans the tensor last to first (instead of first to
          last).
        name: (optional) Name prefix for the returned tensors.

      Returns:
        A tensor or (possibly nested) sequence of tensors.  Each tensor packs the
        results of applying `fn` to tensors unpacked from `elems` along the first
        dimension, and the previous accumulator value(s), from first to last (or
        last to first, if `reverse=True`).

      Raises:
        TypeError: if `fn` is not callable or the structure of the output of
          `fn` and `initializer` do not match.
        ValueError: if the lengths of the output of `fn` and `initializer`
          do not match.

      Examples:
        ```python
        elems = np.array([1, 2, 3, 4, 5, 6])
        sum = scan(lambda a, x: a + x, elems)
        # sum == [1, 3, 6, 10, 15, 21]
        sum = scan(lambda a, x: a + x, elems, reverse=True)
        # sum == [21, 20, 18, 15, 11, 6]
        ```

        ```python
        elems = np.array([1, 2, 3, 4, 5, 6])
        initializer = np.array(0)
        sum_one = scan(
            lambda a, x: x[0] - x[1] + a, (elems + 1, elems), initializer)
        # sum_one == [1, 2, 3, 4, 5, 6]
        ```

        ```python
        elems = np.array([1, 0, 0, 0, 0, 0])
        initializer = (np.array(0), np.array(1))
        fibonaccis = scan(lambda a, _: (a[1], a[0] + a[1]), elems, initializer)
        # fibonaccis == ([1, 1, 2, 3, 5, 8], [1, 2, 3, 5, 8, 13])
        ```
      """
      if not callable(fn):
>       raise TypeError("fn must be callable.")
E       TypeError: fn must be callable.

/usr/local/lib/python3.8/site-packages/tensorflow/python/ops/functional_ops.py:544: TypeError

@luozhouyang Are you still interested in CRF? We are looking for a CRF codeowner. We have 9 open tickets related to CRF https://github.com/tensorflow/addons/labels/crf.

I suppose it is fixed now


May I ask one question?

If we tune the global model for every client by training a few epochs with their own train dataset, instead of one global model, and then we apply knn algorithm to these different personalized models, I wonder will the results still outperform?
Thank you.

Hello @Bhongcheng,
Thank you for your question. If the number of local epochs is and learning rate used to train locally at each client is optimally tuned, then it is likely that the local tuning + local memorization will outperform local memorization. However, tuning both the number of local steps and the learning rate is a resource consuming task.

Hi, thanks for you warm reply,  but maybe my description is confusing...
In your paper, the knn is applied to one global model(we name it g_model). If one client, for example client 1, after get the g_model, and then tune the model by his own dataset, then client 1 gets his own personalized model(we name it p_model, different from the g_model), I wonder in this case will p_model + knn still outperforms p_model?
Thank you

Hi, thanks for the clarification. I misunderstood your question initially; I taught that your question was about the comparison between  p_model + knn and g_model + knn.
Regarding your actual question on the comparison between p_model + knn and p_model, I do not have a firm answer. However, I lean towards a negative answer, i.e., the performance of p_model + knn and p_model well be (essentially) the same. The reason is that if the quality of p_model is bad, e.g., p_model overfits the local dataset, then the quality of p_model + knn will be also bad. On the contrary if p_model performs well and is personalized to the local dataset, then there is no real advantage of the memorization mechanism.

Thanks for your warm reply!


Afterclick indicator not appearing for some classes of wearables

While we click on an item to wear it, an indicator appears over the item that shows the currently selected item. But for some classes of items as shown in video, the indicator doesn't appears.
https://user-images.githubusercontent.com/35926530/215499066-ad8ba319-14b2-4fa2-a4ae-41cce79b5333.mp4

Fixed


EnableDefaultCompileItems and Compile items with absolute paths breaks Roslyn analyzers after first use on Windows

We're experiencing a weird issue where specifically on Windows the Roslyn analyzers will analyze once (in e.g. VSCode) and, on save or afterwards, just bail out and not work again.
After some debugging I was able to reproduce this with a simple dotnet new console project and traced this down to this being due to our project both disabling EnableDefaultCompileItems and using absolute paths for Compile items. If we use relative paths, or use default compile items, the analyzers keep working after the first time.
The rest of autocompletion and IntelliSense keeps working in all scenarios, it's just the in-editor "linting" if you will. It also doesn't happen on Linux.
Details

Platform: Windows 11 64-bit
OmniSharp Version: 1.39.0-net6.0 (from ms-dotnettools.csharp-1.25.0)
.NET Version: 7.0.102 (probably also reproduces with .NET 6)

Steps To Reproduce:

dotnet new console -o TestOmniSharp
Replace TestOmniSharp.csproj with the example below.
Update the absolute path in Compile Include to match your path (it must remain absolute).
Replace Program.cs with the example below to trigger some default linter messages.
Restart OmniSharp (using the VSCode command palette action).
Notice how analyzer warnings either don't show up or, if they do, save or update the editor once and they will disappear.
Replace the Compile with a relative Compile on Program.cs and observe the problem having resolved itself.

TestOmniSharp.csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <PropertyGroup>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="C:\Users\Me\Projecten\TestOmniSharp\Program.cs" />
    <!-- <Compile Include="Program.cs" /> -->
  </ItemGroup>

</Project>

Program.cs
using System;

public static class Foo
{
    static void Main()
    {
        // See https://aka.ms/new-console-template for more information
        Console.WriteLine("Hello, World!");

        string ssssss = "";
    }
}

Other Notes
Program.cs should yield some linter messages such as the following:

I can't immediately find in the Microsoft documentation whether absolute paths in Compile items are even allowed, but I'm guessing they are since you can also use them in other locations.
Also, I'm experiencing this with omnisharp-vscode, but since it seems related to processing the csproj file, it seemed more suitable to report this here. Feel free to correct me if I'm wrong :slightly_smiling_face: .

Thanks for the report, I am sure we never tested anything with absolute paths as Compile includes 😀
Does it work correctly in Visual Studio? Also, is there any specific reason to use an absolute path there?
Would it be possible for you to use <Compile Include="$(MSBuildThisFileDirectory)\Program.cs" /> instead?

Thanks for the report, I am sure we never tested anything with absolute paths as Compile includes grinning

Haha, I suspected something like that. I realized when I made the report that it might be bugged because probably pretty much no one even uses explicit items to begin with :sweat_smile: .

Does it work correctly in Visual Studio?

Yes. :slightly_smiling_face:

Also, is there any specific reason to use an absolute path there?

Not really. I just came upon it because there now is a community fork of the Unity VSCode support that writes SDK-style projects, and I encountered this issue with it. I reported it there first (https://github.com/wackoisgod/com.unity.ide.vscode/issues/5), but it turns out it wasn't directly at fault.
From what I understand the plugin was supposed to write relative paths to begin with as well, but doesn't due to a bug there, so it seems like there is a bug on both ends - in any case it can be fixed in the source project file, but I still thought I'd report it here since it only happens on one platform (Windows), so I figured it must be an edge case somewhere.

Bump


fix: typo in exercise six

It’s impossible to solve without this fix
Closes #7

Thanks for this :)


FIX: make the fence return with correct source type

I have to decline this merge because changing sourceType to token.info instead of token.type could have backwards compatible issues with current users using this lib. i'm adding extra property sourceInfo and sourceMeta to the astToken. see https://github.com/mientjan/react-native-markdown-renderer/commit/ebf6340c41ed15626b6fd90cb164bcb9ef356444


Unexpected .NETStandard When-conditions with net45 restriction in v3 RC

Description
In my dependencies file a have the following framework restriction on the first line. There are not groups:
framework: net45

In v2 this generated simple When-conditions in the csproj file, but in v3 they contain logic for other frameworks as well.
Repro steps
TBD (trying to minimize repro...)
Expected behavior
As in v2.66.9 and earlier:
  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5'">
      <ItemGroup>
        <Reference Include="Sonova.Core">
          <HintPath>..\..\..\packages\Sonova.Core\lib\net40\Sonova.Core.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>

Actual behavior
In v3 RC2:
  <Choose>
    <When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1')) Or ($(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5')">
      <ItemGroup>
        <Reference Include="Sonova.Core">
          <HintPath>..\..\..\packages\Sonova.Core\lib\net40\Sonova.Core.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>

Is there a reason why we'd need the netstandard conditions when we have a framework restriction on net45?

Confirmed this is fixed in RC3. Thanks!


Feature main reorganization

Reorganizes main into an inter-galactic function.
This prepares main and the controls stack for it's eventual re-factor while making main a bit easier to read.

Tested on infantry, works