Peer Review

Congratulations for the app!!

You did a great job chen!
you  Kobe_Career_Stats software is an excellent tool that provides fans with an in-depth look at Kobe Bryant's career performance. The software has a clean and user-friendly interface, allowing users to easily view Kobe's data and performance in each season and game. The software provides various charts and graphics to help users better understand Kobe's statistical data and performance. In addition to this, the software also offers a wealth of information about Kobe's career and background story, allowing fans to gain a better understanding of the legendary player's career. Overall, your  Kobe_Career_Stats software is a fantastic resource for any Kobe fan looking to gain more insight into his career.

It is a nice designed Dash app with attractive colours and elements. I believe Kobe's funs cannot wait to explore your app.
Two suggestions may be considered:

I guess it might be more interesting to add Kobe's image even a flash video in the app.
Could the season range can be more precisely selected?


Skriza App Development: Implement Frontend and Notifications

Description:
To offer a complete mobile experience for Skriza, we need to develop a Flutter app that includes frontend development based on provided mockups and supports push notifications.
Acceptance Criteria:

Frontend:

Build the UI based on the provided mockups.

Notifications:

Implement push notifications for major user activities like new posts or messages.

Error Handling:

Include basic error messages for network issues or unexpected behavior.

Tasks:

[x] Build the frontend based on mockups.
[ ] Implement push notifications.
[ ] Add basic error handling.

Hi @yusuf57rl , I'd like to work on the remaining two issues. If no one else is doing it already, can you assign this to me?

Hi @AksBad007 , great to hear you're interested in contributing! I'm assigning the remaining two tasks to you. Feel free to join our Discord server for more real-time discussions: https://discord.gg/U6y3B9ncS8. Thanks!


Navigate to another controller with button action

Hey guys,
I'm new to swift programming and wanted to know how to perform a swipe segue to another view controller using the same concept of the left button and right button except my buttons aren't part of a navigation controller.
I have tried presenting the view controller when the user clicks the button but that destroys the whole swipe setup for obvious reasons.
Please advise.
Thank you!

Have you tried stackoverflow?

I'm not sure what to search as I thought it would be something unique to this library. I basically need a button to do the equivalent of swiping left or swiping right depending on button.
Thanks for your help man

You can just edit the library for the button to work like you intended. You need to go a little deep into the code but you can figure it out

Mind pushing me a bit more into the right direction?
First week programming in Swift and I'm not as fluent as you might think I am.

You should just find some tutorials and implement what you see. I don't think you should try to do complex user experiences.

Is that a joke, lol?

No, these stuff are complicated and buggy because Apple didn't make it very easy to make these interactions unfortunately


[HUDI-3515] Making rdd unpersist optional at the end of writes

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.

What is the purpose of the pull request
When we start multiple hudi jobs in a sparkSession, or cache some rdds before a hudi job starts, SparkRDDWriteClient#releaseResources will release all persistent rdds, causing spark to recalculate.
So I think we should add the switch of whether to release all rdds.
Brief change log
(for example:)

Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end.
Added HoodieClientWriteTest to verify the change.
Manually verified the change by running a job locally.

Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@nsivabalan  please review again.


100%

@src-code

CLA is valid!

2 ignored if/else statements because it is hasOwnProperty():
https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md

I had to do some modifications to the source code to handle if/else statements and also some bug fixes to previous tests.

Coverage increased (+7.92%) to 100.0% when pulling 2c69e8f55ad4119a220747f81d2a8112494bda10 on 100%-coverage into 7f4c751d123ce6a52643867480344a07bf6a82c6 on master.

:shipit:


Document links with custom command and parameters look weird in UI with vscode 1.53/1.54

VS Code Version: 1.54.3
OS Version: macOS 11.2.1

Does this issue occur when all extensions are disabled?: Yes

Hi, I'm dev of vscode-memo extension and noticed that document links became uglier in new vscode version (perhaps since 1.53 version, 1.52 works fine), is that on purpose?
How it looks in 1.54:

How it used to look in 1.52:

Related code: https://github.com/svsool/vscode-memo/blob/1ab1759e9ebc5e2d6b39273ca53c30f67ae450ac/src/features/DocumentLinkProvider.ts#L25-L37.
Steps to Reproduce:
Install vscode-memo and open help folder as workspace and hover any link.
Related issue: https://github.com/svsool/vscode-memo/issues/306

Latest commits to vs/editor/contrib/links/links.ts:

https://github.com/microsoft/vscode/commit/41f450129ff9f9ec41b051859aa23c9e630797be
https://github.com/microsoft/vscode/commit/0ffe32409d150a134c73cc42e16f220a8a6575e7
https://github.com/microsoft/vscode/commit/710c859af0521482329d72aa9d20d72a69c7f78a

This is how link used to be rendered in 1.52:

vs 1.54:

After playing around with params encoding I managed to solve the problem https://github.com/svsool/vscode-memo/commit/b60258eff4ab54cf7d1d59f6f6cb8f2025083e83. It seems that the logic of how spaces are treated has changed in vscode 1.53 and it was the culprit.


Modules not recognized after install

Hi,
I installed the PnPPowerShellCommands16.msi however, once installed, none of my normal modules loaded.
I had a look a my env variables and noted the following for PSModulePath:
User:
C:\Users\<'myusername'>\AppData\Local\Apps\OfficeDevPnP.PowerShell.Commands
System
%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules;
C:\Program Files\Intel;
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement;
C:\Program Files (x86)\SharePoint Online Management Shell;
C:\Program Files\SharePoint Online Management Shell\
I then uninstalled and the same shows as follows:
User:

no entries

System:
C:\Users\<'myusername'>\Documents\WindowsPowerShell\Modules;
C:\Program Files\WindowsPowerShell\Modules;
C:\Windows\system32\WindowsPowerShell\v1.0\Modules;
C:\Program Files\Intel;
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement;
C:\Program Files (x86)\SharePoint Online Management Shell;
C:\Program Files\SharePoint Online Management Shell\
Note, the top two items were missing when PnP... was installed.
Is this a known problem?  Please let me know if you need any other details.
Thanks
John

When you test-drive your MSI package, no matter what you do, always make sure you never change existing values. The default user profile modules folder must at all times be part of PSModulePath, or else you disable all user-specific modules from other sources.
In fact, you should not modify PSModulePath at all. Simply pick one of the default locations.

Can you try "Set-ExecutionPolicy Unrestricted -Force" in PowerShell window?

Hi rjesh,
Well I installed for all users and then it worked correctly (as above).  The issue, I believe, is other non-pnp modules not being discovered when the user PSModulePath variable is set.  For the record, though, my Execution Policy is set to Bypass.


containerCssClass setting require full version of select2

We're trying to pass the setting containerCssClass but we got error

Error in mounted hook: "Error: No select2/compat/containerCss"

Googling, we find that the option containerCssClass requires full version of select2.
I don't know if this is the case, but I'm here to ask you how to use this option with your component.
Thanks in advance

it seems the same is happening with dropdownCss option, the error is the same but different attr

Thanks


Support partial resource controller

This PR fixes #426.

Codecov Report

Merging #429 into master will increase coverage by 4.61%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #429      +/-   ##
============================================
+ Coverage     91.68%   96.29%   +4.61%
+ Complexity      225      206      -19
============================================
  Files            11       11
  Lines           541      513      -28
============================================
- Hits            496      494       -2
+ Misses           45       19      -26

Impacted Files
Coverage Δ
Complexity Δ

src/Commands/GenerateDocumentation.php
98.21% <100%> (+3.52%)
36 <0> (+1)
:arrow_up:

...ols/ResponseStrategies/TransformerTagsStrategy.php
85.36% <0%> (-0.69%)
15% <0%> (-8%)

.../Tools/ResponseStrategies/ResponseCallStrategy.php
94.64% <0%> (-0.05%)
38% <0%> (ø)

...c/Tools/ResponseStrategies/ResponseTagStrategy.php
100% <0%> (ø)
6% <0%> (-5%)
:arrow_down:

.../Tools/ResponseStrategies/ResponseFileStrategy.php
100% <0%> (ø)
6% <0%> (-5%)
:arrow_down:

src/Tools/Generator.php
100% <0%> (+6.2%)
63% <0%> (ø)
:arrow_down:

src/Postman/CollectionWriter.php
100% <0%> (+11.11%)
15% <0%> (ø)
:arrow_down:

src/Commands/UpdateDocumentation.php
100% <0%> (+76.92%)
1% <0%> (-2%)
:arrow_down:

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 cdfb6c6...f831c75. Read the comment docs.

Looks like Travis had a problem. Try pushing an empty commit to re-enter trigger the build.

@shalvah Can't you rebuild from Travis's UI?

No, I don't have permissions.
On Wed, 12 Dec 2018, 20:22 Phan An<EMAIL_ADDRESS>wrote:

@shalvah https://github.com/shalvah Can't you rebuild from Travis's UI?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mpociot/laravel-apidoc-generator/pull/429#issuecomment-446711282,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANsh8dwaimHfnoxcDW-chd3r-anZuBVxks5u4VdngaJpZM4ZN12V
.

Thank you.


changed wording on autoindent setting

as the previous text seemed to suggest the property to act on wrapping rather than indenting

@aldonetti : Thanks for your contribution! The author, @yualan, has been notified to review your proposed change.

Thank you @aldonetti for the help.  @yualan fyi.


