Unable to set mindate, max date and default date

Can you please provide plunker example to set set mindate,max date and default UTC date and time using data binding.
UTC date:
dateObj: any = new Date();
todaysDate: string = new Date(this.dateObj.getUTCFullYear(), this.dateObj.getUTCMonth(), this.dateObj.getUTCDate(), this.dateObj.getUTCHours(), this.dateObj.getUTCMinutes()).toUTCString();
date2 = new Date(this.todaysDate);
This portion of code works in plunker which sets date to UTC but when i use same in my project its setting date to 11-08-0017 but time is setting correct.

This is invalid date 11-08-0017
Also the example using min-date and max-date is already in the app directory.
https://github.com/ng2-ui/ng2-datetime-picker/blob/master/app/app.component.ts#L34


Question about calculating word embeddings using pretrained model

In extract_features.py , word embeddings seems to be calculated by summing token, segment and positon embeddings. So the word embedding of "apple" in "Apple is a very good company" and "Apple is a kind of fruit" should be the same. However, I calculate with extract_features.py, the embeddings are NOT the same. What mistake did I make?

My understanding is that when using extract_features.py, the output are embeddings that the last layer of the BERT pre-trained model outputs. It therefore doesn't have to do with the embeddings that are created as a first step by summing token, segment and position embeddings. This first step is just intended to transform the text into an input for the pre-trained model. I base this on what I read in the documentation, namely that we obtain "pre-trained contextual embeddings, which are fixed contextual representations of each input token generated from the hidden layers of the pre-trained model". Let me know if that makes sense, I may be wrong :)

My understanding is that when using extract_features.py, the output are embeddings that the last layer of the BERT pre-trained model outputs. It therefore doesn't have to do with the embeddings that are created as a first step by summing token, segment and position embeddings. This first step is just intended to transform the text into an input for the pre-trained model. I base this on what I read in the documentation, namely that we obtain "pre-trained contextual embeddings, which are fixed contextual representations of each input token generated from the hidden layers of the pre-trained model". Let me know if that makes sense, I may be wrong :)

I think you are right. Thanks a lot.

https://github.com/google-research/bert#using-bert-to-extract-fixed-feature-vectors-like-elmo


React Capstone Project

https://github.com/killy10o10/space-travelers-capstone/projects/1

There are two people in the team. @Haadiiii  and @killy10o10

Hi @killy10o10 and @Haadiiii
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
Highlights
✔ Good Kanban board setup
Required Changes ♻

[ ] Based on the requirements, Decide who will be the assignee for the cards marked as group tasks All cards on your Kanban board should have assignees.

Check the comments under the review.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification @prolajumokeoni.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@prolajumokeoni  Thanks for the review

Hi @killy10o10 and @Haadiiii
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
Highlights

Your Kanban board setup is complete!

Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
You can also consider:

N/A

Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification @prolajumokeoni.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Github Backend doesn't work for remote sites

Describe the bug
For my test sytem using localhost as a domain, the authentication with Github
works perfectlty but fails for any remote site on the internet. On remote,  NetlifyCMS shows a dialog to sign in via Netlify but not Github.
To Reproduce
See: https://app.jekyll.one/apps/protected/netlify-cms/page/#cms_ui
Expected behavior
NetlifyCMS should present Sign in to GitHub
to continue to Netlify CMS  but not Netlify Authorisation redirect for  api.netlify.com like this https://api.netlify.com/auth?provider=github&site_id=app.jekyll.one&scope=repo
Applicable Versions:

Netlify CMS version: latest
Git provider: GitHub
OS:  all platform (Windows, Linux)
Browser: Chrome, Firefox

CMS configuration
backend:
  name: github
  repo: jekyll-one-org/j1-netlify-cms

I get managed NetlifyCMS to work using GH as an authorisation provider.  I created a simple web (based on my Jekyll template) on Netlify under: https://j1-netlify-cms.netlify.com/. I created an OAuth App
at GH for this site having a callback url for https://api.netlify.com/auth/done.
I added GH as an authentication provider on Netlify for this site using the credentials (client id and secret) I got from GH. It works!


Plugin: fix arity mismatch

Normal (Tot) plugins were expecting to be called with a full set
of arguments, including type arguments to be dropped, while
tactic plugins expected to be called on an already trimmed list. The
registry code was matching on the list of arguments and finding the
type arguments, but then passing them as-is to the interpretation
function. This meant that polymorphic Tac plugins were broken.
This fixes it by making all interpretation functions expected a trimmed
list.

Thanks!


Resolve promise inside of setCOSJSTargetFunction on NSAlert is stuck

When trying to resolve a promise inside of a setCOSJSTargetFunction which is set on a NSAlert, the process seems to be blocked by the NSAlert being opened. Is there a way to asynchronously open a NSAlert, so that the promises can be resolved while the NSAlert is opened? Maybe using DispatchQueue.main.async in some way?

That's not an skpm issue. Please ask the question on https://sketchplugins.com/


FIXED: Remove deletePacketTrap code. Not needed

Delete of ACLs for packet trap not needed. Chain is cleaned with -F anyway.

Current coverage is 39.66% (diff: 100%)

Merging #108 into master will increase coverage by 0.24%

@@             master       #108   diff @@
==========================================
  Files            20         20
  Lines          2971       2950    -21
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           1171       1170     -1
+ Misses         1701       1681    -20
  Partials         99         99

Powered by Codecov. Last update a4c8fb3...e8808a0


Flyway needs to respect JAVA_ARGS in order to connect to the database over TLS/SSL

The flyway package currently doesn't appear to respect the JAVA_ARGS environment variable.
This is documented upstream as the only way to connect to a database through TLS/SSL:

https://flywaydb.org/documentation/configuration/ssl
https://flywaydb.org/blog/jvm-properties

I believe the wrapper needs to include any user created JAVA_ARGS and spread that into the actual command to control JVM properties.
I tested this by using something like:
export JAVA_ARGS="-Djavax.net.ssl.trustStore=~/truststore.jks -Djavax.net.ssl.trustStorePassword=myPassword"

And the SSL connection to a postgres database still didn't work.

cc @CMCDragonkai


Active Directory White Listing

We are setting up a Bonobo server and are looking to use AD for authentication. Would it be possible to use AD to authenticate but only for a list of users?
I know this is possible by using AD Groups but it would fit our workflow better if the admin(s) could manage this list through the web interface rather than asking our systems team to add or remove users from groups.
Absolutely loving Bonobo so far. Seems  to do everything else we want.

Is it enough to have the admin add the user beforehand to the list of known users?

Same as #56 IMHO.
Please reopen if that method of white-listing users is not an option for you.


Odd formatting issue?

Since the latest release (1.3.2, downloaded this morning)... there are some odd formatting issues with Cupertino's output.

Duplicate of #246.

Fixed for 1.3.3.

Still seeing this in 1.3.3 :(


Fix typo in docs

Thanks for taking notice. However all the methods in JsonMachine class are static factories.
But since you're at it, would you like to shorten JsonMachine usages with use keyword in other places in README?

Forget what I said, you're right. Sorry. I have to learn to read diffs again 😂 Thanks, merging.


Switching Source/Identifier fields with Sequence

Source/Identifier is a fixed, random generated value.
Sequence is autoincrementing
Addresses Issue #13

Any process on this?

I have been using the build from my fork for a while now. It is not published to nuget, but you can download the package from github package repository: https://github.com/ladeak/LifxNet/packages/1063087


fix: use non deprecated custom inspect

Custom inspection with the inspect property is deprecated and will
not work in Node.js 11 anymore. This fixes it by using the custom
inspect symbol where existent and falls back to the old style in case
it does not exist.

I just pushed another commit to simplify it. That way it is always aligned, no matter if there are any changes to the actual inspection function.

Rebased and force pushed.

Ping @dead-horse

Should we backport this to 1.x as well perhaps?


Error

I get the following error:
Any fix?
https://gyazo.com/b632b8e63479a26f88d3f396f8710a04

um close the game if youre already idling  /  playing it elsewhere


Default Login redirect to newly created auth.

Hi, I am using default laravel login and your login, i can see the web.php route configured,
When i try my host (example.com) it is redirect to example.com/developer/login automatically,
If i type manually example.com/login its pointing to laravel auth, but some auth has changed like login controller etc.
Please help, thanks in advance.

can you show your web.php file?


Brush color and multiply

How to set the color for the ChartletBrush?
How to remove the blending of a brush?
Thanks!))

Color of Chartlet Brush Can't be changed now,  It‘s only used to print images to canvas.
Also, blendings can't be removed too. Instead, you can override the setupBlendOptions method on your own brush.

yes, I change the color of the brush, just paint over the image with a color, but I can not figure out how to apply the fill to the texture in the class.
setupBlendOptions - not applicable, I can't figure out what's wrong.
Can you tell me what parameters should be applied so that the brush draws like  ChartletBrush?
Thanks!

If you want to make your own chartlet brush, just extends your brush from the Printer class, like the ChartletBrush class do. In the Printer there are all settings for your needs, not only blend options,  but also shader functions.


Should be able to edit the title when in "edit mode"

https://www.psulions.com/education/sites/online-edu-networks/videos
Interesting point about "details" and title of a page (which is usually front and center) is not logical to be hidden behind other settings.

If you can create new pages through HAX... you should be able to edit title... also any custom fields (drupal specific)


allow richtext on papers + edit premade documents

