Add autoRefetch Option to useQuery for automatic stale entry refetching

Add a boolean option, autoRefetch, to automatically refetch an entry when it becomes stale.

Interesting. This could be useful as a plugin once more stuff is exposed. I see it as a dangerous default as it would spam the server very often

Adding this as an option would be useful, but I would not set it to true by default

If it's added, it should be fully tree shakable too

We will see later on but probably a different kind of plugin. I think a lot of other more critical features are still missing before this 😄

Would love to see this because it enables a major use case (use useQuery instead of adding manual polling).

This should be doable as a plugin if anybody wants to contribute to the repo. The delay plugin should help to get started

Thanks @posva! I'm writing a plugin for this but got stuck at accessing entry.stale in the plugin. I keep getting a Cannot read properties of null (reading 'staleTime') error. Would you have any ides or can you nudge me in the right direction? 🙏🏽
Minimal Reproduction: https://stackblitz.com/edit/github-ruyqjq?file=colada%2FautoRefetch.ts
Plugin file:
// plugins/auto-refresh/src/index.ts
import type { PiniaColadaPlugin, UseQueryEntry } from '@pinia/colada'

export interface PiniaColadaAutoRefetchOptions {
  /**
   * Whether to enable auto refresh by default.
   * Can be overridden per query.
   * @default true
   */
  enabled?: boolean
}

/**
 * Plugin that automatically refreshes queries when they become stale
 */
export function PiniaColadaAutoRefetch(
  options: PiniaColadaAutoRefetchOptions = {},
): PiniaColadaPlugin {
  // Default to enabled
  const { enabled = true } = options

  return ({ queryCache, scope }) => {
    // Keep track of active entries and their timeouts
    const refreshTimeouts = new Map<UseQueryEntry, NodeJS.Timeout>()

    queryCache.$onAction(({ name, after, args }) => {
      if (name === 'create') {
        after((entry) => {
          // Skip if auto-refresh is disabled globally or for this query
          const queryEnabled = entry.options?.autoRefetch ?? enabled
          if (!queryEnabled) return

          scope.run(() => {
            console.log('>> Running', entry.key)

            watch(
              () => entry.stale,
              (stale) => {
                console.log('>> Stale', stale)
                if (stale) {
                  // Clear any existing timeout
                  const existingTimeout = refreshTimeouts.get(entry)
                  if (existingTimeout) {
                    clearTimeout(existingTimeout)
                  }

                  // Schedule a refresh
                  const timeout = setTimeout(() => {
                    if (entry.active) {
                      console.log('>> Refreshing stale query:', entry.key)
                      queryCache.fetch(entry)
                    }
                    refreshTimeouts.delete(entry)
                  }, 0)

                  refreshTimeouts.set(entry, timeout)
                }
              },
              { immediate: true },
            )
          })
        })
      }

      // Clean up timeouts when entry is removed
      if (name === 'remove') {
        console.log('>> Remove', args)
        const [entry] = args
        const timeout = refreshTimeouts.get(entry)
        if (timeout) {
          clearTimeout(timeout)
          refreshTimeouts.delete(entry)
        }
      }
    })
  }
}

// Add types for the new option
declare module '@pinia/colada' {
  interface UseQueryOptions {
    /**
     * Whether to automatically refresh this query when it becomes stale.
     * Requires the PiniaColadaAutoRefetch plugin.
     */
    autoRefetch?: boolean
  }
}

You get that error because the entry doesn't have options yet, so it cannot fetch. options are set by useQuery() calls. It's not a reactive property, so you can't watch it anyway. I would go for the fetch action (among others), to add a refetch timeout


Upgrade to doctrine/migrations 2.0

Preliminary refactor of namespaces and upgrade to doctrine/migrations 2.0 RC.
Added new commands (dump and rollup).
Altered PHP version support to match dependencies (>=7.2).
Once migrations have been released to 2.0 the version can be set correctly in composer.json and that's it.

You will also need to implement the new Configuration options available that are documented here https://www.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/configuration.html


Update to Electron 4.0.x

WIP
Blockers: https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Aelectron-blocker
Notes: https://electronjs.org/blog/electron-4-0

Now that the initial blocker (unresponsive/slow tabs) has been fixed, can this be added now?


Find useful way to log workflow conditions

Conditions are also evaluated when the workflow is loaded to determine the available actions which causes a lot of noise in the logs. (might use MDC::wfid to filter those)

There is no logging in the conditions of the upstream module

Proposed Solution for 1:

log4perl.filter.FilterIsWorkflow               = Log::Log4perl::Filter::MDC
log4perl.filter.FilterIsWorkflow.KeyToMatch    = wfid
log4perl.filter.FilterIsWorkflow.RegexToMatch  = \d+


Status Of Project, Request To Maintain

I wanted to check in and see if this project is still being actively maintained. Looking at the backlog of auto-created PR https://github.com/swift-actions/setup-swift/pulls and the list of automatically merged PRs (all from bots) it appears this project is no longer actively maintained.
If you're looking for a new maintainer, we (The Browser Company of New York) might be interested in picking up maintenance as we're actively doing work on Swift across multiple platforms and could benefit from an up to date version of a GHA setup script that works across all platforms, includes all new versions of Swift, as well as support for non-release builds of the toolchain.
Please let me know!

Hi @brianmichel! 👋
Yeah, unfortunately I haven't had the time over that the project deserves as you noted. There have been some attempts to bring in more maintainers in the past but those efforts ended up fruitless.
I'm always open to anything that will keep the project alive and kicking!

@brianmichel don't know if you saw this, but it seems more maintained.  we're moving over to that one on our end.  https://github.com/sersoft-gmbh/swifty-linux-action

Yeah totally understandable 🙂
If you only target Linux I also think you can use the official docker images directly (bit then there's no version resolution 😞)
Either way, thanks for reaching out and best of luck! ✌

What's really needed is one unified action implementation that works on all the platforms.  @brianmichel  your colleague @compnerd is already maintaining one for Windows.  Maybe that would make a good foundation?  I just ask that you consider improving the UI; the whole branch/tag business on that one is confounding!

@compnerd we should probably not do this here… https://github.com/compnerd/gha-setup-swift/issues/19#issuecomment-1981172160

Yeah there was an initial attempt by SSWG some years ago unify all this and a couple of maintainers of several options came together and we concluded to keep this action going, but it quickly became so that I was still the only maintainer 🙃
I would love to have all platforms running in once action (which they where, although briefly, back in 1.16.0) but sadly rest of life got in the way and I haven't had the time to spare to bring Windows back.


Images are not inserted into DB

Hi, everything is working fine. However, after uploading an image, I have to insert some texts. If I don't, the image are not saved into the database.
I use textarea. Please help. Thank you.

What version do you use? It shoud be fixed in 2.1.0

I use ver 2.1.0 :)

It looks like a problem in medium-editor and the way it handles textarea sync. I submitted a bug fix there.


Resolved dependency conflict with importlib-metadata on Python 3.7

No review needed.

coverage: 25.0%. remained the same when pulling e726dafb5a652d3551f1452fb184354eea22db34 on andy/fix-dep-conflict-py37 into c59fb213eb9bd59af7878ffe23b45690db574e64 on master.


chore: bdd-nh-1583398373 to 0.0.1

chore: Promote bdd-nh-1583398373 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Feature: In Screencast Mode, keep the current line fixed in the center, so it doesn't get obstructed by the Screencast Mode hotkey displays.

This is a feature request.
Whenever you are editing a line in screencast mode, sometimes, you trigger hotkeys to initiate some action or command in Visual Studio Code. When this happens, the hotkeys are displayed and overlaid on top of the document editing portion of Visual Studio Code.
It is fine and dandy, but when you are constantly editing text in the area right behind where the hotkey overlays are usually displayed in, it blocks the view of the text editing part, and some viewers actually couldn't see clearly what was being typed out on the screen.
I would like to propose two methods, but I prefer the former, and hence this issue is about that.

Have the text editing line always be centered on the screen. That means, when you are scrolling up/down in the document, it's the document that scrolls down/up, while keeping the text cursor and the currently highlighted line fixed in the center of the screen. This mode should only be active when the screencast mode is enabled, and the producer of the livestream wants to have this enabled. But maybe it can be useful as a general feature.

Whenever the text editing line is detected to be near the bottom of the Visual Studio Code viewport and hotkeys are triggered, instead of displaying the hotkeys in the usual areas, display the hotkeys in the upper portion of the viewport, where it won't obstruct the text cursor and the edited text.

I don't know if No. 2 will work, considering that there are multiple screen resolutions to take into account, and whatnot, but I think that, by keeping the current line centered on the screen at all times when editing the document, it makes the screencast mode more obvious to the livestream viewers and the hotkey displays won't obstruct their viewing experiences.
When I say "current line" or "currently highlighted line", I am referring to the line where the text cursor is on at that point in time. For me, Visual Studio Code highlights or lightens up the current line where the text cursor is on, so I call it "currently highlighted line".
Thoughts?