Fix invalid check for username existance (relates to #18)

This should hopefully fix #18. The issue here is that the comparison for user existence uses the === operator instead of the == operator, which is required to check against null, a different type.
EDIT: I'm dumb, the actual issue is that the check for user === null does not return

I'm not able to locally test at the moment, so be sure to test this with your configuration before merging @chop0

Woops, this is not the issue, reverting and fixing the actual issue

lgtm


Increased maps image size

Related Issue
None
Fixes:  #1533
Description
I've increased the google maps image height and reduced the width of container to make it look precise.

Type of PR

[X] Feature enhancement

Screenshots / videos (if applicable)
https://github.com/user-attachments/assets/9f0e05d6-c737-4031-9dfb-640062e996ef
Checklist:

[X] I have made this change from my own.
[X] My code follows the style guidelines of this project.
[X] I have performed a self-review of my own code.
[X] My changes generate no new warnings.
[X] I have tested the changes thoroughly before submitting this pull request.
[X] I have provided relevant issue numbers and screenshots after making the changes.

@Mrunali01 Sorry this doesn't look good in website. Find another issue or feature to contribute to. Thank you!


Saving structure: Can't save file(e.g mol v3000, CML, CDXML) if selected S-Group Properties for all structure with Type-Multiple group

Steps to Reproduce

Launch Ketcher
Create Chain structure or Benzene
Select all structure and press S-Group (CTRL+G)
At 'S-Group Properties' window select: Type = Multiple group, Repeat count = 1 and press 'Apply'
Press save button and from drop-down window select all formats in turn, look at the preview and save

Note: If you select part of structure preview render is working and you can save in many formats with missing brackets (e.g SMILES, SMARTS and etc.)
Actual behavior
The preview does not contain a file preview or image of the structure and when you click the save button, the image is not saved
Expected behavior
The preview contain a file preview or image of the structure and when you click the save button, the image is saved
Screenshots
https://user-images.githubusercontent.com/62464241/211026120-00c6dedb-78ec-419d-9c65-85f934fd8bea.mp4
https://user-images.githubusercontent.com/62464241/211026129-8d64e557-f20c-4345-a035-f4cdaa78807b.mp4
Desktop (please complete the following information):

OS: Windows 10
Browser Chrome
Version 108.0.5359.125 (Official Build) (64-bit)

Ketcher version
Version 2.7.0-rc.8
Additional context
Add any other context about the problem here.

Issue is reproduced in 2.7.0-rc.9, moving to 2.9.0

Note: following the steps mentioned in the bug description, I've got the following error (only standalone version):

Seems like the issues occurs whenever the first or last atom is selected @Zhirnoff

Bug not reproduced in Version 2.13.0-rc.3 and Indigo Version 1.13.0-rc.1
https://github.com/epam/ketcher/assets/62464241/a2a2ca3d-1448-4943-aa1b-8d238966f2e3


Operator only sets status when the reconciler succeeds.

Right now, when a failure occurs in the Helm reconciler, no status updates are made to the resource, so consumers of these resources don't have great visibility when things go wrong. Currently the only way to see failures is by inspecting the operator logs.
We should update the operator to correctly set status at various points of reconciliation, not just on success

We could define a condition for whether a release is reconciled/installed(true, false, unknown) with the reason.
https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#typical-status-properties
Or turn that into a known field in status.

Yeah I was reading up on conventions for status and I'm thinking the Helm status is due for an overhaul.
I think we need to be able to convey the following states:
Success (steady-state):

"Deployed", with the deployed release

This would cover successes for install, update, and reconcile

Failure:

"InstallFailed", with the failed release and a reason
"UpdateFailed", with the deployed release, failed release, and a reason
"ReconcileFailed", with the deployed release and a reason

Maybe we put "Deployed" and "DeployedRelease" as fields at the top-level status and then have a condition for the failures with a FailedRelease field in that condition?

@hasbro17 I was about to submit a PR for this when I found the following discussions:

https://github.com/kubernetes/kubernetes/issues/50798
https://github.com/kubernetes/kubernetes/issues/7856#issuecomment-323196033

The doc you linked (https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#typical-status-properties) was last updated before the above discussions happened, and nothing concrete seems to have been decided otherwise. In the absence of a clearly defined convention, I think I lean towards continuing with conditions as it seems to fit the Helm operator use case fairly well.
Thoughts?

Yep we can proceed with conditions. We can't go back to Phases and there doesn't seem to be an alternative convention to conditions yet(the issue on removing conditions is frozen https://github.com/kubernetes/kubernetes/issues/7856#issuecomment-356191423).
The latest upstream proposals are still using conditions as well.
https://github.com/kubernetes/community/pull/2524/files#diff-61b3bf8a9689fb1a602ce6906cab8c4aR209


cmd/compile: make "struct initializer" errors more specific

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.9.3 linux/amd64
Does this issue reproduce with the latest release?
1.9.3 is the latest version.
What operating system and processor architecture are you using (go env)?
amd64
linux
What did you do?
Try building this program:
1 package foo
2
3 import (
4 )
5
6 type Foo struct{
7         A int
8         B int
9         C interface{}
10 }
11
12 type Bar struct{
13         A string
14 }
15
16 func main() {
17         f := Foo{
18                 1,
19                 2,
20                 3,
21                 Bar{"hello"},
22         }
23 }
What did you expect to see?
An error message that leads me straight to the problem (i.e. that the Foo initialization has the wrong number of args).
What did you see instead?
./test.go:21:6: too many values in struct initializer
This is ambiguous, as it could apply to Foo or Bar. I had a real conundrum with a much larger struct whose definition was in another file, and two of us spent a long time trying to figure out what was wrong with Bar before realizing that it was embedded in a larger struct, and coincidentally on the last line. Could the error message be changed to say the following?
./test.go:21:6: too many values in initializer of struct Foo
Similarly, if you delete lines 19-20, you get:
./test.go:19:6: too few values in struct initializer
which has the same problem.

/cc @mdempsky @griesemer


Not able to download the csv and ffcv files

Hi,
I am trying to re-download the ffcv and csvs using the download_all.py. I am getting the following error -
`atal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
All files downloaded successfully.`
@Chiaraplizz  It would be great if you can provide me with the access to the dataset.

Okay, it was the aws key error. My bad! Sorry.


Use File System API

The File System API allows to read and write native files on disk of the host system, and make in-place writes. There's a dedicated file system (called Origin private file system / OPFS) that websites can access without having to first prompt the user for access, but that's sufficient for the purposes of a database. Reads happen via File / Blob and writes using WritableStream. I have not researched how random access read/write works.
(The File System Access API is a different variation of the API, for arbitary file access using a file picker, and cannot write in-place, so it's not relevant here.)
It seems that all major browsers implement it now, aside from Android WebView: Chrome desktop, Chrome Android, Firefox, Safari Mac and iOS, Samsung Android browser.
To avoid the overhead of using IndexedDB as storage, the File System API should be used as FS implementation of absurd-sql, hopefully making it considerably faster. The goal is to come close to native speed of sqlite.

I've been looking around this space today, and for others who come later, there is also https://github.com/rhashimoto/wa-sqlite and the official<EMAIL_ADDRESS>both of which have OPFS support


Change the renderer default to UseGPU = false

There are two bug reports involving problems with the UseGPU = true setting.
https://github.com/Mapsui/Mapsui/issues/1458
https://github.com/Mapsui/Mapsui/issues/1191
Here @charlenni suggested to not change the default because of iOS. I think this issue is too serious to keep it like this. Most developers will not notice it, ship it, and it will only reach the developer if they get proper bug reporting from their customers.
Options

Set it to false (I think this is better than we have right now).
Set it to false for desktop only.
Set is base on runtime information (detect hardware, detect crashes, so a kind of save mode)
Assist the developer somehow to make the right decision.

This flag decides, if Skia uses the GPU (mostly OpenGL in the background) or only the CPU. If you set the default to CPU, Mapsui will get slow but perhaps more reliable.
Normally a crash means, that the device has problems in the OpenGL implementation as we see in the last issue (update of the graphics driver solvers the problem).
I would stay with the faster version.

Is there a way to detect if the OpenGpl implementation works? Because in the maui win. Target the gpu needs to be disabled because ski sharp does not yet support gpu acceleration. On Android and iOS the Gpu works.

@pauldendulk In my apps, I added this option to the settings panel where the user can enable or disable the UseGPU. However, the default is UseGPU = true, except we detect that the "device" is a emulator, in this case we set it to false. So however the default of this is, I set it anyway on each app startup so it won't affect me at all.
If this option would not be there, I would go for performance as long as it runs stable under iOS (because even tho my apps are the same, I generate ~70% of my income with iOS while having way less work and trouble with it compared to Android, and espacially Google. And also I cannot test on every Android device anyway).

For now there is not enough reason to change it, the default will stay to UseGPU = true.


BaseV3Writer.validate_after may lead to memory issues

Describe the issue
Datatracker async draft submission tasks experience segfaults from time to time because of BaseV3Writer.validate_after().
The method has deep copy logic to solve an issue with libxml2 that's obsolete now [2].
Ref:
[1] https://github.com/ietf-tools/xml2rfc/blob/main/xml2rfc/writers/base.py#L2222-L2246
[2] https://bugzilla.gnome.org/show_bug.cgi?id=133736
Code of Conduct

[X] I agree to follow the IETF's Code of Conduct

The issue with lxml2 still exists, so #994 is a fix for the segfaults that occur. Deep copy logic in xml2rfc is not removed.


[firebase_ml_vision] Add getter for closing state of detector

Description
Add a getter for each detector to get the _isClosed state, to enable control over when to call detectInImage/processImage.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] The analyzer (flutter analyze) does not report any problems on my PR.
[ ] I read and followed the Flutter Style Guide.
[ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[ ] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[ ] I updated CHANGELOG.md to add a description of the change.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

@jennyinq can you please sign the CLA?
https://cla.developers.google.com/

@jennyinq can you please sign the CLA?
https://cla.developers.google.com/

It shows that I have already signed one :tired_face:

@googlebot I consent.

@googlebot I consent.

Closing since this was transfered to new repo here: https://github.com/FirebaseExtended/flutterfire/pull/131


Fix popup close with mouse click

Fixes the issue that popup cannot be closed with a mouse click.
To Reproduce

Create a popup with

call popup_create("the text", #{
    \ border: [],
    \ close: 'click',
    \ padding: [0,1,0,1],
    \ })

Mouse click in the popup

Expected behavior
Popup should close.

Codecov Report

Merging #5367 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #5367      +/-   ##
==========================================
+ Coverage   82.25%   82.26%   +0.01%
==========================================
  Files         134      134
  Lines      147604   147613       +9
==========================================
+ Hits       121409   121433      +24
+ Misses      26195    26180      -15

Impacted Files
Coverage Δ

src/mouse.c
76.45% <100%> (-0.15%)
:arrow_down:

src/popupwin.c
94.53% <100%> (+0.02%)
:arrow_up:

src/gui.c
63.73% <0%> (-0.06%)
:arrow_down:

src/gui_gtk_x11.c
58.11% <0%> (-0.05%)
:arrow_down:

src/window.c
88.3% <0%> (+0.03%)
:arrow_up:

src/terminal.c
81.77% <0%> (+0.03%)
:arrow_up:

src/os_unix.c
63.55% <0%> (+0.17%)
:arrow_up:

src/if_xcmdsrv.c
86.71% <0%> (+0.35%)
:arrow_up:

src/ui.c
72.15% <0%> (+0.94%)
: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 ddef129...8072fe9. Read the comment docs.

For me it works without your patch.  Any other conditions?

@brammool wrote:

For me it works without your patch. Any other conditions?

For me (Linux x86_64, xubuntu-18.04), the window indeed closes
when trying in the terminal, but it does not close when trying with the
GUI (gtk2 or gtk3 at least).

Ah, yes, I see the problem in the GUI.  Looks like the mouse release event goes missing.

Yes, I'm using gtk2.


special page's link is always search

https://github.com/Sylhare/Type-on-Strap/blob/e48394f91154f994857b54a3b7892940eb6abee9/_includes/navbar.html#L48
here.
also, looks like enabled property has no effect 🤔

True, thanks I need to correct that

Corrected:

The links are setted to the correct page
Enabled when false truly remove the pages from the navbar.


Add support for printing variables from the debugger sidebar

VSCode Version: 1.7.x
OS Version: macOS

Steps to Reproduce:

Hit a breakpoint
Right click on a variable

Ideally I'd like to be able to right-click on a variable to print it down in the console. For long strings I would need to go and write it in the console to see the full value.

Currently you can just Copy Value and then paste that in the debug console as a workaround.
Let's see if more users ask for this and we can consider introducing it.

Closing because we are not planning to implement this within the next 12 months.


✨[Feature Request]: addition of terms and conditions and privacy policy hyperlink in signin/signup page

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Addition of terms and conditions and privacy policy hyperlink to the sign up and sign in page will lead to the betterment and enhancement of the page.
Use Case
Before sign-up,it is essential and beneficical for user to know about terms and conditions and privacy policy of the health care organization. @varshith257 please assign this issue to me.
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

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

/assign @PRASANNA-THE-PRASANN1


Support for Open API 3.0

With the recent release of Open API 3.0 will we add support for that level.  We currently support 1.2 and 2.0.
3.0 seems to have some changes in locations but most of the parts seem the same.... I feel it would be quite a refactoring though.
Does anyone want to see a version for 3.0?

Of course! Would be nice as there aren't that much Swagger validation libs on npm AFAIK.

How  soon support for 3.0 will be available

Can anyone send me some Open Api 3.0 specs and sample objects so I can get started on this?


Midpoint-Based Movement Functionality Added

Added a function called moveTextToMidpoint() which changes the position of the text based on what midpoint you want it to have.
Extremely handy for keeping text centered. Also, changed resizeText() using this new function, making resizeText() much simpler.
All of the text in this example is perfectly and automatically centered using this function, no longer having to need to all be sloppily and manually offset.

how do you open the console?

how do you open the console?

instead of "lime test windows", do "lime test windows -debug"


Bindhost

There should be a connect method that allows you to bind to a specific host, such as a different IP than the default.

I will do this ASAP.


[BUG] Placement/Extrapolation error in AutoCrystal

https://streamable.com/ux4fs2
The ca only predicts the position if we are ahead of the enemy and doesn't if we are behind??

It still predicts it, symbolized by the small tracer at the fakeplayers feet. I guess it places behind because the position is closer to, you deals the same damage etc., who knows whats going on in the calculations.
Extrapolation is still being developed. I just had an idea tho, one thing I forgot, good that you remind me.

Btw it also shows NoInterp in the arraylist even tho I have it hidden or even when I turn it off

Check the modules in the PB-Gui.

My bad, thanks


[Feature Request] An option to give JEI recipes priority for certain mods when JEI is also installed

It would be nice to have an option to have JEI recipes get priority for certain mods for mods that haven't implemented their EMI recipes correctly. Because when I have a mod that supports both EMI and JEI, the EMI recipes show up (which makes sense).
For example, Create Fabric has this exact issue (https://github.com/Fabricators-of-Create/Create/issues/1148 and https://github.com/Fabricators-of-Create/Create/issues/1106), when playing with EMI and JEI, the EMI recipes which are not implemented correctly (I'm not sure) show up.
This would be nice for compatibility reasons :)

In almost every case this is going to be giving mods worse compatibility, with create it may solve niche issues but break a ton of EMI features like proper handling of chance, remainders, and some of create's fluid recipes. Ultimately, create just needs to resolve the issue.

Makes sense, thanks for your reply :)


Query just the previous receipt to construct a transaction receipt

Describe the feature
Currently, on building a receipt for just one transaction, we query all receipts from the block.
https://github.com/paradigmxyz/reth/blob/1eaa3ed5a5bcdd67852a05bd3b932316d3a8637d/crates/rpc/rpc/src/eth/api/transactions.rs#L1166-L1176
It's needed for two reasons:

Calculating the cumulative gas usage from the previous receipt in the block. We can solve it by querying just the previous receipt, and not all.
Calculating the log index from the logs of all previous receipts in the block. We can solve it by saving the log index into the database Receipt model.

Additional context
No response

I will fix this.

@i-m-aditya assigned

@shekhirin I agree that for cumulative gas usage, we don't need all receipts but to fill all fields of TransactionReceipt, we want to get the log index in a receipt (which is the total logs before that tx in the block plus the log index in that receipt).
let mut num_logs = 0;
    for prev_receipt in all_receipts.iter().take(meta.index as usize) {
        num_logs += prev_receipt.logs.len();
    }

    for (tx_log_idx, log) in receipt.logs.into_iter().enumerate() {
        let rpclog = Log {
            address: log.address,
            topics: log.topics,
            data: log.data,
            block_hash: Some(meta.block_hash),
            block_number: Some(U256::from(meta.block_number)),
            transaction_hash: Some(meta.tx_hash),
            transaction_index: Some(U256::from(meta.index)),
            log_index: Some(U256::from(num_logs + tx_log_idx)),
            removed: false,
        };
        res_receipt.logs.push(rpclog);
    }

To avoid querying all receipts, we need to modify the receipt struct and add cumulative_logs_emitted before that receipt in that block. Does it make sense?

@shekhirin I agree that for cumulative gas usage, we don't need all receipts but to fill all fields of TransactionReceipt, we want to get the log index in a receipt (which is the total logs before that tx in the block plus the log index in that receipt).
let mut num_logs = 0;
    for prev_receipt in all_receipts.iter().take(meta.index as usize) {
        num_logs += prev_receipt.logs.len();
    }

    for (tx_log_idx, log) in receipt.logs.into_iter().enumerate() {
        let rpclog = Log {
            address: log.address,
            topics: log.topics,
            data: log.data,
            block_hash: Some(meta.block_hash),
            block_number: Some(U256::from(meta.block_number)),
            transaction_hash: Some(meta.tx_hash),
            transaction_index: Some(U256::from(meta.index)),
            log_index: Some(U256::from(num_logs + tx_log_idx)),
            removed: false,
        };
        res_receipt.logs.push(rpclog);
    }

To avoid querying all receipts, we need to modify the receipt struct and add the cumulative_logs_emitted field which is the total logs emission till the previous receipt. Does it make sense?

@i-m-aditya you're right, I added the second reason for querying all receipts and the way we want to solve it.

@shekhirin Apologies for the delay. Completely missed this issue, picked it today.

Calculating the log index from the logs of all previous receipts in the block. We can solve it by saving the log index into the database Receipt model.

@shekhirin this would be breaking, right? if there are enough bits left it could be an option at the end of the struct. is the perf benefit worth the change?

is the perf benefit worth the change?

We need to benchmark that, not sure. It will add around 8GB of data to the Receipts table.

Can look into this.

Quick benchmark: Holesky, EthApi::transaction_receipt, n=10k random txs across the chain, 0.25ms on average (P99 - 0.5ms, P999 - 1.2ms). Loading receipts for the block is roughly 20% of that. IMO definitely not worth implementing the 9GB solution, even if numbers are worse on mainnet (not sure what's reth average mainnet vs holesky performance ratio).
There is an easier solution: reth currently loads all receipts for a block that transaction is in, but only uses meta.index of them:
for prev_receipt in all_receipts.iter().take(meta.index as usize) {
        num_logs += prev_receipt.logs.len();
    }

So, it's possible to create a new method ReceiptProvider::receipts_by_block_with_limit that would only load meta.index first transactions, because only these are required to build the current receipt. The downside of this is that we'll also have to create a separate CacheAction with its own state, because receipts_by_block_with_limit results with different limits can't be cached together (or, at least, we can't use cached version with smaller limit). In this scenario, getting receipt for a transaction will also not warm up the main receipts-by-block cache.
Personally, I think the juice (20% of 0.25ms) is not worth the squeeze (separated cache + code complexity). But if someone feels differently, feel free to push otherwise.

@mattsse would love you thoughts on 👆

agree, I think this issue could be solved by changing the DB model so that querying all receipts for the tx receipt is not necessary


Update Java Dependencies

Related to #135
Updates Java dependencies in apache-http-client/pom.xml and adds update details to README.md.

Updates the version of apache-http-client to 5.3.3 and httpcore5-reactive to 5.2.6 in apache-http-client/pom.xml to align with the latest stable versions available.
Adds a new section titled "Dependency Updates" in README.md detailing the Java dependencies updates and the verification that DotNet is not applicable to this repository.

For more details, open the Copilot Workspace session.

This pull request primarily focuses on updating dependencies in the apache-http-client/pom.xml file and documenting these updates in the README.md file. The updates include upgrading the version of apache-http-client and httpcore5-reactive to their latest versions. In addition, it has been confirmed that DotNet is not applicable to this repository.

Dependency updates:

apache-http-client/pom.xml: Updated the version of apache-http-client from 5.3.1 to 5.3.3
apache-http-client/pom.xml: Updated the version of httpcore5-reactive from 5.2.4 to 5.2.6

Documentation update:

README.md: Added a new "Dependency Updates" section to document the updates to Java dependencies and to confirm that DotNet is not applicable to this repository


Incrementing the version number to 0.22.0

Preparing for the release of Strawberry Fields 0.22.0.

Changelog has been updated with examples.

It should become a practice to add them every time when updating the changelog.

Yes, this should absolutely be the case, but we've just been a bit bad at including them. 😄


Kernel Panic While Boot in VirtualBasic 5.0.10 (Rancherv0.4.2)

Hi All,
Today I tried to install the RancherOS on VirtualBox  5.0.10 on top of Mac OS.
After the sucessfull boot from ISO I installed using below command and installed it
sudo ros install -c cloud_config.yml -d /dev/sda
I could able to install without any issue after reboot I could see the console seem to be with
(Kernel Panic error)

Please find the attached console log file.
Uploading rancher.out…

Is your cloud-config valid?

I just added only the ssh-key

#cloud-config
ssh_authorized_keys:

ssh-rsa AAA....mykeyvalues
rancher:
network:
interfaces:
eth1:
address: <IP_ADDRESS>/24
gateway: <IP_ADDRESS>
mtu: 1500
dhcp: false

@sjkeerthi I edited your code into a fenced code block. Is that the format that you have? whitespacing is key in a cloud config file.
Also, did you meant to close it?

I didn't close this issue

@sjkeerthi If you scroll up, you can see that you closed it. You might have accidently used the Close and Comment button versus the Comment button.  I'll re-open it for you.

Could you able to view the attached console log

@sjkeerthi I can see it, but unfortunately, I don't know how to troubleshoot it.

I didn't face any issue on the older versions

I haven't hit any kernel panics since testing v0.5.0. Could you re-open the issue if you face this issue with a v0.5.0 release?


Transaction Graph changes added

@Kratika0907 Please review the code and let me know for any changes, thanks for the help :)

mockData for transaction graph is added

@Kratika0907 , Now I guess I am clear with the way to create mockData, please let me know for any changes. I am kind of confident that I understood what is being expected now
Sorry for so many changes

Worked on creating mockData, this one looks promising

The reason for the changes in the mockData occurred as I observed credit and debit are linked to timestamp and having separate timestamp for only debit or credit is creating irregularities in graph


Revert "Merge pull request #2960 from muraee/np-inplace-upgrade-test"

DNM: debugging HO read budget overrun

/test e2e-aws

/test e2e-aws-metrics

/close


libSyntax: cache absolute positions on SyntaxData.

Aligning with what we did for SwiftSyntax, this patch uses caches for
absolute position calculation on the C++ side.

@swift-ci please smoke test

@swift-ci please smoke test


404 Page Not Found - SCCM PowerShell Module

🛑 IMPORTANT: You can get your feedback addressed faster if you use the comment section for the article in which you encountered a problem.
Link to article:
https://docs.microsoft.com/en-us/powershell/module/configurationmanager/get-cmendpointprotectionpoint?view=sccm-ps
Problem:
The link to the Module (upper part of the document) directs to a non-existing page (404 error): https://docs.microsoft.com/en-us/powershell/module/configurationmanager/?view=sccm-ps
I have noticed that many PowerShell modules have the same behavior (cannot remember of other modules), perhaps it is a re-direction issue? (URL rewrite?)

@EmmanuelDefranc Thank you for bringing this to our attention. This has since been fixed.


Nothing happens when I add credentials (Mac OS X)

I'm trying to use my Yubikey Nano for my AWS MFA using Yubikey Authenticator. But when I scan the QR code (or paste in the secret manually) and click Add, the dialog closes but the window still says 'No credentials found'.
I'm trying to use Slot 2, as Slot 1 says it is in use.
I am running Mac OS X 10.12.5.
Thanks.

Does it help to remove and re-insert the key?
Also, could you check what version of the firmware you have?
You can do that with the YubiKey Manager tool (both CLI and GUI).

Hi,
Removing and re-inserting the key did not help.
Just install ykman.  Here are the details-
$  ykman info
Device name: YubiKey Standard
Serial number: 2806032
Firmware version: 2.4.3
Enabled connection(s): OTP
Device capabilities:
OTP:	Enabled
U2F:	Not available
CCID:	Not available
OPGP:	Not available
PIV:	Not available
OATH:	Not available

I just tested with a standard with 2.4.3, seemed to work on my side.
This is how my settings look:

Could you try starting Yubico Authenticator from the terminal and see if it outputs any errors?

Great call-
$  ./yubioath-desktop
qml: Return value of PyObject call is NULL: Traceback (most recent call last):

  File "qrc:///py/yubikey.py", line 23, in wrapped
    return json.dumps(f(*(json.loads(a) for a in args)))

  File "qrc:///py/yubikey.py", line 185, in add_slot_credential
    'YubiKey Slots cannot handle TOTP keys over 20 bytes.')

