Enroll by Asset Tag not working v0.71a

Expected Behaviour
Enrollment is available via Asset Tag (by changing the option in the Web App Config.
Actual Behaviour
Enrollment is available via Asset Tag.
Steps to Reproduce
Web App > Config > Device Identifier Mode > Toggle Asset Tag > Save Changes
Devices > Enroll > Enter Asset ID > Save
Error: "ERROR: No serial number for device [asset tag]"
When enrolling a device w/ an Asset Tag via the Serial Number Method there is no entry for Asset Tag [Asset Tag: Empty] in the Datastore for the device.
chromedevices.list shows the following for the device.  I am using the "annotatedAssetId" field.
{
"kind": "admin#directory#chromeosdevice",
"etag": ""SXFHf-A4wQx02aM-7Cegj6o2Lk8/zank_9vd8n3IpzA9INHt3gyhMgk"",
"deviceId": "0a08a7c9-3449-4de9-aa9d-7c0f6724dd55",
"serialNumber": "F4NLCX124647168",
"status": "ACTIVE",
"lastSync": "2017-05-22T14:24:51.698Z",
"annotatedUser"<EMAIL_ADDRESS>"annotatedAssetId": "1000005",
"notes": "",
"model": "ASUS Chromebook C201PA",
"osVersion": "57.0.2987.146",
"platformVersion": "9202.64.0 (Official Build) stable-channel veyron_speedy",
"firmwareVersion": "Google_Veyron_Speedy.6588.237.0",
"macAddress": "28c2dd0ea225",
"bootMode": "Verified",
"lastEnrollmentTime": "2017-04-18T13:22:20.385Z",
"orgUnitPath": "/",
... etc.}

Refer to https://github.com/google/loaner/issues/47 for workaround at the moment if you need to get it working asap for auditing purposes.

This is a dupe of #47. Resolving and closing.


[implements #2576] sails.config.csrf.routesDisabled support RegExp

Make sails.config.csrf.routesDisabled support RegExp, a partial solution of #2576 , because I think maybe the format of /:id is useless...

Hi @bolasblack -- thanks for the PR.  I think any solution here would have to use path-to-regex so that actual Express-style dynamic URLS could be matched.  That's what folks have been missing.

@sgress454 WOW, awesome, this package make things easy, I will change my PR to use this package.
Thanks again!

@bolasblack thanks for following up!  This looks great.  And path-to-regex is indeed a lifesaver.
Would you mind rebasing this PR with the latest on master?  Then if you or someone else reading this has a sec to update the csrf config reference docs, this is good to go 👍  for the next release.

@mikermcneil 👌 now

Looking forward to getting this in as well -- I am wondering though if we couldn't pull some of the logic out of the wildcard route handler and have it just run once at the top of the initialize.  Specifically it seems sub-optimal to compute the disabledRoutes array on every request, and to run pathToRegexp on all of the string values in that array on every request.  The disabled routes configuration isn't going to change between requests, and even if it did, disabledRoutes would ideally just be reloaded as needed, not every time.

@sgress454 You are right 👍

It looks like someone added a print statement to check response headers just above the line where this branch previously crapped out. Any chance the travis build may magically pass if re-run?

@brettimus 🍻  test passed now

🙌🙌🙌
On Tue, May 10, 2016 at 09:32 c4605<EMAIL_ADDRESS>wrote:

@brettimus https://github.com/brettimus 🍻 test passed now
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/balderdashy/sails/pull/3661#issuecomment-218214615

How does merging happen? ((Asking for a friend 😁 ))

@brettimus I'm waiting too 😂

Looks good!  Updated master docs.  Thanks for your patience!

🙌🙌🙌🙌🙌🙌


How to change the color of the tab bar.

My application is dark and the tab bar is white. How do you change the color of the tab bar?
CBFlashyTabBar.appearance() doesn't work. Neither does the bar tint color on storyboard

fixed this bug, both ways should work now.
P.S. to not 'multiply entities without necessity' we decided to keep all our tab bar animations in one place: https://github.com/Cuberto/cb-tabbar (flashy style exactly matches this component behavior)


✨ Add support for all Field parameters from Pydantic 1.9.0 and above, make Pydantic 1.9.0 the minimum required version

Summary
The proposed changes add support for the following Field parameters:

max_digits
decimal_places
unique_items
discriminator
repr

This makes the SQLModel Field constructor support all Pydantic field parameters as of version 1.9.0 up until the current one (1.10.2).
Tests sub-package for Pydantic capabilities was added and tests for the new field parameters were included.
The Pydantic dependency was bumped to 1.9.0.
Fixes

#354 - more elegant solution
#356 - fulfills feature request

@tiangolo Is there any planned timeline to merge this PR? Discriminator is a need for many developers (that's why pydantic released a support for it).
It could really make our lives way better as devs using SQLModel.
Thanks

@tiangolo any update on this?

++ on updates

Awesome, thank you @daniil-berg! 🚀
This will be available in the next version: 0.0.10 🎉


Suggestion to add example for list selection

Suggestions
Please add more examples. I wanted to know how to create a list selection where I can navigate with up/down arrow keys.

I think a following example is enough to know your question:
https://github.com/c-bata/go-prompt/blob/master/_example/echo/main.go

thanks @c-bata  , I am talking about something like this. Is this possible?

I see. go-prompt doesn't provide such a feature.
go-prompt just support following completion.

So when you want to use such a completion, please use survey or promptui.

https://github.com/AlecAivazis/survey
https://github.com/manifoldco/promptui

thanks @c-bata


Upgrading to react-script v3 give warning messages about deprecated libraries

Steps to Reproduce
When I upgraded to react-script@v3, i got these warning messages
warning react-scripts > workbox-webpack-plugin > workbox-build ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts > workbox-webpack-plugin > workbox-build > joi ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts > workbox-webpack-plugin > workbox-build > joi ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning react-scripts > workbox-webpack-plugin > workbox-build > joi > topo ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

This can be fixed by upgrading workbox-webpack-plugin to at least v4.1.1.
Expected Behavior
No warning about a deprecated library

Want to submit a PR to upgrade workbox-webpack-plugin?

@iansu I saw it's already done
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json
But the alpha release does not include this changes. I just need to wait the next one.

In that case I'm going to close this issues as it's already resolved in #6840.


Secure workflows

Reviewer checklist

[ ] Ensure relevant issues are linked (description should include text like "Fixes #")
[ ] Ensure correct labels applied
[ ] Ensure any appropriate documentation has been added or amended

Coverage remained the same at 90.299% when pulling ee0a337c9e34be38f4a9b78d69dabcf820d1e4f5 on secure_workflows into 9a4958d423f5b7bdce00207f059a11568f2ad8ca on main.


Path collision when cloning the repo

Description:
When we clone the repo in the MacOS, we get the following warning.
Cloning into 'ballerina-lang'...
remote: Enumerating objects: 101, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 1025723 (delta 36), reused 64 (delta 20), pack-reused 1025622
Receiving objects: 100% (1025723/1025723), 349.55 MiB | 8.75 MiB/s, done.
Resolving deltas: 100% (576623/576623), done.
Checking out files: 100% (11706/11706), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'docs/images/JSONVariable.gif'
  'docs/images/JsonVariable.gif'

Steps to reproduce:
Clone the repo on Mac.

Happens on Windows too. Gives a bad impression for somebody new to the project. This should be fixed.  The two files are duplicates of each other. Looks like this happened in a merge from @sameerajayasoma.


Hide Video button not working

I can't seem to click the icon on the top-right of video thumbnails to hide them in the subscriptions grid. Clicking it just goes to the video as if the button doesn't exist. Are there any options for this in the settings?

For some reason the button is getting overlapped by the items below it, but we can't tell at first because the thumbnail is slightly transparent which gives the illusion that the button is over it and not under.
@YePpHa Setting z-index: 1 to .feed-item-container .menu-container will fix the issue.

@Yonezpt Where do I insert that setting? I'm also having this issue.

@GrahamFinch I am telling to the addon author which fix he can use, he will then insert it in the respective script line to achieve the desired effect.

@Yonezpt I just thought of something. If I put this code into Scriptish, would it work?

Yes, it is scriptish's main purpose so you can do that until YePpHa has the time to implement the fix.


Request for person_detect.tflite file used in micro vision demo of Tensorflow Lite

Hello,
is it possible to get the Tensorflow Lite file for the person detection of the micro vision demo?
The original or unquantized model file would be helpful for my research as well.
Is there a way to get the person_detect.h5 file, if it exists?
Thank you in advance,
Ilkay

Hi @petewarden and Tensorflow people , I need the person_detect.tflite for my research too! I have ESP32-CAM and ESP-EYE.
// don't have a file system. It was created using the command:
// xxd -i person_detect.tflite > person_detect_model_data.cc
Where can we find the person_detect.tflite?
Thank You!


useCurrentBreakpoint not updating at root of application

Im wondering if it is possible to show/hide certain components based on the current break point from the root of the application. Example:
App.tsx
function App() {
  const currentBreakpoint = useCurrentBreakpoint();
  console.log('Current breakpoint in app.tsx', currentBreakpoint);

  return (
          <StacksProvider
            breakpoints={[
              ['mobile', 0],
              ['desktop', 992],
            ]}
            spacing={4}>
            <NavigationContainer
              linking={linking}
              fallback={<Text>Loading...</Text>}>
                <Stack.Navigator>
                  {currentBreakpoint === 'desktop' ? <Stack.Screen name="DesktopTabView" component={DesktopTabView} /> :  <Stack.Screen name="MobileView" component={MobileView} />}
                </Stack.Navigator>
            </NavigationContainer>
          </StacksProvider>
  );
}

export default App;

When the app first bootstraps it shows a console log. But when re-adjusting the screen size the currentBreakpoint value does not update in App.tsx. It works fine in lower components. But I think this makes sense because we are using useCurrentBreakpoint before we declare the StacksProvider.
Any idea on how to get around this? One solution is to make a Navigation child component where we can handle that logic in there instead of at the root of the application, but it would be nice to have this logic where we define the navigation stack as well. Thoughts?

We can use useCurrentBreakpoint in a child component in app.tsx where we can also define our navigation stack.


Clean up documentation and get it aligned with the application(s)

As a complete newbie I have serious problems with the precision of the available documentation. It starts with https://openziti.github.io/docs/introduction/intro/ -- that diagram is (showing "Router"s, an element that never shows up in documentation by that name, edge routers and applications  communicating with some API.
[I would bet the majority of the users today are at least a few miles away from that concept; they are (like me) looking for some kind of overlay network connecting their systems that are connected to the internet by various means, sometimes behind three layers of carrier-grade NAT and needing access to systems hosted somewhere else. Single applications are the smallest of their problems.]
Now you are going on about the Controller (that, as soon as you want to install it, miraculously is also called an "edge-controller" in the docker-compose (I didn't try anything else) as it turns out to be a zitified application needing an edge-router to be able to work at all. Next are fabric and edge router and to this day I don't get it -- is an edge router a fabric router with additional capabilities or a totally different thing. And why can all of it be in one all-in-one docker image? Edge client. Connects to the edge router but what exactly is it? The equivalent to a VPN client or rather some API for some applications? Is an entire OS a "unaware application" that requires a tunneler for pushing all the traffic between what others would call "nodes" across the network?
The only thing that will help here is mapping "user expectations in regards to terminology" onto your way of expressing things and showing examples for some more standard architectural patterns Ziti can be used to implement from typical mesh-VPN to IoT communications.
As good as the whole package is and as great as all of the unique ideas in there are (most products really stop at the mesh-VPN stage and don't add applications into the concept at all) the documentation really needs to become a focus right now. The example docker-compose configuration is not helpful for the general case (deploy one controller that is not bundled with anything else like red, blue or purple networks (these definitely belong somewhere else). Explain the set-up of a mesh and the concept behind fabric and edge routers (and where and why they are different) and their separate (as in not together with the controller) deployment.

Hi @noseshimself, thanks for taking the time to provide feedback. The documentation is currently in the midst of getting rewritten with the goal of making it more clear. Your feedback is helpful and we'll absolutely consider it while we go through this process. Thanks again.


Ability to run the gateway as a edge gateway (443 port)

Description:

Suggested Labels:

Suggested Assignees:

Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

given the ability to customize the port of the gateway service using helm with PR https://github.com/wso2/apk/pull/1629


Table mode is unstable for custom tables

Description
Table mode leads to invalid studies / tables for custom tables.
Steps to Reproduce

Create a custom table in "table mode"
Add a few fields
Change a few boolean values (checkboxes)

Actual Behavior
The table becomes invalid with the following error "AxiosError: Request failed with status code 500"
Expected Behavior
No error
Screenshots

If applicable, add screenshots to help explain your problem.
Possible Solution
Maybe don't allow editions that would lead to an invalid state. Some enums are treated as strings for example.
Environment

[X] Production
[X] Staging

Additional Information

If applicable, provide the study ID that this issue relates to:
The date and time when the issue occurred: 27/02/2023
Browser and version: Firefox 107.0 (64 bits)
Operating System: Linux Ubuntu 20.04

The bug no longer occurs


Create a GHA file to run dbt (qaqc)

Would like to merge this new GHA workflow file so that I can test it under Actions. No way to test that it works since it's a brand new workflow - needs to be merged to main first.

No longer needed. May reopen if we add dbt testing for other products


Update how-to-extend-copilot.md

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/copilot/how-to-extend-copilot.md
92
10
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.


Login: UserEmail return more than 2 values

After upgrading sentry to the latest (8.11.0) version and the plugin to the 2.3, I started getting some weird issues, I ended up with duplicates of UserEmail entries for my users.
Possible reason is here
Or at least you misuse .get(...) method. This at least should be as follows:
try:
    userEmail = UserEmail.objects.get(user=user)
except UserEmail.DoesNotExist:
    userEmail = UserEmail.objects.create(user=user)

I would like "me too" this issue, but with a slight tweak. I added an alternate email address to my account (when logged in to an LDAP account). When I next logged in it 500ed, saying that the UserEmail.objects.get(user=user) returned 2 results.
I think maybe this should look something like:
userEmail, _ = UserEmail.objects.get_or_create(user=user)
userEmail.email = ldap_user.attrs.get('mail', ' ')[0] or ''
userEmail.save()

Or possibly update_or_create if that exists in all Django versions we need to support.

And now sentry supports multiple emails per user (primary and alternatives). Preparing some pull request for that

I don't have a good dev environment for this project right now, but I'm pretty sure this was fixed by #17.


ecl search results

When viewing the ecl results. The download arrow only downloads 20 results. Should have a download button that downloads them all. Try this ECL
(<< 763158003 | Medicinal product (product) | : << 127489000 | Has active ingredient (attribute) |  = <<<PHONE_NUMBER> | Messenger ribonucleic acid of severe acute respiratory syndrome coronavirus 2 (substance) | ) OR <<<PHONE_NUMBER>0001103 | COVID-19 vaccine (product) |

The set viewer has a "download" button so this would be better

Also, the viewer shows the first page only no matter what count you put in.


fix typo

Thanks for the pull request!

If you care, my PR preferences are at https://github.com/ndmitchell/neil#contributions, but they're all guidelines, and I'm not too fussy - you don't have to read them.

Thanks a lot!


Update repo info for opstools

Centos8s went EOL on 31.05.2024 so the packages have been moved to centos vault mirror the repo config we use needs to be updated
Depends-On: https://github.com/infrawatch/sg-core/pull/135

recheck


abnormal respiration child terms

Consider adding impaired/enhanced children
need to consider if this would be a child of abnormal respiration or abnormal respiratory function
see HP:0002093 note this term currently lacks a text definition but does have an eq
annotations that would fit the child terms have been made to both potential parents
related to KidsFirst CHARGE syndrome

decreased MP:0014274
increased MP:0014275
placed under abnormal respiration primarily as this is where respiratory failure was placed
moved respiratory failure to be a child of decreased respiration
currently these don't have eqs but we could use 'respiratory gaseous exchange by respiratory system' GO:0007585 need to add these to the pattern spreadsheets

added eqs manually as we have not set up spreadsheets for the relevant patterns yet


Feature: Add stylelint

Add stylelint to Sass task.
Tests pass on macOS, but currently break on Windows (not sure why).

Current coverage is 96.07% (diff: 100%)

Merging #157 into develop will increase coverage by 0.72%

@@            develop       #157   diff @@
==========================================
  Files             2          2
  Lines            43         51     +8
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits             41         49     +8
  Misses            2          2
  Partials          0          0

Powered by Codecov. Last update 7a55354...8340784


Underline inconsistency

@owendodd commented on Wed Apr 13 2016
General underline inconsistency for artist follows (https://www.artsy.net/article/halley-johnson-e-a-moc)

Couldn't find any examples of inconsistency, as far as I can tell this has been fixed.


Added Table of Contents to long documentation pages

A redo of #13836
use new introduced shortcode (https://gitea.com/gitea/theme/pulls/90)

Codecov Report

Merging #13890 (f64a06c) into master (682f0b0) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #13890   +/-   ##
=======================================
  Coverage   42.25%   42.26%
=======================================
  Files         708      708
  Lines       77191    77191
=======================================
+ Hits        32620    32626    +6
+ Misses      39211    39208    -3
+ Partials     5360     5357    -3

Impacted Files
Coverage Δ

modules/log/event.go
58.96% <0.00%> (-0.95%)
:arrow_down:

services/pull/check.go
51.09% <0.00%> (-0.73%)
:arrow_down:

models/error.go
39.47% <0.00%> (+0.48%)
:arrow_up:

modules/process/manager.go
75.00% <0.00%> (+2.50%)
:arrow_up:

modules/indexer/stats/db.go
52.17% <0.00%> (+8.69%)
:arrow_up:

modules/indexer/stats/queue.go
76.47% <0.00%> (+11.76%)
:arrow_up:

Continue to review full report at Codecov.

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

A note on the new toc shortcode: h1 are not processed and pages should be updated to start at h2 by default so that all headers are included in the ToC.
I will do that now.


Check and fix used bech32 prefixes

When displaying key hashes, they should be encoded in bech32 and use a correct prefix: addr_vkh

Seems OK after #98.


Fix QuantizableMobileNetV3 weight loading issue

Fixes #4959
cc @pmeier, @NicolasHug This is a bug which wasn't caught due to our current testing strategy. Anything that depends on loading the real weights of the models is currently not covered.

@prabhat00155 Yes, we should. Unfortunately we can't do it yet. To test it we would need to download the weights and try to load them on the model. Our current practice is to avoid downloading the weights in all tests to avoid flakiness. I think we should review this an redesign our model testing approach. This is probably a big effort and we should plan for it.

IIUC, we want to test loading the state dict, right? If yes, the solution is probably not that hard to achieve. Can't we have a separate test that loads the model with pretrained=False and then does something like
from collections import OrderedDict

state_dict = OrderedDict([(name, torch.randn_like(weight)) for name, weight in model.state_dict()])
model.load_state_dict(state_dict)
torch.testing.assert_close(model.state_dict(), state_dict)

@pmeier It's a creative proposal. :) Unfortunately I don't think this tests all scenarios because it assumes that the current keys retrieved from mode.state_dict() are the same as in the stored weights. This can be an incorrect assumption, especially when large scale refactoring is involved (see #4487). Moreover, there are situations where depending on the parameters passed to the builder methods, the behaviour changes. An example of this is the current bug fix. I don't believe you can cover this with the proposed trick. What we need to do is download the weights and ensure they still load properly.

In that case, there is probably little we can do besides #4772 or downloading the weights in the background while doing something not I/O bound such as compiling torchvision.


WebSocket-related exception with 0.6.2-SNAPSHOT

Hello there.
I've been playing with 0.6.2-SNAPSHOT as it fixes the increased websocket CPU usage. It works really well! Thank you for that change.
I just noticed one small thing: When I use disconnect on a websocket, then there seems to be a race condition in the way things get cleaned up. The resulting close message (1000, "Graceful shutdown") reaches the closeListener function, but at that point, the Dispatcher sometimes has already been released and I get a dispatcher already shutdown exception in closeListener.
As far as I can tell, this is mostly a cosmetic issue, as the exception simply makes the event listener do nothing. But I thought that I'd bring it up, just in case it has more severe implications that I don't see. I would just have expected the Dispatcher to survive until the event listeners had been removed.
It seems to happen more easily on Firefox than on Chrome.
Oh,and I randomly tried turning channel.close *> closeDispatcher into channel.close *> channel.closed *> closeDispatcher, hoping that channel.closed would block on channel shutdown (and postpone closeDispatcher) until the event listeners were removed. But that didn't do anything. I guess that I misunderstand at what point the Sub's clean-up code runs (and removes the event listeners).
Again, I'm pointing this out mostly as a curiosity, not as a real problem. I just thought that you might be interested, as this is relatively new code.

On second thought - why run liveSocket.closeChannel in disconnect? Wouldn't liveSocket.socket.close() trigger a close event and the closeListener function would take care of closing the channel and the dispatcher?
Also, isn't an error event always followed by a close event? So, should errListener simply not close anything and instead leave closing things to closeListener?


Add API test coverage for mountpoints for pending and declined shares

Test scenarios to add

Coverage for Mountpoints for pending and declined shares

Related Bugs

Need to wait for https://github.com/owncloud/ocis/issues/7702

According to this https://github.com/owncloud/ocis/issues/7702#issuecomment-1833397409 it is unable to navigate to pending and declined share. Also there's this PR https://github.com/owncloud/web/pull/10097 that disables router links for pending and declined shares.


Support checking all elements of collections.

What we're trying to achieve is to enable the checking of all members of collections. For example we might have a function (concat_rows) that takes a collection of array, and require:

All inputs have rank 2.
The inputs may have any number of rows.
The inputs must have the same number of columns.
The output has rank 2.
The output may have any number of rows.
The output has the same number of columns as the input.

check_shapes(
    "xs[all]: [., n_cols]",
    "return: [., n_cols]",
)
def concat_rows(xs: Sequence[np.ndarray]) -> np.ndarray:
    return np.concatenate(xs, axis=0)

To do that we:

Update ArgumentRef and friends to handle collections. Previously get would return a single value and error_context would return a single ErrorContext. In this PR I remove error_context and update get to return a list of (value, error_context) tuples. Then I update all the ArgumentRef implementations to handle sequences. Note that previously missing values were handled by returning None - now I handle them by returning an empty list.
Update check_shapes to handle that the ArgumentRef now returns a list, and check all elements of that list.
Create a common abstract base class (DelegatingArgumentRef) for ArgumentRefs that are a wrapper around another ArgumentRef - which is most of the implementations. This is just for code reuse.
Add new syntax for selecting all elements of collections to check_shapes.lark. I use foo[all] to select all elements of a sequence, foo.keys() to select the keys of a mapping, and foo.values() to select the values from a mapping. I'm not super happy about the inconsistent syntax - any ideas?
Add new ArgumentRef implementations (AllElementsRef, KeysRef, and ValuesRef) corresponding to the three new syntaxes.
Add new ErrorContexts (MappingKeyContext and MappingValueContext) to be used by errors generated by (KeysRef and ValuesRef) respectively. (AllElementsRef uses the pre-existing IndexContext.)
Update parser.py to translate the new syntax into the new arguments refs.
Update our documentation to mention the new syntax.
Update our unit tests.

Hi @jesnie, can you please add a description to this PR? It is hard to parse what is going on in the diff :)

Hi @jesnie, can you please add a description to this PR? It is hard to parse what is going on in the diff :)

Done. Hope it helps.


$inject is not added on exported class when transforming to ES5

When using the following code angularjs-annotate fails to annotate the class if the class is transpiled to ES5
/*@ngInject*/
export class Broken {
  	constructor($q) {

    }
}box chec

The problem can be reproduced on the demo page https://schmod.github.io/babel-plugin-angularjs-annotate/ with the transform checkbox checked
Note that this works fine if the class is not exported.
I found several alternative placement of the @ngInject that work.
export /*@ngInject*/ class Ok {
  	constructor($q) {

    }
}

export class Ok2 {
  /*@ngInject*/
  constructor($q) {

    }
}

It 1 also works if I use an alias for export
/* @ngInject */
class MyControllerInternal {
  constructor($q) {}
}

export const MyController = MyControllerInternal;

@sarod thanks for posting your findings. I've got the same issue, and your suggestion to use /@ngInject/ before the constructor sort of worked for me.
This got the plugin to actually run, but the place that it inserts the $inject statement wasn't right and caused problems at runtime.
I'll see if I can add some failing unit tests...


Series not added to the Sqlite database

Running Komf and Kavita latest version in docker, arch64, ubuntu 20.04.
Komf works perfectly with kavita, it adds metadata and works as intended, but I wasn't sure how it works for old series till I realized it must add the info in the db created in the config volume.
It doesn't seem to add metadata to series as they're added in Kavita, but the manual trigger with the userscript and command line works fine.
What buffles me the most is that series don't get added to the database, hence every time I run a new scan for metadata, it starts at 0. (It created the db file with the predefined template when I installed Komf, but nothing else get added to it)
Notifications for Discord also don't work; it worked once, but I'm not sure why it doesn't anymore (I think it must be database-related too).
Permissions are good too.
I tried looking at the logs for the problem, but it doesn't show anything weird; it shows connected, pings Kavita, receives metadata, and sends metadata to Kavita.
Only once did I see some incompatibility with arch64 when I reinstalled it (especially with the sources that were feathered at the beginning for sqlite and jar), but I can't see the logs for it anymore.
Could it be that the sources for compiling are not fully compartible with arch64? I'm not sure what other information I can provide, sadly.

It only adds series record to database on manual identification so that when you add new books it will pull metadata from source that you chose
Automatic identification will always launch new search, it's intended behavior.
Discord notifications and new series detection might not work properly if your kavita and komf containers don't have matching timezones
If you have TZ=Your/Timezone environment variable in kavita you should also added it to komf container

Thank you, I know understood how it works.
Also the timezone fixed the discord notifications! It now sends notifications when new books are added as intended. :)
Thank you again.


Support json.Number unmarshal

Hi!
We have a problem with unmarshaling json.Number
This is changes added feature for correct unmarshal json.Number type

@Fedott Thank you for your contributions


bsp/pinetime - Change loading tool to J-Link

Default tool to flash pinetime with Mynewt should be J-Link, not STLink.
This is consistent with other bsps using Nordic chips, and is easier to use.

Does the Pinetime even include a bundled J-Link?

It does not have included any debugger, only 4 wires to connect to what user has. So I think it's good idea to use J-Link, as it works good with newt load and avoids hassle with openOCD

It does not have included any debugger, only 4 wires to connect to what user has. So I think it's good idea to use J-Link, as it works good with newt load and avoids hassle with openOCD

So, you think that because using a JLink suits YOU it's OK to break the configuration of other people including the original contributors? Why don't  you use a ST-Link? It costs US$ 1!

Well, I didn't saw that that way; I just thought as it is using nrf52xxx chip AND can be flashed using J-Link it improves consistency with other bsps, namely nordic_pca100xx. Now, I see that it might be an issue, so I think it might be useful to add second bsp - something like pinetime-jlink, to allow both solutions.

Well, I didn't saw that that way; I just thought as it is using nrf52xxx chip AND can be flashed using J-Link it improves consistency with other bsps, namely nordic_pca100xx. Now, I see that it might be an issue, so I think it might be useful to add second bsp - something like pinetime-jlink, to allow both solutions.

J-Link has nothing to do with nRF5x, it just happens to be on every Nordic devkit. You could instead add an environment variable and use it to decide if you prefer to use ST-Link as is now, or J-Link as you want to.

Ok, so I think this PR may be just closed now. Maybe I'll add this feature in the future, but I agree that current state is fine.


Any expected date for Admin LTE with bootstrap 4?

Issue type:

[x] Feature request
[ ] Bug report
[ ] Documentation

Environment:

AdminLTE Version:
Operating System:
Browser (Version):

Description:

#710

#710 is 2 years old.  So a status update may be in order.

AdminLTE 3 dev is now available https://github.com/almasaeed2010/AdminLTE/tree/v3-dev :D

thanks for replay i am developing live project by using new AdminLTE 3 dev with bootstrap 4.
Having a few issue but nice.
Having issue with ASP.NET Core while work fine asp.net freamwork

any news, @rishabhack ???

I am a bit confused if AdminLTE is Bootstrap 3 or Bootstrap 4. For example, on this page, the title reads:
AdminLTE - Free Premium Admin control Panel Theme Based On Bootstrap 3.x https://adminlte.io
https://github.com/almasaeed2010/AdminLTE/tree/v3-dev
Yet the introductory paragraph reads:
AdminLTE is a fully responsive administration template. Based on Bootstrap 4 framework.
Any ideas?

I am a bit confused if AdminLTE is Bootstrap 3 or Bootstrap 4. For example, on this page, the title reads:
AdminLTE - Free Premium Admin control Panel Theme Based On Bootstrap 3.x https://adminlte.io
https://github.com/almasaeed2010/AdminLTE/tree/v3-dev
Yet the introductory paragraph reads:
AdminLTE is a fully responsive administration template. Based on Bootstrap 4 framework.
Any ideas?

https://github.com/almasaeed2010/AdminLTE/tree/v3-dev
This branch is based on Bootstrap 4 , it's description is wrong.

I am a bit confused if AdminLTE is Bootstrap 3 or Bootstrap 4. For example, on this page, the title reads:
AdminLTE - Free Premium Admin control Panel Theme Based On Bootstrap 3.x https://adminlte.io
https://github.com/almasaeed2010/AdminLTE/tree/v3-dev
Yet the introductory paragraph reads:
AdminLTE is a fully responsive administration template. Based on Bootstrap 4 framework.
Any ideas?

https://github.com/almasaeed2010/AdminLTE/tree/v3-dev
This branch is based on Bootstrap 4 , it's description is wrong.

I have download it, and I have checked in:
C:\Users\userName\Desktop\AdminLTE\bower_components\bootstrap\dist\css\bootstrap.min.css
/*!

Bootstrap v3.4.1 (https://getbootstrap.com/)
Copyright 2011-2019 Twitter, Inc.
Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
//! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */

It still bootstrap 3 ?

Hi, any update on the release of a BS4 version? Thank you.


How to store the 'channel' from the raw communication in a python variable?

Thanks so much for this library!  I've got it streaming the information (for quoinex.com) to the screen using one of your examples, via both logging and print.
However, I'm finding that logging provides more information than print at the moment - logging includes event and channel.  Is there a way to access these bits of information outside of logging?
The problem I have is that if I subscribe to lots of channels, I'm not sure how I'll identify which response belongs to which channel.  An ugly workaround below is to create a callback function for each subscription, but I assume there is a far more elegant way.
Any help would be appreciated please!
import pysher
import sys
import time

# Add a logging handler so we can see the raw communication data
import logging
root = logging.getLogger()
root.setLevel(logging.INFO)
ch = logging.StreamHandler(sys.stdout)
root.addHandler(ch)

pusher = pysher.Pusher('XXXX') #key removed

def channel_callbacksell(message):
    response = "btcjpy_sell: %s" % message
    print(response)

def channel_callbackbuy(message):
    response = "btcjpy_buy: %s" % message
    print(response)

def connect_handler(data):
    channelsell = pusher.subscribe('price_ladders_cash_btcjpy_sell')
    channelsell.bind('updated', channel_callbacksell)
    channelbuy = pusher.subscribe('price_ladders_cash_btcjpy_buy')
    channelbuy.bind('updated', channel_callbackbuy)

pusher.connection.bind('pusher:connection_established', connect_handler)
pusher.connect()

while True:
    time.sleep(1)

The results I get to screen are:
Logging Output (with 'event' and 'channel'):
{"event":"updated","channel":"price_ladders_cash_btcjpy_buy","data":"[[\"902803.86848\",\"0.53500000\"],[\"902525.42000\",\"0.24500000\"],[\"902500.00000\",\"0.35320000\"],[\"902041.67444\",\"0.23510000\"],[\"901864.00000\",\"0.01856800\"],[\"901525.40000\",\"0.02000000\"],[\"901518.40000\",\"0.08000000\"],[\"900968.40000\",\"0.02000000\"],[\"900967.63000\",\"0.01609600\"],[\"900936.40000\",\"0.02000000\"],[\"900830.39000\",\"0.02000000\"],[\"900620.00000\",\"2.00000000\"],[\"900532.41000\",\"0.01000000\"],[\"899420.00000\",\"0.01000000\"],[\"899394.25718\",\"0.09366000\"],[\"899379.78211\",\"0.09459000\"],[\"899344.29123\",\"0.18108000\"],[\"899326.67050\",\"0.10873000\"],[\"899244.96171\",\"0.42860000\"],[\"899209.18772\",\"0.42569000\"],[\"899194.03279\",\"0.43184000\"],[\"899182.76156\",\"0.18316000\"],[\"899111.77941\",\"0.42505000\"],[\"899065.00000\",\"1.10000026\"],[\"899064.65503\",\"0.83353000\"],[\"899024.92879\",\"0.74487000\"],[\"899000.00000\",\"0.07000000\"],[\"898784.00000\",\"2.37200000\"],[\"898774.00000\",\"0.10000000\"],[\"898733.00000\",\"2.36500000\"],[\"898710.00000\",\"0.02000000\"],[\"898593.50106\",\"0.87417000\"],[\"898517.91761\",\"0.99008000\"],[\"898504.00000\",\"0.00900000\"],[\"898467.31863\",\"3.68813000\"],[\"898121.09000\",\"3.00000000\"],[\"898000.00000\",\"0.07000000\"],[\"897457.94012\",\"4.23122000\"],[\"897337.00000\",\"2.37200000\"],[\"897000.00000\",\"0.07000000\"]]"}

Print Output (with just 'data'):
[["902803.86848","0.53500000"],["902525.42000","0.24500000"],["902500.00000","0.35320000"],["902041.67444","0.23510000"],["901864.00000","0.01856800"],["901525.40000","0.02000000"],["901518.40000","0.08000000"],["900968.40000","0.02000000"],["900967.63000","0.01609600"],["900936.40000","0.02000000"],["900830.39000","0.02000000"],["900620.00000","2.00000000"],["900532.41000","0.01000000"],["899420.00000","0.01000000"],["899394.25718","0.09366000"],["899379.78211","0.09459000"],["899344.29123","0.18108000"],["899326.67050","0.10873000"],["899244.96171","0.42860000"],["899209.18772","0.42569000"],["899194.03279","0.43184000"],["899182.76156","0.18316000"],["899111.77941","0.42505000"],["899065.00000","1.10000026"],["899064.65503","0.83353000"],["899024.92879","0.74487000"],["899000.00000","0.07000000"],["898784.00000","2.37200000"],["898774.00000","0.10000000"],["898733.00000","2.36500000"],["898710.00000","0.02000000"],["898593.50106","0.87417000"],["898517.91761","0.99008000"],["898504.00000","0.00900000"],["898467.31863","3.68813000"],["898121.09000","3.00000000"],["898000.00000","0.07000000"],["897457.94012","4.23122000"],["897337.00000","2.37200000"],["897000.00000","0.07000000"]]

Got this working by taking another look at your example.  Solved it by passing the following keyword: channel=channel.__dict__['name']
import sys
import time
import pysher

# Add a logging handler so we can see the raw communication data
import logging
root = logging.getLogger()
root.setLevel(logging.INFO)
ch = logging.StreamHandler(sys.stdout)
root.addHandler(ch)

pusher = pysher.Pusher(appkey)

def  my_func(*args, **kwargs):
    print("processing Args:", args)
    print("processing Kwargs:", kwargs)

def connect_handler(data):
    channel = pusher.subscribe('mychannel')
    channel.bind('myevent', my_func, channel=channel.__dict__['name'])

pusher.connection.bind('pusher:connection_established', connect_handler)
pusher.connect()

while True:
    time.sleep(1)


Word Wrap Problem (DP, Java)

💥 Proposal
Word wrap problem is very important and frequently asked problem in which we have given a sequence of words as input, we need to find the number of words that can be fitted in a single line at a time. So, for doing it we put breaks in the given sequence so that the printed document looks good.
The word editors like Microsoft Office, Libre Office, etc. use line breaks to make the document look nice.
Hence, it is an important problem.
I will be implementing this problem following Dynamic approach in Java
Have you read the Contributing Guidelines on Pull Requests?
Yes, I have read the contributing guidelines.

/assign


Fix InvitationForm frontend validation

This one shows when trying to invite an email adress, that has already been invited (and even accepted maybe..? Because otherwise the adress is shown below, right..? 🤔 )

Since it comes from the backend, I first opened an issue there, in which @tiltec said that
"it's the default from Django REST Framework and I don't know where to change it. Ideally it should never show to the user anyway. The invite form is apparently missing proper front-end validation.
This bit should have prevented it:
https://github.com/yunity/karrot-frontend/blob/9b82efd73e4d7b3397ea615198c11d202cbd6f87/src/components/Group/InvitationsForm.vue#L55-L58"

Related #668

I can't reproduce the error above. The invitation form is still a bit rough in other ways, maybe it makes sense to polish it generally?

I improved the server error message, I guess that should be enough to close this.


add VOLUME.teaspoonsUs

Thank you! Could you please add tests?

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.43%. Comparing base (d1693a3) to head (7ff08b7).

Files
Patch %
Lines

lib/properties/volume.dart
50.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
- Coverage   99.54%   99.43%   -0.12%
==========================================
  Files          32       32
  Lines         885      887       +2
==========================================
+ Hits          881      882       +1
- Misses          4        5       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

There is a conversion test since previous and a getters test now. Anything more?

Thank you!

When are you going to release it? I would like to use the update in my app.


MuTect2 Outputs Odd Allele Frequencies

@chandrans commented on Mon Dec 05 2016
Bug Report
Affected tool(s)
Mutect2
Affected version(s)
3.6
Description
The AF field of MuTect2 is unpredictable depending on the input interval. For example, if I run with -L chr7:140452736-140453536, I get this at one site:
chr7	140453136	.	A	T	.	PASS	ECNT=1;HCNT=27;MAX_ED=.;MIN_ED=.;NLOD=239.30;TLOD=243.81	GT:AD:AF:ALT_F1R2:ALT_F2R1:FOXOG:QSS:REF_F1R2:REF_F2R1	0/1:1489,145:0.049:69:76:0.524:45565,4764:771:718	0/0:1094,0:0.00:0:0:.:34322,0:549:545
But, if I run with -L chr7:140452836-140453436, I get this at the same site:
chr7	140453136	.	A	T	.	PASS	ECNT=1;HCNT=15;MAX_ED=.;MIN_ED=.;NLOD=239.98;TLOD=245.96	GT:AD:AF:ALT_F1R2:ALT_F2R1:FOXOG:QSS:REF_F1R2:REF_F2R1	0/1:1489,144:0.092:69:75:0.521:45567,4730:770:719	0/0:1097,0:0.00:0:0:.:34389,0:551:546
Notice the major difference in AF between the two runs. Side  note, the AF does not equal the alt count / (alt count + ref count)?
Steps to reproduce
Test files here:
/humgen/gsa-scr1/schandra/micknudsen_MuTect2AF/bugreport_AF
Command for interval size of 600:
`java -jar /humgen/gsa-hpprojects/GATK/bin/current/GenomeAnalysisTK.jar -T MuTect2 -R /humgen/gsa-hpprojects/GATK/bundle/2.8/hg19/ucsc.hg19.fasta -I:normal /humgen/gsa-scr1/schandra/micknudsen_MuTect2AF/bugreport_AF/normal_chr7.12.bam -I:tumor /humgen/gsa-scr1/schandra/micknudsen_MuTect2AF/bugreport_AF/tumor_chr7.12.bam -o Sheila.MuTect2.vcf -L chr7:140452836-140453436
Command for interval size of 800:
java -jar /humgen/gsa-hpprojects/GATK/bin/current/GenomeAnalysisTK.jar -T MuTect2 -R /humgen/gsa-hpprojects/GATK/bundle/2.8/hg19/ucsc.hg19.fasta -I:normal /humgen/gsa-scr1/schandra/micknudsen_MuTect2AF/bugreport_AF/normal_chr7.12.bam -I:tumor /humgen/gsa-scr1/schandra/micknudsen_MuTect2AF/bugreport_AF/tumor_chr7.12.bam -o Sheila.MuTect2.400.vcf -L chr7:140452736-140453536

This Issue was generated from your [forums]
[forums]: http://gatkforums.broadinstitute.org/gatk/discussion/comment/33762#Comment_33762

@vdauwera commented on Mon Dec 05 2016
@chandrans MuTect2 is in the gatk-protected repo, so I believe issues should go there rather than here.

Just ran it and we fixed it at some point.  Most likely we got it for free just by porting to GATK4.

Sweet! I though that might happen in a bunch of cases...


overload solution for python

There is no overload typing linting in python-wechaty, like in typescript wechaty, and there is solution for python overload typing. I think we can enable this features later. @huan, @wechaty/python  how do you think about it.
refer to :

python-how-to-write-typing-overload-decorator-for-bool-arguments-by-value
literal types in mypy
typing.overload in python

Yes, using overload with the typing system will greatly improve the developers' experience who are using our module, because the API will be very strict and easy to use with the auto-completion.
I definitely support to add this feature, please go ahead and let's keep improving!


Add #presence method, as per Rails version

Thanks for the awesome library. Makes switching between ruby and JS much easier on the brain :).
Rails presence: http://api.rubyonrails.org/classes/Object.html#method-i-presence
These are currently opt-in by explicitly requiring the files only; I am not sure how to go about including them in the comprehensive array.js, object.js files.
I found I missed presence() for handling empty collections, things like:
 collection.presence() || "no components to render"
The string and number versions are probably most useful for duck typing.

My main problem with this solution is it wont work with null, undefined, etc.. Personally, I think this method would make more sense to add it to the Core Functions (this section could possibly be reworked and expanded to include more of the methods on the link you have given me). It could be used like so:
var Rearmed = require('rearmed-js/core');

Rearmed.presence(myVar);

But I really like being able to duck type i like you added. It would be perfect for handling zero's in if statements. Maybe this is a good case to have both ways, what do you think?
Changes Required:

If you want to work on this library you should only be editing the src folder and use the provided gulp task. Everything will make a lot more sense after you know that. Sorry the folder structure is so complicated, JS can get nasty like this sometimes.
I don't like how number presence is handled. I don't need Rails exact behaviour, I want expected, natural feeling behaviour. I think NaN should be rejected.

Thanks for the feedback; having looked up gulp, the library makes more sense :). I am new to modern JS.
Having referenced the way rails does it: https://github.com/rails/rails/blob/cab6ba4e1bf2abf6a5fb83f2f28e2a8482350bbd/activesupport/lib/active_support/core_ext/object/blank.rb
I have amended the PR to only patch Object and Number, and include together with present and blank. Does this seem reasonable?
When I run gulp, each task gives me an error like:
[14:05:12] GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: preserveComments is not a supported option
File: /home/developer/Projects/rearmed-js/object.js
Although it seems to have worked, though has not created the standalone versions of object/blank or number/blank. Have been googling the error, but so far nothing :(.

We need to make very concious decisions about what methods to add in client side libraries. I do not want to bloat the library on useless methods. Once you know javascript better you will understand these methods will not be useful.
I am going to implement a more robust "Core" section to include these types of methods as its the only sane way I can think of handling this.

My regularly encountered use case is to save 3 lines of code in situations like:
myFunction() {
  return some.method().presence()
}

vs
myFunction() {
  let myVar = some.method()
  if (!myVar.empty()) {
    return myVar
  }
}

I think the former is clearer and more elegant, if you work in a team of Rails devs.

Please see the latest master which implements what you want. I have removed the Core section and added a Generic section which contains presence.


How to use in Swift3.0？I'm going crazy

Hey @Z-JaDe, don't worry 😉
As I said in #192, you just need this in your Podfile:
  pod 'EZSwiftExtensions', :git => 'https://github.com/lfarah/EZSwiftExtensions.git'

@lfarah
I have already done so, thank you for your contribution


Determine doc impact of P0346R1

Determine doc impact of P0346R1
Occasionally, a paper increases restrictions on users (either at compile-time or run-time) without requiring implementations to diagnose improper usage.
This has no implementation impact, but may have doc impact.
Determine the doc impact of this paper.

moved to quest


Deprecate max_time from the Trainer constructor

Proposed refactoring or deprecation
Deprecate max_time from the Trainer constructor
https://github.com/PyTorchLightning/pytorch-lightning/blob/3392215ef69b483bff82bf7b0270c2349b33a73c/pytorch_lightning/trainer/trainer.py#L148
Motivation
Same motivation as #9820 and #9500.
We are trying to minimize the number of arguments on Trainer constructor: #9006
Right now we have two ways to configure a Timer, through the Trainer constructor argument max_time, and through the Timer callback. Let's make things simpler by only having one way, and keeping with the principle of putting customization logic into callbacks. This way we can also avoid having to check if the user set both places:
https://github.com/PyTorchLightning/pytorch-lightning/blob/3392215ef69b483bff82bf7b0270c2349b33a73c/pytorch_lightning/trainer/connectors/callback_connector.py#L215-L217

Since max_time relates to the training flow, we consider it to be in the same category as max_epochs, max_steps, etc.
Since those are not going to be removed from the Trainer, it would be strange to force max_time to be passed as a callback.
This was discussed with the wider team so we are going to close this, feel welcome to continue the discussion.


Spike - Could we ensure we check policy permissions every time CRUD operations happen on models?

Description
Right now we use middleware to check the Policy on the primary model of a route. But once in a controller or view, we may load other models (explicitly, or through model relationships) or even create/update/delete other models. Is there a way to ensure, through events or relationships, that we only interact with models that Policies allow?
Images
Place image attachments here.

The goal of this Spike is to see how hard it would be to set up the code in a way that implements the principle of least privileges. Essentially can we limit all access to specific data in way that requires explicit exceptions to circumvent. Circumventing is absolutely Ok when there's a reason to do so. We're not trying to limit what developers can do, but it could be helpful to them if access to data was clearly limited by roles in the code. It would mean we could worry less about accidentally serving data to users with the wrong role.
The default setup in Laravel (policies applied to routes) is sufficient, but this spike is to see if we can find a way to use it better (or do something slightly different).

@gobyrne I can't find any examples of people doing what we discussed, at least in Laravel. Laravel certainly isn't set up to enable it, and the workarounds I initially considered aren't sufficient. It would involve writing a substantial extension to Laravel ourselves.
I have to recommend sticking with the current approach of using permissions at the route or controller level, not on the data models themselves.
There is room for us to unit test our permissions, or our routes, more rigorously.

So it turns out to be fairly easy to authorize against a policy for doing any Creates, Updates, or Deletes. Every laravel model emits events before doing one of these actions, and you can listen for them, check the policy, and prevent the operation.
https://laracasts.com/discuss/channels/eloquent/listen-to-any-saveupdatecreate-event-for-any-model
I've started a branch with some experimenting on this:
https://github.com/GCTC-NTGC/TalentCloud/tree/task/direct-model-permissions
However, I haven't got this method to work for Getting of models. There is a Retrieved event, to match the other ones, but checking the policy in that listenter is causing an error for some reason.
Other concerns:

If we do get the Retreive check working, we need to figure out a way skip the check the User model is initially loaded as part of Login.
This method can't distinguish between different kinds of Updates. For example: claiming a job, editing a job, and publishing a job. All these actions update the same model, but require separate permissions. The only solution I can think of right now is to create several different abstracted Models, that all represent data from the same table.

Part of the reason this happens at the route/controller level is because information required to assess the permission is passed in with the request. The model itself can't know what area of the application the user is attempting to make the action from without somehow handing that information down, which as Tristan mentioned, would require some heavy rewrites.
Tightly coupling the model to the policy/permission feels like the wrong path to go down for me, just because of how Laravel is architected in the first place. Event subscription might be a good alternative but I feel like there will be performance implications having listeners subscribed to every single CRUD event emitted by our main models.


Export react-router-dom 5.1 hooks

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

!import


Some Autload settings are loaded as wrong types

Particularly longs with a L suffix will be loaded as int and may not work properly.
@Protonull is working on fixing it seemingly

Should be fixed with https://github.com/CivClassic/SimpleAdminHacks/pull/41/commits/0343638c61a092c8ade4a6c86bf7a2304db4e2af#diff-41d869965546c7ea2dd6a572c36c4ab81df1ae38d9fabe2adafd9a94a4e1b772R195-R211, though the problem wasn't L-suffixed values.

Fixed by https://github.com/CivClassic/SimpleAdminHacks/pull/41


LivestreamNotRunningError

Yesterday I was super excited as I finally got the Eufy Doorbell working in home assistant. Now I notice that after some time the camera stops working. After I reload the integration in Home assistant the camera will be working again. Anyone familiar with this error i  retrieved from the logs in the eufy-security-ws container?
2022-09-21 08:41:39.095  INFO  Eufy Security server listening on host <IP_ADDRESS>, port 3000
2022-09-21 08:41:49.263  INFO  Connected to station T8200N0020081594 on host <IP_ADDRESS> and port 28962
2022-09-21 08:41:49.319  INFO  Push notification connection successfully established
2022-09-21 08:42:19.233  ERROR Message error
 LivestreamNotRunningError  Livestream for device T8200N0020081594 could not be stopped, because it is not running
error stack:
• message_handler.ts:146 handle
    src/lib/device/message_handler.ts:146:31
• task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5
• server.ts:103 receiveMessage

Duplicate of: https://github.com/fuatakgun/eufy_security/issues/431


Import Module failed (AzureMigrateAssessmentCreationUtility.psm1)

The command name 'New-Group-Add-Machines' from the module 'AzureMigrateAssessmentCreationUtility' contains one or more of the following restricted characters: # , ( ) { } [ ] & - / \ $ ^ ; : " ' < > | ? @  * % + = ~`
Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

@frehnejc Can you provide us with a link to the referenced sample script?

This one:
azure-migrate/assessment-utility/AzureMigrateAssessmentCreationUtility.psm1

@frehnejc I'm reaching out to @weeyin83  who is the author of the referenced script to have them take a look at it.

@mikefrobbins, I am not the author of this script.
@frehnejc, although you get that error message can you still use the commands that are being loaded? Or does it fail completely??

It fails completely.

@weeyin83 my apologies.
@frehnejc Can you run $DebugPreference = 'Continue' prior to running the command that fails to see if any additional details are provided? You'll need to set $DebugPreference = 'SilentlyContinue' or restart your PowerShell session afterwards.

It's just a warning for me and allows to import a module. It does not fail. It's due to the fact that several - dash signed as used in cmdlet name I assume.

@frehnejc, @artisticcheese is correct, this is just a warning due to the author not using Verb-Noun for the function names that are being exported by the module. You can safely use the following command to suppress this warning:
Import-Module <file path>\AzureMigrateAssessmentCreationUtility.psm1 -DisableNameChecking
I'm reaching out to the Azure Migrate service team for a permanent solution. Either to change the New-Group-Add-Machines function to private or to rename it using the appropriate Verb-Noun naming convention.

@mikefrobbins Created the PR #315 and PR #316 to resolve this issue


Add a public version of PullThroughCache#clear

Currently on known updates, you have to cache.disable(); cache.enable(); to clear all existing entries. It would be nice to add a method which executes that.
We don't necessarily want to clear a single specific key, for now at least. The TTL and samplers should be enough for the primary use caches of this cache.

Fixed in 55a7f2c39f55399cf811bec74f89d5edd85109b3


Fix: Update RSSI Field in BLEAdvertisedDevice Structure During Discovery

Description
This pull request fixes an issue in the esp32-nimble where the rssi field of the BLEAdvertisedDevice structure was not updated during the discovery process when an advertising report was received.
Problem
During the BLE discovery process, the Received Signal Strength Indicator (RSSI) value in the BLEAdvertisedDevice structure was not being updated properly. This resulted in incorrect or missing RSSI data for discovered devices.
Solution
The solution involves updating the RSSI field of the BLEAdvertisedDevice structure upon receiving an advertising report. The necessary changes have been made to ensure that the RSSI value is correctly captured and updated.
Additional Notes
Please let me know if there are any additional changes required . I appreciate your review and feedback.
Thank you!

Thanks.


Workflow for Layer detection: missing information when no matching layers are available

Problem To Be Solved
The layer detection workflow works as described in Reference Applications - Usage.
However, when no matching layer is detected, the *.cbuild-idx.yml file does not get updated.
Steps to Reproduce
Use the following repos:

https://github.com/ReinhardKeil/USBD/tree/main
https://github.com/ARM-software/MDK-Middleware/tree/main
https://github.com/Open-CMSIS-Pack/pack-examples/tree/main

Register the development versions of the packs with cpackget add <path-to-pdsc> and verify setup with:
>cpackget list
I: Listing installed packs
I<EMAIL_ADDRESS>I<EMAIL_ADDRESS>I<EMAIL_ADDRESS>I<EMAIL_ADDRESS>I<EMAIL_ADDRESS>(installed via C:\w\pack-examples\B-U585-IOT02_BSP\Keil.
I<EMAIL_ADDRESS>(installed via C:\w\MDK-Middleware\Keil.MDK-Middleware.pdsc)
I<EMAIL_ADDRESS>(installed via C:\w\pack-examples\NUCLEO-U031R8_BSP\Keil.NUCLEO-I<EMAIL_ADDRESS>(installed via C:\w\pack-xamples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc)

Run:
>cbuild setup USB_Device.csolution.yml --packs
error csolution: undefined variables in USB_Device.csolution.yml:
  - $Board-Layer$

To resolve undefined variables, copy the settings from cbuild-idx.yml to csolution.yml
error cbuild: error generating build files
error cbuild: exit status 2

This is the correct layer detection. The file USB_Device.cbuild-idx.yml shows the valid setup.
  configurations:
    - target-type: B-U585I-IOT02A
      target-configurations:
        - configuration:
          variables:
            - Board-Layer: ${CMSIS_PACK_ROOT}/Keil/B-U585I-IOT02A_BSP/2.0.0-dev1/Layers/IoT/Board.clayer.yml
              description: B-U585I-IOT02A Board setup for IoT
              path: ${CMSIS_PACK_ROOT}/Keil/B-U585I-IOT02A_BSP/2.0.0-dev1/Layers/IoT
              file: Board.clayer.yml
              copy-to: .Board/U585

So far so good, but here is the problem:
Change target in *.csolution.yml to a board where not compatible layer exists as shown below.
  target-types:
#    - type: B-U585I-IOT02A
#      board: B-U585I-IOT02A         # name of a target board with layer
#     variables:
#       - Board-Layer: $SolutionDir()$\Board\B-U585I-IOT02A\Board.clayer.yml

   - type: LPC55S69-EVK            # name of a target board with layer
     board: LPC55S69-EVK
#     variables:
#       - Board-Layer: $SolutionDir()$\Board\LPC55S69-EVK\Board.clayer.yml

Run:
>cbuild setup USB_Device.csolution.yml --packs
error csolution: undefined variables in USB_Device.csolution.yml:
  - $Board-Layer$

error csolution: board 'LPC55S69-EVK' was not found
error cbuild: error generating build files
error cbuild: exit status 1

The *.cbuild-idx.yml is unchanged, which means the IDE cannot detect that there is no compatible selection.
Suggest A Solution
Even in this case the *.cbuild-idx.yml needs to be updated and an error indicator should be included.
Consider to list all error messages, i.e. with:
build-idx:
  messages:
    - error: undefined variables in USB_Device.csolution.yml
      detail: $Board-Layer$
    - error: board 'LPC55S69-EVK' was not found

To fix the fundamental problem reported here the *.cbuild-idx.yml should be updated also in case of errors during list layers, similarly as it is done for convert.
The existing boolean errors node can/should be consistently used for this scope.
@ReinhardKeil Please fix the indentation of errors and packs-missing nodes in the documentation - both are inside a cbuild array item, not outside. Also clayers are missing.
doc: https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/2.4.0/docs/YML-CBuild-Format.md#file-structure-of-cbuild-idxyml
schema: https://github.com/Open-CMSIS-Pack/devtools/blob/tools/projmgr/2.4.0/tools/projmgr/schemas/common.schema.json#L925-L927
Concerning listing all error messages, since it has a much wider scope I would suggest to open a separate issue to estimate the effort and schedule the implementation with a proper priority.


Pretty print entity in response

A minor enhancement: pretty print entity response for std output and documentation.

Added!


[BUG] Incorrect reset handling in collectors

Describe the bug
After auto-resetting an environment with _reset_if_necessary, the initial obs is ignored. The actual obs seen by the policy at the next step is always a zero TensorDict.
To Reproduce
Here we use a dummy env where the obs is just the time stamp (starting from 1).
from torchrl.collectors import SyncDataCollector
from torchrl.envs import EnvBase
from tensordict import TensorDict
from torchrl.data import TensorSpec, CompositeSpec, UnboundedContinuousTensorSpec
import torch

class DummyEnv(EnvBase):
    def __init__(
        self,
        device = "cpu",
        dtype = None,
        batch_size = None,
        run_type_checks: bool = True
    ):
        super().__init__(device, dtype, batch_size, run_type_checks)
        self.observation_spec = CompositeSpec({
            "time": UnboundedContinuousTensorSpec((*batch_size, 1)),
        }, shape=batch_size)
        self.action_spec = UnboundedContinuousTensorSpec((*batch_size, 1))
        self.reward_spec = UnboundedContinuousTensorSpec((*batch_size, 1,))
        self.time: torch.Tensor = torch.zeros(*self.batch_size, 1, device=self.device)

    def _step(self, tensordict: TensorDict) -> TensorDict:
        result = TensorDict({
            "time": self.time.clone(),
            "reward": self.reward_spec.rand(),
            "done": self.time > 4,
        }, self.batch_size)
        self.time += 1
        return result

    def _reset(self, tensordict: TensorDict, **kwargs) -> TensorDict:
        if tensordict is not None:
            reset_mask = tensordict.get("_reset")
            self.time[reset_mask] = 1
        else:
            # reset all envs
            self.time[:] = 1
        result = TensorDict({
            "time": self.time.clone()
        }, self.batch_size)
        self.time += 1
        return result

    def _set_seed(self, seed):
        torch.manual_seed(seed)

if __name__ == "__main__":
    batch_size = [4]
    env = DummyEnv(batch_size=batch_size)
    def policy(tensordict: TensorDict):
        if "collector" in tensordict.keys():
            step = tensordict[("collector", "step_count")]
            print(f'step: {step}, obs: {tensordict["time"].squeeze(-1)}')
        tensordict.set("action", env.action_spec.rand())
        return tensordict

    collector = SyncDataCollector(
        env, policy, split_trajs=False, frames_per_batch=4 * 10
    )

    for i, data in enumerate(collector):
        break

Running the above code gives
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([1., 1., 1., 1.]) # the first episode is correct
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])
step: tensor([2, 2, 2, 2], dtype=torch.int32), obs: tensor([3., 3., 3., 3.])
step: tensor([3, 3, 3, 3], dtype=torch.int32), obs: tensor([4., 4., 4., 4.])
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([0., 0., 0., 0.]) # the policy should have never seen zeros
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])
step: tensor([2, 2, 2, 2], dtype=torch.int32), obs: tensor([3., 3., 3., 3.])
step: tensor([3, 3, 3, 3], dtype=torch.int32), obs: tensor([4., 4., 4., 4.])
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([0., 0., 0., 0.]) # the policy should have never seen zeros
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])

Expected behavior
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([1., 1., 1., 1.]) # the first episode is correct
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])
step: tensor([2, 2, 2, 2], dtype=torch.int32), obs: tensor([3., 3., 3., 3.])
step: tensor([3, 3, 3, 3], dtype=torch.int32), obs: tensor([4., 4., 4., 4.])
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([1., 1., 1., 1.]) # consistent with the first episode
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])
step: tensor([2, 2, 2, 2], dtype=torch.int32), obs: tensor([3., 3., 3., 3.])
step: tensor([3, 3, 3, 3], dtype=torch.int32), obs: tensor([4., 4., 4., 4.])
step: tensor([0, 0, 0, 0], dtype=torch.int32), obs: tensor([1., 1., 1., 1.]) # consistent with the first episode
step: tensor([1, 1, 1, 1], dtype=torch.int32), obs: tensor([2., 2., 2., 2.])