Thank you very much for taking the time to write up the feature request and thinking about possible solutions. Overall, I feel that it would be quite confusing if the screencast overlay would jump around the screen depending on the position of the text that you are editing. Have you explored using the screencastMode.verticalOffset setting to place the screencast overlay at the top of the screen (ex: 80, 85)?

I'll try that. I wasn't aware of this option yet, and will let you know if it's acceptable to the viewers.

Spoke with @alexdima who owns the editor and option #1 seems like a valid feature request so labeling the issue accordingly.

@lszomoru By the way, thanks for the screencastMode.verticalOffset suggestion. I believed this might work, and it probably just needs some more tweaking to make sure it doesn't obstruct the user while editing text in the viewport.

There is a way to get this to work now.  Try this setting:
  "editor.cursorSurroundingLines": 500,

Set that to some high enough number and the current line will stay centered.

@ArturoDent Oooh, this is nice!


Thymeleaf integration

Pull Request Test Coverage Report for Build 21

30 of 30 (100.0%) changed or added relevant lines in 6 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.6%) to 89.231%

Files with Coverage Reduction
New Missed Lines
%

src/main/java/coffee/synyx/frontpage/plugin/islieb/ListUtil.java
1
25.0%

Totals

Change from base Build 19:
0.6%

Covered Lines:
58

Relevant Lines:
65

💛  - Coveralls


Set up branch protection rules on main

require the check check added in #5 to pass
require pull request approval

Thanks for raising this. I've created the branch protection rule, matching policy for other SDK Team public repositories.


Rewrite code for parsing Tcl config files

The current implementation for parsing Tcl config files fails to catch environment variables defined in subordinate .tcl files included from the main .tcl with the source command. This breaks openlane1 compatibility for almost every user design submitted to Tiny Tapeout.
Tcl config files are parsed using TclUtils._eval_env(). The current version

modifies os.environ to provide inputs to the script
runs the script
converts ::env to numbered variables on the tcl side
rolls back the changes to os.environ
reads the numbered variables from tcl back into python
filters the results to entries appearing in set ::env(...) constructs in the script

The last step is there to filter out entries inherited from the environment, but it also filters out entries defined in included files. This python-tcl interface relying on os.environ modifications and rewriting ::env to numbered variables also feels brittle in some other ways. I'm proposing to rewrite it in the following manner:

set env(...) directly instead of modifying and rolling back os.environ
provide a python callback function to tcl code for easier backwards communication
patch tcl's set function to also call our callback
on the python side, save all set calls that match env(...) to the returned dictionary

This makes the code more robust and only saves environment variables explicitly set by the Tcl config, making it unnecessary to use the problematic filtering step.

@htfab Do you foresee any problems with us merging this to main?

I have run a few tests with the patch rebased to main, and it looks ok.

Would you mind creating that PR? I would do it myself, but it would assign authorship of the PR to me which would be unfair.

Ok, created #474.


Length validation counting bytes not characters, problems with unicode characters

when you are creating a field with MinLen or MaxLen attributes, the validation is calculating with the
len(v) is counting the bytes and with the Unicode characters, it is calculating 2 bytes.
Suggesting to use the utf8.RuneCountInString instead of len.
Thanks

Hey @pepusz and thanks for raising up this issue.
There's an example for it on our website - https://entgo.io/docs/schema-fields#validators.
// MaxRuneCount validates the rune length of a string by using the unicode/utf8 package.
func MaxRuneCount(maxLen int) func(s string) error {
    return func(s string) error {
        if utf8.RuneCountInString(s) > maxLen {
            return errors.New("value is more than the max length")
        }
        return nil
    }
}

field.String("name").
    Validate(MaxRuneCount(10))
field.String("nickname").
    Validate(MaxRuneCount(20))

thanks for the quick response


Tracking issue: wasm crate tests

We can't test wasm functions that use indexed-db global using vi.test so we have to write tests on rust with indexed-db mock

[x] Add tests for build.rs
[ ] #692
[ ] #693
[ ] #694

@grod220 perhaps we should prioritize our efforts on expanding test coverage for our wasm package in the near term?


chatglm ptuning:ValueError: None is not in list

Describe the bug

A clear and concise description of what the bug is.
Traceback (most recent call last):
File "/root/elton_space/DeepKE/example/llm/InstructKGC/src/finetuning_pt.py", line 191, in
main()
File "/root/elton_space/DeepKE/example/llm/InstructKGC/src/finetuning_pt.py", line 155, in main
train_dataset = Seq2SeqDataSet(args.train_path, tokenizer, args.max_len, args.max_src_len)
File "/root/elton_space/DeepKE/example/llm/InstructKGC/src/finetuning_pt.py", line 36, in init
context_length = input_ids.index(tokenizer.bos_token_id)
ValueError: None is not in list

Environment (please complete the following information):

OS: [e.g. mac / window]
Python Version [e.g. 3.6]

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

这似乎是由于ChatGLM在v2、v3版本中去掉了bos_token_id导致的。

have you solved your issue?


Remove unused dependencies from node-fhir-server-core package

Dependencies were discovered to not be referenced by package when investigating open vulnerabilities in jsonwebtoken package.

if you can run the github checks, i'm down to merge this

I was able to run the tests on my fork, https://github.com/droobah/node-fhir-server-core/actions
Unsure why they are not triggering on this PR.


Issue998

Overview
This PR includes the following proposed change(s):
Please make the following edits in the Terrestrial and aquatic mechanical treatment forms:
Closes #998

[x] remove the well ID and well proximity fields
[x] under mechanical treatment information: add a new mandatory numerical field called "Treated Area (m2)" after invasive plant and before mechanical method
[x] add a new mandatory field called "Disposed material" and allow users to choose either "number of plants" or "weight" (kg) and then enter a number.
[x] build the functionality so users can add multiple invasive plants to a record (similar to chemical).  Each "add item" should include the invasive plant, mechanical method, area treated, disposal method and disposed material (kg) fields.
[x] Under mechanical treatment information, make sure the first field is invasive plant, (then treated area, and the disposal related fields)

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Refactoring / Documentation
[ ] Version change

if your change is a breaking change, please add breaking change label to this PR
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Screenshots
Please add any relevant UI screenshots if applicable.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] New and existing unit tests pass locally with my changes

/reabase


Copy to clipboard button

Simple button to copy any panel's contents to clipboard would be nice.

Hm ne toolbar already has some buttons and space is running out, do you think its necessary? Because all inputs are in an editor its quite easy to copy it via CMD + A / CMD + V

It's not a big deal but multiple keyboard shortcuts just add more steps. Copy buttons are common in cases like these because they improve UX.

hm but we still have space limitations, especially in the resources panel. To solve this we could consider to remove the test from the icons and using tooltips instead.

@chipzoller current layout: removed labels from import buttons and added tooltips, more space for additional buttons like copy button. UX should be okay, wdyt?

Perfect, Frank, this is exactly what I had in mind. Tooltips for EVERYTHING is one of the easiest ways to improve UX at basically no UI real estate cost.

okay, then I close this issue


[StorageMover] Upgrade StorageMover API version and add unit tests

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
API changes are not detected in this pull request.


Updated for version jq cookie v1.4.1, added jsdoc documentation

The proposed pull request updates the definitions to conform to jquery.cookie version 1.4.1. Since this library is deprecated and moved here, this should be one of the last pull requests for jquery.cookie. Even though jquery.cookie was deprecated in favour of a jquery-less version, it's still beneficial for DefinitelyTyped to have the most up to date definitions of it, since it is still heavily used.
The only required addition was for the defaults property, which allows users to set defaults for cookie options.  jsdoc documentation was also added for all properties and methods.  This enables intellisense for editors that support. The jsdoc documentation uses snippets of documentation from the official jquery.cookie github repo as much as possible.
The test file was also updated to test the defaults property.

jquery.cookie/jquery.cookie.d.ts
to author(@RoyGoode). could you review this PR?
:+1: or :-1:?
check list

[ ] pass the Travic-CI test?

FYI, @RoyGoode hasn't made any public contributions for over a year.

Yes I had forgotten I had contributed this. This project was a LOT smaller back then.  I don't even use this component any more, so someone else should check it.  Looks like good work @BenLorantfy !

Is there anyone else that can look at this @vvakame?

:+1:
@RoyGoode thanks!
@BenLorantfy thanks mate!


Update mobile navigation for profile

I'm considering this a work in progress because these updates are mostly cosmetic. The styles have been updated to match the design and the necessary components have been build and added to the mobile navigation. This does not yet connect to the new dotcom-connect app and it still uses Luna as its provider.
lonelyplanet/dotcom-profile#2