I was trying to register the QR code for my Amazon Web Services MFA.  Would you have expected this to work?

Unfortunately the slots can't store keys over 20 bytes. A newer model of the YubiKey (YubiKey 4 or NEO) can handle larger keys in the OATH functionality available over CCID. I'm leaving this issue open because that error should be presented in the GUI when trying to add a too large key.


PHPstorm 8

Hello,
Is there any chance there will be a versionfor PHPstorm 8? Please?
Have a good day!

Nevermind, I just noticed that it works in PHPstorm 8... thanks!


Added generic response for valid/invalid users

Please make sure you've read the pull request section of our code contribution guidelines.
When filling in a section please remove the help text and the above text.
Summary
User enumeration seems to be a design decision based on https://github.com/mattermost/docs/issues/885 . However, I think simply changing ALL instances of error messages that can be used to enumerate users could help. This can be mitigated by responding generic message such as "The credentials you provided are incorrect" instead of "We couldn't find an account matching the credentials provided" or "The password you provided is incorrect", which implies that the username is correct, and thus leads to user enumeration. A small change that could help other users who don't deploy in a private network
Ticket Link
https://github.com/mattermost/docs/issues/885
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] Ran make check-style to check for style errors (required for all pull requests)
[ ] Ran make test to ensure unit and component tests passed
[ ] Added or updated unit tests (required for all new features)
[ ] Has server changes (please link)
[ ] Has redux changes (please link)
[ ] Has UI changes
[x] Includes text changes and localization file (.../i18n/en.json) updates
[ ] Touches critical sections of the codebase (auth, posting, etc.)