Reason and Possible fixes
This occurs because in SyncDataCollector:
def rollout(self):
    ...
    self._reset_if_necessary()
    self._tensordict.update(step_mdp(self._tensordict), inplace=True)
    ...

def _reset_if_necessary(self):
    ...
    if done_or_terminated.any():
        traj_ids = self._tensordict.get(("collector", "traj_ids")).clone()
        steps = steps.clone()
        if len(self.env.batch_size):
            self._tensordict.masked_fill_(done_or_terminated, 0)
            _reset = done_or_terminated
            self._tensordict.set("_reset", _reset)
        else:
            _reset = None
            self._tensordict.zero_()
        self.env.reset(self._tensordict)
    ...

The initial obs of the new episode gets discarded by step_mdp because it is not in self._tensordict["next"]. What the policy will see is the zeros set by self._tensordict.masked_fill_(done_or_terminated, 0).
The most straightforward fix is to change the above to:
def _reset_if_necessary(self):
    ...
    if done_or_terminated.any():
        traj_ids = self._tensordict.get(("collector", "traj_ids")).clone()
        steps = steps.clone()
        if len(self.env.batch_size):
            self._tensordict.masked_fill_(done_or_terminated, 0)
            _reset = done_or_terminated
            self._tensordict.set(("next", "_reset"), _reset)
        else:
            _reset = None
            self._tensordict.zero_()
        self.env.reset(self._tensordict["next"])
    ...