Removed the "WIP" flag. It seems we can launch this using Luna for authentication along with #649 for now.


Add state-based simulator

Right now the translation of instances is static, but if we want to handle the dynamic case we need a to adapt Flatland's stochastic malfunctions. This requires a simulator with a notion of state and action

Everything will be rewritten from scratch


Make all method definitions inline

This allows including TaskScheduler.h from multiple source files,
without causing multiple definition linker errors.

I like the simplicity of this solution.

I am a bit concerned this might increase the sketch size if compiler decides to in-line "small" (by compiler's standards) methods, and the methods in question are frequently used.
I have a sketch which already barely fits into UNO, so that would be a good one to test with.
Will report back.
Sent from a mobile device. Apologies for accidental typos.
On Thu, Jul 7, 2016 at 8:03 AM -0400, "Adam Ryczkowski"<EMAIL_ADDRESS>wrote:
I like the simplicity of this solution.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/arkhipenko/TaskScheduler/pull/17#issuecomment-231058700

@arkhipenko Try my patch. It re-uses the code. It is both backward-compatible for single-file projects and includes example that uses handling multiple files as well.

The inline keyword doesn't actually tell the compiler to inline things. If the compiler has a function method available, it is eligible for inlining, if the compiler thinks the space/time tradeoff is worth it, regardless of the inline keyword (at least that's how I understand gcc implements it).
What the inline keyword does is change the linkage of a function such that, if multiple (identical?) definitions are present at link time, only one of them is used (as opposed to throwing a linker error, which is the default behaviour). Hence, the inline keyword allows putting a function implementation in a header file without causing linker errors, which again makes inlining possible. See also http://en.cppreference.com/w/cpp/language/inline

To confirm my theory, try compiling some examples with and without my patch applied, I expect they'll produce identical compiled code.

Yep, that is what I was planning to do. Test your and Adam's solutions and pick one.
:)
Thanks for the update.
If not a secret, what are you using TaskScheduler for?
Sent from a mobile device. Apologies for accidental typos.
On Thu, Jul 7, 2016 at 8:39 AM -0400, "Matthijs Kooijman"<EMAIL_ADDRESS>wrote:
To confirm my theory, try compiling some examples with and without my patch applied, I expect they'll produce identical compiled code.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/arkhipenko/TaskScheduler/pull/17#issuecomment-231064528

Me - to control RGBW lights in the bathroom (incl. movement sensor and closed doors sensor). Lights need to dim smoothly - hence need for multitasking.

If not a secret, what are you using TaskScheduler for?

A customer of mine is using it as port of the firmware for a 3D printer filament extruder (http://3devo.eu/).

Any plans to integrate this version?

Thinking about it. Did not have the time to compile all my sketches with this patch applied and check if a) they still work, and b) if size is not affected. I am pretty sure it is safe, but I have once spent the entire day chasing a bug in my sketch, which ended up being an "improvement" in the library. Have to test a lot after that all of my changes...

Supported as of v2.2.0

Turns out there is a problem with this approach after all. The iCurrentScheduler globa variable is declared as static in the .h file, which causes a copy to appear in every compilation unit that includes the .h file. Because of this, Scheduler::currentScheduler() can return an invalid reference in some compilation units.
To fix this, you'd like to give this variable similar linkage to the inline functions, where it is included in multiple units, but merged together at link time. I believe there is a linkage for this, used for static variables in inline or template functions, though I'm not sure how to achieve such linkage on a normal variable. Just removing static is not sufficient, since then you will get linker errors (multiple definition). Adding extern fixes those, but requires a definition of the variable in a single .cpp file.
I've tried the latter approach (declaring extern in the .h file and add a .cpp file to define the variable), which works pretty well. Inside the .cpp file, the configuration macros are not available, so I've made the definition of the variable unconditional. This is not a perfect approach, but it should work well enough. Here's the commit https://github.com/arkhipenko/TaskScheduler/commit/907f20d6408de7eeaad0a2fa06588154fa271153 that implements it. I won't be preparing a PR, since our history diverged slightly with the manual merging of my previous PR and I won't be able to spend more time on this now.

The current implementation in v2.2.0 still doesn't work with multi file projects. This is because the constructers weren't made inline. Regardless of that I advise to throw away the inline approach and either implement pull request #16 or #23.


Add loom support to crossbeam-epoch

It'd be really cool if crossbeam-epoch had support for loom. That would allow us to write more reliable tests where every execution interleaving and atomic visibility case actually gets exercised, without resorting to some of the "spin up a bunch of threads" tests we have today. It would also allow downstream crates to write similar tests on top of crossbeam-epoch, such as in flurry where we need loom to exercise some tricky contention cases that are hard to hit reliably otherwise.
The loom README has a decent amount of info on how to go about adding loom support, but it basically boils down to using types from loom instead of from std (or core) when cfg(loom). Then, for tests, you just surround the test with loom::model(|| {}), and loom will automatically run the closure under different concurrent execution schedules.
/cc @jeehoonkang @carllerche @domenicquirl

The sanitize feature is another example of something that could probably go away if we had loom support.

One tricky thing we'd have to figure out is how to expose loom support to downstream crates. If we make it a cfg(loom) the way the loom docs suggest, then I think we'd have to make loom a non-optional dependency since you can't set per-cfg dependencies. Alternatively, we just make loom a feature (like sanitize) — not sure why that's not what the loom docs propose.

Just wondering, does loom support atomic::fence?

Yup, though not compiler_fence.


Is this project abandoned?

I think the author has not been active for a while in general.
I am not sure if someone would be willing to maintain it in the future (if so, I had luck emailing him a while ago).
TBH I do not feel 100% comfortable with my understanding of the code base to take it on but would gladly help someone else who gets ownership transfered/added as editor.

This is sad. @jspaezp What did the author say? Would be cool to email them and ask if they are coming back.

Ok, so found his linkedin profile page https://www.linkedin.com/in/alexander-jung-085448140/?originalSubdomain=ch, basically he stopped working on it, rn he is a ML SWE at Apple.

@rubenamtz-msft has not replied. So I have to assume it is abandoned ...

It would be great, if the project could then be transferred to a group of people who is willing to (at least) merge bug fix pull requests. It is a great library!

Hi guys, sorry for being dead for so long. There was an endless string of other things that had higher priority (e.g. interview prep, relocation between countries, tons of work at a new job, ...). Sadly, my new position doesn't allow me to work on open source software due to possible conflicts of interest. 😢 Even bugfixes require an explicit approval, so my hands are tied. Not that I had the time anyways, but that's a different story. I could give somebody else the necessary permissions to improve on the library, though I do remember that maintaining it was a lot of work.


Create CONTRIBUTING.md

Add missing contributing guide
If anyone can add other information such as a style guide would be great.

As I described in README,

If you have an interesting use case for these files or have a request, please create an issue.

In this repository, we won't accept PR from outside contributors.

Oh, I see. I tried to add this file to configure the CLA bot.
Then I think we should be more specific about there's no outside contribution policy.
I'll cancel configuring the CLA bot.


[Host.Serialization] HybridMessageSerializer builder does not resolve specialised

When adding the hybrid message serializer, instances of the specialised serializers need to be supplied which complicates the dependency management of those serializers.
It would be better if instances of the specialised message serializers were resolved from the DI container instead.

Yes, I agree. It's something I was also thinking about. Thanks for looking into this.
One minor ask, please raise the discussion first in the issue before starting to implement the PR feature.
I would like to have at least a chat to align on the direction. Sometimes there would be things I was thinking about for the future that would be good to discuss or shed some light on related things :)
Nevertheless, good idea!

One minor ask, please raise the discussion first in the issue before starting to implement the PR feature. I would like to have at least a chat to align on the direction. Sometimes there would be things I was thinking about for the future that would be good to discuss or shed some light on related things :)

That's a perfectly reasonable request. It started off as a very minor extension method change that I thought I would just start the conversation with but snowballed fairly rapidly :/

@EtherZa have a look at a few minor things.
I am also wondering if there is a way we could not require hybrid to be configured as the last (while ensuring backward compatibility with the overall serializer configuration experience).
Looks good overall!

