Weird message at build time

For some reason, after I pull the main branch after commit 4d464cc9fb3052c3e9ffb70fa739cabd952cbe41, I got this weird message. I tried to set my RUSTPYTHONPATH to /path/to/Lib but still got this error. Here is the spec of MacOS ventura version 13.1.

Stack trace
    Finished dev [unoptimized + debuginfo] target(s) in 2.32s
     Running `target/debug/rustpython`
encodings initialization failed. Only utf-8 encoding will be supported.
Traceback (most recent call last):
  File "_frozen_importlib", line 1286, in __import__
  File "_frozen_importlib", line 1207, in _gcd_import
  File "_frozen_importlib", line 1176, in _find_and_load
  File "_frozen_importlib", line 1179, in _find_and_load
  File "_frozen_importlib", line 1153, in _find_and_load_unlocked
  File "_frozen_importlib", line 1150, in _find_and_load_unlocked
  File "_frozen_importlib", line 1150, in _find_and_load_unlocked
  File "_frozen_importlib", line 706, in _load_unlocked
  File "_frozen_importlib", line 704, in _load_unlocked
  File "_frozen_importlib", line 697, in _load_unlocked
  File "_frozen_importlib", line 691, in _load_unlocked
  File "_frozen_importlib_external", line 936, in exec_module
  File "_frozen_importlib_external", line 1071, in get_code
  File "_frozen_importlib_external", line 729, in _compile_bytecode
EOFError: marshal data too short

The above exception was the direct cause of the following exception:

RuntimeError: Could not import encodings. Is your RUSTPYTHONPATH set? If you don't have access to a consistent external environment (e.g. if you're embedding rustpython in another application), try enabling the freeze-stdlib feature
Welcome to the magnificent Rust Python 0.2.0 interpreter 😱 🖖

It happens because our buils system is not good at detecting frozen lib changes.
Try clean build including removing pylib directory entirely. It helped

@coolreader18 do you have any idea why it fails to rebuild well?

I think it's not actually at build time, this kind of error can be fixed by deleting all the .pyc files at build time. We should really start bumping the bytecode version so it automatically detects that it's incompatible

omg that makes sense


Remove diagnostics, reflection support, debug info generation

Most of the new issues users are facing are due to these.

Diagnostics

I've long maintained that testing is not the place to look for type errors. Testing is to test the functionality implemented. Moreover, Jest doesn't enable this scenario because the transformers only receive one file at a time. If there's a requirement to check the code in a file against the rest of the files, Jest needs to be provide the supporting structure for it.
I caved in and accepted a PR with this feature but regret the decision now - this isn't something that absolutely needs to be in ts-jest

Reflection support

I see the need for reflection support but the current implementation doesn't seem to have fixed any open issue related to them. For this reason, I'd like the related parts to be removed from the main branch. It can still continue to be available in another branch (or a fork). Once it is in working condition, it can be merged in

Debug info generation

most new issues state that the debug file is not being generated. If this doesn't have a simple fix, it should be removed and the issue template updated accordingly

The intent behind this is to trim the codebase to the parts that work and cut out the rest of it because all it does is make maintenance difficult.

On diagnostics and reflection support:

What do you propose for type-errors then, e.g. for CI? Running tsc --noEmit? I'm not sure this is a reasonable request of people, since they might have e.g. subprojects
Either way we need to decide this reasonably quick - let's get it into the next round of breaking changes.
I don't think the code is particularly messy - e.g. it's reasonably well sectioned off. On the other hand I agree it hasn't actually fixed anything.
I'd like to be able to publish the repo to npm? Should we publish the other branch under a different tag, or something like that?
Agree. I think we should open a new issue and investigate - I think the debug info can be valuable, but if it only works half the time, we should remove it.
Anecdotally, I sometimes think ts-jest is hard to debug when developing, and I do actually use the debug infrastructure to aid me in that.

Hm, I'm not sure. It's an opt-in performance problem though, only. So does it really matter?

Yeah I'm okay with keeping it in a seperate fork. I think I saw a bot that published PR's on npm under namespaces at some point, e.g. ts-jest@pr-ts-language-server for any outstanding PR's. could that work too?

Let's keep it in for now I think. I'll spend some time investigating why it only works sporadically when I have the time.

It's opt-in but we already have had a couple of issues related to performance for it. If it was something that would just sit in quietly and help users, it'd be fine. But it being supported makes users (rightly) expect good performance - I don't see how performance in that can be improved. Until it can, this can also remain in fork if you still want this in.

Okay then, this can be forked - I'm fine with any naming scheme but think putting it under a namespace might be challenging because that should also involve moving ts-jest under the namespace (which would be too disruptive). A separate package (ts-jest-experimental, ts-jest-extra, etc.) should do I think.

Fair enough - this isn't as urgent and can be removed later if needed

I think that's fair enough. The performance should be improved when we implement a proper language server API. (At least there's a comment in ts-node saying it's 3x faster)

Sorry - not a namespace. I meant a label, like @beta , @alpha @pre-release or something like that.

Agree.

okay. We should probably maintain this in another branch instead of a fork then

how do you want to proceed?

Agree.

First one to rip the code out and put it in another branch gets a cookie?
I think we should just do all the breaking changes, and then wait with releasing until next jest release, assuming it is soon. I've tweeted to try and figure out their release schedule https://twitter.com/GeeWengel/status/998899189840056322
I'll try to figure out if we can publish branches automatically somehow.
I'm at https://www.npmjs.com/~geewee if you want to give me publish access (brand new account - aww yeah!)

What's the (2) reflection / language server issue?  Is the goal to spawn a single instance of the languageService, then allow all processes in Jest's worker pool to read from it?

@GeeWee I've added you on npm. A couple of things (for security reasons)

please enable 2FA on your npm account
if it looks like you intend to or can't work on ts-jest for an extended period of time, please let me know so that I can temporarily revoke your account's access to ts-jest on npm

I'll try to figure out if we can publish branches automatically somehow.

I think this should work - on a branch, set the package version to something like actual-version-experimental, add and publish a tag to Github from that branch, npm publish from that branch.

2FA is enabled.
Agree.

Yeah optimally we'd allow all workers to read from the same languageServer. It seems like the languageServer transpiles a lot of different files for each file, and I'd hate to do a lot of IO for each file, for each process.

I was using the Language Service for a couple of days, in a large project.
From what I learned is;

I found quite a couple of issues that otherwise I would have missed using the traditional module compiler.
Was way faster when using diagnostics over enableTsDiagnostics
Also, I am not sure about this, but potential this could have solved the const enum issue.

Yeah it potentially solves const enum. I think we'll add it back in, but we're not there quite yet I think.

First of all, I did read the whole thread rapidly, sorry if I missed something.
I just wanted to add here before someone tries to re-implement something that might have been worked on in beta branch. Here is what exists in beta branch now, published as @next and described in #697, related to what is in this thread:

diagnostics: user can filter which code(s) are throwing or not, and from which file(s)
type-checking (ie using language service) is working, and fast
debug file is relative to cwd, and can even be defined with an absolute path (TS_JEST_LOG, defaulting to ts-jest.log when old var TS_JEST_DEBUG is set to true). It's much more complete, and in JSON format

const enum are working when typeCheck: true is set (and we are thinking about making typeCheck = true by default once we have enough feedback and/or could benchmark it more)
@cspotcode the new ts compiler part of ts-jest's code has been heavily inspired from ts-node. Here an ugly but quite understandable diagram of how ts-jest works in beta branch:

Yes, with the beta (which will become the regular release the next major version), this issue isn't that relevant. It can be closed after the next major version is released

...and I'm actually realizing that in the compiler one part needs to be added: custom AST transformers are called. For now only the one to hoist jest.mock calls, but plan is to read some other files. It could be useful for modules using ts-jest to build jest presets such as react and especially angular. What's missing in beta for that is only the "read from config which files to use as custom transformers and use them!". Format for those files should actually be the same format as the on in src/transformers/ dir.

Do you want to use my hoisting implementation or do you have your own?
One thing to keep in mind, jest's Babel hoister does 2 things: it hoists
calls and it throws diagnostics when hoisted declarations access variables
that they shouldn't.  In TypeScript this is best handled by a language
service plugin, so I started writing one.
On Sun, Sep 2, 2018, 10:15 AM Huafu Gandon<EMAIL_ADDRESS>wrote:

...and I'm actually realizing that in the compiler one part needs to be
added: custom AST transformers are called. For now only the one to hoist
jest.mock calls, but plan is to read some other files. It could be useful
for modules using ts-jest to build jest presets such as react and
especially angular. What's missing in beta for that is only the "read from
config which files to use as custom transformers and use them!". Format for
those files should actually be the same format as the on in
src/transformers/ dir.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kulshekhar/ts-jest/issues/529#issuecomment-417933856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW-uP7rV42QOulY1hcdiPTwwMGwByChks5uW-f-gaJpZM4UGEv5
.

@cspotcode you should definitely come on slack so we can talk about this ;-)
Briefly: hoisting is done, I've tried your PR (quickly, or at least I think it was your PR) but couldn't make it work - anyway I saw it after I implemented mine :-/
Language service is done and we are actually talking about whether it should be the default instead of isolated modules.
But yeah, please come over slack so we can chat better about it ;-)


grunt-browserify not working with parcelify?

It seems grunt-browserify async call is preventing parcelify async calls from working properly.

It seems it's because async.setImmediate have some conflict with parcelify

Can you give a more verbose example of what is going wrong?


Sync eng/common directory with azure-sdk-tools for PR 7276

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/7276  See eng/common workflow

/check-enforcer override


Persona Bar not showing admin pages for Administrators

Description of bug
After you created a new page under the Admin page, only superusers are shown the menu item in the Persona Bar. Administrators cannot see the new page.
Steps to reproduce
From Persona Bar:

Add a new page (e.g "Test"), select "Admin" as your Parent Page, enable the Display in menu and Save.
Login as Host user. You will see the "Test" menu appear under the Manage section in the Persona Bar.
Login as Administrator and the "Test" menu does not appear even after forcing a hard refresh.