So that the initial obs get carried to the next step by step_mdp.
However, this would break some tests, e.g., test_collector.py::test_traj_len_consistency, because now we have ("next", "done") in keys after the first reset which causes key inconsistency when doing torch.cat.
I recall that the earlier versions of torchrl require step_mdp(env.reset()).  Here I wonder does the coexistence of "done" and ("next", "done") make sense. I personally think having both is more rigorous: "done" indicates whether this step is an initial step, and ("next", "done") indicates whether the episode is terminated after this step (IIUC currently we have only "done" for the latter). In this way inside an RNN policy module, we can decide whether we need to reset some of its hidden states.
Checklist

[x] I have checked that there is no similar issue in the repo (required)
[x] I have read the documentation (required)
[x] I have provided a minimal working example to reproduce the bug (required)

thanks for reporting this.
I think we should first fix the bug and then consider having ("next", "done") along with "done".
It's a challenging one: there are some conventions, like r_t goes with s_t, a_t, only s_{t+1} is considered as the "next" value. Is the related final_t a property of t or t+1 is not super clear IMO.
IIUC what you're suggesting, we should move the current done to the next state, is that right?
I'm just afraid that it would not be obvious for all users. But I'm open to discussing it...
I'll make a PR to fix this bug but feel free to keep the conversation going regarding "done".