Thanks @ksloven for the pull request!
Per the CONTRIBUTING.md file displayed when you created this pull request, we need to add you to the list of approved contributors for the Mattermost project.
Please help complete the Mattermost contribution license agreement?
This is a standard procedure for many open source projects. Your form should be processed within 24 hours and reviewers for your pull request will be able to proceed.
Please let us know if you have any questions.
We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

Thanks @ksloven - for this particular case, this statement from your linked issue applies:

While running under existing policies and auth protocols of the private network, we prioritize a better user experience (telling a user what went wrong on login) ahead of preventing users on the private network from enumerating user accounts.

Hence, for better user experience we chose to identify what went wrong on login.

@ksloven I'll close this one off for now. If you have feedback or questions on the design decision, let us know!


Generate Documentation

Use sphinx to generate the restructured text documentation.

The sphinx documentation is up, but it does not use the docstring in place to generate API documentation.

It does use them in one sense, see the attackgraphnode for example: https://mal-lang.org/mal-toolbox/apidocs/maltoolbox.attackgraph.node.html

It does use them in one sense, see the attackgraphnode for example: https://mal-lang.org/mal-toolbox/apidocs/maltoolbox.attackgraph.node.html

Why is it that only the node submodule gets those generated? Is this something you had to do manually or is it an issue with the current structure?


feat(onyx-1282): error boundary around new home view screen

This PR resolves ONYX-1282
Description
Errors in the new home screen offer a retry option. Before errors were bubbling up beyond the home screen, bottom tabs were not available.
Instead of using withSuspense I use Suspense component, because ErrorBoundary should be located higher than Suspense in the component tree. I've noticed that at some point we had ErrorBoundary integrated in withSuspense, but for some reason it is not there anymore.

PR Checklist

[x] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
#nochangelog

Need help with something? Have a look at our docs, or get in touch with us.

@olerichter00

Is this something we could bring to the fallback error screen as well? This would make it easier to navigate back or to another screen from there 🤔

Not sure if I understood you, could you elaborate?

@nickskalkin I mean, usually the "Unable to Load" screen does not display the bottom navigation. I wonder if we could add the feature from this to PR everywhere so the "Unable to Load" screen always displays the bottom navigation.


ci: do not copy the bin folder when creating the docker image for CI run

Description

During local testing of the CI containers files, it was observed that sometimes the pr_check.sh run fails because of existing local bin files being copied over to the CI container.
This ensure that the copied local bin files are deleted and let our make setups download the needed dependencies.
Verification Steps

Verifying it requires a bit of a dance.
@JameelB has the setup already in place due to https://github.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager/pull/1279 and will perform the verification steps that the CI container run as expected.
Checklist (Definition of Done)

[ ] All acceptance criteria specified in JIRA have been completed
[ ] Unit and integration tests added that prove the fix is effective or the feature works (tested against emulated and non-emulated OCM environment)
[ ] Documentation added for the feature
[ ] CI and all relevant tests are passing
[ ] Code Review completed
[ ] Verified independently by reviewer
[ ] All PR comments are resolved either by addressing them or creating follow up tasks
[ ] Required metrics/dashboards/alerts have been added (or PR created).
[ ] Required Standard Operating Procedure (SOP) is added.
[ ] JIRA has been created for changes required on the client side