It definitely has a smell about it. One solution could be to allow for registration to happen in the HybridSerializerOptionsBuilder itself instead of beforehand.
Something like

    services
        .AddSlimMessageBus(mbb =>
        {
            mbb
                .AddHybridSerializer(
                    o => {
                        o..AddJsonSerializer(options)
                            .AsDefault();

                        o..AddAvroSerializer()
                            .For(typeof(Message1), typeof(Message2));

                        o..AddGoogleProtobufSerializer()
                            .For(typeof(Message3));
                    })
                ...
        }

In order to facilitate this, an interface could be added to SlimMessageBus.Host.Serialization which would need an implementation in each of the serializers
i.e
    // In SlimMessageBus.Host.Serialization
    public interface IHybridBuilder
    {
        IHybridBuilderOptions RegisterSerializer<TSerializer>(Action<IServiceCollection> services = null) where TSerializer : IMessageSerializer;
    }

    public interface IHybridBuilderOptions
    {
        IHybridBuilder For(params Type[] types);
        IHybridBuilder AsDefault();
    }

    // In each of the serializer assemblies
    public static class MessageBusBuilderExtensions
    {
        // Original builder
        public static MessageBusBuilder AddJsonSerializer(this MessageBusBuilder mbb, JsonSerializerOptions options = null)
        {
            ...
        }

        // An overload for hybrid
        public static IHybridBuilderOptions AddJsonSerializer(this IHybridBuilder builder, JsonSerializerOptions options = null)
        {
            return builder.RegisterSerializer<JsonMessageSerializer>(services =>
            {
                services.TryAddSingleton(svp => new JsonMessageSerializer(options ?? svp.GetService<JsonSerializerOptions>()));
            });
        }
    }

By making the services parameter in IHybridBuilder.RegisterSerializer optional, it could be used for both DI registration or to add an already registered serializer to the hybrid builder (third party based on previous implementations).
The hybrid builder would still need to replace any previous IMessageSerializer registrations and, while the implementation would require a migration from previous implementations, it could be a more succinct approach.
It would also require a bump to the SlimMessageBus.Host.Serialization nuget package which would be a consideration.

@EtherZa  building on your idea, I am proposing to extract an ISerializationBuilder that will allow us to configure the serializer at the bus builder level (as is now) plus will allow the hybrid serializer to perform the same registrations inside of itself (the hybrid serializer builder would implement ISerializationBuilder too).
Such a change could allow to achieve your provided sample - still be backwards compatible and have a nice developer API to configure this:
    services
        .AddSlimMessageBus(mbb =>
        {
            mbb
                .AddHybridSerializer(
                    o => {
                        o.AddJsonSerializer(options)
                            .AsDefault();

                        o.AddAvroSerializer()
                            .For(typeof(Message1), typeof(Message2));

                        o.AddGoogleProtobufSerializer()
                            .For(typeof(Message3));
                    })
                ...
        }

Could you accommodate your changes on top of the proposed PR?
Does that work conceptually?

@zarusz It's a nice suggestion but would leave two issues that would need to be overcome:

a lack of context when the "AddSerializer" specialisation returns (the builder would not be privy to which serializer was just added)
The fluent extension methods (.AsDefault() and .For()) would both need to be on the builder which then allows o.AsDefault() to be called without having set a serializer first.

    services
        .AddSlimMessageBus(mbb =>
        {
            mbb
                .AddHybridSerializer(
                    o => {
                        o.AsDefault();

                        o.For(typeof(Message1), typeof(Message2));
                    })
                ...
        }

Unless, of course, I am missing something? :)

@EtherZa so I was thinking that the o in your example would be a custom hybrid builder object (HybridSerializationBuilder from hybrid serializer assembly), that would implement ISerializationBuilder hence allowing the standard serializer methods to apply. Then that same type HybridSerializationBuilder to has .AsDefault() or .For().
Then .AddHybridSerializer(o => {}) wrapping the other serializer setup would do the Replace on IMessageSerializer (in the PostConfigurationActions) as the last (so it would be privy?). What might be needed is to know what serializer implementation was registered is to run the post actions there to capture the side effects of each o.AddJsonSerializer()  and to know to pair it with the respective AsDefault() or For() - it could have a ServiceCollection wrapper (or its own instance for just one pass) to introspect what was added.
Now, I think experimenting with the code might highlight issues in my thinking but I believe this could work ;)

I will submit an alternative PR with the original proposal as well, and perhaps when seen side by side, there will be a clearer path ahead.

@zarusz I have added an alternative PR using the specialised builder proposal for review.
If you still prefer the common implementation, please let me know. There are a few more unit tests that will need to be added if you want to follow this path.

@EtherZa thanks for your patience on this, and for going back and forth with me.
I merged the PR #241 of mine to rule out some moving parts from the conversation as I think it won't hurt and might be used in the overall end-state solution. Apologies if it causes conflicts now in the PR.
Regarding the alternative PR #242 am not a fan of adding hybrid specialized config elements into .Host.Configuration, secondly having to maintain alternative config extension methods in the individual serializer packages. It's a good approach too, just still thinking about massaging this initial idea a bit more might do the trick.
Going back to this idea. I think we could still improve the intellisense in this last approach presented in your original #239, by perhaps starting with AsDefault/For first:
.AddHybridSerializer((HybridSerializerBuilder o) =>
{
   o.AsDefault().AddJsonSerializer(); // We start with first AsDefault returns its own instance of ChildHybridSerializerBuilder
   o.For(typeof(CustomerEvent)).AddAvroSerizaliser();
});

class HybridSerializerBuilder {
  ChildHybridSerializerBuilder AsDefault()  {}
  ChildHybridSerializerBuilder For(params Type[] types)  {}
}

class ChildHybridSerializerBuilder : ISerializationBuilder {
 // this does the post actions visitation, only takes the builders and action delegates into account that actually configured the ServiceCollection
}

So essentially, the difference is that the AsDefault/For needs to be used first which then create their own builders
That way both the intellisense should get better, as well as it should get less error prone.
Let me know.  I am happy to move this one forward.

@EtherZa thanks for your patience on this, and for going back and forth with me.

@zarusz Absolutely no issue here. It's worth getting it right.
Moving the .For() and .Type() methods up the "stack" is an interesting idea.
Would you be happy to take a bite from PR #242 and add a method to the ISerializationBuilder to be used for registration by the message serializers (in order to capture the IMessageSerialzier type)?
The implementation in MessageBusBuilder would then also be responsible for registering the service as an IMessageSerializer in IServiceCollection.
public interface ISerializationBuilder
{
    void RegisterSerializer<TMessageSerializer>(Action<IServiceProvider> services) where TMessageSerializer : IMessageSerializer;
}

public class MessageBusBuilder : ISerializationBuilder
{
    public void RegisterSerializer<TMessageSerializer>(Action<IServiceProvider> services) where TMessageSerializer : IMessageSerializer
    {
        this.PostConfigurationActions.Add(services);
        services.TryAddSingleton<IMessageSerializer>(svp => svp.GetRequiredService<JsonMessageSerializer>());
    }
}

public class ChildHybridSerializerBuilder : ISerializationBuilder
{
    public void RegisterSerializer<TMessageSerializer>(Action<IServiceProvider> services) where TMessageSerializer : IMessageSerializer
    {
        this.PostConfigurationActions.Add(services);
        // do something with typeof(TMessageSerializer)
    }
}

// MessageBusBuilderExtensions
public static MessageBusBuilder AddJsonSerializer(this MessageBusBuilder mbb, JsonSerializerOptions options = null)
{
    mbb.PostConfigurationActions.Add(services =>
    {
        services.TryAddSingleton(svp => new JsonMessageSerializer(options ?? svp.GetService<JsonSerializerOptions>()));

        // Removed (added by ISerializationBuilder where necessary)
        // services.TryAddSingleton<IMessageSerializer>(svp => svp.GetRequiredService<JsonMessageSerializer>());
    });
    return mbb;
}

The implementation would solve most of the issues but would leave the fluent building in HybridSerializerBuilder able to add multiple serializers as the default/for the same type. This is probably an acceptable caveat though as it could be done with multiple entries anyway.
var hsb = new HybridSerializerBuilder();
hsb
    .AsDefault()
    .AddSampleSerializer()
    .RegisterSerializer<SampleSerializer>(sp => { });

hsb
    .For(typeof(string))
    .AddSampleSerializer()
    .AddSampleSerializer();

// same issue (cannot be avoided at compile time)
hsb
    .AsDefault()
    .AddSampleSerializer();

hsb
    .AsDefault()
    .RegisterSerializer<SampleSerializer>(sp => { });

hsb
    .For(typeof(string))
    .AddSampleSerializer();

hsb
    .For(typeof(string))
    .AddSampleSerializer();

@zarusz I have updated the PR with the implementation as described above

It is resolved as part of #239 thanks to @EtherZa.


[Question] simalar projects

Hi nedorazrab0,
thank you for this module.
I am sorry for opening an issue but I do not know where else to ask this
Until now I was using systemui-bootloop, but it has not got an update for years and seems abandoned.
Are these projects somehow related?
How does these projects differ?
Thanks a lot for clarifying things for me.

Hi nedorazrab0,
thank you for this module.
I am sorry for opening an issue but I do not know where else to ask this
Until now I was using systemui-bootloop, but it has not got an update for years and seems abandoned.
Are these projects somehow related?
How does these projects differ?
Thanks a lot for clarifying things for me.

systemui-bootloop disables modules when systemui crashes, abootloop disables modules if you press the power key at boot. These are different projects

Thank you (:


feat: added min_password_strength validator

This will still have to be added to the documentation but I can do that in a future PR.

Thanks!


Onnx export of image_encoder

Dear all
once again I'm facing an issue when trying to export @heyoeyo's implementation of image_encoder to onnx. I'm using tracing-based exporter, since I wasn't successful with TorchScript and Dynamo. Seems like the issue lies in https://github.com/heyoeyo/muggled_sam/blob/3502a328cca4352e024487dd68d2551dd8a83b6a/lib/v2_sam/image_encoder_model.py#L78
Error is
Exported graph: graph(%input : BFloat16(1, 3, 512, 512, strides=[3, 1, 1536, 3], requires_grad=0, device=cuda:0),
      %patch_embed.proj.weight : BFloat16(96, 3, 7, 7, strides=[147, 49, 7, 1], requires_grad=1, device=cuda:0),
      %patch_embed.proj.bias : BFloat16(96, strides=[1], requires_grad=1, device=cuda:0)):
  %output : BFloat16(1, 96, 128, 128, strides=[1572864, 16384, 128, 1], requires_grad=0, device=cuda:0) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[7, 7], pads=[3, 3, 3, 3], strides=[4, 4], onnx_name="/patch_embed/proj/Conv"](%input, %patch_embed.proj.weight, %patch_embed.proj.bias), scope: lib.v2_sam.image_encoder_model.SAMV2ImageEncoder::/lib.v2_sam.components.imgenc_components.HalfStepPatchEmbed::patch_embed/torch.nn.modules.conv.Conv2d::proj # /usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py:454:0
  return (%output)

/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py:1738: UserWarning: The exported ONNX model failed ONNX shape inference. The model will not be executable by the ONNX Runtime. If this is unintended and you believe there is a bug, please report an issue at https://github.com/pytorch/pytorch/issues. Error reported by strict ONNX shape inference: [ShapeInferenceError] (op_type:Conv, node name: /patch_embed/proj/Conv): X typestr: T, has unsupported type: tensor(bfloat16) (Triggered internally at ../torch/csrc/jit/serialization/export.cpp:1469.)

The original encoder module seems to export fine, but is quite different from this implementation and thus doesn't give me any hint. I know, onnx export is not the intention of this repo, but maybe someone has an idea what might be going on.
Cheers

Hi @mgrewe, I've also been running into a bunch of issues with onnx exporting! The error messages tend to confuse me quite a bit.

The original encoder module seems to export fine

The original patch embedding model is more or less identical to the muggled SAM version at least. I wonder if that means the errors are occurring at some other point and only breaking exporting once it gets to the patch embedding model... I know that the caching inside muggled SAM can cause some problems with exports at least.
For the error you posted, it mentions unsupported type: tensor(bfloat16) which is something I've run into as well. I'm not sure how to properly enable bfloat16 support with onnx, but it does seem like 'regular' float16 (or float32) works. So if your use case supports float16, that might be a way to get the export working.
Here's some code that seems to export the v2 image encoder without major errors:

Onnx export SAMv2 image encoder
class SAMV2OnnxImageEncoder(nn.Module):
    """Wrapper around SAMv2 image encoder, used to help with onnx exporting"""

    def __init__(self, sam_model: SAMV2Model, image_size: int = 1024):

        # Inherit from parent
        super().__init__()

        # Store image encoder for use in forward pass
        self.model: SAMV2ImageEncoder = sam_model.image_encoder

        # Figure out compatible image sizing
        tiling_constraint = self.model.get_image_tiling_size_constraint()
        constrained_size = int(np.ceil(image_size / tiling_constraint) * tiling_constraint)
        self._scale_hw = (constrained_size, constrained_size)

        # Set up helper variable to keep track of model device & data type
        self.register_buffer("device_info", torch.empty((1)), persistent=False)

    def forward(self, image_rgb_tensor_bchw: torch.Tensor) -> torch.Tensor:

        # Scale input to target sizing & apply mean/scaling offsets
        scaled_img = nn.functional.interpolate(
            image_rgb_tensor_bchw.to(self.device_info),
            size=self._scale_hw,
            mode="bilinear",
            align_corners=False,
        )
        scaled_img = (scaled_img - self.model.mean_rgb) * self.model.stdev_scale_rgb
        image_encoding = self.model(scaled_img)

        return image_encoding

    def make_example_input(self) -> torch.Tensor:
        """Helper used to make example input 'args' for onnx export"""

        example_param = next(self.parameters())
        device, dtype = example_param.device, example_param.dtype
        return torch.randn((1, 3, *self._scale_hw), device=device, dtype=dtype)

# Settings
model_path = "/path/to/model.pt"
device = "cpu"
dtype = torch.float16
image_size = 512

# Create 'onnx-able' version of the image encoder for exporting
_, full_sam_model = make_samv2_from_original_state_dict(model_path)
imgenc_model = SAMV2OnnxImageEncoder(full_sam_model, image_size)
imgenc_model.to(device, dtype)

# Export model 'in memory' to avoid disk IO while testing
print("", "Exporting image encoder...", sep="\n", flush=True)
file_in_memory_imgenc = io.BytesIO()
torch.onnx.export(
    f=file_in_memory_imgenc,
    model=imgenc_model,
    args=tuple([imgenc_model.make_example_input()]),
    input_names=["input"],
    output_names=["output"],
    export_params=True,
    do_constant_folding=True,
    opset_version=14,
    dynamic_axes={
        "input": {0: "batch", 2: "height", 3: "width"},
        "output": {0: "batch", 2: "height", 3: "width"},
    },
)

# Confirm export result is ok
file_in_memory_imgenc.seek(0)
imgenc_onnx_model = onnx.load(file_in_memory_imgenc)
onnx.checker.check_model(imgenc_onnx_model)

# Save to disk
save_path = "/path/to/model.onnx"
enable_save = False
if enable_save:
    file_in_memory_imgenc.seek(0)
    with open(save_path, "wb") as file:
        file.write(file_in_memory_imgenc.getvalue())
    print("", "Saved onnx model:", save_path, sep="\n")

And here's code that can test the onnx model on an image:

Test onnx export
import cv2
import numpy as np
import onnx
import onnxruntime

# Test image
image_path = "/path/to/image.jpg"
onnx_path = "/path/to/model.onnx"

# Make sure we can load the onnx model
# -> Can skip loading from a file here if this code runs after the
#    exporting code (i.e. directly use 'imgenc_onnx_model' from export)
#    this helps avoid lots of reading/writing to disk while testing
imgenc_onnx_model = onnx.load(onnx_path)
ort_session = onnxruntime.InferenceSession(
  imgenc_onnx_model.SerializeToString(),
  providers=["CPUExecutionProvider"],
)

# Load image and convert to RGB with batch/channels/height/width dimension ordering
# -> BGR-to-RGB could be built in to model if needed
# -> Instead assuming model will be used elsewhere, where RGB is already default format
img_bgr = cv2.imread(image_path)
img_rgb_bhwc = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB)
img_rgb_bchw = img_rgb_bhwc.swapaxes(0, 2)[None, :]