Yep, that's challenging and requires a lot of code changes, including the objective and loss modules.
But I do think having "done" and ("next", "done") to mean different things is sometimes favorable, e.g., resetting a recurrent module to some non-trivial hidden states would require identifying if the current step is just after a reset.
BTW a test for this
@pytest.mark.parametrize("env_class", [MockSerialEnv, MockBatchedLockedEnv])
def test_initial_obs_consistency(
    env_class, seed=1
):
    if env_class == MockSerialEnv:
        num_envs = 1
        env = MockSerialEnv(device="cpu")
    elif env_class == MockBatchedLockedEnv:
        num_envs = 2
        env = MockBatchedLockedEnv(device="cpu", batch_size=[num_envs])
    env.set_seed(seed)
    collector = SyncDataCollector(
        create_env_fn=env,
        frames_per_batch=(env.max_val * 2 + 2) * num_envs, # at least two episodes
        split_trajs=False
    )
    for _, d in enumerate(collector):
        break
    obs = d["observation"].squeeze()
    arange = torch.arange(1, collector.env.counter).float().expand_as(obs)
    assert torch.allclose(obs, arange)

After due consideration i'm open about it.
Brining a few folks in the discussion for visibility:
We're considering moving away from a step that returns
TensorDict({
    "done": torch.Tensor(...),
    "action": torch.Tensor(...),
    "reward": torch.Tensor(...),
    "next": TensorDict({
        "observation": torch.Tensor(...),
    }, batch_size),
}, batch_size)