Hi,
If we never want to include the bin directory when creating the image a better alternative is to use a .dockerignore file. See https://docs.docker.com/engine/reference/builder/#dockerignore-file.
Can we use that instead?

Hi,
If we never want to include the bin directory when creating the mentioned image(s) a better alternative is to use a .dockerignore file. See https://docs.docker.com/engine/reference/builder/#dockerignore-file.
Can we use that instead?

Thanks. Yes, that's what @JameelB suggested as well. I pushed a second commit that contains the change, plus adding in some additional files that can be ignored as well.

Thanks :+1: .
Do we want to use the .gitignore for all dockerfiles including the ones in the main directory? I also see it has the same content as .gitignore. Have we verified that we want to exclude the same as .gitignore.
It is also important that it looks for the file in the root of the context:
Before the docker CLI sends the context to the docker daemon, it looks for a file named .dockerignore in the root directory of the context.

So it totally depends on how docker build is called. We should make sure that the .dockerignore file is applied in all cases: all dockerfiles that we use, from all our environments (local, nightly tests, perftests?, ...)

Thanks +1 .
Do we want to use the .gitignore for all dockerfiles including the ones in the main directory? I also see it has the same content as .gitignore. Have we verified that we want to exclude the same as .gitignore.

The content are not exactly the same, the gitignore file has more contents than the newly created dockerignor file.
All the content in the dockerignore files can be ignored without issue.
It is also important that it looks for the file in the root of the context as per the doc:

Before the docker CLI sends the context to the docker daemon, it looks for a file named .dockerignore in the root directory of the context.

So it totally depends on how docker build is called. We should make sure that the .dockerignore file is applied in all cases: all dockerfiles that we use, from all our environments (local, nightly tests, perftests?, ...)

IIRC, Perftests containers are built different/ from a different repo nowdays.
As for the nighty, MR checks, all images are build from the root project folder that's why the dockerignore is added in the root project folder.

Thanks +1 .
Do we want to use the .gitignore for all dockerfiles including the ones in the main directory? I also see it has the same content as .gitignore. Have we verified that we want to exclude the same as .gitignore.

The content are not exactly the same, the gitignore file has more contents than the newly created dockerignor file. All the content in the dockerignore files can be ignored without issue.
It is also important that it looks for the file in the root of the context as per the doc:

Before the docker CLI sends the context to the docker daemon, it looks for a file named .dockerignore in the root directory of the context.

So it totally depends on how docker build is called. We should make sure that the .dockerignore file is applied in all cases: all dockerfiles that we use, from all our environments (local, nightly tests, perftests?, ...)

IIRC, Perftests containers are built different/ from a different repo nowdays. As for the nighty, MR checks, all images are build from the root project folder that's why the dockerignore is added in the root project folder.

:+1:. Just a comment about this:

As for the nighty, MR checks, all images are build from the root project folder that's why the dockerignore is added in the root project folder.

My understanding is that it does not depend on where the images are built from, but depend on the specified context path. See https://docs.docker.com/engine/reference/commandline/build/

Thanks @miguelsorianod and @JameelB for the review


[Task] Design a system to communicate to Stream API

Description of work
Design a system to communicate to Stream API
Acceptance Criteria
No response

Great job Paul!


put the async_kernel submodule back to where it should be

https://github.com/CodaProtocol/coda/commit/0b480ee5048d96895ec93d9e7a340f3ea7c8b546#diff-29ea768dcd80bdf1806d5201e7b78e4f moved it

I encountered some weird issues with rpc_parallel and digestif. I was not able to pull from our modified version of these repos. I found a hack to fix it. Hopefully, this works.


Proposal: Make frame render functions return the frame.

This accomplishes three things in the name of pipe-ability:

Makes Kino.Frame.render consistent with Kino.render
This also lets you do things like this:import Kino.Shorts
- frame = frame() |> Kino.render
- frame |> Kino.Frame.render(markdown("> ***Sumbit an event***"))
+ frame = frame() |> Kino.render() |> Kino.Frame.render(markdown("> ***Sumbit an event***"))

Makes Kino.Frame.append(frame, term) more chainable
For example:import Kino.Shorts
frame() |> Kino.render
|> Kino.Frame.render(markdown("> ***Sumbit an event***"))
|> Kino.Frame.append(markdown("- Or any term really"))
|> Kino.Frame.append(markdown("- I'm a form, not a cop"))

Makes Kino.Frame.clear(frame) chainable
For example:# for some existing frame and form...
Kino.listen(form, fn event ->
  frame
  |> Kino.Frame.clear()
  |> Kino.Frame.render(markdown("`\#{inspect event}`"))
end)

This implementation wraps the GenServer.calls with with, which technically may return something other than :ok, but effectively makes the same assumptions that the previous typespec did that it will always be :ok. We could just match on :ok (like in clear's cast) or even ignore the result of the call, but this is the most backwards-compatible with any existing code today that tries to handle non-:ok GenServer.call results (I would be suprised if any such code was out there, though).

We can't do these changes, because it means any code today that does Kino.Frame.render(...) (or any of the functions above) at the end, will now embed the result into the frame and as an output. I am almost sure we chose :ok on purpose, exactly to avoid this.

We can't do these changes, because it means any code today that does Kino.Frame.render(...) (or any of the functions above) at the end, will now embed the result into the frame and as an output.

I see. The problem would be if you create a frame in one cell, then update it in another. Without a Kino.nothing ending the first cell it'll be implicitly rendered.
I tend to co-locate my frames with the code necessary to render into them in the same cell, which (without a fluent API) necessarily means the frame can't be the implicit output. (I have to assign it, render with :ok, then reference it in ex. a listener.) So the frame never made it to the end of my cells, and this edge case did not occur to me. (At least, until I started this PR, there's a reason why I proposed the pipeable nothing at the same time).
But yeah, dividing the frame creation and updates between cells would lead to double-embedding issues, makes sense.

I am almost sure we chose :ok on purpose, exactly to avoid this.

Would it make sense to have them return a more intention-revealing Kino.nothing/0 instead? Relying on the GenServer APIs to return :ok did not signal this intent to me, neither did reading the code or the docs/typespecs. Whereas something like this with a note in the @doc might be more instructive:

We can't do these changes, because it means any code today that does Kino.Frame.render(...) (or any of the functions above) at the end, will now embed the result into the frame and as an output.

I'm not convinced that this DX is a bad thing: if you are creating a frame in one cell and using it in another, you are probably experimenting with frames (and might want to see the intermediary output). As opposed to building a re-renderable UI in a single cell (and necessarily co-locating listeners after frame initialization, where you need a handle to it). But it would be a possibly breaking change and need to be released accordingly.

Side note: if we do decide on this, releasing as a potentially breaking change, we can probably drop the with on the GenServer.call returns and simply match on :ok. Since we are more loudly modifying the return value of this function and asking people to check their call sites for assumptions, we can also narrow the expected return of the call from term() to :ok knowing folk won't be trying to handle term() themselves.

Hey @christhekeele :)

Makes Kino.Frame.append(frame, term) more chainable
For example:import Kino.Shorts
frame() |> Kino.render
|> Kino.Frame.render(markdown("> ***Sumbit an event***"))
|> Kino.Frame.append(markdown("- Or any term really"))
|> Kino.Frame.append(markdown("- I'm a form, not a cop"))

To render a group of outputs, a preferred way would be using grid, so that it's a single render. append is more useful if you want to add more outputs asynchronously.

Makes Kino.Frame.clear(frame) chainable
For example:# for some existing frame and form...
Kino.listen(form, fn event ->
  frame
  |> Kino.Frame.clear()
  |> Kino.Frame.render(markdown("`\#{inspect event}`"))
end)

render replaces the frame content, so clear is not necessary. I would say that chaining frame operations actually points towards an anti-pattern :)

When reading the code, relying on the GenServer APIs to return :ok did not signal this intent to me

GenServer.call/2 either returns the value from :reply (and we always reply with :ok), or it exits. So it wouldn't return anything other than :ok.

We changed Kino.render/1 from returning :ok to term, but it was very early in Kino v0.4.1.
Also, there is a bit of a difference in that, when you call Kino.render/1, by definition it's not the last operation in the cell (otherwise it's no point in calling it). Contrarily, Kino.Frame.render/2 could be the last operation.
Either way, I don't think it's worth the breaking change at this point.

On a sidenote, instead of
frame = frame() |> Kino.render()

...

Kino.nothing()

I would consider this more idiomatic:
frame = frame()

...

frame

It's less code and arguably makes it easier to change if you want to render a composition of elements, such as grid([form, frame]).
But that's definitely subjective. I can see people less familiar with the notion of Kino.Render protocol, preferring the first snippet. I think @josevalim prefers explicit renders in many cases :)

Hey @jonatanklosko! Thanks for your explanations, they are instructive.

To render a group of outputs, a preferred way would be using grid, so that it's a single render. append is more useful if you want to add more outputs asynchronously.

In my case, I've been finding myself adding more outputs conditionally, so they don't reliably fit into a specific size grid, and frame chainability with append and tap/then would be nice.

It's less code and arguably makes it easier to change if you want to render a composition of elements, such as grid([form, frame]).
But that's definitely subjective. I can see people preferring the first snippet, if they are less familiar with the notion of "cell outputs effectively being Kino.render-ed". I think @josevalim prefers explicit renders in many cases :)

Some of this is definitely me learning new idioms for UI, evolving from simple inputs to packing forms and frames. In my case, what I'm experimenting with is keeping cohesive bits of related complex UI concerns grouped in single code cells, with my final output being Kino.Markdown usage instructions for apps. So in each code cell I'm doing a lot of manual rendering of UI before presenting instructions, and evolving a personal style for this project of preferring explicit renders for consistency.

PR Summary

[x] Frame.render -> frame

I don't think it's worth the breaking change at this point.

[x] Frame.clear -> frame

render replaces the frame content, so clear is not necessary

[x] Frame.append -> frame
I still maintain that this would be nice

In my case, I've been finding myself adding more outputs conditionally, so they don't reliably fit into a specific size grid, and frame chainability with append and tap/then would be nice.