About the PR
let players markup their fancy papers and edit existing ones (character sheet, books, …). includes a guidebook entry ('Writing').
should be checked for regressions to https://github.com/space-wizards/space-station-14/pull/17786 (i didn't see any)
caveats: (I don't consider any of these blockers)

KeybindTag is still usable for some reason.
markup-only changes sometimes aren't saved, but you can temporarily change the text as a workaround.

Depends on https://github.com/space-wizards/RobustToolbox/pull/4187
Media

[ ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl:

fix: Nanotrasen no longer uses disappearing ink for official books and documents.
add: New pen technology enables new stylish ways of writing. See the guidebook for more info.

test fail is erroneous

caveats: (I don't consider any of these blockers)
KeybindTag is still usable for some reason.
ColorTag doesn't work on paper.
markup-only changes sometimes aren't saved, but you can temporarily change the text as a workaround.

Those should be fixed before merging this PR imo.
The color not working might be because of the style that gets applied to paper RichTextLabel
  Element<RichTextLabel>().Class("PaperWrittenText")
      .Prop(Label.StylePropertyFont, notoSans12)
      .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#111111")),

Agreeing with Julian, especially as more markup gets added for use in guides/etc. Last thing we need is for players to be able to insert UI elements like links when those are introduced.


Add ability to train decoder using embedding-image pairs

I am implementing a single node training script for the decoder and it seems @lucidrains has implemented a wrapper script for this purpose that is already feature-full. Currently, the forward pass is implemented as follows:
https://github.com/lucidrains/DALLE2-pytorch/blob/1d5dc088109c5d606096d40bea59ff8c7b8e7d9f/dalle2_pytorch/train.py#L189-L199
This lacks the ability to substitute our own image embeddings in the case where we have precomputed embedding-image pairs. The functionality is already mostly supported by the Decoder network where image_embed can be passed to the forward method so this could be implemented by simply adding the image_embed parameter as a pass though to decoder.forward. However, it would also be convenient to make the clip model optional in the Decoder constructor. I already started on this a week ago in this branch by adding the ability to set clip_image_size and channels separately from a clip model.
There are only a few small changes that would be necessary to implement this feature so I could put together a pull request to do this.

@Veldrovive Hi Aidan! Indeed that is the case, and I can get this finished in the next half hour, been meaning to get around to it!

Great! For the DecoderTrainer are you thinking to just use kwargs for image_embed and not put a specific named parameter for it?

@Veldrovive yup, for wrapper i usually just forward kwargs to whatever is being wrapped (instead of using some fancy forwarding module)


[Feature] Add sDAQC strategy to Identity Initialised Ansatz

The Hardware Efficient Ansatz already supports a fully digital as well as sDAQC strategy. The identity initialized ansatz is automatically digital. We can also have an IIA with sDAQC. It just requires implementing an analog entangler (similar to the hea case), and initialize the trainable time parameter to zero to keep it identity initialized.

In the IIA, should periodic as the argument, be moved to an optional keyword argument, like **strategy_args in hea? Potentially breaking change if someone was using it without providing the name? Or can keep it how it is and then ignore in case the strategy is sDAQC?


Add multiple "" children for <etc_directory> tag

Actually the <etc_directory> tag of the maven plugin accepts only a string.
If multiple values are provided, they must be set in the same string with a separator.
Ex:
<plugin>
    <groupId>com.qwazr</groupId>
    <artifactId>qwazr-maven-plugin</artifactId>
    <configuration>
        <etc_directory>dir1;dir2</etc_directory>
    </configuration>
</plugin>

Possible enhancement:
<plugin>
    <groupId>com.qwazr</groupId>
    <artifactId>qwazr-maven-plugin</artifactId>
    <configuration>
        <etc_directory>
            <param>dir1</param>
            <param>dir2</param>
        </etc_directory>
    </configuration>
</plugin>

Definitely better +1.
Currently done and available in 1.0.1-SNAPSHOT.
I will also rename the properties etc_directory as etcDirectory and etc as etcFilter.


Uncaught Error: ENOENT: no such file or directory, lstat '/Users/bkrodg/Library/Application Suppo...

Loaded a file from the command line using open -a Atom <file>
Atom Version: 1.2.3
System: Mac OS X 10.11.1
Thrown From: Atom Core
Stack Trace
Uncaught Error: ENOENT: no such file or directory, lstat '/Users/bkrodg/Library/Application Support/com.github.atom.ShipIt/update.WB0OHau'
At ATOM_SHELL_ASAR.js:0

Error: ENOENT: no such file or directory, lstat '/Users/bkrodg/Library/Application Support/com.github.atom.ShipIt/update.WB0OHau'
    at Error (native)
    at fs.lstatSync (fs.js:844:18)
    at Object.fs.lstatSync (ATOM_SHELL_ASAR.js:189:16)
    at realpathSync (fs.js:1454:21)
    at Object.fs.realpathSync (ATOM_SHELL_ASAR.js:272:24)
    at toRealPath (module.js:109:13)
    at Function.Module._findPath (module.js:149:20)
    at Module._resolveFilename (module.js:334:25)
    at Function.Module._resolveFilename (/Users/bkrodg/Library/Application Support/com.github.atom.ShipIt/update.WB0OHau/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.require.resolve (module.js:388:19)

Commands

Config
{
  "core": {},
  "editor": {
    "invisibles": {}
  }
}

Installed Packages
# User
No installed packages

# Dev
No dev packages

Duplicate of #9559 and #7399, please subscribe there for updates.


Start and stop monitoring for regions

@stephencelis hopefully this can make it into next release 🤞🙏

oh, it looks like you've added this functionality already but it's still wip 🚧

Haha thanks for the PR, though! Timely!  Planning to release soon!


chore: complete ProofWidgets bump

See discussion on Zulip

maintainer merge

bors r+

bors merge

After this commit, the mathlib cache seems to no longer work for me:
$ git checkout ae7a2e405
$ git clean -xffd
$ lake exe cache get
info: cloning https://github.com/leanprover/std4 to ./lake-packages/std
info: cloning https://github.com/gebner/quote4 to ./lake-packages/Qq
info: cloning https://github.com/JLimperg/aesop to ./lake-packages/aesop
info: cloning https://github.com/mhuisi/lean4-cli.git to ./lake-packages/Cli
info: cloning https://github.com/EdAyers/ProofWidgets4 to ./lake-packages/proofwidgets
info: Downloading proofwidgets/v0.0.15/linux-64.tar.gz
info: Unpacking proofwidgets/v0.0.15/linux-64.tar.gz
info: [1/9] Building Cache.IO
info: [2/9] Compiling Cache.IO
info: [2/9] Building Cache.Hashing
info: [3/9] Compiling Cache.Hashing
info: [3/9] Building Cache.Requests
info: [5/9] Compiling Cache.Requests
info: [5/9] Building Cache.Main
info: [7/9] Compiling Cache.Main
info: [9/9] Linking cache
Attempting to download 1026 file(s)
Downloaded: 0 file(s) [attempted 1026/1026 = 100%] (0% success)
Warning: some files were not found in the cache.
This usually means that your local checkout of mathlib4 has diverged from upstream.
If you push your commits to a branch of the mathlib4 repository, CI will build the oleans and they will be available later.
Decompressing 2702 file(s)
unpacked in 1529 ms

$ lake build
[2/5] Building Mathlib.Tactic.PPWithUniv
...
[111/261] Building Mathlib.Tactic.Classical
[119/271] Building Mathlib.Util.AssertExists
[121/274] Building Mathlib.Init.Data.Fin.Basic
[127/274] Building Mathlib.Lean.Expr.Basic
[127/274] Building Mathlib.Tactic.PermuteGoals
[142/379] Building Mathlib.Tactic.Use
[142/380] Building Mathlib.Lean.Meta
[142/380] Building Mathlib.Tactic.GCongr.ForwardAttr
[154/460] Building Mathlib.Tactic.NthRewrite
...
[180/3726] Building Mathlib.Data.Buffer.Parser.Basic
[181/3726] Building Mathlib.Data.Buffer.Parser.Numeral
[183/3726] Building Mathlib.Lean.IO.Process
[183/3726] Building Mathlib.Lean.LocalContext
... (full rebuild )


medatada: make namespaces' deletion error less cryptic

The error message was unnecessary cryptic. snapshot-[name] notation
was only used here and hard to understand.
Instead it should say snapshots on "..." snapshotter.
Signed-off-by: Kazuyoshi Kato<EMAIL_ADDRESS>

Rebase to grab this should make the CI happier on Windows at least https://github.com/containerd/containerd/pull/6355

@dcantah Thanks! Rebased.


Update asp-net-core.md

Nit fix.

@AaronMaxwell
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


Buy-macro on first use

The first use of the buy macro (nothing has been found yet), but provisionally I like to start the macro right after opening PBS, leads to the following error:
Message: [string "PointBlankSniperTabFrame.Buy.BuyButton:Clic..."]:1: attempt to index global 'PointBlankSniperTabFrame' (a nil value)
Time: Thu Dec 22 06:26:58 2022
Count: 55
Stack: [string "PointBlankSniperTabFrame.Buy.BuyButton:Clic..."]:1: attempt to index global 'PointBlankSniperTabFrame' (a nil value)
[string "=(tail call)"]: ?
[string "=[C]"]: ?
[string "PointBlankSniperTabFrame.Buy.BuyButton:Click()"]:1: in main chunk
[string "=[C]"]: in function RunScript' [string "@Interface/FrameXML/ChatFrame.lua"]:2170: in function ?'
[string "@Interface/FrameXML/ChatFrame.lua"]:5224: in function ChatEdit_ParseText' [string "@Interface/FrameXML/ChatFrame.lua"]:4888: in function ChatEdit_SendText'
[string "@Interface/FrameXML/ChatFrame.lua"]:3132: in function <Interface/FrameXML/ChatFrame.lua:3125>
[string "=[C]"]: in function UseAction' [string "@Interface/FrameXML/SecureTemplates.lua"]:364: in function handler'
[string "@Interface/FrameXML/SecureTemplates.lua"]:690: in function <Interface/FrameXML/SecureTemplates.lua:672>
[string "@Interface/FrameXML/SecureTemplates.lua"]:704: in function <Interface/FrameXML/SecureTemplates.lua:697>
[string "@Interface/FrameXML/SecureTemplates.lua"]:746: in function SecureActionButton_OnClick' [string "@Interface/FrameXML/ActionButton.lua"]:109: in function TryUseActionButton'
[string "@Interface/FrameXML/ActionButton.lua"]:144: in function `ActionButtonDown'
[string "ACTIONBUTTON4"]:2: in function <[string "ACTIONBUTTON4"]:1>
Locals: (*temporary) = "down"
(*temporary) =  defined =[C]:-1

The error is from activating the macro before PBS has finished loading. This doesn't need fixing, just don't use the macro until the PBS tab is open.

I am in the PBS tab: Now I definitely have to wait until the first auction pops up. Only then the macro works. Otherwise the error message


Fix BQM.add_bqm to correctly sum duplicates

Codecov Report

Merging #831 (40046be) into main (535604c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #831   +/-   ##
=======================================
  Coverage   92.13%   92.13%
=======================================
  Files          63       63
  Lines        4652     4652
=======================================
  Hits         4286     4286
  Misses        366      366

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 535604c...40046be. Read the comment docs.


Update kompose completion

Updates Kompose completion with neutral language (using shell instead of
bash).
Fixes the indentation issues when outputting kompose completion --help

lgtm :+1:


Create whitepaper.md

Initial version of @erikzhang dBFT English paper, heavy edits coming soon

Will do that, after a lot of editing on the paper... Needs some work (especially with symbols, etc).

@anfn101 Hi, how is it going?

I just found this update had been merged due to other issue. @anfn101 you can edit upon this version:http://docs.neo.org/en-us/node/whitepaper.html


FileStack plugin Issue

Hi,
I added fileStack plugin,

..

...

var editor = grapesjs.init({
....
plugins: ['gjs-plugin-filestack'],
pluginsOpts: {
'gjs-plugin-filestack': {
key: 'A2uS7BnssSUSrxxxxxxx....',
    }
  },

...
});
it throws an error like
Uncaught ReferenceError: filestack is not defined
at grapesjs-plugin-filestack.min.js:2
at grapes.min.js:2
at Array.forEach ()
at Object.init (grapes.min.js:2)
at (index):45

@BharathSavitr Filestack itself is not included so you have to add it manually
<script src="https://static.filestackapi.com/v3/filestack-0.1.10.js"></script>


How get first entry in AccessController

Hi, how can i get first entry inside canAppend?
Or can i access orbitdb api inside canAppend?

Related to https://github.com/orbitdb/orbit-db/issues/680

Please see latest version of OrbitDB. If it does not meet your needs, please feel free to re-open this issue.


Bump version for 0.41.1 hotfix(tcgc, autorest)

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/600/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/600/


Common modules in main entry

I have following structure, components mostly are pages and they use "shared" modules, e.g. those which main.js module uses already. Is there a way to not include those module in chunks, but just keep them in main.js module?
        main.js     150 kB       0  [emitted]  main
components/1.js  315 bytes       1  [emitted]
components/2.js    8.06 kB       2  [emitted]
components/3.js    17.3 kB       3  [emitted]
components/4.js    6.32 kB       4  [emitted]
components/5.js  337 bytes       5  [emitted]
components/6.js    9.26 kB       6  [emitted]
components/7.js  462 bytes       7  [emitted]
components/8.js    8.67 kB       8  [emitted]

P.S. I know there is CommonsChunkPlugin but as I understand, it puts common module in separate file, but I need them in main module.

Okay, I see this now:

require.include can be useful if a module is in multiple child chunks. A require.include in the parent would include the module and the instances of the modules in the chunk chunks would disappear.

Seems like this won't work with bundle-loader, will need to handle loading myself.

You can do this with the CommonChunkPlugin.
new CommonsChunkPlugin({
  name: "main",
  minChunks: 4,
  children: true
})

Also try async: true this creates an async extra chunk which is loaded in parallel with the on-demand loaded chunks.

@sokra I understand how to load files :-) Let me explain in more details what I am trying to achieve, sorry if this is exactly that you are proposing here and I do not understand.
Let's say I have one main module main, two pages page1 and page2 and a utils module utils.

main is the only entry of the app and is loaded always and first.
page1 and page2 are chunks generated by the bundle-loader. They are loaded when specific page is navigated.
utils is the shared module which is referenced by all the other modules (main, page1, page2).

The goal is to include utils module it to the main entry alongside with main module and do not include it in page1 and page2. And not having an separate file for common modules like CommonsChunkPlugin does (if I correctly understand it).

Hmmm.. it seems that this line new webpack.optimize.CommonsChunkPlugin('main', null, false) does exactly what I wanted. Sorry for misunderstanding..

Forget to close. Thanks for answers here, I did not get that your initial response here worked as I wanted until I found some articles about CommonsChunkPlugin over internet.

@sokra now no one solution works, only adding require.include('module') in the main entry does the trick. Any ideas why?


Rename bootable components to providers

This PR renames "bootable component" (or "component" as it was confusingly termed in a few places) to "provider".
It includes a range of related changes in order for the end state to be coherent:

Renamed "bootable component" (or "component" in some places) to "provider"
Renamed the previous "provider" term to "source provider" - since it's job is to provide the source for a concrete provider within a container

With the source providers, there's no longer two different abstractions (previously these were "providers" offering a collection of individual "components") — now it's just source providers only, with each provider having a "group" name as a way to bring them together and avoid naming conflicts when multiple groups of source providers are being used

Renamed the key: param when using a source provider to source:
Renamed the provider "init" lifecycle hook to "prepare"
Clarified some of the terminology inside the Provider class itself:

The two possible blocks are passed as named arguments, rather than one of them as Ruby's implicit trailing &block
The first is called lifecycle_block, which is the block that should hold the definition of the actual provider lifecycle (this is provided by the block that users write themselves for their own providers, or by the source provider when using one of those)
The second is called refinement_block, which is the block that is passed only when using a source provider. In this case the job of this block is to refine the lifecycle already established by the source provider
Renamed the #finalize method to #apply, since its job is to apply the registrations from the lifecycle container into the target container. In addition, it's actually run more than once per provider (after both the "prepare" and "start" hooks), so "finalize" as a term didn't make sense anymore anyway.

Along with these name changes, I did a bunch of minor refactors where possible just to improve general clarity and separation of concerns.
There's a bunch of churn here to get these name changes in place, but the benefits should hopefully be clear. Chiefly, throughout the codebase (and in what we communicate to our users), we have just one name for this concept now, instead of two ("provider" instead of a mix of "bootable component" and "component", depending on which bit of code you were looking at).
There's benefit in the code too. For example, in the Booter we have the boot_dependency(component) method. What the component here was unclear previously, because we used the term "component" for multiple things. However, with this change now, this is the only place inside Booter that actually deals with a component (because everything else is now a provider), which means it's much clearer that we're dealing with a Dry::System::Component instance in this case.
TODO:

[ ] Add backwards compatibility as much as possible

This is effectively ready for review, @flash-gordon and @solnic — the only thing missing is API doc updates, plus any backwards compatibility and deprecation concerns. I'm going to move onto that tomorrow, but if you're interested in taking a look before then, please do!

I have one more API doc to update (the chunky one above Container.register_provider), but otherwise this is now fully done!
Even includes full backwards compat of and deprecation notices for the historical API, along with supporting tests.
@solnic @flash-gordon @jodosha This is ready for if/when you want to take a look. I'm going to be basing all future work on top of this branch, so if you're happy with the naming changes, be good for us to get this merged 😄

Thanks for checking this out, @solnic 😄
There's a bunch more tidying/clarifications I'd like to do, but I think we've bitten off enough for this particular PR! I'll merge it now and move onto more targeted efforts next.

FWIW, it'll be a week or more until all this is ready for a proper release, so please feel free to leave any additional thoughts on this PR in the meanwhile.


Skycatch

You can add Skycatch
Skycatch.com
WE made the announcement on slack on Monday.
WFH       | Travel        | Visitors | Events
Required| Restricted | Restricted | No encouraged

Is this issue taken care of? If not, happy to do the code. Do let me know ASAP. :)


Fail to build docker image locally

Description
I failed to build the Restler Docker image locally using instructions provided in README.
Steps to reproduce
# Clone the repo
git clone git@github.com:microsoft/restler-fuzzer.git
cd restler-fuzzer

# Check project version
git log --name-status HEAD^..HEAD
# commit 694cc9e63dc61b372ddab5c6648223e4329ee6fa

# Try to build an image
docker build -t restler .

Expected results
I expected a successfully built Docker image, that I will be able to use locally.
Actual results
[+] Building 3.9s (15/16)                                                                                docker:default
 => [internal] load build definition from Dockerfile                                                                     0.0s
 => => transferring dockerfile: 472B                                                                                0.0s
 => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0-alpine                                              0.7s
 => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0-alpine                                                 0.6s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [target 1/4] FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine@sha256:a48a7a54f543d1824bec45d65fe039659f727681a68f44e  0.0s
 => [builder 1/7] FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine@sha256:5c1cfd0241d775caf2c396a6de5fc9efe4260cdc31f19f2ef  0.0s
 => [internal] load build context                                                                                0.1s
 => => transferring context: 36.48kB                                                                                0.0s
 => CACHED [target 2/4] RUN apk add --no-cache python3 py3-pip                                                           0.0s
 => ERROR [target 3/4] RUN pip3 install requests applicationinsights                                                     3.0s
 => CACHED [builder 2/7] RUN apk add --no-cache python3 py3-pip                                                          0.0s
 => CACHED [builder 3/7] COPY src ./src                                                                                0.0s
 => CACHED [builder 4/7] COPY restler ./restler                                                                          0.0s
 => CACHED [builder 5/7] COPY build-restler.py .                                                                         0.0s
 => CACHED [builder 6/7] RUN python3 build-restler.py --dest_dir /build                                                  0.0s
 => CACHED [builder 7/7] RUN python3 -m compileall -b /build/engine                                                      0.0s
------
 > [target 3/4] RUN pip3 install requests applicationinsights:
2.130 error: externally-managed-environment
2.130
2.130 × This environment is externally managed
2.130 ╰─>
2.130     The system-wide python installation should be maintained using the system
2.130     package manager (apk) only.
2.130
2.130     If the package in question is not packaged already (and hence installable via
2.130     "apk add py3-somepackage"), please consider installing it inside a virtual
2.130     environment, e.g.:
2.130
2.130     python3 -m venv /path/to/venv
2.130     . /path/to/venv/bin/activate
2.130     pip install mypackage
2.130
2.130     To exit the virtual environment, run:
2.130
2.130     deactivate
2.130
2.130     The virtual environment is not deleted, and can be re-entered by re-sourcing
2.130     the activate file.
2.130
2.130     To automatically manage virtual environments, consider using pipx (from the
2.130     pipx package).
2.130
2.130 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
2.130 hint: See PEP 668 for the detailed specification.
------
Dockerfile:16
--------------------
  14 |
  15 |     RUN apk add --no-cache python3 py3-pip
  16 | >>> RUN pip3 install requests applicationinsights
  17 |
  18 |     COPY --from=builder /build /RESTler
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install requests applicationinsights" did not complete successfully: exit code: 1

Environment details
Linux, Docker 26.1.3

I am also seeing same error on Mac OS

I am seeing the same error on Windows 10

Linux randy-miller 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.8.11-1kali2 (2024-05-30) x86_64 GNU/Linux
Docker version 27.1.1, build 6312585
Docker Compose version v2.29.1

  restler:
    container_name:  restler
    build:
      context:       restler-fuzzer
    working_dir:     '/RESTler/restler'
    entrypoint:     './Restler'


Design QA - Banners on Sportsbook landing page

We need to update the banner design to match the following approach:

We have a top banner (that invite the user to sign up)
We have side banners that redirect the user to our other products (Trading / Betting Exchange)

Figma reference:
https://www.figma.com/file/wogMuUDylgOHgTEYhZ3jgp/Augur-Bet-UI?node-id=6732%3A219660

updated - closing


:wave: Welcome KodaDot One

We are moving all the internal packages under the KodaDot org and we will deprecate all @vue-polkadot packages in the upcoming weeks

:truck: replaced @vue-polkadot with @kodadot1
:broom: use @kodadot1 packages
:tada: moving minimark to @kodadot1

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Do a quick check before the merge.
PR type

[ ] Bugfix
[ ] Feature
[x] Refactoring

What's new?

[x] PR closes #2077
[ ] <brief_description_of_what_I've_added>

Before submitting Pull Request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[ ] I've tried respect high code quality standards
[x] I've didn't break any original functionality
[ ] I've posted screenshot of demonstrated change in this PR

/giphy test tube


Operation name not being logged

Hi,
I am trying to use Serilog to centralize logging exceptions and for Application Insights I would like to use this project.
Although the exception does get logged in Application Insights it lacks the parent operation name
I attach here a project that demostrates the issue using both Microsoft.ApplicationInsights.AspNetCore  and Serilog.Sinks.ApplicationInsights
When using  Microsoft.ApplicationInsights.AspNetCore I correctly get the parent operation:

When using Serilog.Sinks.ApplicationInsights I only get the exception, but no parent operation:

To test, just replace in both application insights your instrumitation key / connection string, and then run the appropiate configuration

Thanks!
InsightsLoggingAlternatives.zip

So analyzing the network call, I realized that ai.operation.name is not being sent to AI
when using Microsoft.ApplicationInsights.AspNetCore the following is being posted:
    "ai.application.ver": "<IP_ADDRESS>",
    "ai.cloud.roleInstance": "PC-MVD",
    "ai.operation.id": "540951cacb4095d87f89e8c00e62e3f1",
    "ai.operation.parentId": "ce1f02a301d748f7",
    "ai.operation.name": "GET Demo/TestExceptionLogging",
    "ai.location.ip": "::1",
    "ai.internal.sdkVersion": "il:2.22.0-997",
    "ai.internal.nodeName": "PC-MVD"

when using Serilog.Sinks.ApplicationInsights the following is being posted (which misses among other things the operation name):
   "ai.cloud.roleInstance": "PC-MVD",
    "ai.operation.id": "540951cacb4095d87f89e8c00e62e3f1",
    "ai.operation.parentId": "ce1f02a301d748f7",
    "ai.internal.sdkVersion": "dotnetc:2.22.0-997"

Hi, this issue is causing the azure function console to not display any logs beside executing / executed one

I've found a workaround until this issue is officially fixed
I've created a custom Trace converter that is adding the operation_Namevalue. Also note the true values when calling the base.FowardPropertiesToTelemetryProperties. The most important is the value of includeLogLevel without it "LogLevel" do not display in the azure invocation screen

public class MyTelemetryTraceConverter : TraceTelemetryConverter
{
    public override void ForwardPropertiesToTelemetryProperties(LogEvent logEvent, ISupportProperties telemetryProperties, IFormatProvider formatProvider)
    {
        base.ForwardPropertiesToTelemetryProperties(logEvent, telemetryProperties, formatProvider, true, true, true);
        if (telemetryProperties is ITelemetry telemetry
            && string.IsNullOrWhiteSpace(telemetry.Context.Operation.Name)
            && logEvent.Properties.TryGetValue("AzureFunctions_FunctionName", out LogEventPropertyValue value))
        {
            telemetry.Context.Operation.Name = value.ToString().Trim('"');
        }
    }
}


Color palette option for red-green color blindness

This looks really useful, but for 5% of the male population that is red-green color blind I think this might not work very well.
Perhaps it would be useful to offer an option for red-green color blind people?
https://usabilla.com/blog/how-to-design-for-color-blindness/

Closing this in favor of the more generic request (#94) to support custom output formatters. Would not say no to a pull request adding such support!


docs(hybrid) add status API docs for hybrid data plane

https://github.com/Kong/kong/pull/7429
Review

@reviewer
Summary

Reason

Testing

I think this feature is expanded in Kong Enterprise, where those endpoints can be prefixed with /<workspace>.
Where should I put the node mentioning those endpoints are workspace-aware? I know we also have a hybrid mode
doc for EE in like app/enterprise/2.4.x/deployment/hybrid-mode.md

I think this feature is expanded in Kong Enterprise, where those endpoints can be prefixed with /<workspace>.
Where should I put the note mentioning those endpoints are workspace-aware? I know we also have a hybrid mode
doc for EE in like app/enterprise/2.4.x/deployment/hybrid-mode.md

So Enterprise has a Hybrid Mode Overview in the Deployment Options section of Installation here: https://docs.konghq.com/enterprise/2.4.x/deployment/hybrid-mode/ - I looked at the EE Admin API guide and did not see an endpoint that prefixes those endpoints with /workspace - so I am unsure what you are referencing.


fix: Restrict read permissions for config file

Adds an extra mode parameter to the _install method that writes the config file so that we can restrict its read permissions.
Also removes unnecessary test numbers in a separate commit.

@aieri - would appreciate your +1 again since my commit dismissed your review :sweat_smile:


Update timestamp bug - no longer updates

With v0.10.4, a feature was added that lets you set your own updated timestamp:
https://github.com/bookshelf/bookshelf/commit/381c9b54cfa1fbfe071cfb85c551362096923b0d
However this breaks the standard use case where an existing record's timestamp gets updated automatically. Instead of setting a new updated_at timestamp, it'll just reuse whatever value was there before.

Thank you for reporting this issue. We should definitely add a test to check this behaviour.

yeah , max priority this fix and the test @dj-hedgehog

Just found this issue after debugging a test in a project of mine that depends on model[updatedAtKey] actually updating on save() and can verify this line as the root cause. It's a no-op for any update operation where model[updatedAtKey] already contains a value.

thanks for the catch! 👍
we have to understand how to differenciate between the model being updated know and the version already saved... any advice?
in case this is impossible I will revert the change in the next release...
in the mean time @jackwanders  can you describe this test of yours? is it possible to adapt it for our codebase? we are in need for a check for this piece of code :)

we have to understand how to differenciate between the model being updated know and the version already saved... any advice?

From this question, I infer that there is a desire to only change the value of the updatedAtKey field if there is a legitimate change to the entity being saved, as opposed to changing the value of the updatedAtKey upon every save, regardless of whether there is any real change to the record. Is that correct?
Based on the old code here, it appears the logic was that the updatedAtKey field always changed. Is it inappropriate to simply keep that contract in place?

without #1583 it's impossible to update easily the created_at and updated_at columns, because they are managed exclusively by bookshelf
In theory this is great and for the majority of cases this is the right behaviour, but for some edge cases, like the one proposed by @nil1511 , one would want more refined controls

Looking at the pull request from which this change originated (https://github.com/bookshelf/bookshelf/pull/1583), it appears that the intent is this:

If a save is executed on a model, and the new set of attributes includes either createdAtKey or updatedAtKey, then apply those values to the appropriate fields of the model.

However, that's not what the code is doing, based on my understanding of the logic.  Let's take a simple example model:
var car = Model.forge({
  make: 'Ford'
  model: 'Mustang',
  color: 'red'
})

Let's then say that I change the color of the car:
car.save({color: 'blue'});

This call would eventually hit this line which executes the .timestamp() function which adds created_at and updated_at attributes to the hash of attributes that are being updated, if appropriate.
Here is the current code in question within .timestamp() (with comments added by me)
// attributes = {color: 'blue'}
// this.attributes = {make: 'Ford', model: 'Mustang', color: 'red', created_at: '2017-07-19T14:05:01.402Z', updated_at: '2017-07-19T14:05:01.402Z'}

if (updatedAtKey) {
    // if the model already has a 'updated_at' value, add that current value to the hash of
    // attributes that are being updated
    attributes[updatedAtKey] = this.attributes[updatedAtKey]
      ? new Date(this.attributes[updatedAtKey])
      : now;
  }

  if (createdAtKey && method === 'insert') {
    // if the model already has a 'created_at' value, add that current value to the hash of
    // attributes that are being updated
    attributes[createdAtKey] = this.attributes[createdAtKey]
      ? new Date(this.attributes[createdAtKey])
      : now;
  }

  // attributes = {color: 'red', created_at: '2017-07-19T14:05:01.402Z', updated_at: '2017-07-19T14:05:01.402Z'}
  this.set(attributes, options);

From this, it's obvious that not only is the updated_at field not being updated to the current time, but the assumed goal of consuming an updated_at value provided in attributes is not being realized either.
I would assume that the code should look like this:
if (updatedAtKey) {
  attributes[updatedAtKey] = attributes[updatedAtKey]
    ? new Date(attributes[updatedAtKey])
    : now;
}

if (createdAtKey && method === 'insert') {
  attributes[createdAtKey] = attributes[createdAtKey]
    ? new Date(attributes[createdAtKey])
    : now;
}

  this.set(attributes, options);

Note that now we are using the updated_at and created_at values provided via the incoming attributes hash, and not those that already exist within the model. This would seem to achieve the goal set out in #1583.

in #1607 I propose a change, discuss there and tell me if you are ok with that

Fixed with #1607

@Playrom What's the timeline for this making it into a numbered release?

as soon as we'll fix some other issue we will push a new 0.10 dot release

Great, looking forward :)

Is there any way I can assist in turning this into a release sooner?

asap

+1 A release of this would be useful please. I'm having to downgrade 0.13.0.

Can you please reopen this?

@icflorescu The issue is solved in the master but no new version has been released yet.

@tgriesser Any help on putting out a new release?
It would also be immensely helpful for us to document the process for making new releases. I put a card on this repo's github projects: https://github.com/bookshelf/bookshelf/projects/1#card-5247809


[Android] BoxShadow appears randomly when Canvas/Box size is dynamic

Description
Hello everyone,
I have a problem with the BoxShadow component.
My application must have neumorphic elements. But I want my element to be able to have dynamic sizes (flex, percentages, ...). I also need to be able to put whatever I want in my elements not just Skia components, so I need a Canvas with another View above it.
I achieved this by using the onLayout callback on a parent view that has a dynamic or fixed size and I apply the size returned by onLayout on my canvas and on my Box. It works on IOS but on Android the BoxShadows are not drawn every time, or sometimes they are drawn multiple times.
Do you have any solution to resolve the bug or it's related to the core library ?
Thank you for your help
Version
0.1.157
Steps to reproduce
You can see what I do in the Snack.
I also put a simple Box with fixed values, and as you can see sometimes this Box is also not drawn either
It's random so sometimes all boxes are drawn and sometimes only one or no boxes are drawn
Snack, code example, screenshot, or link to a repository
Here is a snack with what I'm doing :
https://snack.expo.dev/@jaws_tm/276ee9

Thanks for your answer, first I used the onSize property but since I need to have a canvas bigger than the parent div (otherwise the shadows are cut by the canvas) I can't directly size the canva.
 So I get the parent size with
onLayout (50x50) and I add 20 of ""padding"" so size the canvas with 90x90, then put my canvas relatively with an offset of x:-20; y:-20. Finally I add another View who contain the content above the canvas.
I don't know if it's very clear, don't hesitate to ask me for more details if necessary.

Hi William,
You can check this snack : https://snack.expo.dev/@jaws_tm/276ee9
And as you can see the onSize doesn't work. There is something wrong in my code ?
Thanks

The example seems to work correctly?
The original issue was about shadows, but this example is not using shadows anymore.
Could you please to the following:

Try on the latest version of RN Skia (we fixed a lot of issues that SDK 48 doesn't have)
If there are one or more issues (one size not working or shadows not working), provide us with the smallest reproducible example that showcases the issue.
I hope this helps.


About using the Images

Hello,
First of all, Thank you for providing this awsome dataset, which all beginner can access easily.
I have a plan to open a basic competition by using this dataset.
Fortunately, data is provided by CC0 but the image, which describe palmerpenguins data and is in readme.md has no aligned liscence.
I  want to ask this dataset provider ,that I can use the images
(Ofcourse I clearly define the source)
thanks

I see the guideline of artwork now
Thanks


Improve the BUG template

Pull Request Template
Description
This PR improves the bug report template to create a more standardized format for contributors. The goal is to streamline the documentation of bug reports, making it easier for contributors to report issues consistently and for maintainers to troubleshoot effectively. Changes include clearer instructions and additional fields for screenshots and environment details.
Fixes #61
Type of Change
Check the relevant option(s):

[x] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (change that affects existing functionality)
[ ] Documentation update (changes to documentation only)
[ ] Chore (cleanup or minor improvement that does not alter functionality)

Checklist

[x] My code follows the project's style guidelines.
[x] I have performed a self-review of my code.
[x] I have commented on my code, especially in hard-to-understand areas.
[x] I have made corresponding updates to the documentation.
[x] My changes produce no new warnings or errors.
[x] I have added tests to verify my fix or feature.
[x] All new and existing unit tests pass locally with my changes.

Screenshots (if applicable)
N/A
Additional Information
This PR is part of the larger effort to improve documentation and standardize templates for contributors. This update includes more descriptive prompts for each section to make the bug report process more intuitive for new contributors.

@Git21221 the task has been completed. Kindly review the PR


Fixed (probably) a typo in src/model.js

Hello,
It's not a typo error. It's the optionnal chaining that has been finally added in the node v14.
Our two lines are not doing the same :
const match = datas.VIDEO_NUMBER?.match(/(?<=of )\d+/gi, '');
const match = datas.VIDEO_NUMBER.match(/(?<=of )\d+/gi, '');

The first one :
const match = datas.VIDEO_NUMBER?.match(/(?<=of )\d+/gi, '');

Could be done in node v12 or under like this :
const match = datas.VIDEO_NUMBER === null || datas.VIDEO_NUMBER === undefined ? null : datas.VIDEO_NUMBER.match(/(?<=of )\d+/gi, '');

It tests first that you datas.VIDEO_NUMBER exist and has been defined for applying the match function.
If you want more informations about it : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
Why I am using that instead of the v12 ways that could give me a better compatibility ?
Because the latest LTS version of Node is v14, so everyone should turn to that version.
And also, I wanna try Node v14. I am already coding at my work in Node v14, Node v12 and Node v8 syntax ;)
But nice that someone see it :)

I created this pr because I'm using Node v12, but now I guess I'll just create my own fork for Node <= 12

Oh ! I see.
You actually make me rethink about it, I will make it Node v12 and Node v10 compatible over the weekend.
Node v10 is still on until mid next year and Node v12 until April 2022.
So after second thoughts, it would be nice to support it too.

I did not see that you push a correction to your first fix.
const match = datas.VIDEO_NUMBER === null || datas.VIDEO_NUMBER === undefined ? null : datas.VIDEO_NUMBER.match(/(?<=of )\d+/gi, '');
datas.VIDEO_NUMBER = match[0];

It's the idea but it will break.
If datas.VIDEO_NUMBER is null. You will give to match a null value. In the next line you will try to access the index 0 of match. Crash.
I fixed it in #30 if you are curious ;)


[SPARK-42789][SQL] Rewrite multiple GetJsonObjects to a JsonTuple if their json expressions are the same

What changes were proposed in this pull request?
This PR adds a new rule to rewrite multiple GetJsonObjects to one JsonTuple if their json expressions are the same and the path is .name. For example:
=== Applying Rule org.apache.spark.sql.catalyst.optimizer.RewriteGetJsonObject ===
!Project [get_json_object(a#0, $.c1) AS c1#3, get_json_object(a#0, $.c2) AS c2#4, get_json_object(b#1, $.c1) AS c3#5, get_json_object(b#1, $.c2) AS c4#6, get_json_object(c#2, $.c1) AS c5#7]   Project [c1#13 AS c1#3, c2#14 AS c2#4, c1#15 AS c3#5, c2#16 AS c4#6, get_json_object(c#2, $.c1) AS c5#7]
!+- LocalRelation <empty>, [a#0, b#1, c#2]                                                                                +- Generate json_tuple(b#1, c1, c2), false, b, [c1#15, c2#16]
!                                                                                +- Generate json_tuple(a#0, c1, c2), false, a, [c1#13, c2#14]
!                                                                                +- LocalRelation <empty>, [a#0, b#1, c#2]

Please note that it needs to rewrite the path, otherwise it will not get the correct value. For example:
spark-sql (default)> SELECT get_json_object('{"name": "alice", "age": 5}', '$.name') AS name;
alice
spark-sql (default)> SELECT name lateral view json_tuple('{"name": "alice", "age": 5}', '$.name') a AS name;
NULL
spark-sql (default)> select name lateral view json_tuple('{"name": "alice", "age": 5}', 'name') a AS name;
alice

Why are the changes needed?
Improve query performance.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit test and benchmark test.
Benchmark result:

No. of   GetJsonObjects
Default(ms)
Rewrite to JsonTuple(ms)
Relative

2
37914
24887
1.5X

3
52862
26752
2.0X

4
71680
28452
2.5X

5
108479
36830
2.9X

10
153952
32436
4.7X

15
224950
34806
6.5X

20
293155
38148
7.7X

25
366037
45725
8.0X

30
439567
52949
8.3X

35
526481
60586
8.7X

cc @cloud-fan

We also encountered the same problem, this optimization rule is very useful.

Hi @wangyum , can we get this updated? seems a useful optimization

@cloud-fan has updated the code.

The benchmark result is thrilling, can we ship it?


unexpected behavior of defaultTags

Hello!

Vote on this issue by adding a 👍 reaction
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details
The AWS provider ignores changes to defaultTags after a resource has been created unless other attributes are being changed
Steps to reproduce

Specify some defaultTags and create a bucket. The bucket has the tags as expected:

~/tmp/wtf/defaultTags$ cat index.ts
import * as aws from "@pulumi/aws";

const bucket = new aws.s3.Bucket("bucket-with-default-tags", {bucket: "bucket-with-default-tags"});
~/tmp/wtf/defaultTags$ cat Pulumi.dev.yaml
encryptionsalt: v1:ggyom6IhdG8=:v1:sJqljlbglc8JJgpe:jYzdmym/+StNPwPbn+7uIpAIL+fKLA==
config:
  aws:region: eu-west-1
  aws:defaultTags:
    tags:
      Tag1: value1
      Tag2: value2
~/tmp/wtf/defaultTags$ pulumi up --diff
Previewing update (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
    + aws:s3/bucket:Bucket: (create)
        [urn=urn:pulumi:dev::defaultTags::aws:s3/bucket:Bucket::bucket-with-default-tags]
        [provider=urn:pulumi:dev::defaultTags::pulumi:providers:aws::default_4_23_0::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
        acl         : "private"
        bucket      : "bucket-with-default-tags"
        forceDestroy: false

import * as aws from "@pulumi/aws";
Resources:
    + 1 to create
    1 unchanged
Do you want to perform this update? yes
Updating (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
    + aws:s3/bucket:Bucket: (create)
        [urn=urn:pulumi:dev::defaultTags::aws:s3/bucket:Bucket::bucket-with-default-tags]
        [provider=urn:pulumi:dev::defaultTags::pulumi:providers:aws::default_4_23_0::8510e26a-009d-460f-a5e1-4f5e95a6af22]
        acl         : "private"
        bucket      : "bucket-with-default-tags"
        forceDestroy: false
Resources:
    + 1 created
    1 unchanged

Duration: 11s
~/tmp/wtf/defaultTags$ aws s3api get-bucket-tagging --bucket bucket-with-default-tags
{
    "TagSet": [
        {
            "Key": "Tag1",
            "Value": "value1"
        },
        {
            "Key": "Tag2",
            "Value": "value2"
        }
    ]
}

Add some new tags to the defaultTags and attempt an update, which shows no diff and results in no changes:

~/tmp/wtf/defaultTags$ echo '      Tag3: value3' >> Pulumi.dev.yaml
~/tmp/wtf/defaultTags$ echo '      Tag4: value4' >> Pulumi.dev.yaml
~/tmp/wtf/defaultTags$ cat Pulumi.dev.yaml
encryptionsalt: v1:ggyom6IhdG8=:v1:sJqljlbglc8JJgpe:jYzdmym/+StNPwPbn+7uIpAIL+fKLA==
config:
  aws:region: eu-west-1
  aws:defaultTags:
    tags:
      Tag1: value1
      Tag2: value2
      Tag3: value3
      Tag4: value4
~/tmp/wtf/defaultTags$ pulumi up --diff
Previewing update (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
Resources:
    2 unchanged
Do you want to perform this update? yes
Updating (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
Resources:
    2 unchanged

Duration: 3s
~/tmp/wtf/defaultTags$ aws s3api get-bucket-tagging --bucket bucket-with-default-tags
{
    "TagSet": [
        {
            "Key": "Tag1",
            "Value": "value1"
        },
        {
            "Key": "Tag2",
            "Value": "value2"
        }
    ]
}

Change another property of the bucket and observe how the new tags are also added to the bucket (but are not being shown in the preview):

~/tmp/wtf/defaultTags$ vim index.ts
~/tmp/wtf/defaultTags$ cat index.ts
import * as aws from "@pulumi/aws";

const bucket = new aws.s3.Bucket("bucket-with-default-tags", {
    bucket: "bucket-with-default-tags",
    acl: "authenticated-read",
});
~/tmp/wtf/defaultTags$ pulumi up --diff
Previewing update (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
    ~ aws:s3/bucket:Bucket: (update)
        [id=bucket-with-default-tags]
        [urn=urn:pulumi:dev::defaultTags::aws:s3/bucket:Bucket::bucket-with-default-tags]
        [provider=urn:pulumi:dev::defaultTags::pulumi:providers:aws::default_4_23_0::8510e26a-009d-460f-a5e1-4f5e95a6af22]
      ~ acl: "private" => "authenticated-read"
Resources:
    ~ 1 to update
    1 unchanged
Do you want to perform this update? yes
Updating (dev):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::defaultTags::pulumi:pulumi:Stack::defaultTags-dev]
    ~ aws:s3/bucket:Bucket: (update)
        [id=bucket-with-default-tags]
        [urn=urn:pulumi:dev::defaultTags::aws:s3/bucket:Bucket::bucket-with-default-tags]
        [provider=urn:pulumi:dev::defaultTags::pulumi:providers:aws::default_4_23_0::8510e26a-009d-460f-a5e1-4f5e95a6af22]
      ~ acl: "private" => "authenticated-read"
        --outputs:--
      ~ tagsAll                          : {
            Tag1: "value1"
            Tag2: "value2"
          + Tag3: "value3"
          + Tag4: "value4"
        }
Resources:
    ~ 1 updated
    1 unchanged

Duration: 15s
~/tmp/wtf/defaultTags$ aws s3api get-bucket-tagging --bucket bucket-with-default-tags
{
    "TagSet": [
        {
            "Key": "Tag1",
            "Value": "value1"
        },
        {
            "Key": "Tag4",
            "Value": "value4"
        },
        {
            "Key": "Tag3",
            "Value": "value3"
        },
        {
            "Key": "Tag2",
            "Value": "value2"
        }
    ]
}
~/tmp/wtf/defaultTags$

Expected:

I expected the Tag3 and Tag4 to be added to the bucket in step 2.
I also expected the preview in step 3 to show the addition of Tag3 and Tag4 given that it has added them in the update.

Actual:

Tag3 and Tag4 were not added in step 2
Addition of Tag3 and Tag4 was not shown in preview of step 3

Inspiration for this issue report: https://stackoverflow.com/a/68829181/13846505

@leezen any updates on this by any chance :)?

Anyone know of a workaround for this? I already have a stack with hundreds of resources, and I want to add a common tag to all of them. I was hoping I could use defaultTags to do this. Is there another way that doesn't require manually tagging them all?

@mwcampbell you can use something like https://www.pulumi.com/blog/automatically-enforcing-aws-resource-tagging-policies/#automatically-applying-tags .

Any update on this? Or workaround? Almost a year later this still seems to be an issue, defaultTags don't seem to be appearing in any diff at all, and it also doesn't trigger the update of resources.
@filip-zyzniewski your alternative sounds promising, but it includes maintaining a long list of resources which are taggable (https://github.com/joeduffy/aws-tags-example/blob/master/autotag-py/taggable.py). Or is there any source of those resources? (eg: somewhere in the pulumi sdk?)

@filip-zyzniewski your alternative sounds promising, but it includes maintaining a long list of resources which are taggable (https://github.com/joeduffy/aws-tags-example/blob/master/autotag-py/taggable.py).

The way we are approaching this now is:
import pulumi
import pulumi.resource as res
import typeguard

def is_taggable(resource):
    internal_init = getattr(type(resource), "_internal_init", None)
    if not internal_init:
        return False
    tags_type = internal_init.__annotations__.get("tags", None)
    if not tags_type:
        return False
    try:
        typeguard.check_type("tags", {"": ""}, tags_type)
    except TypeError:
        return False
    return True

def register_auto_tags(**auto_tags):
    def add_tags(
        args: res.ResourceTransformationArgs,
    ) -> res.ResourceTransformationResult:
        props = args.props
        if is_taggable(args.resource):
            props = dict(props)
            props["tags"] = auto_tags | (props.get("tags") or {})
        return res.ResourceTransformationResult(props=props, opts=args.opts)

    pulumi.runtime.register_stack_transformation(add_tags)

Also running into this. A fix would be much appreciated.

This behaviour makes defaultTags effectively useless.
Is there a clear root cause of the issue? If the Terraform provider performs as-expected then this is a Pulumi-specific issue, correct?
If anyone internal to Pulumi could point the community in the right direction here, I'm sure there might be someone (possibly me) who would be willing to help with pushing a fix.

I'm pleased to say that the next release of the AWS provider v5 will contain a fix for this issue. Thanks all for your patience and understanding.

Thank you for jumping on this, I was one of the enterprise customers who called out how bad this issue was impacting my organization.

@AaronFriel, I updated @pulumi/aws to the latest version, and indeed defaultTags were updated for most resources. However, this still doesn't work for resources created with @pulumi/awsx. Will you publish a new version of that package as well?
To clarify, I have resources created with @pulumi/aws and @pulumi/awsx in the same stack. The resources created with @pulumi/aws picked up the new default tags as expected, but those created via @pulumi/awsx were not updated and kept the old, bad behaviour.


Not able to connect to Memgraph via IPv6 host addres

Create a IPv6 network:
docker network create --ipv6 --subnet 2001:db8::/64 ip6net
Start Memgraph in IPv6 network:
docker run --name memgraph --network ip6net -p 7687:7687 memgraph/memgraph:2.20.0 --log-level=TRACE --also-log-to-stderr --telemetry-enabled=False
Keep in mind that now Bolt port works both for IPv4 and IPv6 networking.
maple@big-bang:~$ ss -tuln | grep LISTEN
tcp   LISTEN 0      4096                                     <IP_ADDRESS>:7687       <IP_ADDRESS>:*
tcp   LISTEN 0      128                                    <IP_ADDRESS>:631        <IP_ADDRESS>:*
tcp   LISTEN 0      4096                               <IP_ADDRESS>%lo:53         <IP_ADDRESS>:*
tcp   LISTEN 0      128                                      <IP_ADDRESS>:22         <IP_ADDRESS>:*
tcp   LISTEN 0      1024                                   <IP_ADDRESS>:43509      <IP_ADDRESS>:*
tcp   LISTEN 0      4096                              <IP_ADDRESS>:54544      <IP_ADDRESS>:*
tcp   LISTEN 0      4096                                        [::]:7687          [::]:*
tcp   LISTEN 0      4096   [fd7a:115c:a1e0:ab12:4843:cd96:6240:958d]:54544         [::]:*
tcp   LISTEN 0      128                                        [::1]:631           [::]:*
tcp   LISTEN 0      128                                         [::]:22            [::]:*

You can disable IPv4 network access by setting the port like this: -p '[::]::7687'
This can be checked via: docker container inspect memgraph --format "{{json .NetworkSettings.Ports}}"
The problem is that connection to the [::] [::1] or IPv6 address from the container "GlobalIPv6Address": "2001:db8::2", does not work in any way, and results in the following errors, depending how you change the driver or URI config:
maple@big-bang:~/repos/mgconsole/build/src$ ./mgconsole --host=2001:db8::2
Connection failure: couldn't connect to host: Connection refused

Neo4j driver:
Error: Couldn't connect to [::]:7687 (resolved to ('[::]:7687',)):
Failed to read any data from server ResolvedIPv6Address(('::', 7687, 0, 0)) after connected (deadline <neo4j._deadline.Deadline object at 0x70d036001de0>)

maple@big-bang:~/repos/mgconsole/build/src$ ./mgconsole --host=ip6-localhost
mg_raw_transport_recv: Connection reset by peer
Connection failure: failed to receive handshake response

Snippets:
from neo4j import GraphDatabase

URI = "bolt://[::]:7687"
AUTH = ("", "")
employee_threshold=10

def main():
    with GraphDatabase.driver(URI, auth=AUTH) as driver:
        with driver.session(database="") as session:
            for i in range(100):
                try:
                    session.run("CREATE (a:Person {name: 'Alice'})")
                except Exception as e:
                    print(f"Error: {e}")

main()

import mgclient

try:
    conn = mgclient.connect(host='[::]', port=7687)
    cursor = conn.cursor()
    cursor.execute("CREATE (a:Person {name: 'Alice'})")
    cursor.close()
    print("Success")
except Exception as e:
    print(f"Error: {e}")

Context:
maple@big-bang:~$ cat /etc/hosts
<IP_ADDRESS>	localhost
<IP_ADDRESS>	big-bang

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

We also need to document/test similar for monitoring server.


Fonts referenced in exported SVGs no longer work

Exported SVGs reference https://excalidraw.com/FG_Virgil.woff2 and https://excalidraw.com/Cascadia.woff, but those are no longer served as fonts. They are serving the application just like https://excalidraw.com/.
To reproduce:

Create a drawing with text
Export as SVG
Open the SVG in a browser

Expected Virgil as the font:

Seeing a fallback font:

/cc @ad1992


allow tools to optionally terminate the execution of LLM-powered functions

I have a project where I would like an LLM to iteratively improve a code snippet with the help of various tools.
One of those tools invokes a interpreter with the updated code that the LLM came up with, as often as required.
Once the interpreter invocation succeeds without error, there is no reason to return to the LLM-powerd function again, instead the LLM-powered function could simply return as well.
As far as I could tell from the docs it is currently not possible for user-written tools to do this.
The following comment makes me think something like this might be possible, since tool invocation is already used to terminate the execution of LLM-powered functions:

magentic uses function calling / tool calls to return most of these objects. list[int] gets converted into a function called "return_list_int" that GPT can choose to use, and if chosen the response gets parsed into a list[int] by magentic.
Originally posted by @jackmpcollins in https://github.com/jackmpcollins/magentic/pull/144#discussion_r1520392721

Thanks for the suggestion. I had to think about it, but now it makes sense to me.
My code is quite similar, so you got the idea right.
The main differences being that I was using @prompt_chain and did not have FunctionCall as one of the return parameters.
@prompt_chain("""
    Modify the following code until it runs without error:
    ```
    {code}
    ```
     """
    functions=[run_code_and_get_feedback]
)
def llm(code:str) -> str: ...

code = # some sensible code snippet
working_code = llm(code)

I think there were two flaws with how I was trying to do this.
Flaw 1
Eventually I realized that function calling in current LLMs seems to be much more primitive than I expected, and they are probably trained not to invoke run_code_and_get_feedback more than once (see also https://community.openai.com/t/function-calls-multiple-function-calls-to-same-function/348937). Though I was only able to actually test this with the OpenAI API so far.
Flaw 2
The reasons I wanted to use @prompt_chain and invoke run_code_and_get_feedback over and over again were

that I thought this way the LLM get to see the initial prompt as well as all of the previous  run_code_and_get_feedback  invocations and the returned errors in the same context.
I also thought that this would be more efficient, since the context for the ongoing llm invocation could be updated with the output of from run_code_and_get_feedback before proceeding to generate output.

It would be really great if you could clarify the following:
Is my assumption right that the 'scope' of the LLMs context is the current invocation of the decorated function?
If yes, does making this work with @prompt_chain imply magentic stitching together the context from the prompt and all of the interleaved LLM responses and results from tool invocations and passing that as the next input to the LLM, or can that process happen more efficiently (in terms of tokens)?

Thanks @mnicstruwig for answering here.
@mschwaig to answer your questions

Is my assumption right that the 'scope' of the LLMs context is the current invocation of the decorated function?

For @prompt and @chatprompt when the function is called only the message(s) that are in the decorator will be passed to the LLM and only one query will be made to the LLM. A way to think of these is that they only add a single "assistant" message to the chat.
@prompt_chain makes a call to the LLM and if the response is a FunctionCall (for a function in the functions argument) then prompt_chain automatically calls that, appends the result to the chat, and makes another call to the LLM. This continues until the LLM returns something that is not a FunctionCall, which is returned as the final result.
You are correct that in both cases the "chat" with the LLM exists only during the decorated function's invocation.

If yes, does making this work with @prompt_chain imply magentic stitching together the context from the prompt and all of the interleaved LLM responses and results from tool invocations and passing that as the next input to the LLM, or can that process happen more efficiently (in terms of tokens)?

The @prompt_chain decorator is just continuing the chat conversation by adding the function call results. To summarize the chat history or exclude certain messages you would have to do something custom. There is the Chat class in magentic which is used internally by prompt_chain and would help with this - I haven't documented it yet and might change the API slightly. You can see how it's used in @prompt_chain here.
Another idea that might work for your use case is to have two prompt-functions, one for code + error -> updated code and one for code -> testing_function. You could then control the loop in python. This would mean the previous errors/fixes are not visible to model but there is no cumulative context. Something like

from enum import Enum

class TestType(Enum):  # Enums to codify categorical options
    INTERPRETER = "interpreter"
    LINTER = "linter

@prompt(
    """How should this code be tested?

    {code}
    """
def choose_test -> TestType: ...

@prompt(
    """Update the following code based on the error.
    Error: {error}

    {code}
    """
def update_code(code: str, error: str) -> str: ...

code = "<initial code>"
for _ in range(10):  # Could while loop until code doesn't change?
    test_type = choose_test(code)
    test = get_test_for_test_type(test_type)
    test_result = test(code)
    code = update_code(code, test_result)

@prompt_chain should work for this use case. Here's some imperfect but mostly-working code to demonstrate. I found that the model likes to jump straight to the solution, so more prompt-engineering is probably required.
from magentic import prompt_chain, OpenaiChatModel

def submit_code_for_evaluation(description_of_changes: str, lines_of_code: list[str]) -> str:
    code = "\n".join(lines_of_code)  # Avoids JSON serialization issues with newlines

    print("\n---\n")
    print("Running code")
    print("Changes:", description_of_changes)
    print()
    print(code)
    try:
        exec(code)  # DANGER: Be careful what code you let this execute
        print("Result: Success")
        return "Success"
    except Exception as e:
        print(f"Error: {e}")
        return f"Error: {e}"

@prompt_chain("""
    Modify the following code until it runs without error.
    Use the available tools to test the code after each modification.
    First test the initial code before making any changes.
    Then make a small change to correct the error and test again.
    Before returning the final code, test it to make sure it works.
    Do not describe the error or changes between attempts.
    When it is working, return just the code with no extra text.
    ```
    {code}
    ```
    """,
    functions=[submit_code_for_evaluation],
    model=OpenaiChatModel("gpt-4"),
)
def llm(code: str) -> str: ...

code = """
def fib(n):
    '''Return the nth number in the Fibonacci sequence'''
   raise NotImplementedError

assert fib(5) == 5
assert fib(7) == 55
"""
working_code = llm(code)

Printed output

---

Running code
Changes: Initial test before making any changes.

def fib(n):
    '''Return the nth number in the Fibonacci sequence'''
   raise NotImplementedError

assert fib(5) == 5
assert fib(10) == 55
Error: unindent does not match any outer indentation level (<string>, line 3)

---

Running code
Changes: Fixing the indentation error in the raise statement.

def fib(n):
    '''Return the nth number in the Fibonacci sequence'''
    raise NotImplementedError

assert fib(5) == 5
assert fib(10) == 55
Error:

---

Running code
Changes: Implementing the fib function.

def fib(n):
    '''Return the nth number in the Fibonacci sequence'''
    if n <= 1:
       return n
    elif n == 2:
       return 1
    else:
       a, b = 0, 1
       for _ in range(n - 1):
           a, b = b, a + b
       return b

assert fib(5) == 5
assert fib(10) == 55
Result: Success

Returned output
```
def fib(n):
    '''Return the nth number in the Fibonacci sequence'''
    if n <= 1:
       return n
    elif n == 2:
       return 1
    else:
       a, b = 0, 1
       for _ in range(n - 1):
           a, b = b, a + b
       return b

assert fib(5) == 5
assert fib(10) == 55
```

@mschwaig  I'm going to close this issue. Please reopen or create a new issue if the above answers don't resolve this. Thanks


Sorbet defines private method in non-private scope first, causing it to be seen by another library

Input
~→ View on sorbet.run~
some_rails_generator.rb
# typed: strict
# frozen_string_literal: true

require "rails/generators"

class SomeRailsGenerator < Rails::Generators::NamedBase
  extend T::Sig
  source_root File.expand_path("../templates", __FILE__)

  sig { void }
  def do_generation_stuff
    puts "Creating a file here"
  end

  private

  sig { void }
  def a_private_method
    puts "Doing private stuff"
  end
end

(Credit to @paracycle for originally deriving the root issue here.)
When using Sorbet method signatures in a Rails generator, powered by Thor, private methods are briefly defined in a public scope and then their scope is redefined while disabling the method_added hooks, but other libraries method_added hooks can not be disabled. This leads a library like Thor to have its method_added hook triggered and result in it seeing the method as a public method initially.
Observed output
$ rails g some_rails a_name
Creating a file here
Could not find command "a_private_method".

Expected behavior
$ rails g some_rails a_name
Creating a file here

Additional Information
Rails 7.0.3
Thor 1.2.1
sorbet-static-and-runtime 0.5.9964
Workaround
Wrapping the methods in a Thor no_commands block resolves this.
  private

  no_commands do
    sig { void }
    def a_private_method
      puts "Doing private stuff"
    end
  end

Removing method signatures also resolves this.
  private

  def a_private_method
    puts "Doing private stuff"
  end

Hello,
I was bit by this issue earlier, and investigated in a sorbet only environment.
# typed: true

require 'sorbet-runtime'

class MethodSpy
  def self.method_added(m)
    puts "#{self.name} => #{self.protected_instance_methods.inspect}"
  end
end

class UncheckedFoo < MethodSpy
  protected
  def bar
  end
end

class Foo < MethodSpy
  extend T::Sig

  protected
  sig { void }
  def bar
  end
end

UncheckedFoo => [:bar]
Foo => [:bar]
Foo => []

The methods are added back in gems/sorbet-runtime/lib/types/private/class_utils.rb:99 and visibility restored after, and as joevgreathead mentioned, method_added callbacks from other ancestors are still being called, meaning those checking on method visibility get the wrong information.
Ruby: 3.1.2p20
Sorbet:
sorbet (0.5.10032)
sorbet-runtime (0.5.10032)
sorbet-static (0.5.10032)


Upgrade package set, add runAndEmitStoreT, selectEmitter, fork instances

Summary
This PR contains the following changes:

[x] Upgrades package set to 0.14.7-20220303 and PureScript 0.14.7 52cde690c8557a1111b21a2f692bdbb92dec49e2
[x] Adds purescript-language-server to the nix shell 8a09a591400fe20f5f5c09735ef3f605236c5016
[x] Adds a new entrypoint API runAndEmitStoreT fd6031ba87d8a4a683ca2c212345701c6e1481a6
[x] Extracts the logic of applying a selector to and emitter from emitSelected to selectEmitter (this makes runAndEmitStoreT more ergonomic to use in a performant way) d2450ab2d5d4947e31b449646ffefc9921183301

This change includes a bugfix: The Emitter returned by emitSelected cannot be subscribed to multiple times (which can also happen implicitly when using higher-order combinators with the resulting emitter, e.g. <*> and <|>). This was due to the mutable Ref used to track the previous derived value being shared between subscribers. Now a new mutable ref is created for each new subscriber.

[x] Adds StoreT instances for purescript-fork typeclasses: MonadFork, MonadKill, MonadBracket 25f5340

Details
runAndEmitStoreT
Adds a new entrypoint API function that allows the caller to obtain an
emitter from the store in addition to a component. This can be used to
react to store changes outside of the component.
An example application for this is persisting values from the store to
local storage or some other persistence mechanism. Without this
capability, one must perform these tasks inside their Halogen component's
handleAction when they receive new Input. This couples the component
with the persistence layer. Even if the concrete persistence mechanism is
injected, the component will still be aware that persistence is required.
With this concern handled outside the component, a "plug-in" style of
architecture is enabled, allowing the driver to opt-in or out of
persistence as desired. For example, a test driver that hosts a
component does not need to mock or configure any peristence layer to run
the component, but a production driver is still free to do so as
required.
selectEmitter
Moved the logic of applying a selector to an emitter from
Halogen.Store.Monad to Halogen.Store.Select in a new function
selectEmitter. This allows the logic of applying a selector to an
emitter to be reused outside of selectEmitted, for example, when
running an application via runAndEmitStoreT.

By the way, please let me know if you'd prefer me to PR these changes individually. They can be easily separated (except for fixing the bug in selectEmitted and extracting selectEmitter). I decided to batch them together because the PR size was still relatively small, and the changes make sense together (runAndEmitStoreT is not as ergonomic without selectEmitter, and selectEmitter is not very useful without runAndEmitStoreT), so I reasoned it would be useful to discuss and review them together, as they provide context for each other. I also thought the additional instances and package set upgrades would be fairly uncontroversial and straightforward, so didn't see the benefit of incurring the overhead of an additional PR for them.

I have a few comments but I'm on board with the change overall. I think this makes sense as a single PR, and I don't mind the package set updates. Thanks!

Thanks for the quick review! I've applied all your suggested edits.


Add convenience functions to map sparse tensor to/from cupy and jax

Having conversion functions going across pytorch and cupy/jax for sparse tensors would be useful.
Basic example supporting torch->cupy COO tensors:
# Convenience function to map a torch COO tensor in a cupy one
def coo_torch2cupy(A):
  A = A.data.coalesce() # Maybe this should raise if the input is not coalesced as it may mess up with gradients otherwise
  Avals_cp = cp.asarray(A.values())
  Aidx_cp = cp.asarray(A.indices())
  return cp.sparse.coo_matrix((Avals_cp, Aidx_cp))

This relates to https://github.com/cai4cai/sparsitypreservingtorchutils/issues/5

Added basic conversions to/from jax and cupy csr and coo


ViT-Demo

I find the ViT-Demo in the vitis-ai-2.5, examples/transformer.
I find there is only the .xclbin file that complied by VCK5000? I want to develop it in U250, Could you share the files that how to build the .xclbin？？？

Hi @hocken-li , The VIT demo released in VAI2.5 only can be supported by VCK5000.  There is no corresponding xclbin for U250. Thanks!

Hi @hocken-li , The VIT demo released in VAI2.5 only can be supported by VCK5000. There is no corresponding xclbin for U250. Thanks!

Hi, @SuZhan0322
May I ask you a question?
I have buy the VCK5000 and try the demo, but it didn't success
The dmesg is
Run BERT_Base:

[XCLBIN    ] ./testcase/bert_base.xclbin
[MODEL     ] ./testcase/bert_base.bm
[INPUT     ] ./testcase/squad1.1/dev-v1.1.json
[THREADNUM ] 3
Begin parsing dateset...
Finish parsing dateset
======= Total Number of Examples: 10570
======= Total Number of features: 21363
XRT build version: 2.14.384
Build hash: 090bb050d570d2b668477c3bd0f979dc3a34b9db
Build date: 2022-12-09 00:55:08
Git branch: 2022.2
PID: 8292
UID: 1001
[Thu Jul 27 11:09:14 2023 GMT]
HOST: host-scut-hg-fpga-1
EXE: /data/Vitis-AI/lhq_workspace/VCK5000_BERT_Demo_2.5.0/build/bin/bert_accuracy
[XRT] ERROR: See dmesg log for details. err = -22
terminate called after throwing an instance of 'xrt_core::system_error'
  what():  failed to load xclbin: Invalid argument
./test_accuracy.sh: line 24:  8292 Aborted                 (core dumped) ./build/bin/bert_accuracy -b ./testcase/bert_base.xclbin -m ./testcase/bert_base.bm -i ./testcase/squad1.1/dev-v1.1.json -v ./testcase/squad1.1/vocab_en.txt -t 3
calculating the accuracy...
Traceback (most recent call last):
  File "/data/Vitis-AI/lhq_workspace/VCK5000_BERT_Demo_2.5.0/scripts/evaluate-v1.1.py", line 104, in <module>
    with open(args.prediction_file) as prediction_file:
FileNotFoundError: [Errno 2] No such file or directory: 'demo_pred.json'

[ 1844.159927] cgroup: cgroup: disabling cgroup2 socket matching due to net_prio or net_cls activation
[ 1898.756014] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 1
[ 1898.756145] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.756163] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 2
[ 1898.756279] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.756296] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 3
[ 1898.756881] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.769300] xocl 0000:56:00.1: xmc.u.18874370 ffff9ca876ce2010 xmc_read_from_peer: reading from peer
[ 1898.769320] xocl 0000:56:00.1: mailbox.u.9437186 ffff9ca876ce1410 _mailbox_request: sending request: 10 via HW
[ 1898.785982] xclmgmt 0000:56:00.0: mailbox.m.9437186 ffff9ca8d7669010 process_request: received request from peer: 10, passed on
[ 1898.785993] xclmgmt 0000:56:00.0: xclmgmt_read_subdev_req: req kind 0
[ 1898.786081] xclmgmt 0000:56:00.0: mailbox.m.9437186 ffff9ca8d7669010 mailbox_post_response: posting response for: 10 via HW
[ 1898.873139] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_read_from_peer: reading from peer
[ 1898.873147] xocl 0000:56:00.1: mailbox.u.9437186 ffff9ca876ce1410 _mailbox_request: sending request: 10 via HW
[ 1898.873518] xclmgmt 0000:56:00.0: mailbox.m.9437186 ffff9ca8d7669010 process_request: received request from peer: 10, passed on
[ 1898.873528] xclmgmt 0000:56:00.0: xclmgmt_read_subdev_req: req kind 1
[ 1898.873557] xclmgmt 0000:56:00.0: mailbox.m.9437186 ffff9ca8d7669010 mailbox_post_response: posting response for: 10 via HW
[ 1898.874450] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.874494] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.874580] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.875468] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 4
[ 1898.875568] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.875959] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 5
[ 1898.876050] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.876131] xocl 0000:56:00.1:  ffff9ca8ddb170b0 _xocl_drvinst_open: OPEN 6
[ 1898.876519] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_create_client: created KDS client for pid(5280), ret: 0
[ 1898.926384] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.926820] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.927198] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_cached_ocl_frequency: no cached data for 3
[ 1898.985189] [drm] Finding MEM_TOPOLOGY section header
[ 1898.985191] [drm] Section MEM_TOPOLOGY details:
[ 1898.985193] [drm]   offset = 0x29654f0
[ 1898.985193] [drm]   size = 0x80
[ 1898.985222] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_download_bitstream_axlf: check interface uuid
[ 1898.985235] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_fdt_check_uuids: Can not find uuid e221a0ff8695d5eb8725fc65147f90c3
[ 1898.985238] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_download_bitstream_axlf: interface uuids do not match
[ 1898.985241] xocl 0000:56:00.1: icap.u.22020098 ffff9ca8d7686410 icap_download_bitstream_axlf: err: -22
[ 1898.985246] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_read_axlf_helper: Failed to download xclbin, err: -22
[ 1899.196907] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5336)
[ 1899.196914] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 7
[ 1899.196922] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5337)
[ 1899.196924] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 6
[ 1899.196931] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5338)
[ 1899.196933] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 5
[ 1899.196939] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5338)
[ 1899.196940] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 4
[ 1899.196944] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5336)
[ 1899.196946] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 3
[ 1899.196950] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_destroy_client: client exits pid(5337)
[ 1899.196951] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: CLOSE 2
[ 1899.196954] xocl 0000:56:00.1:  ffff9ca8ddb170b0 xocl_drvinst_close: NOTIFY<PHONE_NUMBER>f6eff0

It seems is the uuid not match? How to solve it?
What is the Platform of the xclbin file? Is gen4×8_xdma_base_2 or gen4x8_qdma_base_2 ???
My VCK5000 Platform is already xilinx_vck5000_gen4x8_qdma_base_2. Is that the problem of the error?

Hi @hocken-li , Thanks for your feedback! Please install the "xilinx_vck5000_gen3x16_xdma_base_1" platform which released in VAI2.5.   Thanks!

Hi, @SuZhan0322
Thanks for your reply. There is a bad new that the latest VCK5000 platform "xilinx_vck5000_gen4x8_qdma_base_2" implements some features that make it incompatible with previous platforms (especially SC version 4.4.35).  So it is not success for me to return back to the platform "xilinx_vck5000_gen3x16_xdma_base_1".
Will you guys build ViT/BERT xclbin files on this platform? Why is it not available in VAI3.0?
Or are there any Tutorials to build it?
Thanks!

Hi @hocken-li , the VIT/BERT_base's xclbin need to match the platform version.  And the ViT/BERT's xclbin will not update on VCK5000. For transformer-related updates, please pay attention to the Ryzen AI release. Thanks!


Allow globs for regex exceptions

Codecov Report

Merging #266 into master will decrease coverage by 3.36%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##            master     #266      +/-   ##
===========================================
- Coverage   100.00%   96.63%   -3.37%
===========================================
  Files           47       47
  Lines         2547     2556       +9
===========================================
- Hits          2547     2470      -77
- Misses           0       86      +86

Impacted Files
Coverage Δ

statick_tool/exceptions.py
100.00% <100.00%> (ø)

...tatick_tool/plugins/tool/uncrustify_tool_plugin.py
65.21% <0.00%> (-34.79%)
:arrow_down:

statick_tool/plugins/tool/xmllint_tool_plugin.py
77.77% <0.00%> (-22.23%)
:arrow_down:

statick_tool/plugins/tool/cppcheck_tool_plugin.py
82.97% <0.00%> (-17.03%)
:arrow_down:

...tatick_tool/plugins/tool/perlcritic_tool_plugin.py
85.18% <0.00%> (-14.82%)
:arrow_down:

...tatick_tool/plugins/tool/clang_tidy_tool_plugin.py
85.91% <0.00%> (-14.09%)
:arrow_down:

statick_tool/plugins/tool/cccc_tool_plugin.py
91.08% <0.00%> (-8.92%)
:arrow_down:

statick_tool/discovery_plugin.py
95.83% <0.00%> (-4.17%)
:arrow_down:

statick_tool/statick.py
98.57% <0.00%> (-1.43%)
: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 0f6d9a7...1701648. Read the comment docs.

Tested locally and it successfully allows a message on one file to be reported, but not a file that matches my glob.


A problem in full_domain_spider

I think there is a  problem with this code in full_domain_spider:
for link in LxmlLinkExtractor(unique=True).extract_links(response):
    if not response.url in self.already_crawled:
        self.already_crawled.add(link.url)
        yield WebdriverRequest(link.url, callback=self.parse_item)
    else:
        print "avoiding request for: ", response.url

When yielding requests for scrapy, the spider tests response.url if it is already crawled instead of link.url.
I think the code should be:
for link in LxmlLinkExtractor(unique=True).extract_links(response):
    if not link.url in self.already_crawled:
        self.already_crawled.add(link.url)
        yield WebdriverRequest(link.url, callback=self.parse_item)
    else:
        print "avoiding request for: ", link.url

Thank you for pointing this out! You absolutely correct. I updated the code and pushed the changes to github.