to one where the "done" state is in the "next" tensordict:
TensorDict({
    "action": torch.Tensor(...),
    "reward": torch.Tensor(...),
    "next": TensorDict({
        "done": torch.Tensor(...),
        "observation": torch.Tensor(...),
    }, batch_size),
}, batch_size)

This is a major BC-breaking change, meaning that if we don't do it now (before beta) it'll be more difficult to bring it later.
This has several advantages but mainly the point is that "done" is a property of the next state (ie: it is final) and not of the current state. See above for the full discussion.
cc @shagunsodhani @matteobettini @albertbou92 @Benjamin-eecs @riiswa @smorad @XuehaiPan

For policy input consistency, I suggest having reset also return a done of Trues so that we can do
hidden_state[done] = init_hidden_state

either inside the policy or in the collector.

For policy input consistency, I suggest having reset also return a done of Trues so that we can do
hidden_state[done] = init_hidden_state

either inside the policy or in the collector.

Isn't is sufficient that the ("next", "done") is True? Like this two consecutive trajectories are clearly delimited.
In other words: we don't need to set ("done",) to True since it already is

Would it make sense to have done in both the current timestep and next timestep TensorDicts, similar to how observations are treated? It might be confusing to diverge from how gym/dm_env and other libraries treat done, unless there is a compelling reason to do so.