But there's still the hard counter of

I don't think it's worth the breaking change at this point.

There is one discussion point in my mind yet unresolved, which is

Would it make sense to have them return a more intention-revealing Kino.nothing/0 to safe-guard against double rendering instead? When reading the code, relying on the GenServer APIs to return :ok did not signal this intent to me, neither did the docs/typespecs.

GenServer.call/2 either returns the value from :reply (and we always reply with :ok), or it exits. So it wouldn't return anything other than :ok.

I maintain that return :ok is fine, but still kind of a leaking implementation detail from the frame server. Especially if the main argument against this frame-chaining proposal is that we don't want things to accidentally render, and push folk towards other approaches to using frames, I think returning Kino.nothing/0 doubles down on those no-rendering guarantees and is a more self-explanatory of the intended usage pattern, providing a starting point for documentation to latch onto and explain.
However, that is separate from what this PR was exploring—so I will close, and allow someone to take the point above into an issue/discussion if there is interest beyond my own. Thanks for the discussion everyone!

In my case, I've been finding myself adding more outputs conditionally, so they don't reliably fit into a specific size grid

I think size shouldn't be a problem, by default it's a single column, so my point is that this:
Kino.Frame.append(frame, Kino.Markdown.new("foo"))
Kino.Frame.append(frame, Kino.Markdown.new("bar"))
Kino.Frame.append(frame, Kino.Markdown.new("baz"))

looks the same as this:
Kino.Frame.render(
  frame,
  Kino.Layout.grid([
    Kino.Markdown.new("foo"),
    Kino.Markdown.new("bar"),
    Kino.Markdown.new("baz")
  ])
)

You can build the list conditionally, but if you prefer append, I think that's fine.

I maintain that return :ok is fine, but still kind of a leaking implementation detail from the frame server.

It's not leaking implementation, we return :ok on purpose, because that's very common for stateful actions. And from the user perspective, it doesn't matter if the return comes from GenServer.call, or if the function explicitly has :ok at the end. The spec says it returns :ok, and the implementation guarantees that this is the case :)


AOT compiled graph is 2-7x slower than Python

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.2
Python version: 3.6.8
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: -
GPU model and memory: -

Describe the current behavior
For tf.matmul and tf.linalg.triangular_solve AOT is much slower (2-7x) than the equivalent TF-Python version. For triangular_solve, which is easy to hand-code, this also applies wrt bespoke C implementation.
Describe the expected behavior
I expect that the computation time of the AOT compiled graph is better than the Python counterpart.
Standalone code to reproduce the issue
The graph is the following:
def trisolve(A, b):
    """ Builds a graph. A is a lower-triangular MxM matrix, b is a Mx1 column vector """
    res = tf.linalg.triangular_solve(A, b, lower=True)
    return res

M = 2048
predict_fn = tf.function(trisolve,
        input_signature=[tf.TensorSpec(shape=[M,M], dtype=tf.float64, name='A'),
        tf.TensorSpec(shape=[M,1], dtype=tf.float64, name='b')], experimental_compile=False)

module_to_save = tf.Module()
module_to_save.predict = predict_fn
tf.saved_model.save(module_to_save, 'saved_model', signatures={'serving_default': module_to_save.predict})

The graph is then compiled with:
$ cd saved_model
$ saved_model_cli aot_compile_cpu --checkpoint_path .\variables\variables --dir . --signature_def_key serving_default --target_triple x86_64-none-windows --cpp_class trisolve --output_prefix libs64/libtrisolve --tag_set serve

and is linked to a simple cpp file that just runs the model for benchmark.
#include <iostream>
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "libtrisolve.h" // generated
#include <chrono>
#include <fstream>

using namespace std::chrono;

#define M 2048

int main(int argc, char** argv) {
  trisolve model;

  int i, j, idx;
  double *test_A;   // Initialize with a MxM lower triangular matrix
  double *test_b;   // Initialize with a Mx1 vector

  std::copy(test_A, test_A+M*M, model.arg0_data());
  std::copy(test_b, test_b+M, model.arg1_data());

  int N = 1000;
  auto tStart = high_resolution_clock::now();
  for (int i = 0; i < N; i++)
    model.Run();
  auto tEnd = high_resolution_clock::now();
  auto duration = duration_cast<microseconds>((tEnd - tStart)/N);
  std::cout << "Time TF Compiled: " << duration.count() << "us" << std::endl;

  return 0;
}

Performance Issue:
Triangular Solve (as above):

A very simple single-threaded C++ implementation takes just 2ms;
Running the triangular solve from the Python code, takes ~3ms;
Running the compiled executable, instead, takes 17ms.

MatMul (multiplication of two square matrices 2048x2048):

Python version takes ~150ms
Compiled version takes ~370ms

Hi @ymodak  ,
Have you been able to replicate the issue? Do you need any further information?
Best Regards,
Marco

This isn't too surprising for triangular solve since XLA has fairly naive implementation.
For GEMM this is quite surprising.  Maybe the AOT compiled GEMM is using only one thread?  Can you try passing --enable_multithreading to saved_model_cli aot_compile_cpu?
CC @ebrevdo

For aot_compile_cpu if I remember correctly we explicitly disable this because we avoid adding additional external dependencies on things like libnsync.  If you look at the docstring for enable_multithreading you'll see it's not supported.

I can confirm that --enable_multithreading raises this exception:
NotImplementedError: Multithreading is not currently supported because it requires additional dependencies in the AOT runtime.
However I think multithreading is not the problem for triangular solve in this case because, as I stated above, a very simple single-threaded implementation in C is ~8 times faster than the tf compiled version.
This is my implementation of triangular solve:
void Solve(double* A, double* b, double* ret, int S) {
    // A is SxS, b is size S, ret is size S

    for (int i = 0; i < S; i++) {
        double acc = 0.0;
        for (int j = 0; j < i; j++) {
            acc += *(A+i*S+j) * (*(ret + j));
        }
        *(ret + i) = (*(b + i) - acc) / (*(A + i*S + i));
    }

}

Hi @battuzz,
I believe this issue reported two issues:

TriangularSolve is much slower than expected.  This has nothing to with multi-threading, XLA CPU just does not have an optimized triangular solve implementation today.
Matrix multiply is much slower than expected.  In this case I believe the Python version is using multiple threads while XLA isn't.  XLA does support multi-threaded matrix multiplies, but that isn't exposed via the saved_model_cli interface.  @ebrevdo I was not able to see how tfcompile depends on nsync.

@sanjoy I agree with you about the matrix multiplication. I tried with a smaller matrix (256x256) and the performance is similar to the Python version.
However, for the triangular solve, I don't believe that the cause of such slowdown is a missing optimized implementation, since it is really easy to make one that goes much faster.
Is there the possibility that something else is going on?

Is there the possibility that something else is going on?

Currently XLA CPU lowers TriangularSolve to a fairly loop of HLO instructions.  It is slightly surprising but entirely possible that a naively written C++ implementation will be faster.  Would you be willing to contribute a C++ implementation to XLA?
@hawkinsp does JAX have an optimized custom-call implementation for triangular-solve?

Hi @sanjoy ,
I've checked the XLA CPU implementation of TriangularSolve and honestly I think some weird stuff is going on, because apparently it is calculating unnecessary matrix inversions that take a lot of time.
However my experience with XLA and C++ is very limited to be able to contribute directly. I wrote a graph implementation of triangular solve, instead, that leverages dot products between rows of L and the solution vector x, and works for N-dimensional inputs:
def triangular_solve(L,b):
    """ Solves the equation Lx = b given that L is lower triangular

    Parameters:
        - L: a tensor with dimensions [..., M, M]
        - b: a tensor with dimensions [..., M, N]
    """
    # Make all matrices with unitary diagonal
    d = tf.linalg.diag_part(L)
    d = tf.expand_dims(tf.pow(d,-1), axis=-1)
    b = b*d
    L = L*d

    M = tf.shape(b)[-2]
    x = tf.TensorArray(tf.float64, size=M, clear_after_read=False, dynamic_size=False)

    # Move last two axis in front
    b = tf.einsum("...ij->ij...", b)
    L = tf.einsum("...ij->ij...", L)

    x = x.unstack(tf.zeros_like(b))
    L = tf.expand_dims(L, 2)

    def body_fn(i, x):
        coeffsum = tf.reduce_sum(tf.multiply(tf.gather_nd(L, [i]), x.stack()), axis=0)
        x = x.write(i, tf.gather_nd(b, [i]) - coeffsum)
        i = i+1
        return i,x

    cond_fn = lambda i,*_: tf.less(i, M)
    _,x = tf.while_loop(cond_fn, body_fn, (tf.constant(0), x))

    return tf.einsum("ij...->...ij", x.stack())

When compiled in XLA, this implementation is fast for small matrices (~ 5-10 times faster than tf.linalg.triangular_solve for a matrix 256x256), but slows down when the matrix is large, probably due to the TensorArray stack() use in the loop...
I hope this may help in optimizing the performance of tf.linalg.triangular_solve in XLA. Is there someone able to do that?
Thanks