Current behavior
Page created under Admin parent page are not showing in the Persona Bar for Administrators.
Expected behavior
Any page created under Admin parent page with show in menu should appear for Administrators.
Screenshots
New page created under Admin parent page with Display in menu.

This is what you see as Administrator

This is what you see as Host. Notice the Test menu item shows up.

Additional context
I found similar issue discussed in the old JIRA DNN-10608 and is unresolved.
Affected version
This tested in DNN 9.2 and 9.6.

[x] 09.02.02
[x] 09.06.01

Affected browser

[x] Chrome
[x] Firefox
[x] Safari

Issue ist still existing in DNN 9.10.2, so this should be re-opened.

Agree. I was able to confirm the problem still exists in in DNN 9.9.1

Issue ist still existing in DNN 9.10.2, so this should be re-opened.

Confirmed

This shouldn't be closed before it's resolved...

Please can we have an update on this issue, is it even being looked at? Otherwise, this thread will just keep closing.
Is there an update on the horizon or is it just NOT been considered?


Clarify RGB support in AVC encode on both Linux and Windows

Please clarify RGB support in AVC encode on both Linux and Windows. Currently MediaSDK manual doesn't say anything about it but this functionality definitely works on Windows out-of-the-box.
If I hardcode libva caps to report VA_RT_FORMAT_YUV422 | VA_RT_FORMAT_YUV444, AVC encode from RGB surfaces on Linux seems to work fine.
If there are no concerns, I propose to describe the possibility in the manual.
Driver declares support with VDEnc:
https://github.com/intel/media-driver/blob/master/docs/media_features.md#hardware-encoding-low-power-encodingvdenchuc

@DenWolf any updates?


ExtraTrees returns NaN for std

yield (check_minimize, minimizer, bench1, 0., [(-2.0, 2.0)], 0.05, 75) with et_minimize produces
scikit-optimize/skopt/acquisition.py:165: RuntimeWarning: invalid value encountered in greater
  mask = std > 0

and std is:
(Pdb) print(std)
[  0.00000000e+00   3.44874701e-01   4.35236492e-01              nan
   5.35666028e-01   3.76289149e-01   0.00000000e+00   3.44874701e-01
   3.03596891e-01   2.84929167e-01              nan              nan
   1.11601649e-01   3.44874701e-01              nan              nan
   2.98023224e-08   6.69582536e-01   1.68631973e-01              nan]

Hmm good point, we should check these border cases.

For future debuggers: this is with ETRegressor() no special hp settings.

In all our estimators, we should make sure that std=0.0 for all border cases (e.g. constant predictions), then deal properly with that in the acquisition functions.

I think so, at least haven't seen that warning anymore. Closing.


Unfortunately ,Gallery has stopped

Hi,
In android genymotion, I got this error when I click 'Choose from library...'. bellow is the adb logcat
logcat
Please help, thank you very much!

Can you reproduce the issue when pressing gallery in your android native menu ?

Same issue with me. It's a problem with Genymotion because it works fine with my Android device. :)

I have this issue both in Genymotion and on the real device - when the photo from camera or from the gallery is chosen the app crashes.. Android 6.0, RN 0.33

Make sure you followed all the INSTALL steps in the README and if you still get the issue please copy past your stack trace error

Yes, I have followed all the steps. I can't copy the stacktrace as the app just crashes with no logs (I use react-native log-android for logging). Is there a way to get more information in the crash?
Just for comparison - the crop-picker library works fine in the same conditions.

I can't reproduce this by running the Example project on a Galaxy S6 Android 6.0.1.

Any luck on this issue? I tried using Android Studio Emulator. There Gallery opens but once I pick an image app crashes. On Genymotion app crashes, but due to Gallery crash.
This is the log for Genymotion:
09-15 01:33:24.472  5839  5852 E AndroidRuntime: FATAL EXCEPTION: GLThread 175
09-15 01:33:24.472  5839  5852 E AndroidRuntime: Process: com.android.gallery3d, PID: 5839
09-15 01:33:24.472  5839  5852 E AndroidRuntime: java.lang.IllegalArgumentException: No config chosen
09-15 01:33:24.472  5839  5852 E AndroidRuntime: 	at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:870)
09-15 01:33:24.472  5839  5852 E AndroidRuntime: 	at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
09-15 01:33:24.472  5839  5852 E AndroidRuntime: 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
09-15 01:33:24.472  5839  5852 E AndroidRuntime: 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
This is the log for Android Studio Emulator:
09-15 08:43:40.031  2714  2714 E AndroidRuntime: FATAL EXCEPTION: main
09-15 08:43:40.031  2714  2714 E AndroidRuntime: Process: com.rn_sample_app, PID: 2714
09-15 08:43:40.031  2714  2714 E AndroidRuntime: java.lang.AbstractMethodError: abstract method "void com.facebook.react.bridge.ActivityEventListener.onActivityResult(android.app.Activity, int, int, android.content.Intent)"
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:210)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.facebook.react.XReactInstanceManagerImpl.onActivityResult(XReactInstanceManagerImpl.java:612)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:134)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:77)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.Activity.dispatchActivityResult(Activity.java:6428)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.ActivityThread.-wrap16(ActivityThread.java)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-15 08:43:40.031  2714  2714 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

My android app is also crashed with no error.
I am using Android 5.0
and react native 0.33.
It doesn't provide any log.

Same issue here, both on an emulator and a Moto G running Android 5.1. React Native version 0.33. It crashes when selecting an image from the gallery or taking a picture from the camera, as well as cancelling those in the middle of the process. The stacktrace that I got from adb logcat is the following:
09-23 13:36:26.409  5868  5868 E AndroidRuntime: java.lang.AbstractMethodError: abstract method "void com.facebook.react.bridge.ActivityEventListener.onActivityResult(android.app.Activity, int, int, android.content.Intent)"
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:210)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.facebook.react.XReactInstanceManagerImpl.onActivityResult(XReactInstanceManagerImpl.java:612)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:134)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:77)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.demo.demo.MainActivity.onActivityResult(MainActivity.java:25)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.Activity.dispatchActivityResult(Activity.java:6428)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.ActivityThread.-wrap16(ActivityThread.java)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.os.Handler.dispatchMessage(Handler.java:102)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.os.Looper.loop(Looper.java:148)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at android.app.ActivityThread.main(ActivityThread.java:5417)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at java.lang.reflect.Method.invoke(Native Method)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-23 13:36:26.409  5868  5868 E AndroidRuntime:       	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-23 13:36:26.412  1574  2029 W ActivityManager:   Force finishing activity

I have tested the code on iOS successfully, it is pretty much the same as the sample code:
const imagePickerOptions = {
      mediaType: 'photo',
    };
    ImagePicker.showImagePicker(imagePickerOptions, (response) => {
      if(response.error){
        console.warn(response.error);
      }
      else if(!response.didCancel){
        const picture = {uri: `data:image/jpeg;base64,${response.data}`, isStatic: true};
        this.setState({picture});
      }
    });

any updates on this issue?

java.lang.AbstractMethodError: abstract method "void com.facebook.react.bridge.ActivityEventListener.onActivityResult(android.app.Activity, int, int, android.content.Intent)"

Make sure you update this project package
Make sure you folow all the instalations steps in the README
then : #308

hi @yfuks which file is that?

facing the same error here, but fixed by upgrading to v0.22.8

@nodegin I think latest version is 0.22.7.
how can I get 0.22.8?

@georgi-kovachev just check it on npm, it says that the latest one is 0.22.8

@nodegin i see. i am checking from github.
https://github.com/marcshilling/react-native-image-picker/blob/master/package.json
Thanks I will try to use with 0.22.8

This issue is kind of outdated at this point so I'm going to close. Please open another if anyone is still having issues on the latest version.


IGNITE-12261 - Issue with adding nested index dynamically

http://apache-ignite-users.70518.x6.nabble.com/Issue-with-adding-nested-index-dynamically-tt29571.html
As discussed in the user group ( please check the link ), I have added fix in this class, please let me know if it can be merged and new version can be released. Please let me know for any issue with this commit. Thank you

Can you please check this pull request. Thanks

Creatdd another pull request with comment
Closing this so that we can look at other
https://github.com/apache/ignite/pull/6949


Send run summary statistics as part of the metadata call

Description
As part of the sparkly badge to show on pipelines build pages to upsel bktec, we want to send the run summary statistics as part of the bktec metadata call.
This PR does the needful.
Testing
I've tested that the statistics are being added to the metadata call by running against a local copy of bk/bk and logging out the params.
Question: Are we happy to send the statistics through in title-case as opposed to snake-case?
"statistics"
=>{"Total"=>37, "PassedOnFirstRun"=>37, "PassedOnRetry"=>0, "MutedPassed"=>0, "MutedFailed"=>0, "Failed"=>0, "Skipped"=>0}

Question: Are we happy to send the statistics through in title-case as opposed to snake-case?

I'd vote for either snake_case or camelCase, but preferably snake_case because the server is in Ruby. PascalCase (Title case) looks weird to me.

All good, will take a look

All good, will take a look

You can annotate the RunStatistic struct with the JSON key name. When it get's converted to JSON, it will use the key name defined in the annotation.
type RunStatistic struct {
  PassedOnFirstRun int `json:"passed_on_first_run"`
  ...
}

Thanks @nprizal!


Add CI bot configuration for pre-commit

This is a new feature of pre-commit that will allow us to enforce e.g. code formatting etc.

https://pre-commit.ci/ is one-click setup and works great - except that I found that clang-format didn't work.
This ci job basically does the same thing: https://github.com/ssciwr/hammingdist/blob/master/.github/workflows/ci.yml#L47

I guess the clang-format issue is because the clang-format pip package is not available on all platforms and therefore the hook does not specify the dependency on clang-format in https://github.com/pocc/pre-commit-hooks/blob/master/.pre-commit-hooks.yaml#L11 Luckily, this will be fixed when the packaging issue in https://github.com/mgevaert/clang-format-wheel/issues/4 is fully resolved.