After due consideration i'm open about it. Brining a few folks in the discussion for visibility: We're considering moving away from a step that returns
TensorDict({
    "done": torch.Tensor(...),
    "action": torch.Tensor(...),
    "reward": torch.Tensor(...),
    "next": TensorDict({
        "observation": torch.Tensor(...),
    }, batch_size),
}, batch_size)

to one where the "done" state is in the "next" tensordict:
TensorDict({
    "action": torch.Tensor(...),
    "reward": torch.Tensor(...),
    "next": TensorDict({
        "done": torch.Tensor(...),
        "observation": torch.Tensor(...),
    }, batch_size),
}, batch_size)

This is a major BC-breaking change, meaning that if we don't do it now (before beta) it'll be more difficult to bring it later.
This has several advantages but mainly the point is that "done" is a property of the next state (ie: it is final) and not of the current state. See above for the full discussion.
cc @shagunsodhani @matteobettini @albertbou92 @Benjamin-eecs @riiswa @smorad @XuehaiPan

Commenting on this, I think reward should go togheter with done, whatever we do

Now, after the step, we should get (o_t+1, done_t+1, r_t+1), which, paired with the previous data, would be a td like
TensorDict({
    "done": torch.Tensor(...),
    "action": torch.Tensor(...),
    "reward": torch.Tensor(...),
    "observation": torch.Tensor(...),
    "next": TensorDict({
        "observation": torch.Tensor(...),
        "done": torch.Tensor(...),
        "reward": torch.Tensor(...),
    }, batch_size),
}, batch_size)