# Cast input to type expected by model
is_float16 = "float16" in ort_session.get_inputs()[0].type
img_rgb_bchw = img_rgb_bchw.astype(np.float16 if is_float16 else np.float32)

# Run the onnx model on real data to test it
onnx_output = ort_session.run(None, {"input": img_rgb_bchw})
print("", "Onnx model run results:", sep="\n")
print("  Num outputs:", len(onnx_output))
print("  Data type:", onnx_output[0].dtype)
print("  Example output shape:", onnx_output[0].shape)

That being said, this gives loads of warnings about needing to hard-code some of the boolean checks inside the model (which breaks support for changing input image sizing I believe...?), which I haven't figured out a solution for.

Hi @heyoeyo
thanks for your answer. I think even if orig and this implementation are semantically equivalent, it might still fail in one case while working in the other - e.g., depending on which ops where used, and orig encoder exports fine with bfloat16. Have you compared results of float16 vs. bfloat16, did you experience significant loss of accuracy?

I know that the caching inside muggled SAM can cause some problems with exports at least.

What kind of caching are you referring to? The memory bank or other module parameters? I haven't gotten very far yet, but I was thinking about arranging state entirely in tensors, esp. prompt_{memory*|object*} and previous_{memory*|object*}. Ideally, I would like to have computations entirely in nn.Modules and only maintain buffer memory from outside.
By the way: is there any empty placeholder (like no_mem_embed) that could be inserted into memory to maintain static tensor size during memory fusion, e.g., when tracking has just started and there are fewer previous frames than max_memory_history?