very nice! I look forward to deleting my format ci job once this is available :-)
I came across this repo a while ago which might be a helpful reference in terms of building older versions on the various platforms: https://github.com/muttleyxd/clang-tools-static-binaries

Pre-commit CI is enabled and working.


Example with Pilet displayed in a modal

Hi all,
piral looks like a very promising and flexible micro apps solution but I still can't get how to display pilets as modal dialogs without routing to another page, so like after clicking on a tile to show the modal dialog. Can you, please provide an example of how exactly should be done?
thx in advance ;)

A pilet is just a package (or microfrontend). It may (and usually will) contain components such as pages or other fragments (navigation items, modal dialogs, ...).
As such I am a bit confused by your question. Why are you routing to a page? How do you want to display a modal dialog? Are you using piral-modals for this? How are you using it in a pilet? How is it integrated in your app shell?
Would be great to know where exactly you are stuck.

Thank You so much for the immediate response. I try to use pilets which will be extensions of the data rendered into the app shell. For example in the shell app I have a project list, then after selecting one should become available the extentions belonging to it and then I just don't prefer after clicking on an extension to show data at the same view like it is in the example here for the weather cast.

Hm I'm not sure I get it fully. Have you tried working with registerModal and showModal?
You'll find more infos on the documentation page.

The relevant parts of the weather app:
export function setup(app: PiletApi) {
  // ...
  app.registerModal(weatherDialog, WeatherSetupDialog);
}

where WeatherSetupDialog comes from
import * as React from 'react';
import { ModalComponentProps } from 'sample-piral';
import { WeatherForm } from './WeatherForm';
import { setupData } from './actions';
import { getLocation } from './utils';

export const WeatherSetupDialog: React.FC<ModalComponentProps<any>> = ({ onClose }) => {
  const info = getLocation();
  return (

        Setup Weather Location

          X

      <WeatherForm
        defaultCity={info && info.city}
        defaultCountry={info && info.country}
        getWeather={(country, city) => {
          setupData(country, city);
          onClose();
        }}
      />

  );
};

Hope that helps!

The relevant parts of the weather app:
export function setup(app: PiletApi) {
  // ...
  app.registerModal(weatherDialog, WeatherSetupDialog);
}

where WeatherSetupDialog comes from
import * as React from 'react';
import { ModalComponentProps } from 'sample-piral';
import { WeatherForm } from './WeatherForm';
import { setupData } from './actions';
import { getLocation } from './utils';

export const WeatherSetupDialog: React.FC<ModalComponentProps<any>> = ({ onClose }) => {
  const info = getLocation();
  return (

        Setup Weather Location

          X

      <WeatherForm
        defaultCity={info && info.city}
        defaultCountry={info && info.country}
        getWeather={(country, city) => {
          setupData(country, city);
          onClose();
        }}
      />

  );
};

Hope that helps!

import * as React from 'react';
import { ModalComponentProps } from 'sample-piral';
import { WeatherForm } from './WeatherForm';
import { setupData } from './actions';
import { getLocation } from './utils';

export const WeatherSetupDialog: React.FC<ModalComponentProps<any>> = ({ onClose }) => {
  const info = getLocation();
  return (

        Setup Weather Location

          X

      <WeatherForm
        defaultCity={info && info.city}
        defaultCountry={info && info.country}
        getWeather={(country, city) => {
          setupData(country, city);
          onClose();
        }}
      />

  );
};

Thank You, It really helped me. Now I managed to do what I needed.

import * as React from 'react';
import { ModalComponentProps } from 'sample-piral';
import { WeatherForm } from './WeatherForm';
import { setupData } from './actions';
import { getLocation } from './utils';

export const WeatherSetupDialog: React.FC<ModalComponentProps<any>> = ({ onClose }) => {
  const info = getLocation();
  return (

        Setup Weather Location

          X

      <WeatherForm
        defaultCity={info && info.city}
        defaultCountry={info && info.country}
        getWeather={(country, city) => {
          setupData(country, city);
          onClose();
        }}
      />

  );
};

Thank You, It really helped me. Now I managed to do what I needed.


Update validateSAID.swift file

I have added some description to ValidateSAIDError enum and NationaltyType enum to show understandable feedback

Updated validateSAID.swift


Multi key

We have many changes, I'll try my best to summarize:

Multi key pair backend is added. Why? Because Kontrol was only able to sign and validate Kites based on a single key pair. Now we can use multiple keys to generate tokens and validate incoming requests.
A new KeyPairStorage is being added. This storage interface is responsible of retrieving key pairs and managing them. It has support for Postgres and fallbacks to the in memory if it doesn't exists.
Machine registrations uses the last set key pair. This can be changed with the MachineKeyPicker function if wished.
Constructor is changed. This is by design, because this whole PR is a fundamental changes and API users need to be aware of it and upgrade.
Now key's are added with the AddKeyPair method. This can be called  multiple times to add multiple keys.
External key storage can be added with the SetKeyPairStorage method.
There are no API changes on any Kite interaction related methods. So this means no tests are modified. All changes currently passes the current test suite.

This is ready to review.

@cihangir all done :+1:

:+1: thanks!


This is a co-op game that is similar to Fireboy and Watergirl
How do you play your game?
You press WASD to move player 1 and IJKL to move player 2. The main goal is to try to get the boxes into the correct color goal.
Code
Check off the items that are true.

[x] The game was made using the Sprig editor.
[x] The game is placed in the in the /games directory.
[x ] The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[x] The game runs without errors.
[x] The name of the file/game contains only alphanumeric characters, -s, or _s.
[x] The game name is not the same as the others from gallery

Image (If an image is used)

[ ] The image is in the /games/img directory.
[ ] The name of the image matches the name of your file.

Thanks for your PR!

Closing this PR due to inactivity. If you want it reopened, ping me here.


Auth0-callback breaks LinkedIn OAuth-flow

The problem
As already mentioned in #75 here as a separate ticket because I'm afraid that it will be forgotten in the other ticket (which is already closed):
We need to use OAuth-flow from LinkedIn (not for login) which also uses the params code and state in callback. The plugin (and #107) checks for this both params to decide whether it is the Auth0-callback or not.
@adamjmcgrath suggested an option like skipRedirectCallback which could check location to determine wether its the Auth0-callback or not. This would be perfect for our case.
Expected behavior?
LinkedIn-callback not breaking Auth0.

Thanks for raising visibility on this @svenadlung - I'll put something in our backlog

In fact this can be generalized for any other OAuth-flow being used in the app that uses this library.
Almost every OAuth flow attaches code and state query params to the redirect URL.


AWS Secret Access Key

The process to get a key has changed. We should update the wiki appropriately.

It hasn't really.


fix: If the same affected product deifned in NVD and JVN, ignore JVN

What did you implement:
Fixed because it was not implemented in filterCveDetailByCpeURI.
Type of change

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

How Has This Been Tested?
Checklist:

[x] Write tests
[ ] Write documentation
[x] Check that there aren't other open pull requests for the same issue/feature
[x] Format your source code by make fmt
[x] Pass the test by make test
[x] Provide verification config / commands
[x] Enable "Allow edits from maintainers" for this PR
[x] Update the messages below

Is this ready for review?: YES

I know it's a small detail, but do you need the else here?
https://github.com/kotakanbe/go-cve-dictionary/blob/ce865c47d34dbbe57bd3a5145a24a2ce551e9e03/db/db.go#L321

Is the name in this test a mistake for VendorProductMatch instead of RoughMatch?
https://github.com/kotakanbe/go-cve-dictionary/blob/fix-get-by-cpeid/db/db_test.go#L97-L105
ditto
https://github.com/kotakanbe/go-cve-dictionary/blob/fix-get-by-cpeid/db/db_test.go#L107
https://github.com/kotakanbe/go-cve-dictionary/blob/fix-get-by-cpeid/db/db_test.go#L117


Impossible to set rolloutStrategy to rollingUpdate

What happened:
In place rolling upgrades of cluster is failing with following rke2controlplane config:
spec:
  rolloutStrategy:
    rollingUpdate:
      maxSurge: 0

We can observe following logs in rke2 control plane provider logs:
E0402 22:15:22.179854       1 rke2controlplane_controller.go:758]  "msg"="RolloutStrategy type is not set to RollingUpdateStrategyType, unable to determine the strategy for rolling out machines" "error"="unknown rollout strategy type \"\"" "cluster-name"="mgmt-1237351673-rke2-capm3-virt" "name"="mgmt-1237351673-rke2-capm3-virt-control-plane" "namespace"="sylva-system"

This is a bug in controller, as it expect RolloutStrategy to be set to RollingUpdate whereas the CRD constrains us to use the rollingUpdate without capital.
(copied from downstream issue in sylva project)

In fact it's was just a misconfiguration,  we were missing the type: RollingUpdate field:
spec:
  rolloutStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 0


Mirage unikernel VPN support

Hi @talex5 and thank you!
Is there a Mirage Unikernel equivalent for VPNs?

none i am aware of.
there are however various vpn-related protocols implemented in ocaml already.
so the main part missing is for someone to slap it together into a usable vm.
there may or may not be people planning to work on that at the 2020-03 retreat.
ping @hannesm @laudecay

Is the 2020-03 retreat still on, even in a virtual format? I am anxiously awaiting a ocaml/mirage unikernel that reads OVPN files. Surely many other qubes users are, too.