I think reward is still at t
When we write RL papers we usually say s_t, a_t, r_t, s_{t+1}
Not sure about terminal. The suggestion is to say "done belongs to t+1". IMO reward should stay out of "next"

I mean one could argue it is a subjective choice, but this was decided by Sutton and Barto and picked up by OpenAI gym so I would not break it. In they book they always make rewoards, dones and obs got together. And I think that is what gym wanted to do with the values returned by step.
Reset could omit returning a reward, but it would still return done and obs since the reset could be partial and only some envs may actually have been reset

See my edited comment above

EDIT: Happy to move r_{t} to r_{t+1} But then do we need reset to fill a reward too? What sense does it have? I can see why an env would be immediately done but the reward is linked to an action no?

Would reset need to return a reward in that case? Couldnt it just return done and obs? Done is needed as the return as the reset could be partial

Yeah maybe we can do without.
So for a trajectory we'd have
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
        "reward": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

Following up on the related slack conversation, this seems fine to me.
On Mon, Feb 27, 2023 at 6:19 PM Vincent Moens @.***>
wrote:

Yeah maybe we can do without.
So for a trajectory we'd have
TensorDict({
"obs": torch.Tensor([T, ...]),
"action": torch.Tensor([T, ...]),
"done": torch.Tensor([T, ...]),
"next": TensorDict({
"obs": torch.Tensor([T, ...]),
"done": torch.Tensor([T, ...]),
"reward": torch.Tensor([T, ...]),
}, batch_size=[T]),
}, batch_size=[T])
—
Reply to this email directly, view it on GitHub
https://github.com/pytorch/rl/issues/937#issuecomment-1446730523, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3KUOUUJDMIBCMODTPJNATWZTO2HANCNFSM6AAAAAAVIU6MRE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Yeah maybe we can do without. So for a trajectory we'd have
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
        "reward": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

This looks good to me

At this point, the reward specs should go in the observation_spec, like action is in input_spec

At this point, the reward specs should go in the observation_spec, like action is in input_spec

I mean it could be output_spec which is a composite of reward, obs, (done?) specs

Following the standard convention in RL:

obs, done and reward should go together (seconding @matteobettini )

Regarding @vmoens comment "But then do we need reset to fill a reward too? What sense does it have? I can see why an env would be immediately done but the reward is linked to an action no?", one could argue that the action (at reset) is no-op so the reward = f(obs, no-op). Having said that, I would prefer not returning a reward at reset as this seems to be the common convention.

Maybe I missed something but is the plan to go with
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
        "reward": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

I thought we want to keep reward next to obs so would have expected this:
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "reward": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

Following the standard convention in RL:

obs, done and reward should go together (seconding @matteobettini )
Regarding @vmoens comment "But then do we need reset to fill a reward too? What sense does it have? I can see why an env would be immediately done but the reward is linked to an action no?", one could argue that the action (at reset) is no-op so the reward = f(obs, no-op). Having said that, I would prefer not returning a reward at reset as this seems to be the common convention.

Maybe I missed something but is the plan to go with
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
        "reward": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

I thought we want to keep reward next to obs so would have expected this:
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "reward": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

I think the solution proposed by Vincent (first of your comment):
TensorDict({
   "obs": torch.Tensor([T, ...]),
   "action": torch.Tensor([T, ...]),
   "done": torch.Tensor([T, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([T, ...]),
        "done": torch.Tensor([T, ...]),
        "reward": torch.Tensor([T, ...]),
    }, batch_size=[T]),
}, batch_size=[T])

does what we all want.
If you think aboout it, at time step 0 you have
TensorDict({
   "obs": torch.Tensor([1, ...]),
   "action": torch.Tensor([1, ...]),
   "done": torch.Tensor([1, ...]),
}, batch_size=[T])

which has obs_0 and done_0 coming from reset and action_0, taken for that obs.
You call step with this and you get done_1, obs_1, rew_1, which go in "next".
TensorDict({
   "obs": torch.Tensor([1, ...]),
   "action": torch.Tensor([1, ...]),
   "done": torch.Tensor([1, ...]),
   "next": TensorDict({
        "obs": torch.Tensor([1, ...]),
        "done": torch.Tensor([1, ...]),
        "reward": torch.Tensor([1, ...]),
    }, batch_size=[1]),
}, batch_size=[1])

Then, when you step the mdp, you obtain
TensorDict({
   "obs": torch.Tensor([1, ...]),
   "action": torch.Tensor([1, ...]),
   "done": torch.Tensor([1, ...]),
}, batch_size=[1])

again, which now contains obs_1 and done_1, with added action_1.

Sorry I didnt follow. Lets take the example of gym API and then we will continue with the torch-rl example.
At time 0, we just reset the env so we get just obs. At time t, the agent uses the last observed state [footnote 0], obs_{t-1}, used that to predict the action to take (a_t), performs that action, reaches a state obs_t, emits a reward r_t and a done signal d_t. Now, in the standard gym API obs_t, r_t, d_t are returned with env.step call.
Now lets extend this to TorchRL

If you think aboout it, at time step 0 you have
 TensorDict({
   "obs": torch.Tensor([1, ...]),
  "action": torch.Tensor([1, ...]),
   "done": torch.Tensor([1, ...]),
}, batch_size=[1])

What is the action here? The agent hasnt taken any action so far. If the agent has taken an action, there should be a reard field as well.

You call step with this and you get done_1, obs_1, rew_1, which go in "next".
TensorDict({
  "obs": torch.Tensor([1, ...]),
  "action": torch.Tensor([1, ...]),
  "done": torch.Tensor([1, ...]),
  "next": TensorDict({
       "obs": torch.Tensor([1, ...]),
       "done": torch.Tensor([1, ...]),
       "reward": torch.Tensor([1, ...]),
   }, batch_size=[1]),
}, batch_size=[1])

Why are we still returning old obs and old done?

Then, when you step the mdp, you obtain
TensorDict({
   "obs": torch.Tensor([1, ...]),
   "action": torch.Tensor([1, ...]),
   "done": torch.Tensor([1, ...]),
}, batch_size=[1])
again, which now contains obs_1 and done_1, with added action_1.

Just to confirm, we will have the reward as well here correct ?
[0]: or observation, or all observations seen so far etc. I am overloading the notation here.

@matteobettini Thanks for the clarification. In that case, is the following flow correct:
at time t = 0, env emits
 TensorDict({
   "obs": torch.Tensor([1, ...]), # say obs_0
   "done": torch.Tensor([1, ...]), # say d_0
}, batch_size=[1])