Just tried to comment-out everything except patch_tokens_bhwc = self.patch_embed(image_tensor_bchw) from SAMV2ImageEncoder's forward method. Error is still the same. Weird since HalfStepPatchEmbed only has a nn.Conv2d layer :shrug:

Have you compared results of float16 vs. bfloat16, did you experience significant loss of accuracy?

I haven't check it out too carefully for SAMv2, but with another model I found float16 is generally more 'accurate' (at least in terms of matching the float32 result) but can be prone to generating NaN or inf results in some cases (some more discussion of that can be found in the dinov2 issues board).
The muggled sam scripts use a helper function that has a default arg of prefer_bfloat16=True. If you switch that to False, the scripts will all use float16 instead, so that's a quick way to check for differences. Here's a comparison flipping between bf16/f16/f32 two (showing colormapped mask logits):

There are noticeable differences between f16 & bf16, but it's not clear if one is better than the other.

What kind of caching are you referring to?

For the image encoder, the caching shows up when computing the position encoding for the patch embedding. The onnx exporter doesn't like the boolean checks used to check for cache mismatching, so it can cause problems, and it seems to flat-out fail if the cache exists (i.e. if you run the model once before exporting).
There are a number of other places where caching is used which you can find by searching for "persistent=False" since that's used to stop the cached tensors from being included in the model weights.

I was thinking about arranging state fully as tensors

That's a good idea. I'm still working through updating the memory steps to properly include the changes introduced by the v2.1 models, but once that's finalized I'll probably make a similar change to taking tensors as inputs.

is there any empty placeholder that could be inserted into memory to maintain static tensor size during memory fusion

I don't think there's any learned embedding for that, but repeating the prompt memory to fill up all previous frame slots should probably work ok. Filling the memory with zeros also seems to work (may vary by video though!). A quick way to check this is to modify the initial state of the video_segmentation.py example script to something like:
prev_mems = deque([init_mem] * 6, maxlen=6)
prev_ptrs = deque([init_ptr] * 15, maxlen=15)

This doesn't seem to (qualitatively) change the results for me. Using [init_mem * 0.0] * 6 as the filler value also works.

Just tried to comment-out everything except patch_tokens_bhwc = self.patch_embed(image_tensor_bchw)

Super weird! My experience with the onnx exporting has mostly been dealing with surprising errors as well. I'm guessing there's some set of config parameters for onnx that would resolve the issue, but I haven't looked into it enough to figure out yet.

Actually one thing that might be worth doing is putting the original encoder onnx model into netron to view the structure (at least up until the patch embedding part). Here's what the muggled sam version (from the code above) looks like:

The highlighted Conv block is where the exporting error occurs. Interestingly, though the bfloat16 version of muggled sam doesn't work, it can still be exported/saved and viewed in the netron app, and looks the same (but the initial cast is to bfloat16). So maybe the original encoder does something different to avoid the error?

Do you see a way of expressing this without conv op?

It could be done using a linear layer repeatedly applied to each of the patches, or otherwise as a single linear layer applied once to a matrix version of the image, re-arranged in a special way...
However, I think the extra work of shuffling the data around to make it work with linear layers would add a lot of overhead. The conversion you did (to float16, then back to bfloat16) is probably the easiest/fastest solution.

However, next op missing bfloat16 support is MaxPool in HieraModel

The max pooling steps are super simple, it's just looking at 2x2 collections of values and keeping only the maximum value (out of the 4 values in the 2x2 grid). To see what it's doing, you can try running:
import torch
data = torch.arange(16).reshape(1,1,4,4)
print(data)
# [[ 0,  1,  2,  3],
#  [ 4,  5,  6,  7],
#  [ 8,  9, 10, 11],
#  [12, 13, 14, 15]]

pool = torch.nn.MaxPool2d(2)
print(pool(data))
# [[ 5,  7],
#  [13, 15]]

So it's just taking the max value from the first 2x2 block (0, 1, 4, 5 -> max is 5), then the max of the next 2x2 block (2, 3, 6, 7 -> max is 7) and so on.
This is probably something that could be easily implemented manually, but indexing out the 2x2 blocks and then re-building the smaller resulting tensor would involve a lot of data shuffling/overhead. It may again just be simpler & faster to do the conversion to regular float16 (or float32 if stability is a concern) for the maxpool step and then convert the result back to bfloat16 afterwards.


Request new module repository:  MAS-manage gitops

Related user story
GitOps module for Maximo - Manage #8
Type of module
gitops
If requesting a terraform module, what is the target cloud platform?
ibm, aws, azure, etc
What is the purpose of the module?
Install MAS manage operator
What is the category of the module?
Middleware - Maximo

@seansund can you approve new repo creation?

/name mas-manage


[WebGPU] Add mlc wasm runtime, support grammar in web

This PR supports wasm runtime in MLC. The main change is a web folder, built similarly to tvm/web.
By running make under web,  we create artifact mlc_wasm_runtime.bc, which is passed into the model library's wasm (see changes in auto_target.py), so that during runtime, WebLLM can directly use functions defined in MLC-LLM that are registered globally in TVM.
Currently, only global TVM functions in grammar are included in the wasm (see the included list in web/emcc/mlc_wasm_runtime.cc). We also define macro COMPILE_MLC_WASM_RUNTIME so that dependencies can be minimized (otherwise we need to build the entire tokenizers-cpp into the wasm). FindNextTokenBitmaskAsNDArray() is defined additionally to help Web runtime deal with bitmask more easily.
For users, there is virtually no difference when compiling wasm, since we update scripts/prep_emcc_deps.sh. They may need to define MLC_LLM_HOME in addition so that we can look up mlc_wasm_runtime.bc. Documentation is updated correspondingly.
Depends on: https://github.com/apache/tvm/pull/16825
On WebLLM side: https://github.com/mlc-ai/web-llm/pull/350

For wasm CI, need to wait for https://github.com/apache/tvm/pull/16825 to be picked into relax and a rebuild of mlc-ai-nightly


[Common Config Bootstrapper] Apply env overrides to values only when loaded from file

As decide in 3/15/2023 Architects meeting, Config Provider will be the System of Record for services' values.
This means that env overrides are only applied when configuration is loaded from file, including the common config file.
They are not applied to values loaded from Config Provider.
The overridden values are pushed into the Config Provider the first time the service starts or when the -o flag is used.

On hold until overrides are applied and pushed into Config Provider and verify that it resolves this issue.

@farshidtz if we don't push the environment overrides to the Config Provider during the first time startup, the Config Provider would be seeded with the default config files only.  For example, the other service client host will be localhost instead of core-metadata, which is the correct host name in the docker network environment.  We leverage the environment variable overrides to adjust the config in the docker-compose files.  It won't work in docker environment if we don't push the initial values.

The Common Config ADR is being modified to formalize the decisions: https://github.com/edgexfoundry/edgex-docs/pull/1025


Support "hyphenat" / add feature for hyphenation in monospace text

See motivation from the hyphenat package, and this question and this other question.

Following a recent discussion in the LuaTeX users mailing list, it seems fontspec already has hyphenation by default in monospace text. In order to follow the standard latex settings, maybe \setmonofont should set HyphenChar=None by default unless explicitly changed.
Not filing it as a new issue because it is highly related to this.

Thanks — I’ve added the line to the .cfg file for \setmonofont.
I don’t know why this never occurred to me to do in the past...


Add new certs to Samples

Samples for middleware must have server certs updated as per C SDK and Embedded C SDK. They can't have only Baltimore, since this is about to be retired.

See https://github.com/Azure-Samples/iot-middleware-freertos-samples/pull/129

The new certs have been added so this can be closed.


Spring Security False Positives (again)

It looks like Spring Security 3.2.8 is showing up as a false positive in the dependency check.  This is the current version for the 3.2.8 line and as far as I know, there are no CVE's associated with it. Please let me know if you need further information.

Actually, I believe this is a correct report. I am still not 100% sure of the relationship between Pivotal, VMWare, and SpringSource - but there are CPE/CVE combos for all three related to Spring. For instance, info one of the Pivotal Spring Framework CVEs can be found here: https://jira.spring.io/browse/SPR-12354
Info on the other can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=1131882
By current version of 3.2.8 - I'm not sure what you mean. There are newer versions of 3.2.x:
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>3.2.14.RELEASE</version>
</dependency>

I just realized you said Spring-Security. That is a false positive and I corrected the issue. Sorry for the misunderstanding on my above comment.
The patch has been added to the core 1.3.1-SNAPSHOT and will be included in the next release.
Best Regards,
Jeremy