sorry, there has been not much happening on this front at the retreat AFAICT (there are other QubesOS-related news -- namely Xen-PVH, which we'll hopefully shortly get into MirageOS merged and released)

well, there's @roburio 's https://github.com/roburio/openvpn that also specifically mentions mirage-firewall, so, presumably this could get turned into a working mirage-vpn Qube at some point.
and there was apparently at one point an attempt at a wireguard-ocaml implementation (https://github.com/cfcs/ocaml-wireguard) which is now 404, but existed long enough to be referenced here.

I'm closing this issue, it is unrelated to the qubes-mirage-firewall. For discussions about future VPN unikernels, let's talk on the mirage mailing list, or discuss.ocaml.org (or reach out to team at robur dot coop).

Just to inform you that Robur are currently developping a QubesOS unikernel as a VPN client. It is available here: https://github.com/robur-coop/qubes-miragevpn. A tutorial is actually available here too: https://github.com/robur-coop/miragevpn-handbook/pull/3


Fix imports

Description
In the newest web3 library version, some files have changed location, so we had to change the paths from which we import the files.
Is this PR related with an open issue?
Related to Issue #
Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] Follows the code style of this project.
[ ] Tests Cover Changes
[ ] Documentation

the version of web3 is pinned https://github.com/nevermined-io/contracts-lib-py/blob/master/setup.py#L21
if you are doing this change you also need to update the version of the web3 in setup.py

@r-marques it looks like the pinning isn't working properly. The defi-dataset-loader which depends on this library was throwing errors about these imports and when I execed into it, the structure of the web3 library resembles that of the latest version.


Adjust internal layout in weather widget

Feature Description
As the Uptime and Clock widget internal layouts have been adjusted to deal with the loss of space due to the side menu, could the weather widget then get the same treatment, so that the weather condition is on a single line?
Not sure if this makes sense, as longer strings, like Partially Cloudy might end up line wrapping anyway. So maybe this might just be not a worthwhile change.
Homebridge UI: v4.62.0
Node.js: v20.18.0
OS: Ubuntu
Docker: Yes

Homebridge UI: v4.62.1-beta.14
Node.js: v22.9.0
OS: macOS Sequoia

Like this! This would word wrap anyway.

Closing this, as the example above shows that word wrap will occur anyway at some point.


Update changelog

Update changelog for hotfix

Pull Request Test Coverage Report for Build 414638468

0 of 0   changed or added relevant lines in 0 files are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.008%) to 41.533%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/common/ports.ts
4
74.14%

Totals

Change from base Build 414621025:
-0.008%

Covered Lines:
22097

Relevant Lines:
48825

💛  - Coveralls


Fixes an issue with blocks copy/pasting using keyboard

As a part of @ColinTree commit ba120fc773b654ea8c4fe7d9f4877d9e03c816df, blocks copy/pasting using keyboard was removed. This commit strikes to fix issue #1068. Also, I added a few spaces for better naming...

Copy and paste on ai2-test seem to work on Mac. This is possibly due to the difference in Ctrl vs Cmd for Windows/Linux vs Mac. It's unclear though how this is semantically any different (in fact it seems like it should trigger the typeblock bar because you are no longer exiting early).

@ewpatton this is true. Probably e.keyCode === 7 on both OS's are Ctrl key (Mac contains such key too) and not Cmd key.

I tested on both Mac and Windows with Google Chrome. Copy and pasting on Mac doesn't appear to be broken because of the Cmd vs Ctrl differentiation. On Windows, it always opened the typeblocking autocomplete rather than allowing copy/paste.

@ewpatton, sorry, after updating my local machine's App Inventor sources with Colin's commit and making a fix to it, I forgot to flush caches and so, I couldn't test that... I am on my of including that line.

@moliata Thanks for fixing this!

@ewpatton actually thank you for giving a notice that this doesn't fix this issue!

Sorry about causing the bug.. i didn't try these meta keys ( ˙-˙ )


Night CI 2023-02-23: Failed

action url: https://github.com/spidernet-io/spiderpool/actions/runs/4256501209

processing


[question]: Freezed support

Hi Team,
I was trying out ferry for our first-ever graphql client project.
Is there a reason why there is no freezed based serialization made available in ferry_generator?
I understand this is open source and I can also contribute. I have experience creating a fork of existing open-api generator which uses freezed as its model/serialization library. Before I try it I would like to know if there is a specific reason we chose built_value and not freezed.

I am not the original author of ferry but took over maintenance, but I am one of the first users of ferry.
But I can give my thoughts on the possible rationale of the original author:
query HeroQuery {
   hero {
     ...HeroFragment
     height
     weight
 }
}

fragment HeroFragment on Hero {
   id
   name
}

This will generate a HeroFragment abstract class, and a HeroQuery_hero class that implements the HeroFragment class, so you can write code that accepts fragment types which are shared across many queries.
Similarly, when using inline fragments with type conditions, like
fragment DroidFragment on Droid {
  primaryFunction
}

query HeroForEpisode($ep: Episode!) {
  hero(episode: $ep) {
    name
    friends {
      name
    }
    ... on Droid {
      ...DroidFragment
    }
  }
}

We generate a base class GHeroForEpisodeReq_heroBase, which has the common fields,
and specialized classes for the type conditions, in this case GHeroForEpisodeReq_heroOnDroid, which has the common fields plus the fields that are specific to this typecondition.
These are the two features of ferry_gererator that go a bit beyond basic data classes.
The first versions of ferry were published in 2019.
built_value was already out and stable at that point and supported all of these features.
It supported union types (even though in a bit crude way) for fragment spreads with type conditions and subtypes (for inline fragment spreads).
I don't know if freezed even existed at that point, but if it did, it was probably a very new and unstable package and did not yet have support for this kind of subtyping.
I think built_value was the reasonable choice in 2019. Nowadays, with Dart having native support for sealed classes, null safety (yes, built_value supported null safety using runtime checks before Dart had null safety), etc. it might look differently.
Of course, the syntax of built_value is cumbersome, and also the single serializers.dart file which lists all the serializers for all the generated types prooves to be problematic for bigger projects.
Another thing is that since early 2021, the Dart team announced that it explored static metaprogramming.
While still unclear on if this will ever be released and how exactly it would look like, for people working on code generators that brings uncertainty, because of the risk of spending many hours on a project that could be outdated soon because of language level support for macros.
ferry does not directly depend on ferry_generator, as long as any generator uses the OperationRequest interface, it will work fine, so in principle, one could implement another code generator that uses freezed or implements serialization manually (I also like what graphql_codegen does for example).

@knaeckeKami Thanks for the detailed answer. Now that static metaprogramming is already out in dart master branch, i think the development is going good on its way. So i dont see any reason why we shouldn't approach freeazed serializers as well. I will walk through the code and see how much effort it would require. I am not sure if ferry_generator is confirgurable by design. If then this would need a separate package say ferry_freezed_generator.

most of the actual codegen logic is in gql_code_builder, ferry_generator is mostly just a wrapper that uses gql_code_builder to generate the OperationRequest classes that ferry expects (gql_code_builder is also used by other graphql code builders like graphql_codegen or the now deprecated artemis).
I think another package is warranted though, as users of built_value probably don't like and additional dependency to ferry which they don't need and visa-versa.

I will give it a try then. 👍


Measure bandwidth for each individual session in a connection

I added small amount of code that measures the bandwidth of each session in a connection every 5 seconds. It measures the bandwidth usage just over those 5 seconds, and not the whole time the session was running, because when eventually trying to limit bandwidth usage, a low average with a random high spike cannot be caught with that method. Bandwidth is calculated as bits/second.

This change is

General comment in addition to the below: it seems like a more continuous interval (e.g. be able to get the value for the last X seconds (as a configurable constant)) at multiple points would be helpful instead of having the occasional 5-second update.  @trevj probably has a lot more context on what we'd actually want to use though.

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

src/lib/rtc-to-net/rtc-to-net.ts, line 334 [r1] (raw file):

    //used to caculate the total bandwidth of this session in 5 second intervals
    private stopBandwidthCalc_:number = 0;

Should probably not be using an number for a boolean value

src/lib/rtc-to-net/rtc-to-net.ts, line 399 [r1] (raw file):

      this.onceReady.then(this.linkSocketAndChannel_, this.fulfillStopping_);
      this.calculateBandwidth_();

It might be more understandable to do setInterval on a function instead of the repeated setTimeouts here

src/lib/rtc-to-net/rtc-to-net.ts, line 432 [r1] (raw file):

      // that any exception is sent to the Promise.catch, rather than
      // propagating synchronously up the stack.
      this.stopBandwidthCalc_ = 1;

Does this ever get reset to 0 (false)?

Comments from Reviewable

Just to add a bit more clarity to my comment:
The way this is written, assuming everything works, we'd be able to compute the bandwidth from 0-5, 5-10, 10-15, etc.  It would be nice to also be able to know what the bandwidth from 0-2, 3-8, 6-11, etc. was, and also be nice to be able to have the 5-second window be something we could change at least at build time.  Again, deferring to @trevj since he'll have a better idea of what would actually be useful to the project overall, but I think this might be the kind of thing we'd want to measure for determining when to pause the connections

Review status: all files reviewed at latest revision, 3 unresolved discussions.

Comments from Reviewable

OK! Cool. I have a bunch of comments but I can see how something like this could be used to help throttle someone's bandwidth if they have been using too much bandwidth in the last 5s (or some other short time interval).

@jpevarnek What you're describing sounds like it might be useful for graphing someone's bandwidth over time but I think for @shilpa10kumar9's purposes just looking at the most recent use might be sufficient, at least initially.

Review status: all files reviewed at latest revision, 10 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 333 [r1] (raw file):
Previously, trevj wrote…
> Full sentences an dspelling:
>
> ```js
>
> // Used to calculate the total bandwidth of this session.
>
> ```
>
>
>
> Ideally, each variable has its own comment.

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 334 [r1] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Should probably not be using an number for a boolean value

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 335 [r1] (raw file):
Previously, trevj wrote…
> Good to mention in the comment that this records bytes received and sent to/from the peer.

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 399 [r1] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> It might be more understandable to do `setInterval` on a function instead of the repeated `setTimeouts` here