agent chooses an action and returns
 TensorDict({
   "obs": torch.Tensor([1, ...]), # obs_0
    "action": torch.Tensor([1, ...]), # say a_0
   "done": torch.Tensor([1, ...]), # d_0
}, batch_size=[1])

The action is executed and the env returns
TensorDict({
  "obs": torch.Tensor([1, ...]), # obs_0
  "action": torch.Tensor([1, ...]), # a_0
  "done": torch.Tensor([1, ...]), # d_0
  "next": TensorDict({
       "obs": torch.Tensor([1, ...]), # say obs_1
       "done": torch.Tensor([1, ...]), # say d_1
       "reward": torch.Tensor([1, ...]), # say r_1
   }, batch_size=[1]),
}, batch_size=[1])

Could you also clarify what is the object that the agent sees at time step 1

What you wrote is correct. at timestep 1 the agent sees what you have put in next (obs_1)

Sounds good - thanks for the clarification :)

Something I'm having some trouble figuring out is:
do we need "done" to be True when calling reset?
Here's the rationale in favour:

makes sense when stacking two trajectories one after the other. Since traj["next", "done"] at t is the same as traj["done"] at t+1 but t+1 is the result of a reset, having "done" set to True marks this as the result of a reset.
Following this idea, "done" could substitute "_reset" altogether (wdyt @matteobettini ?)
As pointed by @btx0424 that could help with the implementation of RNN policies.
Cons:
What if the env is actually done after a reset? In some cases (eg using noops reset) we do have envs that are immediately done.

@vmoens
We need to keep in mind vectorized and miulti-agent environments. If i have a batch size with 32 vectorized environments each with 4 agents lets say, i want to be able to reset just one of the agents in one of the envs , independently if they are done or not. So, if i reset just one agent in just one part of the batch, the rest of the done will be False when returning from the reset. In other words, we need to keep in mind that “done” is multidimensional and the dimensions can be independent and unrelated. For the same reason, some part of the env that is done and not resetted has to stay done.
Therefore, i think reset should only depend of the “_reset” flag, which could match the previous done or not. It will return a true done, stating which dimensions, after the partial (always think of a reset as partial as we are batched) reset are still done.

do we need "done" to be True when calling reset?
Here's the rationale in favour:

makes sense when stacking two trajectories one after the other.
As pointed by @btx0424 that could help with the implementation of RNN policies.

@vmoens I don't think so. You should never do that if you only have one boolean flag (i.e., done) when doing episode stacking with RNN or GAE. The semantics for done is a bit ambiguous. Have you ever thought about using the new Gymnasium step API? I.e. split the single boolean done flag into two booleans terminated and truncated, where:

terminated: the game is over, and needs reset(). Calling further step() will give undefined values.
truncated: reach the time limit, you can call reset. Also, you can still run further step() calls, which will give valid values.

The old done = terminated or truncated.
For value learning (V or Q):
$$
V (s_t) = E_{a_{t} \sim \pi} [ r_t + \gamma \cdot (1 - \text{terminated}{t + 1}) \cdot V (s{t + 1}) ]
$$
Ref:

openai/gym#2510
openai/gym#2752
#613

It's something we could support but I don't think we want to enforce that.
I personally don't mind but from the interactions I had with the community many feel that this change in the gym API was unwanted and harmful. It blocks many users from adopting gymnasium afaict.
Using TorchRL's env API you could easily modify StepCounter to register a new copy of "done" that carries the extra information that you want. I'd rather do that and leave it to the users to choose if they want to differentiate terminated or trunctated rather than imposing it when the community hasn't fully bought the feature.

It's something we could support but I don't think we want to enforce that.
I personally don't mind but from the interactions I had with the community many feel that this change in the gym API was unwanted and harmful. It blocks many users from adopting gymnasium afaict.

I agree that it's painful to migrate to the Gymnasium API. There are still many RL frameworks using the old Gym API. But I think the implementation correctness is the top priority for an RL framework. It is not worth shipping "wrong" implementations of value-based algorithms (e.g., Q-learning) or policy-based algorithms (e.g., Actor-Critic, PPO). All RL algorithms using TD learning need to consider the "done" information seriously. Since TorchRL is a relatively new repo and its APIs are not finalized yet. It does not have too much tech debt to resolve.

Using TorchRL's env API you could easily modify StepCounter to register a new copy of "done" that carries the extra information that you want.

A step counter is not doing the same thing as a truncated flag does. You can truncate and reset your environment whenever you want. You do not need to reach some conditions such as the step counter hinting at a limit. For example, you have an env with max_episode_steps=200, your batch size is 1024, and already sampled 1000 steps (5 episodes). Then you only need to sample 24 steps and set the truncated flag on.

I have the following suggestions:

API-wise, since two dones could be a bit confusing to those have been comfortable with Gym-like convention, we can consider have different names for them, e.g., is_initial and done. When stepping the MDP we let tensordict["is_initial"]=tensordict[("next", "done")]. It should resolve the ambiguity while keeping the advantages.
Keep a clear description of the stepping process somewhere obvious in the doc since it's a fundamental design choice here.
Clarify the role of _reset somewhere in the doc/code as many other users are not familiar with a natively vectorized (and multi-agent) environment.

This one is almost ready
https://github.com/pytorch/rl/pull/941
@btx0424

API-wise, since two dones could be a bit confusing to those have been comfortable with Gym-like convention, we can consider having different names for them, e.g., is_initial and done. When stepping the MDP we let tensordict["is_initial"]=tensordict[("next", "done")]. It should resolve the ambiguity while keeping the advantages.

I will do a transform that allocates a "is_initial" key when calling reset later. Would that serve your purpose?

Keep a clear description of the stepping process somewhere obvious in the doc since it's a fundamental design choice here.

I updated the readme by putting a gif of the env API, putting the env feature on top and referring to the tutorial and doc in there. Suggestions are welcome!

Clarify the role of _reset somewhere in the doc/code as many other users are not familiar with a natively vectorized (and multi-agent) environment.

We should do that, but as of now it is a private key that is handled by the classes on a per-usage basis. @matteobettini may have an opinion on where and what should be told about it?

Regarding the gif, I really like it! The only thing that i wonder is in the rollout on top why do we have reward at t=0.

Regarding the reset, I think the normal user which does not use vectorized envs can completely ignore it, as in its absence it will default to all trues (which is just one True in the case of a classic gym env). Users will not have to set this and it will be True by default when calling reset.
To make users aware of it I would probably talk about it in a tutorial that explains how to make your own environment / use vectorized envs (such as brax) / a multi agent env tutorial

API-wise, since two dones could be a bit confusing to those have been comfortable with Gym-like convention, we can consider having different names for them, e.g., is_initial and done. When stepping the MDP we let tensordict["is_initial"]=tensordict[("next", "done")]. It should resolve the ambiguity while keeping the advantages.

Check https://github.com/pytorch/rl/pull/962


Replace Build [Admins] team groups by konflux-build[-admins]

Use new group names which are aligned with new service name but also with the names of new Rover groups. Having both GitHub and Rover group names aligned will allow to have clusters auth with either GitHub or Red Hat SSO without having any difference in the RBACs.
RHTAPSRE-287

/test appstudio-upgrade-tests

Could you help rename the Build Team in the tekton-ci namespace maintainers as merged with PR. Would like to avoid raising one more PR for the same.

Ok, this PR was failing kube-linter check for an unrelated issue, which is fixed now: https://github.com/redhat-appstudio/infra-deployments/pull/3130
It is ready to be reviewed

/lgtm


Fixed inadvertitent breakage of CPUID usage

In removing the AVX512 "well-suited" flag, a second cpuid call that's
needed for feature detection was accidently removed.  This brings that
back.

@Dead2 I'm not sure I can create labels but this one should be "bug".


Bonfire: Truncate a string - Last Argument is Broken

The code pretty much speaks for itself. I don't really know what to say about it.

I can see your point, but I don't know that this is something we can solve. It's always going to be possible for users to code to the specific test cases unless we have an near infinite number of test cases or we start creating random tests. Random tests are an interesting idea, but they'd be a pretty big time investment for not a lot of gain.
I'm leaving this open for discussion, but I don't think there's ultimately a way to prevent users from going this route if they want to.

Itegman, the backend code is messing up. Look at the last argument case. In the code, I've only added a singular period, whatever is happening behind the scenes is adding two more on top of this. Additionally, the spelling of the word itself is wrong. I had written an algorithm that would have solved this naturally, but it kept messing up because of the issues with the final argument case and it was only when I targeted that word specifically did I find the solution.

That's your code doing it actually. You wrote two if statements, which the code will go through even if it fulfills the first.
You might want to use else if with your second if statement if the two conditions are meant to be mutually exclusive.

mifune, I did actually write an if else statement. I had to separate it into separate arguments to narrow down the result to find out what was causing the issue. It's a bug.

@sinithwar Please copy and paste the code you are seeing this with so we can confirm it's not your code then.

  if(str === "Abolutely Longer"){
    str = "Ab.";
  }
  if (str.length > num && str.length != 2){
    str = str.slice(0, num-3) + '...';
  }else if(str.length > num && num === 1){
    str = str.slice(0, num-2) + '...';
  }

If you notice, the str is checking for a Misspelled String, so it only works in case it is misspelled.

@sinithwar as @mifuyne said your code is wholly responsible for what is happening. You're making str = "Ab." and then running and if-statement that returns true because that string is both longer than num (2) and has a length that is not equal to 2.
Closing as not a bug with the site. Please visit the Help Chat in the future for help with challenges.
Thanks and happy coding!

I will reiterate.
The str is checking for a Misspelled String, so it only works in case it is misspelled.
"Absolutely Longer" != "Abolutely Longer"
If it didn't have a bug, the if statement would not work.

Sorry, I misunderstood your bug. There is indeed a misspelling in the passed argument.

Additionally, when I wrote the initial code for that word it was on the end of the else if statement as
else if(str.length > num && num === 2){
str = str.slice(0, 2) + '...';
}

and this was where the bug first cropped up because the console.log would print
Abolutely long...

The else was
console.log("Fail Conversion")

The testing of results claims that my code fails the following (last) two tests:

truncate("A-", 1) should return "A...".
truncate("Absolutely Longer", 2) should return "Ab...".

HOWEVER, the requirements state clearly that for values of "num" at 3 or less, NO "..." is to be appended to the truncated string (see requirement 3 below):
(1) Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a "..." ending.
(2) Note that the three dots at the end add to the string length.
// the above was a little confusing since I first thought it meant to truncate to num characters,
// then add another 3 characters ("..."); However, the post processing of results assumes one
// must truncate to num - 3 length, and then add the "...";
// thus maintaining TOTAL length to "num".
(3) If the num is less than or equal to 3, then the length of the three dots is NOT added to the string length.