FWIW, Pivotal is a company VMWare started to house lots of projects that
were once under the "vFabric" suite, including Spring, CloudFoundry, and
some other things (unfortunately, the Pivotal site doesn't make that very
clear). So basically, Spring Foundation as an opensource group was bought
by vmware, who then spun off a new company with those folks called Pivotal.
On Sun, Aug 23, 2015 at 6:19 AM, Jeremy Long<EMAIL_ADDRESS>wrote:

Actually, I believe this is a correct report. I am still not 100% sure of
the relationship between Pivotal, VMWare, and SpringSource - but there are
CPE/CVE combos for all three related to Spring. For instance, info one of
the Pivotal Spring Framework CVEs can be found here:
https://jira.spring.io/browse/SPR-12354
Info on the other can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1131882
By current version of 3.2.8 - I'm not sure what you mean. There are newer
versions of 3.2.x:

org.springframework
spring-core
3.2.14.RELEASE

—
Reply to this email directly or view it on GitHub
https://github.com/jeremylong/DependencyCheck/issues/319#issuecomment-133813212
.

Thanks for the followup and the quick fix @jeremylong


Correction for raw affiliation UMR ECOSYS, UniversitÃ© Paris Saclay, INRAE, AgroParisTech, 91120 Palaiseau, France

Correction needed for raw affiliation UMR ECOSYS, UniversitÃ© Paris Saclay, INRAE, AgroParisTech, 91120 Palaiseau, France
raw_affiliation_name: UMR ECOSYS, UniversitÃ© Paris Saclay, INRAE, AgroParisTech, 91120 Palaiseau, France
new_rors: 02kbmgc12;01z6yh944;003vg9w96;03xjwb503
previous_rors: 02kbmgc12;01z6yh944;003vg9w96
works_examples: W4318021299
contact: f22562aecdbcd2a7a6c11603d34563eb:09d88d7b1943eb59425dc5fc640ec81140af @ agroparistech.fr

This issue was accepted and ingested by the OpenAlex team on 2024-12-19. The new affiliations should be visible within the next 7 days.


Translation files added

Problem
Translations files were missing after pip install
Solution
The binary files were added to the git for now.
The UI of the main window has been moved to a .ui file
WIP

Thanx


fix(ssa refactor): Speedup acir-gen

Description

Problem*
Resolves https://github.com/noir-lang/noir/issues/1750
Summary*
After a flamegraph profiling I found out that most time in acir-gen for the eddsa test was spent in mul_var and sub_var, and most time in those methods was spent in TwoWayMap::insert where to insert a new AcirVar, AcirVarData pair we were calling FieldElement::eq repeatedly which uses to_bytes_be internally.
To fix this, I changed the TwoWayMap to a single-way map. The downside of this fix is if an identical AcirVarData is ever tried to be inserted, it will be assigned a new id instead of an existing one. This may slow down proving later on.
Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.

It is worth noting that nargo prove --experimental-ssa still takes 62s on my machine for eddsa in release mode. Most of the time is spent on proving.


Bug 2085329: Use v1 PodDisruptionBudget and CronJob resources

Both the PodDisruptionBudget and CronJob resources have been promoted
to v1 as of Kubernetes v1.21 release.  The previous v1beta1 versions
are now deprecated, and will be removed in v1.25 and above.  This
updates all references to the new v1 versions.
(cherry picked from commit d01ad03ae64661f37caa79b97ad8a4edf2ac3933)

What this PR does / why we need it:  kube-state-metrics trips APIRemovedInNextEUSReleaseInUse in 4.10 clusters because it is watching v1beta PDB
How does this change affect the cardinality of KSM: does not change cardinality
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2085326

/bugzilla refresh

/bugzilla refresh

/retitle  Bug 2085329: Use v1 PodDisruptionBudget and CronJob resources #72

/retitle Bug 2085329: Use v1 PodDisruptionBudget and CronJob resources

/label cherry-pick-approved

/label qe-approved

/label cherry-pick-approved

/bugzilla refresh
/label backport-risk-assessed

/lgtm


[ZD-2703623] deleting space after @mention cursor jump

Context
This pull request fixes the cursor jumping problem when using @mention inside the content editor in zendesk_console. Whenever we use emoji and the mention functionality, the At.j library inserts a span with the attribute contenteditable=false while our content editor (see .zendesk-editor--rich-text-comment) has the attribute contenteditable=true. Right now, this kind of nesting is buggy and will cause weird behavior.
cc @zendesk/sustaining @zendesk/harrier
Please see these PR's for reference:
Pull request that introduced the bug:
https://github.com/ichord/At.js/pull/423
Pull requests looking to reverse or have already been reversed:
https://github.com/ichord/At.js/issues/463
https://github.com/CenterForOpenScience/At.js/pull/3
Description
Zendesk Support Ticket 2703623
Steps to reproduce:

Login a user with admin access.
Go to /agent/tickets/<ticket-number>
Try mentioning someone in either the public reply or internal note.
After choosing a person to mention, press backspace and the cursor will jump to the end of the wysiwyg editor.

Before
Google Chrome

Safari

After
Google Chrome

Safari

Risks
Low: the change just removes an attribute in html which the library doesn't use and adds \u200D as hack for the cursor positioning.

@zendesk/orchid


CrashPlan Backup Report Area of Concern?

Running this docker on my Synology Nas, have been since early this year.  At some point, the CP Backup reports began expressing 1 area of concern, that has been an ever increasing Last backup activity number which is up to 3.4 months ago not, and same associated stat for Last completed backup.
However, the webinterface to the container surely suggests that the backup to CP is working, and if I stage test by adding new file to the volume, it shows up as a file I can restore, and I have demonstrated the ability to restore them.
I can't say I'm 100% comfortable however with the status reporting figure since last backup run continues to grow.