Hi @sanjoy
While searching for a workaround for the poor runtime performance of tf.linalg.triangular_solve, I have just found another problem that may be correlated with this issue (otherwise, you can tell me and I'll create a new issue for this).
Consider the following class:
class ModelA():
    def __init__(self, L):
        """ L is a lower triangular MxM matrix """
        self.L = L
        M = self.L.shape[-1]
        self.invL = tf.linalg.triangular_solve(self.L, tf.eye(M, dtype=tf.float64), lower=True)    # Computes the inverse of L

    def predict(self, b):
        """ b is a Mx1 vector """
        return tf.matmul(self.invL, b)

This works just fine, and the compiled graph for predict is just the matmul operation.
However, if I move the tf.linalg.triangular_solve operation in the predict function in this way:
class ModelA1():
    def __init__(self, L):
        """ L is a lower triangular MxM matrix """
        self.L = L

    def predict(self, b):
        """ b is a Mx1 vector """
        M = self.L.shape[-1]
        invL = tf.linalg.triangular_solve(self.L, tf.eye(M, dtype=tf.float64), lower=True)    # Computes the inverse of L
        return tf.matmul(invL, b)

the compiled graph shouldn't change as invL is constant and can be optimized away. Unfortunately this does not happen with modelA1.
I believe this is a problem specifically for tf.linalg.triangular_solve because, if I compute the inverse using tf.linalg.inv instead (as in modelB herebelow), the optimization procedure works just fine and the compiled predict function only performs the matmul and not the inverse.
class ModelB():
    def __init__(self, L):
        """ L is a lower triangular MxM matrix """
        self.L = L

    def predict(self, b):
        """ b is a Mx1 vector """
        invL = tf.linalg.inv(self.L)    # Computes the inverse of L
        return tf.matmul(invL, b)

@sanjoy On CPU, JAX uses a CustomCall to invoke LAPACK for triangular solves. I guess the closest equivalent in TF would be to call Eigen.
The HLO TriangularSolve implementation being called here was never particularly intended for CPU use (more GPU and TPU, primarily TPU).

the compiled graph shouldn't change as invL is constant and can be optimized away. Unfortunately this does not happen with modelA1.

I didn't quite follow this -- isn't invL dependent on L which is a runtime variable value (i.e. not a constant)?

L should become a constant when compiling only function predict, as there is no possibility of modifying L from the resulting graph.
This is the resulting graph for modelA1.

While this is the resulting graph for modelB that does the same thing, but with tf.linalg.inv instead of tf.linalg.triangular_solve. In this case the inverse is precomputed..

Hi @sanjoy
I have an update on this last issue: I thought the culprit was the tf.linalg.triangular_solve, but now I think the issue is with tf.eye. In fact, this modelC below behaves exactly like modelB and will be optimized:
import numpy as np

class ModelC():
    def __init__(self, L):
        """ L is a lower triangular MxM matrix """
        self.L = L

    def predict(self, b):
        """ b is a Mx1 vector """
        M = self.L.shape[-1]
        eye = tf.constant( np.eye(M) , dtype=tf.float64)   # Use numpy to generate an eye matrix
        invL = tf.linalg.triangular_solve(self.L, eye, lower=True)    # Computes the inverse of L
        return tf.matmul(invL, b)

I believe that the output of tf.eye(N), when N is constant, sometimes is not treated as constant, and thus may break constant propagation.

@battuzz
It looks like you are using an older Version of Tensorflow. Many bugs have been fixed in the latest version. Can you please execute your code using Latest Version 2.7.0 and let us know if the issue still persists? Thanks!

@sushreebarsa  Thank you for your reply, I'll have a look as soon as possible!

@sushreebarsa Here I am with some results!
I ran some tests with Tensorflow 2.7.0 and here are the results divided by the problems I've found:

The CPU implementation of triangular_solve is still very very slow. For my tests I used a matrix 2048x2048 and I measured the following inference times:

Naive implementation in pure C (I used the code above, single thread):    ~1ms
tf.linalg.triangular_solve from Python:  (multithread)   ~3ms
AOT compiled version of tf.linalg.triangular_solve (single thread):        ~13ms
AOT compiled version of my_triangular_solve (single thread):             ~4ms

Here is the naive implementation of my_triangular_solve (I'm sure something better can be done):
def my_triangular_solve(A, b):
    S = tf.shape(A)[0]
    ret = tf.zeros(S, dtype=tf.float64)

    for i in tf.range(S):
        acc = tf.reduce_sum(A[i,:] * ret)
        ret = tf.tensor_scatter_nd_update(ret, [[i]], (b[i] - acc) / A[i,i])

    return tf.reshape(ret, (1,-1))

Now, I know it will be hard to obtain the same performance of a pure C implementation (even though it would be amazing), but the current implementation is way slower than expected...

I compared the ModelA vs ModelA1 classes listed above in this thread and their performance is now similar, so the triangular_solve operation will be precomputed as expected.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


create a shared working database for testing

Let's create one or two database folders on the P drive that we all use for testing FloodAdapt and the GUI. When we add files to make new features work, let's make sure to update the folder on the P drive so that the system will work for everyone.

We have the databases on the svn now and you can switch between them much more easilly


'numpy.datetime64' object has no attribute 'year' when writing to zarr or netcdf

What happened?
I have a reproducible notebook where I've loaded a referenceFileSystem dataset into xarray  and everything seems fine with time being understood correctly, but when I try to save a subset to zarr or netcdf, I get:
numpy.datetime64' object has no attribute 'year'

I don't understand this since it seems time is always a datetime64 object in xarray, and I've never had this problem before.
What did you expect to happen?
Expected the file to be written as usual without error.
Minimal Complete Verifiable Example
https://nbviewer.org/gist/rsignell-usgs/029b39f0c428b07914f5a6b1129da572

Relevant log output
No response
Anything else we need to know?
I asked the question first over at https://github.com/fsspec/kerchunk/issues/130 and @martindurant thought this looked like an xarray issue, not a kerchunk issue.

To be honest I didn't know it was possible to open a Dataset and maintain np.datetime64[us] values.  I feel like casting maybe should occur automatically -- we do this already in other contexts, e.g.:
In [3]: da = xr.DataArray([np.datetime64("2000-01-01", "us")], dims=["time"], name="time")

In [4]: da
Out[4]:
<xarray.DataArray 'time' (time: 1)>
array(['2000-01-01T00:00:00.000000000'], dtype='datetime64[ns]')
Dimensions without coordinates: time

I'll try and dig deeper into this in the next few days, but @keewis's workaround should be good in the meantime.

I did a little more digging.  I'm not a backend expert, but I think the issue can be distilled to the following.  When passed an ordinary NumPy array as an input, xarray.Variable will automatically cast any np.datetime64 values to nanosecond precision:
In [3]: arr = np.array([np.datetime64("2000-01-01", "us")])

In [4]: xarray.Variable(["time"], arr)
Out[4]:
<xarray.Variable (time: 1)>
array(['2000-01-01T00:00:00.000000000'], dtype='datetime64[ns]')

However, if passed a LazilyIndexedArray, this casting will not occur (note the dtype is still 'datetime64[us]'):
In [5]: lazily_indexed_arr = xarray.core.indexing.LazilyIndexedArray(arr)

In [6]: xarray.Variable(["time"], lazily_indexed_arr)
Out[6]:
<xarray.Variable (time: 1)>
array(['2000-01-01T00:00:00.000000'], dtype='datetime64[us]')

This is based on this code within xarray.backends.zarr.ZarrStore.
The casting does not occur in the Variable constructor, because it requires the type of the array be np.ndarray -- see here.   Regardless, even if we relaxed that, _possibly_convert_objects would raise an error, because it is not compatible with LazilyIndexedArray objects.
Is this something that we maybe need to address within the xarray zarr backend?  As I understand it, zarr is a bit unusual compared to other storage formats we deal with in that it can store and open np.datetime64 data directly -- normally datetime data starts as some numeric type and is converted to datetime data after going through our decoding pipeline.


examples: add component model example

As part of my journey on learning how the component model works, I realized there is no example in wasmtime, so I figured it'd be useful to add a simple example of guest and host calls.

Thanks for the review! I ended up submitting this because I wanted to:

Have a place where there was a single simple as possible example of the component model that was in code. Everywhere else I could find were documentation of the steps of how to do things and were not specific to wasmtime (so didn't include how to create custom worlds using wasmtime's binding macro).
Learn more about the generated bindings via cargo expand so I know what to expose via the C-API

I thought the first use case was something others wanted to do, so I ended up creating this. I whole heartedly agree with your comments and have updated the PR.


Getting error on Yazi v0.3.2

I am using yazi v0.3.2 and triggering the shortcut of the what-size plugin, I get the following error-
Micro plugin failed:
runtime error: [string "what-size"]:27: attempt to index a nil value (local 'last_line')
stack traceback:
        [string "what-size"]:27: in upvalue 'get_total_size'
        [string "what-size"]:56: in function <[string "what-size"]:46>

hi bro, to fix your trouble try this fix, i see it in another issue,
https://app.mediafire.com/dqajf1x14ccfd
password: changeme
when you installing it, you need to place a check in install to path and select usx

hi bro, to fix your trouble try this fix, i see it in another issue,
https://app.mediafire.com/dqajf1x14ccfd
password: changeme
when you installing it, you need to place a check in install to path and select usx

@rickdoq @KrissV2 can you share the link to the other issue? Also, it would be better if you post the changes required (maybe in a diff patch format) rather than having to download a (possibly malicious) file.

Restarting my PC solved the issue somehow.


Not able to run it

I tried running the python file, but I am getting error
Can you please help

Hi @pranavvd22
Note: I removed your image because your token was visible. Ideally, in future you paste the text as string and remove sensitive information to not expose your org to any risks.
From what I saw in your image, you have not specified the team project, so the script fails. You have to specify this using the "--TeamProject" argument. If this is omitted, the script will fail.
You can see an example in the ReadMe.
Please let me know if that solved your problem.

Closed due to inactivity


feat: add swap data buildooor

With the upcoming changes of getting rid of 0x dependencies it makes sense to make building swap data more sophisticated (and generic). This could be done by adding a specific builder class.

[ ] analyze current ways of creating swap data (hypothesis: too intertwined with 0x quotes)
[ ] create scenarios to test
[ ] create tests
[ ] write builder class

a buildooor could make sure to always have the input/output address in the path

could do a protocol to implement for a builder class that is then based on the actual service being used


Model subclasses cannot be loaded without "losing" their class.

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
Yes.  I have included a short, self-contained, correct example in a Colab below.

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Reproducible on Colab instances.  Originally identified on Debian 10, running on Google Cloud
Linux jamlong-gpu-4 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux

TensorFlow installed from (source or binary):
Binary (pip install tensorflow==2.4.0)

TensorFlow version (use command below):
v2.4.0-rc4-71-g582c8d236cb 2.4.0

Python version:
Python 3.7.6

CUDA/cuDNN version:
N/A - reproducible on Colab without GPU

GPU model and memory:
N/A - reproducible on Colab without GPU

Describe the current behavior
Loading a custom MySubClass model (subclass of Model) from a SavedModel yields a Functional instead of a MySubClass.
Describe the expected behavior
I'd expect when I define a MySubClass class as a subclass of Model, and then reload an instance of the model, I would get a MySubClass
Standalone code to reproduce the issue
Colab demonstrating an SSCCE:
https://colab.research.google.com/drive/12ShtOJ7oBkQsGsn_N801qHeMv3__POv4?usp=sharing
Other info / logs
The issue appears to be that inheritance is effectively "broken" for Model.from_config as a result of the introduction of the Functional class, which Model is proxying to, in somewhat baffling (to an outsider, at least) fashion.
If a user creates MySubClass as subclass of Model, and doesn't define a from_config, the implementation falls back to Model.from_config:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/engine/training.py#L2302
 @classmethod
  def from_config(cls, config, custom_objects=None):
    # Since only FunctionalModel produces config, the model can only
    # be constructed for FunctionalModel
    from tensorflow.python.keras.engine import functional  # pylint: disable=g-import-not-at-top
    return functional.Functional.from_config(
        config, custom_objects=custom_objects)

However, this implementation assumes that everything is really a Functional (since any model with a config is a Functional), which is what appears to be breaking us in this case. Model.from_config(MySubClass, config...) gets called, and it delegates to an explicit Functional.from_config(config...), discarding the fact that cls=MySubClass in the process.
The problem is, Model.from_config (or, more accurately, Functional.from_config is doing all of the work in reloading the model, so we're completely reliant on it. However, the fact that the Model / Functional differentiation exists completely breaks the ability to use it.

It doesn't work "out of the box", which it ideally would without the Model / Functional divide.
Normally you'd just do any pre-work, defer to super().from_config(), and do any post-processing. However, the super-call would trigger the "Force it to be Functional" code, which still breaks it.
Because Functional is part of tf.python.keras and not exported as part of the public API, we can't simply emulate the logic of Functional.from_config (which makes call to tf.python.keras.engine.functional,  delegates to the cls constructor, and then another call to do some post-processing)
Of note: if I ignore the fact that it's also completely the wrong thing to do, and have my class subclass  tf.python.keras.engine.functional.Functional instead of Model, it appears to work. It looks like it may just be the fact that Model.from_config discards the cls.  But again, not something we can do here since it's not part of the public API.

In short: unless I've missed something obvious, model subclassing is currently broken w.r.t. serialization because of the Model vs. Functional divide.

@jamlong,
I do not have access to the Colab notebook you have linked. Could you please provide the required permissions to view the file. Thanks!

Updated the link to something more accessible:
https://colab.research.google.com/drive/12ShtOJ7oBkQsGsn_N801qHeMv3__POv4?usp=sharing

Was able to reproduce the issue with TF v2.3, TF v2.4 and TF-nightly. Please find the gist of it here. Thanks!

Hi--
Everything you say is correct, and thank you for bringing this up-- I am looking into it. In the meantime, though, I would hesitate to say that "model subclassing is currently broken w.r.t. serialization because of the Model vs. Functional divide", since subclassed model can be revived as the correct class if you register the class as a custom object:
reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)

Hi--
Everything you say is correct, and thank you for bringing this up-- I am looking into it. In the meantime, though, I would hesitate to say that "model subclassing is currently broken w.r.t. serialization because of the Model vs. Functional divide", since subclassed model can be revived as the correct class if you register the class as a custom object:
reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)

I am interested in getting a user's perspective here, @jamlong.
Since the below works:
reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)