When I was reading into Javascript's timer functions, many people suggested using setTimeout recursively because it is a safer option.. Apparently memory leaks and such are more common with setInterval. Not sure how true this is, but that's why I went with setTimeout (http://weblogs.asp.net/bleroy/setinterval-is-moderately-evil)

src/lib/rtc-to-net/rtc-to-net.ts, line 432 [r1] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Does this ever get reset to `0 (false)`?

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 674 [r1] (raw file):
Previously, trevj wrote…
> You're using `stopBandwidthCalc_` as a `boolean` so it should be one - however, take a look at how `initiateSnapshotting` terminates its loop. That will eliminate the need for this class-level variable altogether.

For some reason, when I modeled the code after the ```initiateSnapshotting``` loop, the code got stuck on ```this.onceStopped_.then(() => ...``` . Not sure what happened there, but I could not get it to work..if it really is a better version, I will try to fix it more! For now, I've changed it so that ```stopBandwidthCalc_``` is a boolean.

src/lib/rtc-to-net/rtc-to-net.ts, line 675 [r1] (raw file):
Previously, trevj wrote…
> This looks like a method-level comment. Keep to the 80 line character limit.

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 681 [r1] (raw file):
Previously, trevj wrote…
> The debugger supports placeholders which perform better than string concatenation when logging is disabled.
>
>
>
> Try this:
>
> ```typescript
>
> log.debug('%1: current bandwidth %2 bits/sec', this.longId, bandwidthSession_);
>
> ```

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 682 [r1] (raw file):
Previously, trevj wrote…
> Let's extract a class-level constant for the interval, e.g. `BANDWIDTH_MONITOR_INTERVAL`.

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 685 [r1] (raw file):
Previously, trevj wrote…
> Blank line between functions.

Done.

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 11 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 399 [r1] (raw file):
Previously, shilpa10kumar9 wrote…
> When I was reading into Javascript's timer functions, many people suggested using setTimeout recursively because it is a safer option.. Apparently memory leaks and such are more common with setInterval. Not sure how true this is, but that's why I went with setTimeout (http://weblogs.asp.net/bleroy/setinterval-is-moderately-evil)

Works for me, I hadn't heard anything about the memory leaks

src/lib/rtc-to-net/rtc-to-net.ts, line 432 [r1] (raw file):
Previously, shilpa10kumar9 wrote…
> Done.

Aah, you can actually ignore my comment here, not ever necessary since that's after the channel is totally finished.  Sorry!

src/lib/rtc-to-net/rtc-to-net.ts, line 674 [r1] (raw file):
Previously, shilpa10kumar9 wrote…
> For some reason, when I modeled the code after the ```initiateSnapshotting``` loop, the code got stuck on ```this.onceStopped_.then(() => ...``` . Not sure what happened there, but I could not get it to work..if it really is a better version, I will try to fix it more! For now, I've changed it so that ```stopBandwidthCalc_``` is a boolean.

Do you know what's breaking there?

src/lib/rtc-to-net/rtc-to-net.ts, line 339 [r2] (raw file):

    // Records the bytes sent to and from peer, for the previous time interval in this session.
    private prevBytesSession_:number = 0;
    // The length of each interval used to calculate bandwidth.

Might be worth it to mention this is in milliseconds (may also be useful to make it const and private unless you think it will be changed)

src/lib/rtc-to-net/rtc-to-net.ts, line 679 [r2] (raw file):

    }

    // Calculates bandwidth over "BANDWIDTH_MONITOR_INTERVAL" millisecond intervals based on

nit: quotes not necessary for variable name
nit: trailing space

Comments from Reviewable

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 11 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 336 [r2] (raw file):

    private stopBandwidthCalc_:boolean = false;
    // Records the bytes sent to and from peer, for the current time interval in this session.
    private currBytesSession_:number = 0;

Super-nit: mentioning session here seems a tad redundant given this is the session class

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 11 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 674 [r1] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Do you know what's breaking there?

I have no idea, I tried everything to make it work but even if I put a debug line right after ```this.onceStopped_.then(() ....```, it never shows up, which makes me think that it gets stuck in some sort of weird infinite loop or something similar.

src/lib/rtc-to-net/rtc-to-net.ts, line 336 [r2] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Super-nit: mentioning session here seems a tad redundant given this is the session class

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 339 [r2] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Might be worth it to mention this is in milliseconds (may also be useful to make it `const` and private unless you think it will be changed)

experimenting with calculating bandwidth for entire connection, so I'll hold off on changing this until I figure out what I'm doing in the ```Rtc-to-net``` class. Mentioned milliseconds though

src/lib/rtc-to-net/rtc-to-net.ts, line 679 [r2] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> nit: quotes not necessary for variable name
> nit: trailing space

Done.

Comments from Reviewable

Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 9 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 674 [r1] (raw file):
Previously, shilpa10kumar9 wrote…
> I have no idea, I tried everything to make it work but even if I put a debug line right after ```this.onceStopped_.then(() ....```, it never shows up, which makes me think that it gets stuck in some sort of weird infinite loop or something similar.

Very strange.  If you want I can try to look at this with you.  Otherwise, the version we have here is probably good.

src/lib/rtc-to-net/rtc-to-net.ts, line 336 [r2] (raw file):
Previously, shilpa10kumar9 wrote…
> Done.

(my comment was referring to the variable name, again, super-nit you shouldn't feel obligated to address)

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 9 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 674 [r1] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Very strange.  If you want I can try to look at this with you.  Otherwise, the version we have here is probably good.

I'll talk to you about it today

src/lib/rtc-to-net/rtc-to-net.ts, line 336 [r2] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> (my comment was referring to the variable name, again, super-nit you shouldn't feel obligated to address)

Done.

Comments from Reviewable

Reviewed 1 of 1 files at r4.
Review status: all files reviewed at latest revision, 10 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 61 [r4] (raw file):

    private stopBandwidthCalcTotal:boolean = false;
    private prevBytesTotal:number = 0;

space before type

src/lib/rtc-to-net/rtc-to-net.ts, line 290 [r4] (raw file):

        for (var label in this.sessions_) {
          currBytesTotal += this.sessions_[label].currBytes_;
          // prevBytesTotal += this.sessions_[label].prevBytes_; //TODO there might be a better way to keep track

Make sure to remove the comment before the final version

src/lib/rtc-to-net/rtc-to-net.ts, line 297 [r4] (raw file):

        log.debug('Current bandwidth for whole connection: %1 bits/sec', bandwidthTotal);
        this.prevBytesTotal = currBytesTotal;
        setTimeout(this.calculateBandwidthTotal, Session.BANDWIDTH_MONITOR_INTERVAL);

Why are we using the constant from Session here?

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 10 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 61 [r4] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> space before type

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 290 [r4] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Make sure to remove the comment before the final version

Done.

src/lib/rtc-to-net/rtc-to-net.ts, line 297 [r4] (raw file):
Previously, jpevarnek (Jonathan Pevarnek) wrote…
> Why are we using the constant from `Session` here?

I thought it would be a better idea to measure the total bandwidth in the same time intervals as we do for each individual session, and I also think that it would be easier to keep one constant instead of two (so we only need to change it in one spot). I can change it if that's better!

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 10 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 297 [r4] (raw file):
Previously, shilpa10kumar9 wrote…
> I thought it would be a better idea to measure the total bandwidth in the same time intervals as we do for each individual session, and I also think that it would be easier to keep one constant instead of two (so we only need to change it in one spot). I can change it if that's better!

Cool! I think I'd prefer that it was a separate constant since there's no requirement for the two to be the same (although definitely agree that using 5000 for both right now makes sense)

Comments from Reviewable

Review status: 0 of 1 files reviewed at latest revision, 10 unresolved discussions.

src/lib/rtc-to-net/rtc-to-net.ts, line 297 [r4] (raw file):
Previously, lucyhe wrote…
> Cool! I think I'd prefer that it was a separate constant since there's no requirement for the two to be the same (although definitely agree that using 5000 for both right now makes sense)

Done.

Comments from Reviewable

:+1:


scroll-to-current-file - Initial commit

GitHub should scroll the file tree to the current file.
But it seems that GitHub couldn't do it properly when you're logged in
(except when you're navigating to a file from the directory view, or to a directory from the file path segments)
I reproduced it with Firefox 132.0b1, and Chrome 129.0, without Refined GitHub extension.
This extension attempts to fix that.
Test URLs
The current file should be in the center of the view on the following cases:

pages

on the directory page
https://github.com/refined-github/refined-github/tree/main/source/features (on directory)
on the file page
https://github.com/refined-github/refined-github/blob/main/source/refined-github.ts (on file)

viewport width, and file tree mode

the viewport is wide and

the file tree is expanded by default
the file tree is collapsed and expanded again manually

the viewport is narrow and

the file tree is collapsed by default and expanded manually

after

refreshing on the file page
refreshing on the directory page
navigating to other files/directories through the file tree (no problem before)
navigating to other directories through the file path (no problem before)

back to the file/directory page from other tabs (Pull Requests, Issues, etc.)

Known issue
sometimes it scrolls the entire window a little bit.
Screenshot

Thanks for the PR. Generally we'd want to discuss this first in an issue, but the feature should be rather simple.
From what I see, this behavior already works well in most scenarios, the only time it doesn't work is on the first load of the code viewer, which is when you open the link https://github.com/refined-github/refined-github/blob/30114ade84c18aba40454c8dd42dc8268ec80794/source/features/link-to-changelog-file.gql from anywhere other than the repo's Code tab.
https://github.com/user-attachments/assets/6defa9b5-ee3c-486f-9b6f-3db45ee57acf

Thanks for the quick reply!
You're right. I'll create a new discussion on the GitHub community here https://github.com/orgs/community/discussions

I'll create a new discussion on the GitHub community here github.com/orgs/community/discussions

I mean an issue on this repo. That community is different from this repo

I mean an issue on this repo. That community is different from this repo

Sorry for the misunderstanding.
I'll create a discussion there soon anyway since it is better to fix a bug on the upstream.

I've changed to simple setTimeout.
This is what it looks like when setupPageLoad is fixed.
https://github.com/foriequal0/refined-github/tree/scroll-to-current-file-2
This is the discussion:
https://github.com/orgs/community/discussions/140389


Discussion on repository name and python vs matlab

We have more and more python-scripts available to deal with OpenFAST simulations, but no repository for it.
Some options would be to either:

Create a python-toolbox repository
Rename matlab-toolbox to openfast-toolbox. Then we could either gather code by:
2.1 language (e.g. a folder matlab and a folder python at the root
2.2 functionality (e.g. folders io , mbc, areoacoustics, preprocessors.

If you think of other options, I can add them to this post. I'd be happy to hear the opinion of people listening to this channel (for instance:  @bjonkman, @andrew-platt , @jjonkman , @ptrbortolotti, @nikhar-abbas, @gbarter, @kshaler, @evan-gaertner, @ewquon)
Hopefully we can come up with some kind of consensus on what to do about matlab/python. Then I'd suggest we sit down and decide on an architecture. On the python side, I'd like to aim for a repository with unit tests and continuous integration, and a couple of examples. Hopefully we can find a balance between adding a lot of inconsistent scripts and having a too restrictive framework that no one dares using or pushing to.
I believe the repository should stay fairly small and OpenFAST-focused: read/write files, generate cases, postprocess them. Some of these steps might involve generic tools, which we can extract from other repositories without actively developing on them. Otherwise things might run out of proportion.
But that's already too much details..  I just want to start a discussion on where to put our python scripts. Let me know your thoughts.
Examples of repositories with potential overlap

DTU Wind energy toolbox https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox
ROSCO_toolbox https://github.com/NREL/ROSCO_toolbox
WISDEM https://github.com/wisdem/wisdem
Some of my repos that I'm happy to move around:
Wind energy IO: https://github.com/ebranlard/weio
FASTlib: https://github.com/ebranlard/welib/tree/master/welib/fastlib
and more

Hi all,
We've started adding more functionalities to the python-toolbox. There is still much work to be done to add examples, unit tests, documentation, and more scripts. Some links to the repositories mentioned in this thread are given in the README. Feel free to add more openfast scripts to the python-toolbox!


Revert "SILOptimizer: make a conversion operation explicit"

Reverts apple/swift#19300
This failed to build on Ubuntu 14.04:
https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04/2187/
https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04-long-test/4947/
etc.

@swift-ci please smoke test

Bleh; reverting this breaks on Windows :-(.

Yeah, sorry I don't have a better fix right now 😞 but I don't have this setup to reproduce and we need to prioritize keeping CI working.

@benlangmuir - actually, I think I might have an idea - changing the forwarding constructor to copy construction might do it (aka, replacing the braces with parenthesis).  Any idea of how to test that?

apple/swift#19348

@compnerd I don't know of a way to test 14.04 from a PR (CC @shahmishal in case I'm missing something).  I'll try building your patch myself for now I guess.


[Feature Request] Better ControlNet Integration

Is your feature request related to a problem? Please describe.
While openOutpaint seems to work okay with the ControlNet extension, it is suboptimal to have to switch to another tab to change ControlNet parameters between generations. I don't know if we will have to modify something inside the extension to make it work with the API, but if so, we can issue some pull requests there.
Describe the solution you'd like
Preprocessor and other parameter switching for ControlNet, mainly, when the extension is installed. If we are being fancy, we can try implementing (focus on the try, as it would be difficult to do so), a 3D overlay for manual pose editing with rigs.
Proposed workflow
We would need to discuss this point.
Describe alternatives you've considered
Continue using it as-is, or sending it back and forth to the WebUI to make this type of editing.
Additional context
While it is another extension, it is quite a game changer for many. I think it would be useful to integrate, and if it is integrated in the future by AUTOMATIC1111, we can just change some API calls, probably.
This will be a medium-long term feature to implement. Created a branch controlnet to play with this for now.

i haven't even gotten an opportunity to try controlnet yet but holy crap does it appear to be terrifyingly powerful; in a perfect world i'd of course prefer to have first-class support for controlnet directly within webUI like instruct-pix2pix received, but yeah, if it stays an extension then so be it - i believe there's at least 2 existing extensions for it and i personally lean more towards this implementation just since it's a single-purpose extension dedicated to it
also thanks again for your recent commits of course <3 sorry i'm kind of not doing anything too useful lately lol

Yeah, that is the one I'm personally using because of its genius implementation that merges the controlnet on the fly with whichever model you are currently using, making literally every single 1.5 based model compatible with controlnet.

looks like API support is coming for control net one way or another :D
https://github.com/Mikubill/sd-webui-controlnet/issues/63
https://github.com/Mikubill/sd-webui-controlnet/pull/194

That was quick! Also, we can add something like this to openOutpaint quite easily I think:
https://github.com/fkunn1326/openpose-editor
This was what I was thinking about implementing, rather than a full 3d rig editor.


Allow reusable sets of tasks that maintain ordering

One thing that our current "1-click child tasks" component does well (that has a number of other issues and we'd love this to replace it) is allowing us to setup a number of tasks in order

i.e we want "heal effect of bug" bug only task to be before shared "orientation and task estimates" and that before bug only task "add PostDeploy to remove DisableDoParameter".
I mentioned this way back in the now closed #1
The problem with the current implementation is that we either have to have

2 separate groups of task e.g. "Bugs", "PBIs" with duplicate tasks for each one where they both need the same. This means that we have to copy and paste the same tasks across which is difficult to maintain.
OR we could have 3 separate groups "Shared", "Bug tasks only" and "PBI's tasks only" BUT there is no way to ensure that the "Bug tasks only" are ordered appropriately alongside the "PBIs tasks only". Today it would result in the Bug Only tasks to be grouped together and the Shared tasks to be grouped together incorrectly.

Today our only practical option is the first one with the overhead that this brings
It would be great if we could either

Indicate a constraint on each Task to indicate the "workItemTypes" that this would be created on. This way we would just have a single group "Bugs/Pbis" and then appropriate tasks would be created in the given order
Have a way to indicate ordinal

option 1 is much more preferable as it would be much easier to maintain and intuitive to understand what would happen

I've actually solved this for now by having a master simplified json (like #12) and a powershell that generates the 2 separate groups of task.
So for me this is now a lower priority issue


Fixing link

Found another one.
/cc @crichID @brianamarie @hectorsector @JasonEtco

You're welcome @hectorsector.


Attach verbose logging level to request context

Internally, sysl-go uses a value attached to the context to
track whether or not additional debug/verbose-level information is
attached to its logs. In order for this value to persist within a
request, it must also be attached to the request context.
Closes #150

LGTM

Thanks Andrew & Alex. I will test it.


Rating fails at checking instance of rateable model

When I attempt to rate a model after following the configurations i get false from this
! $model instanceof Rater && ! $model instanceof Rating in CanRate Trait

I believe the check should be: if (! $model instanceof Rateable && ! $this instanceof Rater) {

I believe the check should be: if (! $model instanceof Rateable && ! $this instanceof Rater) {

I copied the code from the Source code of the package

This has been fixed in https://github.com/rennokki/rating/releases/tag/2.0.1


Pre-trained model for genomic benchmarks

Hello. We've been working through replicating the results from your arXiv paper to better understand HyenaDNA and how we can use it for our own purposes. Using the hyena-dna-nt6 Docker image, we were able to successfully replicate the "Nucleotide Transformer" experiments. However, we've been unable to replicate the "Genomic Benchmark" experiments because the pretrained_model_path in the configs/experiment/hg38/genomic_benchmark.yaml file is set to a path that doesn't exist in the container: /local-scratch/nigam/projects/mwornow/projects/safari-internal/outputs/2023-04-14/2_128_1024.ckpt.
Is this file available somewhere that we can access it? This appears to be the file that's generated by the Quick Entry point experiment, but we would like to use a pre-trained model if possible before generating our own for this first round of validation.
Thanks!

Sure, checkout the public weights here.  It's the tiny-1k model.

Thanks for the quick response @exnx. I had a suspicion we could use the pre-trained models on Hugging Face but didn't want to assume. Cheers!


Can i get the tutorial3 script?

In the asplos tutorial, there is a tutorial 3 section.
But i cannot find the tutorial 3 script in this repository.
In this repository, there are tutorial 1 and 2, but not 3.
So, can we get it?

We did not publish this script, as is contains a lot of custom work for each user. You can follow the tutorial video and program it following your own requirements. We would therefore kindly refer you to the video.
You can also check out krittika for another template on the topic here


Define defaults for extensions and targetExtensions

Any extended BroccoliFilter must define its extensions property, otherwise it fails.
I guess, extensions are defined to be replaced with targetExtension because broccoli could not assure which is the real file extension with the path api, but I think most of the FilterPlugins will not care about the final targetExtension because they are commonly used as temporary step of the final result.
I would add this default behaviour to avoid filter developers the need to define common extensions or force the plugin user to pass the extensions as options property.

@joliss Hopefully this isn't too dead, default behavior that I would propose:

If extensions is not defined, run the filter on all files in the tree
If the targetExtension is not defined, leave the extension alone (This seems to already be implemented)

The use case that I have for this, is that I am building a general purpose non-js file preprocessor. Each file in the inputTree would be mapped into a js file with it's contents available as a string. e.g. While using ember-data I could write shader files in app/etc with their native extension. Then the preprocessor would wrap that shader code in a JS module so that it could easily be imported by my component which has some three.js rendering inside of it. I would use this for many different types though, so ideally I would just give it the app/etc tree and let it transform all files.
If this is acceptable for the goals of this package let me know and I'll open a PR.
Thanks

@jonesetc I'm a bit hesitant to add this behavior for extensions and targetExtensions, but you can override getDestFilePath in your subclass to get that behavior.

Loud and clear. Alternatively would it be acceptable to give extensions a default of []? That way the default behavior would not do any modifications but would also not throw an exception. It follows with the current implementation of no targetExtension passed in means that the extensions should not be altered.

the default behavior would not do any modifications

Hm, so you're suggesting that it just pass everything through by default? Is there a use case for that?

My use case would be that if my ember-cli add-on is installed but no extensions specified, it would not affect the build. Currently I just default it to [] myself, so it's not required from broccoli-filter.
Mostly it's a matter of preference. I believe it makes more sense for it to do nothing by default rather than throw an exception by default.


data:AasthaShahCodes

It's my first contribution. Edits are appreciated.

Add a comma after the } on line 22

Done. Thank you. How can I improve my profile code?

Looks good to merge. Thank you for your contribution! 🎉
Also, congrats on your 1st contribution.

Thank you so much Pradumna!! ✨
Feels great.

Welcome @aasthashahcodes
Btw your filename does not match the case of your GitHub username - this will still work now but might break in the future. I suggest making a new pull request and rename the file to avoid any issues in the future

Welcome @aasthashahcodes
Btw your filename does not match the case of your GitHub username - this will still work now but might break in the future. I suggest making a new pull request and rename the file to avoid any issues in the future

Thank you Eddie.
Looks good now?


Fix Form Recognizer Sample issue

Fix issue https://github.com/Azure/azure-sdk-for-java/issues/21046
@jongio for notification.

Thanks for the fix @LuHang2021 !


Disable async hooks checks on travis and azure for macOS

Codecov Report

Merging #207 into master will not change coverage by %.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #207   +/-   ##
=======================================
  Coverage   73.47%   73.47%
=======================================
  Files          33       33
  Lines        1896     1896
  Branches      295      295
=======================================
  Hits         1393     1393
  Misses        503      503

Continue to review full report at Codecov.

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


Sign PyPI releases

Describe the bug
When a user downloads this python module using pip, there is no cryptographic authenticity or integrity validation to protect the user from a MITM attack.
Therefore, this project is making any other projects that obtain the mitogen module via pip in their build process vulnerable to a watering hole attack.
Expected behavior
A developer should have a mechanism to cryptographically verify the integrity and authenticity of mitogen when obtaining it through pip.
To Reproduce
pip install mitogen
Additional context
Possible solutions include:

Using the --sign argument of twine when uploading packages to PyPI

Publishing a cryptographically signed document (ideally using gpg) listing the hashes for all packages uploaded to PyPI, which users can then pass into pip using the --hash argument

Tagging @dw on this ticket since he's the only one I know that can push Mitogen to PyPi.

Tagging @dw on this ticket since he's the only one I know that can push Mitogen to PyPi.


Clarify return types

We should clarify return types in all of our public api methods.
This means making it clear to developers not only the general type of the return value, but the schema of the value when the return value is an object.
@vsund was kind enough to bring this up as part of his creation of typescript definitions for this library #336

While resolving this, it may make sense to go through the TypeScript type declarations and correct/improve the wrong ones.

For the declarations, see all the .d.ts files in https://github.com/vsund/blockstack.js/tree/feature/add-typescript-declarations/src
For the PR (have listed some open types there), see the todo part of https://github.com/blockstack/blockstack.js/pull/336#issue-285799836

The entire library has now been converted to Typescript and should provide return types.


Bump CONTROLLER_TOOLS_VERSION to 0.14.0

bump controller tools to the version which bumps k8s deps to v0.29.0, which aligns with the version in the operators.

/retest

recheck


Feature request: ability to apply stop gradient to some parameters

To motivate this feature request, I'll explain what I'm currently doing (without Flax), and the other solutions I've considered.  Then I'll suggest some Flax solution.
Problem:
In the process of inferring one of my modules, I need to mask varying subsets of the weights with stop-gradient in a single function:
(click for long snippet)

def infer(encoding: EncodingElement,
          observation: PoolingMessage,
          prediction: PredictionMessage,
          rng: Generator,
          weights: FrozenVariableDict) -> TwoPassEncodingConfiguration:
    sampler_rng, code_rng = rng.split()
    # Create four copies of the weights:
    # * weights_sg has stop_gradient applied to all weights, and
    # * the other three have stop_gradient applied to different partitions of
    # the weights.
    weights_sg, weights_g, weights_c, weights_e = _stop_gradient_on_some_weights(weights)

    # Inference ------------------------------------------------------------------------------------
    # This function uses weights_sg so this calculation won't poison the weight cotangents.
    # However, cotangents still propagate back to observation.
    code_message = encoding.code_message(observation, weights_sg)

    # GLN loss -------------------------------------------------------------------------------------
    # The scan parameters depend on weights_g.
    encoding_parameters_g = SamplerParameters(observation, prediction, weights_g)
    # This use of stop_gradient prevents the cotangents from propagating back from the scan through
    # to the observation.
    initial_code_message = stop_gradient(code_message)
    # This class manages an iterated function (a scan)
    sampler = EncodingSampler(encoding)
    sampler_iterations = encoding.inference_parameters.sampler_iterations
    initial_sampler_state = SamplerState.initial_state(encoding, initial_code_message, sampler_rng)
    # This is an extremely computationally expensive scan.
    sampler_state, sampler_trajectory = sampler.sample_trajectory(
        encoding_parameters_g, initial_sampler_state, sampler_iterations, None)
    # We calculate a GLN loss, which can only affects the subset of weights in weights_g.
    gln_loss = ((sampler_state.total_gln_centering_loss + sampler_state.total_prediction_loss)
                / sampler_iterations)
    iterative_code_message = sampler_state.code_message

    # Code loss ------------------------------------------------------------------------------------
    # The code loss trains the code and selection links to produce a code message that predicts the
    # code message that we inferred by iteration.
    # This is the same code_message function as above, but uses weights_c.
    c_code_message = encoding.code_message(observation, weights_c, rng=code_rng,
                                           use_code_signal_noise=True)
    # When this loss is minimized only the weights that are not marked stop-gradient in weights_c
    # are adjusted.  Cotangents are also blocked from poisoning the scan by applying stop_gradient
    # to its outputs.
    code_presence_loss = jnp.sum(jnp.square(stop_gradient(iterative_code_message.log_presence)
                                            - c_code_message.log_presence))
    code_value_loss = jnp.sum(jnp.square(stop_gradient(iterative_code_message.code_value)
                                         - c_code_message.code_value))
    code_loss = code_presence_loss + code_value_loss

    # Snipped a lot of code here that uses weights_e and produces output primals.

    return TwoPassEncodingConfiguration(iterative_code_message, gln_loss, code_loss)

# Below is the code that uses Haiku to partition the weights and apply stop gradient to different
# partitions.
_module_classes = [{'gln'}, {'code_value', 'code_presence'}, {'explanation'}]

def _module_predicate(module_name: str,
                      name: str,
                      value: Array) -> int:
    prefix = module_name.split('/')[0]
    for i, prefix_set in enumerate(_module_classes):
        if prefix in prefix_set:
            return i
    raise RuntimeError

# I was using Haiku before, but I'll have to port this to Flax somehow.
def _partition_by_module(weights: FrozenVariableDict) -> tuple[FrozenVariableDict, ...]:
    return hk.data_structures.partition_n(_module_predicate,  # type: ignore[arg-type]
                                          weights, len(_module_classes))

def _stop_gradient_on_some_weights(weights: FrozenVariableDict) -> list[FrozenVariableDict]:
    weights_sg = stop_gradient(weights)
    weights_p = _partition_by_module(weights)
    weights_sg_p = _partition_by_module(weights_sg)

    return ([weights_sg]
            + [hk.data_structures.merge(weights_pi,
                                        *[weights_sg_pi
                                          for j, weights_sg_pi in enumerate(weights_sg_p)
                                          if i != j])
               for i, weights_pi in enumerate(weights_p)])

Non-solution:
I discussed this with @cgarciae and brainstormed a non-solution:  I could try to put the "C", "G", and "E" weights into different "collections".  And then run inference three times.  This doesn't work because:

the scan is very expensive and I don't want to run it three times,
the scan can't easily be hoisted out because the scan itself depends on the G collection of weights, and
all sorts of intermediate values that are created between the different parts of the function.

Possible Flax interface:
We came up with two Flax interfaces that might work.
I suggested some kind of context manager flax.linen.stop_gradient:
(click for long snippet)

def infer(encoding: EncodingElement,
          observation: PoolingMessage,
          prediction: PredictionMessage,
          rng: Generator,
          weights: FrozenVariableDict) -> TwoPassEncodingConfiguration:
    sampler_rng, code_rng = rng.split()

    # Inference ------------------------------------------------------------------------------------
    # This function uses weights_sg so this calculation won't poison the weight cotangents.
    # However, cotangents still propagate back to observation.
    with nn.stop_gradient(lambda c: True):
        code_message = encoding.code_message(observation)

    # GLN loss -------------------------------------------------------------------------------------
    encoding_parameters_g = SamplerParameters(observation, prediction)
    # This use of stop_gradient prevents the cotangents from propagating back from the scan through
    # to the observation.
    initial_code_message = stop_gradient(code_message)
    sampler = EncodingSampler(encoding)
    sampler_iterations = encoding.inference_parameters.sampler_iterations
    initial_sampler_state = SamplerState.initial_state(encoding, initial_code_message, sampler_rng)
    # The scan parameters depend on weights_g.
    with nn.stop_gradient(lambda c: c.name.starts_with('gln')):
        # This class manages an iterated function (a scan)
        # This is an extremely computationally expensive scan.
        sampler_state, sampler_trajectory = sampler.sample_trajectory(
            encoding_parameters_g, initial_sampler_state, sampler_iterations, None)
    # We calculate a GLN loss, which can only affects the subset of weights in weights_g.
    gln_loss = ((sampler_state.total_gln_centering_loss + sampler_state.total_prediction_loss)
                / sampler_iterations)
    iterative_code_message = sampler_state.code_message

    # Code loss ------------------------------------------------------------------------------------
    # The code loss trains the code and selection links to produce a code message that predicts the
    # code message that we inferred by iteration.
    # This is the same code_message function as above, but uses weights_c.
    with nn.stop_gradient(lambda c: c.name.starts_with('code')):
        c_code_message = encoding.code_message(observation, rng=code_rng,
                                               use_code_signal_noise=True)
    # When this loss is minimized only the weights that are not marked stop-gradient in weights_c
    # are adjusted.  Cotangents are also blocked from poisoning the scan by applying stop_gradient
    # to its outputs.
    code_presence_loss = jnp.sum(jnp.square(stop_gradient(iterative_code_message.log_presence)
                                            - c_code_message.log_presence))
    code_value_loss = jnp.sum(jnp.square(stop_gradient(iterative_code_message.code_value)
                                         - c_code_message.code_value))
    code_loss = code_presence_loss + code_value_loss

    # Snipped a lot of code here that uses weights_e and produces output primals.

    return TwoPassEncodingConfiguration(iterative_code_message, gln_loss, code_loss)

Cristian suggested a lifting transformation like those found in flax.core.lift.  I'm still learning how these work, so I can't yet sketch what this might look like.
Possible side benefits
Besides applying stop-gradient, this kind of system may be able to do other things with parameters such as:

marking parameters as constant within a block, and raising if any computation tries to change them,
temporarily replacing parameters with values from another variable within a computation, or
replacing parameter cotangents with values from another variable or another parameter cotangent.

Of course, that's beyond this feature request, but I mention these ideas as something to keep in mind when considering solutions.
Conclusion
Am I missing an easy solution to my problem?  If not, I will need to solve this problem in order to use Flax since this use of stop-gradient is integral to my research.  Thanks for reading!

So in the haiku version of the code you are solving this "outside" of Haiku by operating on the variables dict directly and making 4 copies. In Flax you could do something similair for example by using flax.travere_util.flatten_dict. If you want to do this inside a linen Module you could use nn.map_variables where the mapping is basically identity but with stop_gradient applied to some or all of the params (again you cam make your life easy here by using flatten_dict).

Here's an sketch of what that would look like:
from flax import traverse_util

 def selective_stop_grad(variables):
      flat_vars = traverse_util.flatten_dict(variables)
      new_vars = {k: lax.stop_gradient(v) if some_filter_fn(k) else v for k, v in flat_vars.items()}
      return traverse_util.unflatten_dict(new_vars)

class OneBitDense(nn.Module):
  @nn.compact
  def __call__(self, x):
    MySGSubModule = nn.map_variables(MySubModule, "params", selective_stop_grad, init=True)
    return MapDense(4)(x)

@jheek the map_variables solution is great, I like it a lot!
A HOWTO about freezing parameters using this strategy would be great.

I'm still trying to get this working.  Here's what I have now:
from __future__ import annotations

from collections.abc import Callable
from typing import Any, Generic, TypeVar

import flax.linen as nn
import jax.numpy as jnp
from flax import traverse_util
from flax.core.scope import FrozenVariableDict
from jax.lax import stop_gradient
from jax.random import PRNGKey
from tjax import print_generic

T = TypeVar('T', bound=nn.Module)

class StopGradientModule(nn.Module, Generic[T]):
    filter_f: Callable[[tuple[str, ...]], bool]
    submodule_cls: Callable[..., T]

    def setup(self) -> None:
        mapped_cls = nn.map_variables(self.submodule_cls, True, self._selective_stop_gradient,
                                      methods=['f'])
        self.submodule = mapped_cls()

    def f(self, x: Any) -> Any:
        print("Calling")
        return self.submodule.f(x)

    def _selective_stop_gradient(self, variables: FrozenVariableDict) -> dict[str, Any]:
        flat_vars = traverse_util.flatten_dict(variables)  # type: ignore[no-untyped-call]
        new_vars = {k: stop_gradient(v)
                    if self.filter_f(k) else v
                    for k, v in flat_vars.items()}
        return traverse_util.unflatten_dict(new_vars)  # type: ignore[no-untyped-call]

    def __call__(self):
        assert False

class X(nn.Module):
    def setup(self) -> None:
        self.dense = nn.Dense(10)

    def f(self, x: Any) -> Any:
        return self.dense(x)

    def __call__(self):
        assert False

class Y(nn.Module):
    def setup(self) -> None:
        self.x = X()
        # stop_gradient_all is a copy of x whose parameters are identical, but whose parameter
        # cotangents are always zero.
        self.stop_gradient_all = StopGradientModule(lambda _: True, X)

    def f(self, x: Any) -> Any:
        y = self.x.f(x)
        return y, self.stop_gradient_all.f(x)

    def __call__(self):
        assert False

(y, y_prime), variables = Y().init_with_output({'params': PRNGKey(0)}, jnp.ones(3), method=Y.f)
print(y, y_prime)
print_generic(variables)

gives
Traceback (most recent call last):
  File "/home/neil/src/cmm/a.py", line 66, in <module>
    (y, y_prime), variables = Y().init_with_output({'params': PRNGKey(0)}, jnp.ones(3), method=Y.f)
  File "/home/neil/src/cmm/a.py", line 61, in f
    return y, self.stop_gradient_all.f(x)
  File "/home/neil/src/cmm/a.py", line 28, in f
    return self.submodule.f(x)
  File "/home/neil/src/cmm/a.py", line 46, in f
    return self.dense(x)
  File "/home/neil/src/flax/flax/linen/linear.py", line 177, in __call__
    kernel = self.param('kernel',
flax.errors.ScopeCollectionNotFound: Tried to access "kernel" from collection "params"" in "/stop_gradient_all/map_variables(submodule)/dense" but the collection is emtpy. (https://flax.readthedocs.io/en/latest/flax.errors.html#flax.errors.ScopeCollectionNotFound)

Ah that's because map_variables makes collections immutable. You need to provide a function that maps back the variables on output or pass init=True such that during init the map_variables isn't called.
Can you try passing init=True to nn.map_variables? I think that should fix your issue. Actually I accidentally removed the init=True from the example I copied from the docstring :S

@jheek Thanks, that gets it to run, but it's still reflecting a copy of x?  It outputs:
FrozenDict
    params=FrozenDict
        stop_gradient_all=FrozenDict
            submodule=FrozenDict
                dense=FrozenDict
                    bias=Jax Array (3,) float32
                            0.0000      0.0000      0.0000
                    kernel=Jax Array (3, 3) float32
                            0.3932      0.3981     -0.5165
                            0.1566     -0.0768     -0.2396
                           -0.3035      0.5167     -0.1552
        x=FrozenDict
            dense=FrozenDict
                bias=Jax Array (3,) float32
                        0.0000      0.0000      0.0000
                kernel=Jax Array (3, 3) float32
                       -0.0201     -0.6220      0.9425
                       -0.2652     -0.1386      0.8165
                       -1.2677      0.0672     -0.7958

So x and stop_gradient_all are different.


Assume filename correctly

Fixes #108

Test fails but functionally works, apheleia-ft needs to handle evaluating the formatter args

How does this change look to you?

I don't love switching on major modes inside the formatter command, but we don't have a better abstraction for doing this at the moment, so I think it is okay.

I don't love switching on major modes inside the formatter command, but we don't have a better abstraction for doing this at the moment, so I think it is okay.

It defaults to the buffer name and only falls back for a temp buffer or something

How does this change look to you?

LGTM! I'll push a changelog entry now


New package: BibleTime.BibleTime version 3.0.3

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.5 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service agree

@stephengillie thanks a lot!


241872: Azure monitor profile fix and test

Description
Add MonitorProfile property required for enabling Prometheus on AKS

Issues that this PR fixes
Fixes #4046

-->

Pipeline references

Pipeline

Type of Change

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

Checklist

[x] I'm sure there are no other open Pull Requests for the same update/change
[ ] My corresponding pipelines / checks run clean and green without any errors or warnings
[ ] My code follows the style guidelines of this project
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (readme)
[ ] I did format my code

Nice PR @osagiestar , added a few suggestions and would have 1 question: Have you been able to successfully validate the changes in your fork? Ideally, for these kind of changes we ask contributors to provide a pipeline badge to a successful run so we can be sure it works. However, that requires you to have a subscription, and we can not always expect that :) If that's not an option we'll find another way to test.

Please go ahead and test @AlexanderSehr

Hey @osagiestar will do and merge your contribution soon. However, to do so I'd need to ask you to please resolve the conflicts first by merging upstream CARML back into your fork. It appears something in the AKS module changed in the meantime that conflicts now. If that turns out to be big a mess (Git can get quite complicated) I can also port the changes over manually, but this would mean that the history is lost :/

Any update on this?

cc: @JPEasier please include this one in the AVM module too (if not already considered)

@osagiestar any chance on resolving the conflicts? Again, otherwise I can port the changes from our end, but will only do so with your go ahead.

@osagiestar any chance on resolving the conflicts? Again, otherwise I can port the changes from our end, but will only do so with your go ahead.

@AlexanderSehr - If it has not been resolved yet and you can resolve it from your end that will be great. Regards.

Alright, this was merged as part of PR https://github.com/Azure/bicep-registry-modules/pull/665 and will hence be closed. Thanks  @osagiestar for your contribution 💪


Snake's speed

Increase the snake speed, so that it does not lags. Smooth movement overall.

Hello there!
Modifying the movement pattern of the snake may not be advisable, as it is an integral part of the game's original design. However, if you have different preferences, you could try forking the project and making the necessary changes to suit your needs.


login fail : space in the user name

installes this HA addon on the last hass OS update,
added some hosts in uptime kuma, OK
1/ impossible to add integration to display my monitored hosts inside HA ?
this tuto : https://www.youtube.com/watch?v=9xBGO2Fpnkc&t=4s&ab_channel=BeardedTinker
sends to this read only repo to add to HACS : https://github.com/meichthys/uptime_kuma
but the repo si impossible to add in HACS, and sends to an other repo :
https://github.com/jayakornk/pyuptimekuma
but this repo is impossible to add to HACS : https://github.com/jayakornk/pyuptimekuma/issues/1
😭😩
2/ impossible to login
when installed addon i used ipad with his fu * * * g auto-completion i fight all the time,
and in the install process when created user for uptime kuma there is a fu * * * g space character at the end of the user name
uptime kuma created user with the space character,
the ipad recorded credentials, so no problemo to login with this user name on ipad,
but on hte PC, i typed the username without space so uptime kuma displayed the message : wrong user or password
after hours of trial and error, finally copy-pasted infos from ipad and noticed the fu * * * g space character !
and now i can login from PC :)
BUT :
how do i change the user name in uptime kuma to correct my space error ???
there is only logout and change password options in this HA extension ?
help please xD

Hello! Inside Uptime Kuma, you can download a backup, remove the addon, re-add it and then upload your backup. It does not contain your login credentials so you can create a new one in this install.
Hope this help.

thank you this worked well 👍

Glad I could help