Have you updated to the latest Docker image? I noticed the same a while back when CrashPlan pushed an update (the Docker image doesn't auto-update).

Closing this issue.  Please re-open if needed.


Run two categories of test with ng test

Description
I have two different types of tests:

Unit tests (standard angular cli .spec.ts files)
Functional tests (my specific .func.spec.ts files, works the same way as .spec.ts files, but not mocked and injects data in my db, so no need to run them all the time)

I am trying to :

Exclude the .func.spec.ts files from the ng test command to only run .spec.ts test file
Call the test command to only run .func.spec.ts

So my functional tests are not executed in the regular ng test context and can be run separately.
I tried to create a different karma config file that excludes the files I don't want but it does not work.
Versions
Angular CLI: 1.7.3
Node: 8.4.0
OS: win32 x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.3
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0

have you try exclude from tsconfig.spec.json?

then just create tsconfig.func.spec.json and declare 1 more app in .angular.json

@sandangel thank you for your suggestion and sorry for the long time to answer.
I tried to create another app that is an exact copy of my first one, expect that I reference another testTsConfig file:
"testTsconfig": "tsconfig.func-spec.json",
Then in this tsconfig file I change the include property from:
  "include": [     "**/*.spec.ts",     "**/*.d.ts"   ]
to:
  "include": [     "**/*.func.spec.ts",     "**/*.d.ts"   ]
That should theoretically work, but unfortunately the module bundler expects .spec.ts on every angular cli generated file (component, service, etc). I got this kind of error:

Uncaught Error: Module build failed: Error: C:\(...)\src\app\app.component.spec.ts is missing from the TypeScript compilation.

Any other suggestion?

have you tried to add exclude **/*.spec.ts to tsconfig.func-spec.json?

Yes, but same error: components, services and so on are still found and the ng test command tries to build the bundle with the spec files.

may be you should try include all func test in a specific folder
and use tsconfig path map for short import.

Tried to do that. Unfortunately it's still the same : Because I need to build my components and so on, the build error appears as well.

Anyone has an idea? I've tested so many workarounds, but none of them worked.

For support requests it'll be best to use StackOverflow or gitter. Although we see value in introducing separate setups for these different types of tests, I'd still recommend to explore ngx-build-plus or alternative way to extend the build. Let us keep this outside of the CLI.


Hidden: Refactor the  component to use the new getBreakpointsDeclarations util function and add missing stories and tests

Closes https://github.com/github/primer/issues/1664
Hidden component is being used in PageHeader and working as expected. After improving the way we manage the responsive visibility on PageHeader via getBreakpointDeclarations utility function to reduce the layout shift in SSR - I applied the same strategy to Hidden component. I refactored it to use the getBreakpointDeclarations function rather than useResponsiveHook as this is something can be achieved with CSS as well.
I also wrote unit tests, added docs and  stories.
Screenshots
No visual changes. All examples are available on storybook and docs.
Merge checklist

[ ] Added/updated tests
[ ] Added/updated documentation
[ ] Tested in Chrome
[ ] Tested in Firefox
[ ] Tested in Safari
[ ] Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Looking good! I just found one small bug in the PageHeader story.
When I resize the PageHeader story to a narrow viewport, I get an error:

This is interesting, I cannot seem to replicate it. Do you mind sharing a screen recording?

Here you go @broccolinisoup. This is from the preview deployment.
https://user-images.githubusercontent.com/2313998/213017797-3f7aac79-d707-413b-b2b4-b1fc43fd420d.mp4

Here you go @broccolinisoup. This is from the preview deployment.

@mperrotti Oh right!! This is on the new canvas! Sorry I missed that. Actually, this is a bug (more like an uncovered case) in UnderlineNav! Timing is a coincidence that I am synchronously working on it.

@joshblack just renamed a few things to reduce confusion around breakpoints/ranges and refactored PageHeader and getBreakpointsDeclarations function to use the media queries from a shared place (src/utils/layout.ts). (commit)
I'd like to merge this to move forward with the accessibility eng review for PageHeader - but please let me know if you have any concern - happy to address them in a following PR! - thanks so much again for your suggestions 🙏🏻


feat(amplify-function-plugin-interface): update contribute params

Some function plugins need access to the functionName and resourceName to properly construct templates and runtimes. This exposes a ContributionRequest object that has these parameters instead of just the raw selection string.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #3711 into master will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master    #3711    +/-   ##
========================================
  Coverage   59.28%   59.29%
========================================
  Files         287      285     -2
  Lines       13306    13304     -2
  Branches     2676     2529   -147
========================================
  Hits         7888     7888
- Misses       4992     5009    +17
+ Partials      426      407    -19

Impacted Files
Coverage Δ

packages/graphql-mapping-template/src/print.ts
35.71% <0.00%> (ø)

...ages/amplify-appsync-simulator/src/server/index.ts
64.28% <0.00%> (ø)

...ges/amplify-util-mock/src/CFNParser/stack/index.ts
88.09% <0.00%> (ø)

...ges/graphql-transformer-core/src/util/fileUtils.ts
11.76% <0.00%> (ø)

...es/graphql-transformer-core/src/stripDirectives.ts
35.29% <0.00%> (ø)

...amplify-appsync-simulator/src/server/operations.ts
28.12% <0.00%> (ø)

...graphql-transformer-core/src/TransformerContext.ts
26.20% <0.00%> (ø)

...mplify-appsync-simulator/src/resolvers/function.ts
9.67% <0.00%> (ø)

...plify-appsync-simulator/src/server/subscription.ts
26.95% <0.00%> (ø)

...lify-graphql-types-generator/src/compiler/index.ts
90.32% <0.00%> (ø)

... and 19 more

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 3bf6877...1add4c6. Read the comment docs.


istioctl: Add missing options ecds to proxyconfig example

Please provide a description of this PR:

@my-git9: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
0a7be7d07be7355e297874e704606defe3c44935
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@my-git9: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
0a7be7d07be7355e297874e704606defe3c44935
link
true
/test release-notes

integ-helm_istio
0a7be7d07be7355e297874e704606defe3c44935
link
true
/test integ-helm

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

/retest

@my-git9: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-helm_istio
0a7be7d07be7355e297874e704606defe3c44935
link
true
/test integ-helm

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

/test integ-helm

@my-git9: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-helm_istio
0a7be7d07be7355e297874e704606defe3c44935
link
true
/test integ-helm

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.


debug just my code setting

For #6870

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[x] Title summarizes what is changing
[x] Has a news entry file (remember to thank yourself!)
[ ] Appropriate comments and documentation strings in the code
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated
[ ] Test plan is updated as appropriate
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #7080 into master will decrease coverage by 0.76%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7080      +/-   ##
==========================================
- Coverage    58.3%   57.53%   -0.77%
==========================================
  Files         483      483
  Lines       21371    21025     -346
  Branches     3451     3446       -5
==========================================
- Hits        12460    12097     -363
- Misses       8130     8148      +18
+ Partials      781      780       -1

Impacted Files
Coverage Δ

src/client/common/types.ts
100% <ø> (ø)
:arrow_up:

.../client/datascience/jupyter/jupyterConnectError.ts
0% <0%> (-66.67%)
:arrow_down:

...science/jupyter/jupyterKernelPromiseFailedError.ts
0% <0%> (-50%)
:arrow_down:

...ent/datascience/jupyter/jupyterWaitForIdleError.ts
0% <0%> (-50%)
:arrow_down:

src/client/api.ts
60% <0%> (-27.5%)
:arrow_down:

src/client/language/characters.ts
12% <0%> (-21.34%)
:arrow_down:

src/client/testing/codeLenses/main.ts
60% <0%> (-17.78%)
:arrow_down:

src/client/datascience/cellFactory.ts
72.34% <0%> (-17.32%)
:arrow_down:

src/client/common/logger.ts
68.55% <0%> (-6.92%)
:arrow_down:

src/client/constants.ts
75% <0%> (-5%)
:arrow_down:

... and 27 more

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 fc95274...2310558. Read the comment docs.


Where do I submit security related issues?

Hello,
I'd like to report a potential security vulnerability, but I don't want to make it immediately visible to all.
What is the most appropriate way to submit it privately?

Ah, nevermind - it's already open here: https://github.com/ebidel/try-puppeteer/issues/6

Actually, found one more issue that wasn't reported yet, though could be nasty. Re-opening.
Please ping me over email address<EMAIL_ADDRESS>


Write single script that runs the by_name and human_curated pipelines end to end

Right now this is two scripts in here. It would be nice to have this all in one script that takes Anita's spreadsheet as input and outputs the final set of software to ROR links in the form consumed by consolidate_links.py. I think it would also be nice to convert this to python, now that we are out of hackathon mode, for the sake of consistency (and we could use #22 here and in #20). Would you be interested in working on this @sfisher ?

Thanks @jmelot, sorry for the late reply.  I hope I'll have some time later this week to look at this, if not I may have some time next week to work through it.  Is there a specific date you're targeting cleanup by?

Closed via https://github.com/jmelot/SoftwareImpactHackathon2023_InstitutionalOSS/pull/30 (and manual merging)


【Live 𝐒𝐭𝐫𝐞𝐚𝐦𝐬】 — 41st Breeders' Cup 2024— Live 𝐒𝐭𝐫𝐞𝐚𝐦𝐬  Horse RacingＦｒｅｅ — Anywheres

More than $34 million in prize money will be on the line when horses hit the track this weekend at the 41st Breeders' Cup World Championships.
A total of 14 races will be held during the two-day event, which will feature some of the best trainers, jockeys and horses from around the world.
WATCH:2024 Breeders' Cup Classic
Of course, the Breeders' Cup Classic is the headliner on the schedule. Horses like City of Troy, Fierceness, Forever Young, Sierra Leone and Next are expected to be the top contenders, but as horse racing fans know, you can never rule out the possibility of an underdog pulling off a stunning upset.
Here is everything you need to know about the Breeders' Cup schedule, including TV and streaming options for every race.
Coverage of the second day of the Breeders' Cup will take place on Saturday starting at 2 p.m. EDT from Del Mar, California.
There are a number of platforms where you can watch the races, including USA Network, NBC and Peacock. The $7 million Breeders' Cup Classic race will stream exclusively on Peacock on Saturday at 5:41 p.m. EDT. You can live stream USA Network on fubo TV (FREE trial), Sling TV (discount) and DirecTV Stream (FREE trial and discount).
Fierceness, Ireland-based City of Troy and Forever Young from Japan are among a full field of 14 horses for the Breeders' Cup Classic at Del Mar Racetrack.
The Classic field is among the 212 horses, including a record 80 from overseas, that were pre-entered for the $34 million, 14-race world championships that began Friday and will continue Saturday. Del Mar is hosting for a third time in the event’s 41-year history.
Citizen Bull won the $2 million Breeders' Cup Juvenile by 1 1/2 lengths and Gaming was second at Del Mar on Friday, giving Hall of Fame trainer Bob Baffert a 1-2 finish and his record sixth career victory in the race for 2-year-olds.
Ridden by Martin Garcia, Citizen Bull ran 1 1/16 miles in 1:43.07. He paid $33.80 at 15-1 odds.
Citizen Bull earned 30 qualifying points for the Kentucky Derby, where Baffert will return next year for the first time since 2021. His three-year ban by Churchill Downs ended in July.
WHAT: Breeders' Cup races
WHEN: Starting at 2 p.m. EDT Saturday
TV: NBC and USA Network
LIVESTREAM: fubo TV (FREE trial), Sling TV (discount) and DirecTV Stream (FREE trial and discount) and Peacock. The $7 million Breeders' Cup Classic race will stream exclusively on Peacock on Saturday at 5:41 p.m. EDT.
Gaming was the 6-1 third choice. Baffert’s other entry, Getaway Car named for the Taylor Swift song, finished fourth at 25-1 odds.
It was Baffert’s 19th career Cup win and he broke a tie with D. Wayne Lukas for most Juvenile victories.