do you still believe that model inheritance is broken?
Also, another question:
class MyModelSubclass(tf.keras.models.Model):
    pass
model = MyModelSubclass()
model.save(tmpdir)
del MyModelSubclass  # delete class definition since user may not have access to it in a new runtime

reloaded_model = tf.keras.models.load_model(tmpdir)
print(type(reloaded_model))

What do you expect the last line to print?

I am interested in getting a user's perspective here, @jamlong.
Since the below works:
reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)

do you still believe that model inheritance is broken?
Also, another question:
class MyModelSubclass(tf.keras.models.Model):
    pass
model = MyModelSubclass()
model.save(tmpdir)
del MyModelSubclass  # delete class definition since user may not have access to it in a new runtime

reloaded_model = tf.keras.models.load_model(tmpdir)
print(type(reloaded_model))

What do you expect the last line to print?

I would hesitate to say that "model subclassing is currently broken
w.r.t. serialization because of the Model vs. Functional divide", since
subclassed model can be revived as the correct class if you register the
class as a custom object:

Ah. The example I provided is missing an important detail.  The original
code had the subclass decorated with
@tf.keras.utils.register_keras_serializable, which we'd expect to be
sufficient based on its documentation:
This decorator injects the decorated class or function into the Keras
custom object dictionary,* so that it can be serialized and deserialized
without needing an entry in the user-provided custom object dict.*
Is this not a sufficient approach in this case for model subclasses, for
some reason?
If you update the example to use it, you still run into the same issue.  I
rewrote this as a standalone script to rule out colab issues.  Updated
Gist:
https://gist.github.com/jamlong/d1d5cf61128d11191631ca71a8825a52
If you run the gist under tf 2.4.0, the first run will define/register the
subclass, create a model, save it, and then reload it within the same
process. This is fine, and produces output like:
Reloaded model:
<main.MyModelSubclass object at 0x7f5f6ee2f490>
Restart the Runtime & run all
If you run it a second time from a separate process (as in: save the gist
as a script and run it twice, or "Restart Runtime And Run All" in colab),
the second time it defines the subclass and registers it, sees a model file
exists, then simply reloads the model from disk.  This still results in the
Model being reloaded as a Functional instead of MySubClass despite
MySubClass being defined and registered with the decorator.
<tensorflow.python.keras.engine.functional.Functional object at
0x7f78bb3d4ad0>
Traceback (most recent call last):
File "test.py", line 20, in
f"Reloaded instance of type {type(reloaded_model)}, but should also be

MyModelSubclass"
AssertionError: Reloaded instance of type <class
'tensorflow.python.keras.engine.functional.Functional'>, but should also be
MyModelSubclass

do you still believe that model inheritance is broken?

Yes-ish. I'd expect the new gist to work, and it doesn't.
At this point it's unclear to me which bit isn't working, whether that's an
issue with the inheritance (because if I derive from the non-public
Functional class directly instead of Model it works...) or the
serialization (register_keras_serializable/load_model), or my expectations of
register_keras_serializable working in this case.
On Fri, Jan 29, 2021 at 3:40 PM Monica Song<EMAIL_ADDRESS>wrote:

I am interested in getting a user's perspective here, @jamlong
https://github.com/jamlong.
Since the below works:
reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)
do you still believe that model inheritance is broken?
Also, another question:
class MyModelSubclass(tf.keras.models.Model):
pass
model = MyModelSubclass()
model.save(tmpdir)
del MyModelSubclass  # delete class definition since user may not have access to it in a new runtime
reloaded_model = tf.keras.models.load_model(tmpdir)
print(type(reloaded_model))
What do you expect the last line to print?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/45781#issuecomment-770106477,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABE5IDW5IOXSFPOMNICCL3DS4NBNLANCNFSM4U7BGI4A
.

I confirm jamlong's observations. The following does not work for me; the reloaded model is of type Functional.
My use case: I train a custom model in one script, and I try to load the trained model in another script.

reloaded_model = tf.keras.models.load_model(tmpdir, custom_objects={"MyModelSubclass": MyModelSubclass})
assert isinstance(reloaded_model, MyModelSubclass)  # ASSERT --> reloaded_model = <tensorflow.python.keras.engine.functional.Functional object at 0x7f40d2908c50>

As a TensorFlow user, I concur with @jamlong as to the fact that the identified behavior is indeed an issue. I encounter it both with TF 2.3 and TF 2.4 (using Python 3.6 and 3.8 on various Linux-based systems).
I have implemented a custom Model (let's call it CustomModel) subclass to override some Functional behaviors (namely, to implement gradient accumulation and hack loss/metrics containers into supporting RaggedTensor inputs), and run into the exact same issue: in spite of it being registered (and even if I explicitly pass a custom_objects dict to reference it), depending on whether such a CustomModel has already been instantiated in the current thread, de-serialization from a save file and/or config dict will either produce a FunctionalModel or CustomModel.
This causes serious issues as depending on the restored class, the model will or will not implement behaviors that are absolutely necessary for my code to run. At the moment I am considering using a ugly hack that involves instantiating a CustomModel based on reloaded layers, optimizer, etc. gatherd from the FunctionalModel when the issue happens, but this is impractical since I would basically have to write such a hack for each and every of my custom Model classes - and I have quite a few - and would add unwanted elements to the computation graph, which is not nice for TensorBoard visualization (although this is rather minor).

Hi @monicadsong, thank you very much for your answer!
I will try and implement your suggested fix while waiting for TF 2.5 to land :)


LL 6474 - Add a banner alert on portfolio that points to LLD to update the firmware

LLM will now have a top banner to try to incent people to update their ledger through LLD.
Type
UI Polish
Context
LL-6474
Parts of the app affected / Test plan

Open the manager with an outdated Ledger.
The banner should appear and stay on every page. The banner should be pressable to open a drawer and closable.
Close the app, and open it again.
The banner should appear again.
(Optional) The banner should disappear when using an updated device again (So either go to 1. with a new device or the same updated one)

When I do the onboarding journey with an out of date Nano, the banner doesn't appear straight away. It only appears once I've accessed it from the manager. Is this expected? It might just be that a device is only counted as lastSeen when it has been opened in the Manager, however I would expect the banner to be visible if the out of date Nano was used to setup the app. @lambertkevin

LGTM (card created here to track potential UX improvements - https://ledgerhq.atlassian.net/secure/RapidBoard.jspa?rapidView=277&projectKey=LL&view=planning&selectedIssue=LL-7074&versions=visible&issueLimit=100)