Typing Doesn't Trigger Search

On the examples page for 3.5.2, if you use the tab key to give a select box focus and start typing, a search of the options begins, as desired.
On the examples page for 4.0, if you do the same thing, nothing happens. You are required to actually click the dropdown in order for searching to begin.
This is no good - I want my users to be able to tab through a form and, when they reach a dropdown, to be able to just start typing to begin searching, and use the enter key to make a selection. In other words, I don't want to users to have to use the mouse at all if they don't want to, which with 3.5.2 is possible, but with 4.0 is not.

I agree, this appears to be a breaking Ux change in 4.0. I would also include the change in behavior to the clear button (x) as a breaking Ux change in 4.0. It now displays the drop down automatically when clearing the selection.
Any suggestions on work-around(s) for these issues ?

This was an intentional change, and in order to understand why we changed it you need to understand how it was done before.
We started off doing this by listening to key events when the <div> was focused, and then repeating the character into the text box. This had two unfortunate side effects:

Not all browsers (cough Internet Explorer) handled key events the same way, and it was difficult to consistently get the typed in character.
Moving that typed character over to the search box meant moving the keyboard focus over and ensuring that the character wasn't highlighted. This proved to be more difficult than it should have, and both IE and Firefox had a tendency to lose the first character.

So we decided to make the focusing element an <input /> box, and have it be hidden out of sight. This fixed the IE issues, and we could consistently get the character typed (just get the .value). Eventually we were able to alleviate the second issue, but we ended up adding in a few new side effects:

Because were were automatically focusing the keyboard, any interaction with Select2 on a mobile device would trigger the on-screen keyboard.
We created an accessibility problem because there was no indication of what the focusing <input /> was actually for. And some screen readers actually ignored it, so it was impossible to navigate Select2 through a keyboard.

And that's why we added a shouldFocusInput option in Select2 3.x that disables the automatic focusing of the input if the user is on a mobile device and there isn't a visible search box. While that worked in a way, it was never considered anything more than a hack.
And that's why we no longer try to handle that case magically in Select2 4.0.
If we took the easy route and automatically opened the dropdown when we detected a keypress, that would work some of the time. But we would run into exactly the same issue that we originally hit. It would also block any possibility of us getting the searching to work when the dropdown is not open (so you can quickly select things), which is far out on our roadmap.
So we made the decision to not support it in Select2 4.0. You can still open the dropdown by hitting [space] or [enter], which is how it works in a normal <select>.

Thanks for the details.
Ed
On Sun, Apr 26, 2015 at 5:01 PM, Kevin Brown<EMAIL_ADDRESS>wrote:

This was an intentional change, and in order to understand why we
changed it you need to understand how it was done before.
We started off doing this by listening to key events when the  was
focused, and then repeating the character into the text box. This had two
unfortunate side effects:

Not all browsers (cough Internet Explorer) handled key events the
same way, and it was difficult to consistently get the typed in character.
Moving that typed character over to the search box meant moving the
keyboard focus over and ensuring that the character wasn't highlighted.
This proved to be more difficult than it should have, and both IE and
Firefox had a tendency to lose the first character.

So we decided to make the focusing element an  box, and have it
be hidden out of sight. This fixed the IE issues, and we could consistently
get the character typed (just get the .value). Eventually we were able to
alleviate the second issue, but we ended up adding in a few new side
effects:

Because were were automatically focusing the keyboard, any
interaction with Select2 on a mobile device would trigger the on-screen
keyboard.
We created an accessibility problem because there was no indication
of what the focusing  was actually for. And some screen
readers actually ignored it, so it was impossible to navigate Select2
through a keyboard.

And that's why we added a shouldFocusInput option in Select2 3.x that
disables the automatic focusing of the input if the user is on a mobile
device and there isn't a visible search box. While that worked in a way, it
was never considered anything more than a hack.
And that's why we no longer try to handle that case magically in Select2
4.0.
If we took the easy route and automatically opened the dropdown when we
detected a keypress, that would work some of the time. But we would run
into exactly the same issue that we originally hit. It would also block
any possibility of us getting the searching to work when the dropdown is
not open (so you can quickly select things), which is far out on our
roadmap.
So we made the decision to not support it in Select2 4.0. You can still
open the dropdown by hitting [space] or [enter], which is how it works in a
normal .
—
Reply to this email directly or view it on GitHub
https://github.com/select2/select2/issues/3279#issuecomment-96450069.

I can partially understand this reasoning for the regular select, but for the multiselect it's a pretty bad user experience. The multiselect looks visually like a regular input, and when you tab to it, it's not at all clear that you're dealing with a mutliselect, so pressing the spacebar is not intuitive.

I agree with @philipwalton. The select looks like an string input and should therefore act in a similar way. If it's confusing developers using it, chances are it's also going to their users too. With that said, I can understand it's a difficult issue, but that just doesn't make it resolved just by stating why the desired behaviour was unable to be achieved. Leaving the issue open would also encourage pull requests.

As noted in https://github.com/select2/select2/issues/3415 and on the mailing list, I'm open to the idea of automatically focusing the search on a multiple select when the selection area is focused. I think this would fix the major usability problem (the multiple select looks like a search box but doesn't act like one), but it would still leave the difference in behaviour between the multiple and single select.

Right now there are two UX issues that are a result of this in 4.0.0:

Any letters typed in a focused by closed dropdown do not filter the results at all.
This same action also does not open the dropdown.

This also increases the minimum number of key presses to select an item in 4.0.0 to 5, which is up from 4 in 3.5.2 and 3 in a native select.
Here are the key sequences that I've been using to measure this UX issue in 4.0.0. All of these are done using Chromium 43 on Ubuntu 14.04.

Default <select> - never opening the dropdown (optimal)
http://jsbin.com/kawoxenofa/1/edit?html,js,output

Place focus on the text box
Press tab to focus on the select
Type the search term ("g")

During this time the browser finds the first element starting with "g" and "selects" it

Press the tab key to move focus on to the next element

Default <select> - with opening the dropdown
http://jsbin.com/kawoxenofa/1/edit?html,js,output

Place focus on the text box
Press tab to focus on the select
Press the "enter" or "space" key to open the select
Type "g" to get the first result starting with "g"
Press "enter" to close the dropdown
Press the tab key to move the focus on to the next element

Select2 4.0.0
http://jsbin.com/kawoxenofa/3/edit?html,js,output

Place focus on the text box
Press tab to focus on Select2
Press the "enter" or "space" key to open the Select2
Type the search term ("g")
Press "enter" to select the result
Press the tab key to move the focus on to the next element

Select2 3.5.2
http://jsbin.com/kawoxenofa/2/edit?html,js,output

Place focus on the text box
Press tab to focus on Select2
Type the search term ("g")

The dropdown is automatically opened
Results are filtered by "g"

Press "enter" to select the result
Press the tab key to move the focus on to the next element

Is there a fix for this? This is kind of a dealbreaker for me when using the multiselect. You should be able to tab to it and start typing.

Is there stopgap fix for this?

If you are interested in using the unstable builds (I guess you could say "not released", they're relatively stable), the fix for multiple selects landed yesterday in https://github.com/select2/select2/commit/02cca7baa7b78e73cdcf393172ee3a54be387167.

Thanks for the tip. I tried it, but the copy from today isn't working in IE 9 (the combo box isn't being hidden), so I'll just keep an eye out for the next stable release.

Does anybody have an idea when is v4.0.1 coming? Not a huge fan of monkeypatches.

Does anybody have an idea when is v4.0.1 coming? Not a huge fan of monkeypatches.

We're aiming to release 3.5.3 (probably the last of the 3.5.x line) this weekend. Then we can start focusing on 4.0.1, which will be released when this milestone has no open tickets.

+1. It is an important accessibility feature. I proposed a workaround here.

+1

+1

+1

+1

+1

+1

@select2 any news on this?

@select2 any news on this?

It's fixed for multiple selects, that patch landed in 4.0.1. For single selects, no "good" solution has been found yet, but we're open to ideas.

Opening the search box on the keypress event would be better than nothing.
http://jsfiddle.net/n2en77vt/
Feel free to improve.
It may not be an ideal solution in all case, but at least when doing tab, start typing, you see what is done and just have to type enter to validate the selection.
For me, it's sufficient.
Maybe it could be possible, on a keypress, to :

open the search box
add the key pressed to the search box (or maybe replace it if last key was typed more than ms ago)
trigger the search
select first result
close the search box

and, such, having the same behaviour as a classic select.

Not sure if it's of interest to anyone, but I hacked a solution using jquery. Note, this assumes you have a select2 class added to the select element:
 $(document).on('focus', 'span.select2', function () {
  $(this).prev('select:not([multiple])').select2('open');
 });

@jgeurts : Open on focus is interesting, but IMHO it's too much.
Let's consider a form with input / select 2 / input, if I press 3 times Tab, it won't do what I think it will do.
But I suppose it's a matter of taste.
See my answer above (and the fiddle) for opening the select2 only on a keypress.

@Yopai Timeout seems to be required
http://jsfiddle.net/9zmco28f/

I understand you had your reason for changing the default behavior, but we are using Select2 on a long-term project and need to provide existing users the UX they are used from 3.5.x (opening the select2 on keypress, without typing return first.).
IMO there should at least be an option to use the old select2 opening behavior for legacy projects.

+1

Current implementation seems to only allow search on single select when the dropdown is open AND there is a search box present. I'm regretting upgrading at this point. Not providing search on initial focus seems like a big deal. Would it be possible to track keypresses on the focus div and just append to an in-memory string, rather than changing focus to a DOM element, resetting the string after a reasonable timeout?

Would it be possible to track keypresses on the focus div and just append to an in-memory string, rather than changing focus to a DOM element, resetting the string after a reasonable timeout?

This doesn't work well with odd keyboards, non-English languages, and numeric keypads. See https://github.com/select2/select2/issues/3279#issuecomment-96450069.

So, the way I understand it, using an input as the focus element is the only (known) way to correctly capture the keyboard input on all keyboards, but it has 2 negative side effects... 1) it shows the keyboard on touch devices, and 2) it was not picked up by some screen readers. Is that a good summary?

@kevin-brown I'd really need a solution for this. Can you give specific requirements for how this needs to behave to be acceptable? Also, worth noting, at least on my iPhone 5, the mobile keyboard does display on tap under the current example (one of the issues against using an input as the focus element, i thought).

Below is a codepen showing my partial solution to the issue, using an adapter. The technique transfres focus from the $selection element to the $search element on keydown. This seems to correctly capture the input in the search box (which must be enabled for this to work). Since this doesn't change the initial focused element, I assume it will still be fine for screen readers. I have tested this in IE11, and recent versions of FF, Chrome and Safari (Mac).
http://codepen.io/jessehouchins/pen/rWZxwr

This is a crippling missing feature that has caused me to toss out Select2 as an option for my application.
I get that it is free and you are totally under no obligation to fix it, but I thought you might be interested in knowing that even though I would rather go with Select2, I can't.  Without the "closed" selection via typing and arrow keys that a normal select box (and so many other select replacements) fully support the difference in the user experience is just too jarring for most users.

OK, so Chosen did not work out for me so I was back to Select2.  I found a way to make it support typing in place for searching.  I only tested it for single select and YMMV.
Here is the code (typescript):
// At the class level:
inlineSearchString: string = '';
inlineSearchTimeoutId: any;

// In a setup somewhere
//+ Add the ability to just type in the item you want.
selectBox.keypress(event => {
    var key = event.which;
    if (key >= 32) {

        // If we don't get a keystroke after a bit, then we will reset the
        // inline filter so that they can start a new search.
        clearTimeout(this.inlineSearchTimeoutId);
        this.inlineSearchTimeoutId = setTimeout(() => {
            this.inlineSearchString = '';
        }, 750);

        let char = String.fromCharCode(key);
        let inlineSearch = this.inlineSearchString = this.inlineSearchString + char;
        let allOptions = originalSelect.find('option');
        // A filter of `option[value*='${char}']` was tried and it returned 0 results.
        // So a manual filter on the function was put in even though it is not as clean.
        let filteredList = allOptions.filter(function(index) {
            if (inlineSearch && this.value) {
                let optionMatchRegExp = new RegExp('^'
                                + inlineSearch.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "i");
                let result = optionMatchRegExp.test(this.value);
                return result;
            } else {
                return false;
            }
        });

        let newValue = filteredList.first().val();
        if (newValue) {
            originalSelect.val(newValue);
            originalSelect.trigger('change');
        }
    }
});

In the above code, selectBox is the Select2 select box (the root span).  originalSelect is the element that is the actual <select> tag that you put in your code.
Here is a working fiddle: http://jsfiddle.net/Vaccano/L3gozrew/1/

This is how I solved the "open on keypress". Your solution will not work with AJAX.
    /*
     * An unfortunate restriction of Select2 v4 is that there is no backing <input> and it will
     * not open until you press enter or space.
     * https://github.com/select2/select2/issues/3279
     */
    // noinspection JSUnusedGlobalSymbols
    @HostListener('window:keydown', ['$event'])
    onKeyDown(ev: KeyboardEvent) {
        /* we're only interested when the open on keypress behavior is enabled */
        if (!this.openkeypress) {
            return;
        }
        /* quick test that it is a select2 element to not cause a performance drag */
        if ((<any>ev.target).className.indexOf('select2-selection') === -1) {
            return;
        }
        let $target = jQuery(ev.target).closest('.select2-container');
        if (!$target.length) {
            return;
        }
        /* not if it is already open */
        if ($target.hasClass('select2-container--open')) {
            return;
        }
        $target = $target.prev();
        /* check if it belongs to this component instance */
        if (!$target.length || !$target[0].isEqualNode(this.element[0])) {
            return;
        }
        if (ev.which >= 32) {
            this.element.select2('open');
            let $search = this.element.data('select2').dropdown.$search || this.element.data('select2').selection.$search;
            /* Safari does not have key */
            let key = ev.key ? ev.key : String.fromCharCode(ev.which);
            /* filter function keys such as "Meta" */
            if (key.length === 1) {
                $search.val(key);
            }
            // Timeout seems to be required for Blink
            setTimeout(() => {
                $search.get(0).setSelectionRange(1, 1);
                $search.trigger('keyup');
            }, 0);
        }
    }

+1

I started with the code from @achimha and ended up with this:
$('.select2-selection').keydown((ev) => {
  if (ev.which < 32)
    return;

  var target = jQuery(ev.target).closest('.select2-container');
  if (!target.length)
    return;

  target = target.prev();
  target.select2('open');

  var search = target.data('select2').dropdown.$search ||
               target.data('select2').selection.$search;

  /* Safari does not have key */
  var key = ev.key ? ev.key : String.fromCharCode(ev.which);

  /* filter function keys such as "Meta" */
  if (key.length === 1)
    search.val(search.val() + key);
});

It works even when you type really fast :)

So to be clear, no official support for this feature is coming for single-select? Any news on this?

Native dropdowns will search for a value when focused and a key is pressed. I don't understand why that functionality is not at least supported here.

+1

I modified the library with the following (borrowing from @turekl):
// Line #5368
this.on('keypress', function (evt) {
  var key = evt.which;

  if (self.isOpen()) {
    if (key === KEYS.ESC || key === KEYS.TAB ||
        (key === KEYS.UP && evt.altKey)) {
      self.close();

      evt.preventDefault();
    } else if (key === KEYS.ENTER) {
      self.trigger('results:select', {});

      evt.preventDefault();
    } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
      self.trigger('results:toggle', {});

      evt.preventDefault();
    } else if (key === KEYS.UP) {
      self.trigger('results:previous', {});

      evt.preventDefault();
    } else if (key === KEYS.DOWN) {
      self.trigger('results:next', {});

      evt.preventDefault();
    }
  } else {
    if (key === KEYS.ENTER || key === KEYS.SPACE ||
        (key === KEYS.DOWN && evt.altKey)) {
      self.open();

      evt.preventDefault();
    } else {
      if (key === KEYS.SHIFT || key === KEYS.CTRL || key === KEYS.ALT || key === KEYS.TAB)
        return;

      target = self.$container;

      if (!target.length)
        return;

      target = target.prev();
      self.open();

      var search = target.data('select2').dropdown.$search ||
                   target.data('select2').selection.$search;

      /* Safari does not have key */
      var key = evt.key ? evt.key : String.fromCharCode(evt.which);

      /* filter function keys such as "Meta" */
      if (key.length === 1)
        search.val(search.val() + key);
    }
  }
});

Seems like a simple fix to the library, not sure what the issue is. Any improvements are welcome.

My original fix stopped working in Firefox on Linux (it's still OK on Windows). I found another, even simpler solution, only setting focus to the search field:
$('.select2-selection').keydown((ev) => {
  if (ev.which < 32)
    return;

  var target = jQuery(ev.target).closest('.select2-container');
  if (!target.length)
    return;

  target = target.prev();
  target.select2('open');

  var search = target.data('select2').dropdown.$search ||
               target.data('select2').selection.$search;

  search.focus();
});

This is still an issue as far as I know.  It is stale only because there is no movement on any kind of fix.

Just done a migration of a project which required updating our Select2 library.
To which, I was surpised to find tabbing into the select2 field and typing didn't work naturally like it did in 3.*.
A number of workarounds on this long thread I can see here - each with their own use-case. I'd agree with an eariler poster, would of been great if there was a legacy option to allow this behaviour.
Although I guess not many people are upgrading from version 3 to 4 these days as was before.

See also #5993


Update HuBMAP Kidney data

https://portal.hubmapconsortium.org/search?mapped_data_types[0]=snRNA-seq [Salmon]&mapped_data_types[1]=Slide-seq [Salmon]&origin_sample.mapped_organ[0]=Kidney (Right)&origin_sample.mapped_organ[1]=Kidney (Left)&entity_type[0]=Dataset
(Requires access)
Additional datasets need to be run through Azimuth using:
https://github.com/hubmapconsortium/hra-azimuth-predictions
Cell predictions file need to be run through an aggregator, such as
https://github.com/hubmapconsortium/hra-azimuth-predictions
Add the aggregated counts for new datasets in the static branch
https://github.com/hubmapconsortium/tissue-bar-graphs/tree/static/csv/Kidney_HuBMAP_Portal

Some datasets do not have an h5 file on the server which results in a 404 error and terminates the program. Can I modify the download.py to skip over 404 errors and continue downloading other datasets by showing the "skipping dataset" message in the download log?

Finished updating Kidney HuBMAP data on the portal HRA tissue blocks (05/18/22)


VOC Classification Code is not working for my model that has the alexnet structure

Hi,
I have a pretrained model in torch and I have transfered the weights and biases to the caffe, and I checked if the model is transfered correctly. The problem is that when I want to evaluate my model for pascal dataset with philkr  VOC classification code (https://github.com/philkr/voc-classification), it gives me 7% and it seems that it cannot finetune. I want to use the code with clipping from drop6 instead of drop7 which is the default in the code and I changed the code accordingly, but I still get the same result.I was wondering how I can use the code correctly?I really appreciate any help
Thank you so much,

Hello,
I am facing the same problem. I am trying to finetune my model on Pascal VOC 2007 dataset and the loss is not going down beyond random. It's not clear what is going wrong.
I have tried with default hyperparameter settings as well as my own.
Please advise.
Thanks

+1

I encountered the same problem as @Maryames . And I solved it with the help of @uahsan3 .
If anyone else encounter this problem, please look at the trainval.prototxt generate by the code (in train_cls.py)and check the data layer. The code will create a right data layer and if your alexnet.prototxt also include a data layer, then the network will have two data layer and the image data will not go through the network. Besides, I attach two screenshots of trainval.prototxt below, the first is wrong and the second is right.


Component props not appearing in this.$props unless default value is provided

Vue.js version
2.2.4
Reproduction Link
https://jsfiddle.net/morficus/2Lgcjr5m/2/
Steps to reproduce

create a new component with at least one prop
make sure at least one of the props do NOT have a default value
check for the presence of that prop in this.$props

What is Expected?
Expected for a prop to appear inthis.$props regardless of having a default value or not (presumably with a value of undefined)
What is actually happening?
The prop is not appearing unless it has a default value or an explicitly set value by the parent component.

should be {{this.$props}}

@EliazTray hm? can you elaborate on your comment?
What should be {{this.$props}}?

This is by design. $props contains all props that were passed to the current instance, or have a default value.
The feature was intended for situations where you want to access and pass on all currently "active" props, e.g. to a child component. Including those that are neither passed by the parent nor have a default value is not required for that, because their value would be undefined anyway in the child t.
If you need a list of all possbile props, use Objectkeys(this.$options.props)
Or do you have another use case where it would be better to include the undefined props?

oops, close was unintended.

And also doing 'prop' in $props should yield false if the prop wasn't provided
@LinusBorg I think we should close this ftm because of the reasons you gave. The initial propasal is https://github.com/vuejs/vue/issues/4571 in case someone wants to review it. If @morficus provides a valid use case we can always reopen it

@LinusBorg this.$options.props would actually fit my use case perfectly.
I ran in to this issue when writing unit tests for a reusable component. Wanted to check that a specific prop could be set on it. So this.$options.props is actually better than what I was trying originally.
Thanks!


hashNavigation broken

Check that this is really a bug

[X] I confirm

Reproduction link
https://codesandbox.io/s/quiet-dew-4nc59v?file=/index.html
Bug description
I've tried multiple ways to get hashNavigation to work, with either the current 9.4.1 or a build of next, and none of these work.
I've put the minimized example in that codesandbox, but it's pretty short and should be self contained, so also included here:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <link rel="stylesheet"<EMAIL_ADDRESS>/>

        Foo

        Bar

 -->

Expected Behavior
Get proper numbers in the URL hash fragment
Actual Behavior
Usually gets to a broken #null
Swiper version
9.4.1, 10.0.0-beta.5
Platform/Target and Browser Versions
Win 11, MSEdge / Chrome
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

Please, check documentation and demos


Bring Back action UpdateHostname and UploadCertificate

We need to support updatehostname and uploadcertificate actions for one more version, to avoid customers breaking change in powershell which is built on .NET client.
These actions will be deprecated in next apiversion
PR information

[x] The title of the PR is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[x] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[x] If applicable, the PR references the bug/issue that it fixes.
[x] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[x] I have read the contribution guidelines.
[x] My spec meets the review criteria:

[x] The spec conforms to the Swagger 2.0 specification.
[ ] The spec follows the guidelines described in the Swagger checklist document.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

@sarangan12 ping!

@solankisamir Please take a look at https://travis-ci.org/Azure/azure-rest-api-specs/jobs/287657498. Your changes have caused 2 new errors which must be fixed. Please fix them and update PR

@sarangan12 I will fix the description issue, but the other issue around certificate_password naming, we had to bring back, as we need that resource in our .NET Client, which gets integrated to powershell. To make a breaking change in powershell, we need it around for one more version.

Opened issue on self https://github.com/Azure/azure-rest-api-specs/issues/1881

@sarangan12 ping! on this. Let me know, if I am not clear.

No modification for AutorestCI/azure-sdk-for-python

No modification for AutorestCI/azure-sdk-for-node

No modification for AutorestCI/azure-sdk-for-ruby


Doc updates for inotify and max open files

Docs update

This resolves https://github.com/cloud-bulldozer/osde2e-scale-wrapper/issues/6


Players don't lose mass below 10, cosmetics, add random mass to food object.

I made it look and feel more like agar.io. Changed the grid and background color and the player size a little.  Players wont lose mass when they haven't eaten anymore. I added mass to the food object in server.js(I also made it slightly random). I adjusted the speed a little. I also changed the name of the "contain" function to "valueInRange".

Just a recommendation, change your git name on your computer to your GitHub username instead of "my name" so GitHub actually attributes commits to your account. I think it's
git config --global user.name "Buskcoin"

And I think food rendering could be improved to look more like the original by changing client/js/app.js:110 to "foodMass": 1, as by default the server config is foodMass: 1

Thanks for the feedback. I didn't realize i wasnt getting any credit ;). I'll check out the food mass next time I get a chance.

Nvm, #235 got there first

Awesome!


Disable bounds checking in

calculate_source_pixel_brightness!, add_elbo_log_term!, evaluate_psf_pixel_fit!, evaluate_psf_fit!, and get_bvn_derivs!.
This gives a decent speedup. Single threaded, I get
master
10.146384 seconds (4.08 M allocations: 623.774 MB, 7.43% gc time)
PR
8.841830 seconds (4.08 M allocations: 623.774 MB, 8.80% gc time)
This can, of course, hide some errors but we can always run Julia with --check-bounds=yes if we see segfaults. Generally, LLVM is much better in vectorizing code when bounds checking is off so this might become even more relevant on KNL. I haven't checked if the code in any of these function is getting vectorized though.

Nice, thanks!


[pdal] Add plugin features

Add plugin features for pdal. Related issue: #8478. Plugins list:

i3s
cpd (Need add new port: cpd, related PR: #8827. Port cpd only support build static library.)
geowave
icebridge
mbio
mrsid
pgpointcloud
openscenegraph
rdb
sqlite
fbx
tiledb
e57

/azp run

/azp run

Temporary close this PR, Please reopen it when continue this work.


Is this repo still mantained?

@djmaze Thanks for the work BTW!

My understanding is @djmaze is taking PRs but not actively using / developing the project - see here. He does respond to issues, and I tend to add my 2c when I see a new one too 😄

Exactly. If there is someone keen to take over, I would be good with that as well.l

Thank you both for your answers.
I forked the project and created an automated build for the Docker image. You can find them at:

m0wer/tiddlywiki-docker - GitHub
m0wer/tiddlywiki - Docker Hub

I will be using this myself and update the Docker image weekly.

@m0wer , since you are forking the project can you enable issues on that repo?
also, thank you all for maintaining this project before @m0wer :grin:

@m0wer , since you are forking the project can you enable issues on that repo?
also, thank you all for maintaining this project before @m0wer

Done, thanks for reminding me @elreydetoda.


Update page title (Typo)

Change "An overview ahd Azure SQL Database security capabilities" to "An overview of Azure SQL Database security capabilities"

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


Upgrade oneTBB to 2021.7.0

Upgrading the oneTBB external to 2021.7.0.
Compiles, runs and passes validation.

Just curious, is there any specific reason to motivate the update? (I am going to merge this after some tests)

Marco has issues building on Ubuntu 21.10 with the previous release, while
this one worked.
Luca and Aurora were also asking to update, but I don't recall the exact
reason.


Tensorflow 2.0 make_csv_dataset reads files too slowly

It takes 10 seconds to read a batch of 1024 data from the csv file. After setting the num_parallel_reads parameter to 2, the time becomes 5 seconds. But continue to increase the reading thread, the time will not be reduced. Am I setting something wrong?

Try num_parallel_calls= tf.data.experimental.AUTOTUNE

Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version.
Make sure you also include the code snippet to reproduce the issue in our environment. It helps us in localizing the issue faster. If you are unclear what to include see the issue template displayed in the Github new issue template.Thanks!

The tensorflow version is 2.0.0(gpu).
The system information is as follows：
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

@wkzqn
Will it be possible to share colab link or simple standalone code to reproduce the issue in our environment.It helps us in localizing the issue faster. Thanks!

@wkzqn
Any update on this issue please. Thanks!

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!


Static examples by default, with dynamic CLI/JS/Query option

As a Prism user with experience using v2, I expect similar behavior from v3, and as such examples should be static by default, with an option to enable dynamic responses if I want to.
Acceptance Criteria

Make the default responses be consistently static and update integration tests

Add --dynamic CLI option to the mock command so all responses served are dynamic (same as current behavior)

Add  ?__dynamic=true/false query string param which will make that one request dynamic or not, and override the CLI option

Order should be:

if ?__dynamic=true then dynamic response

else if --dynamic in CLI then dynamic response

else look for examples, use the first examples it finds that matches the mime type or star/star

If no examples then go through the schema, and for every property and use 1.) example 2) default, 3) if nullable use null, 4) if not nullable then datatype relevant static values: "string", 0 etc.

This was done in #347.


right click context menu support

it would be nice if I could cut-and-paste using the mouse.

Oh yes it will be very useful ! Great idea.

rather than the shortcut you mean?
If so okay, we would have to introduce a full right click context, I wouldn't mind having this but we would need then to think which shortcuts are worth enough to land there.
WDYT?

for my workflow, it's really only cutting and pasting that I bump into. during t/s various issues, I need to check responses from spark-notebook against the scala-shell to ensure that the issues I'm running into aren't the result of some wonky interaction between notebook and what's below. i keep forgetting that it's not yet supported in spark-notebook and it's one of those slight aggravations whilst working out why my code isn't doing what I expect it to do.

can you elaborate more on that issues, maybe the solution is to work on the amount of information reported to the user when something goes wrong on the backend I guess, right ? Which for now is very limited :-S

it's not so much that something goes wrong - it's that the standard browser context menu doesn't appear when the user right-clicks on a table cell. you get one of these instead.


inject not working with nuxt-property-decorator on ssr  from b55dc9d8

Environment

Reproduction
https://codesandbox.io/s/nuxt-nuxt-js-typescript-forked-7pmgqn?file=/nuxt.config.ts here non working examples with latest bridge
here working example with last working bridge https://codesandbox.io/s/nuxt-nuxt-js-typescript-forked-lkqd1w?file=/package.json
caused by https://github.com/nuxt/bridge/commit/b55dc9d8443930b53007393e0d1c413d8f873028
maybe something to do with transpiling\paths, if use just use vue-class-component instead of nuxt-property-decorator - it works.
https://codesandbox.io/s/nuxt-nuxt-js-typescript-forked-7pmgqn?file=/pages/index2.vue
But all nuxt-property-decorator do is just reexport
export { default as Component, mixins } from 'vue-class-component';
Describe the bug
inject not working properly on ssr
Additional context
No response
Logs
No response

Does nuxt-property-decorator not work with nuxt/bridge right now?
I got different errors like:
"TypeError: Cannot read properties of undefined (reading 'state')"
_ssrEscape is not a function) inject not working with nuxt-property-decorator on ssr from b55dc9d
Property or method "_ssrEscape" is not defined onthe instance but referenced during render.
Property or method "_ssrNode" is not defined on the instance but referenced during render.
So I tried to use the last working version: 3.0.0-27611430.cf4761a
But that version had a problem when runningbuild , then start, it doesn't work (Reached heap limit Allocation failed ). But that seems to be fixed when I try the current latest version 3.0.0-27711990.d463650

You probably need to transpile nuxt-property-decorator and vue-class-component, now that Vue 2.7 has built-in composition API support.
https://codesandbox.io/s/nuxt-nuxt-js-typescript-forked-94w6ey?file=/nuxt.config.ts:163-211


[Consumer UI Refresh] Implement the Search view

If you haven’t already, check out our contributing guidelines for onboarding!

We need to replace the ChatSwitcherView entirely with a "Search page" which is an even simpler version of the "New Chat" page. There is a method that should already calculate the correct options to display called OptionsListUtils.getSearchOptions(). The difference here between the "New Chat" page will be that:

No headers will be shown
No personalDetails will be shown
No headers will be shown for the sections
Users can not be invited via this flow
Chats with multiple participants should be shown

Deliverables:

Implement the Search page and replace the ChatSwitcherView in the Sidebar.
The ChatSwitcherView and anything related to it (that is no longer used) must be deleted from the codebase.

@marcaaron
I have a couple of questions:

We need to replace the ChatSwitcherView entirely with a "Search page"

Is the search a page accessed by a URL (using redirect)? Just like NewGroupPage, NewChatPage.... Or is it to maintain as it is right now, rendering if isChatSwitcherActive? If it is the second, I will create a component in components/, not a page.
This is just a double check, but from the images in the description, we can see this contact:

with the email, which makes it look like there is not a active chat with him yet (not in recentReports), unless of course the last message was the email  (:grin:). I'm assuming we really just want to show recentReports.

Is the search a page accessed by a URL (using redirect)?

I think we can leave things as they are now. There's no need to create a /search route yet as we can always do this in the future.

which makes it look like there is not a active chat with him yet (not in recentReports), unless of course the last message was the email (😁). I'm assuming we really just want to show recentReports.

Was just chatting with @trjExpensify about this and the behavior in the mock up is what we want. So if a chat has no messages it should just show the email in that second line. IIRC we are currently excluding reports that have no last message in the Sidebar view. So we may need to make that logic optional so that the Search view can show chats that have no messages.

@marcaaron

IIRC we are currently excluding reports that have no last message in the Sidebar view

It seems to work like this. So the only way to have access to contacts without messages is with the personalDetails return from the getOptions function.
Should I add this then?
From my tests for this to work the getOptions function would need some additional logic, to be able to show either recent messages or email, depending on the case.

Sorry, I'm unsure of what changes you are suggesting. Can you break down what the additional logic would be?

I thought it would be more stuff, but it's extremely simple. I just needed to change:
alternateText: showChatPreviewLine ? lastMessageText : personalDetail.login

to
alternateText: (showChatPreviewLine && lastMessageText) ? lastMessageText : personalDetail.login

on the createOption function.
Alright I think I got all information I needed, going to finish testing on the platforms and create the PR. We can discuss better with the code in hands.
Proposal

Create a SearchView component which looks a lot like NewChatPage. It uses the OptionsListUtils.getSearchOptions function to fetch both personalDetails and recentReports.
Replace it with the ChatSwitcherView, and delete everything related to it from the code.
On the list, show either the last message if it is a recentReport, or the email if it personalDetail.
For showing the text unread style and hide the pin and draft icons on the list, I will break down the current OptionRow's hideAdditionalOptionStates prop in two: hideAdditionalOptionStates and forceTextUnreadStyle.

The forceTextUnreadStyle is used on NewChatPage and NewGroupPage.

On the list, show either the last message if it is a recentReport, or the email if it personalDetail.

To clarify, the search page should only show recent reports so we will just need some way to indicate that reports with no messages should not be filtered from the Search page but should be filtered from the Sidebar.
Rest of the plan sounds good to me :)

Ohhhhh ok!
That took me a while to figure out. Needed to stop and understand the getOptions function better.
Added a new entry in the object prop of the getOptions function, called showEmptyRecentReports, defaulted it to false.
Set to true in the getSearchOptions call.
PR coming soon.


Xrootd Third Party Transfers SOFTWARE-3362

@brianhlin this is ready to give it a review. I am still a little bit conflicted on how to make travis work. Since I am using macaroon-init that is on osg-contrib but apart from that it is working.

@brianhlin can we then merge?

@efajardo these weird module failures are back across the board in the CI (https://travis-ci.org/opensciencegrid/osg-test/jobs/499577470#L1223-L1233). Could you sort that out first?

@efajardo these weird module failures are back across the board in the CI (https://travis-ci.org/opensciencegrid/osg-test/jobs/499577470#L1223-L1233). Could you sort that out first?

@brianhlin well the problem is that test_465 imports requests but python-requests is not installed. So it actually fails in that way. I can try to work today on doing it via curl and try to remove that dependency alltogether

@brianhlin can you review again please


chore: release v1.1.1

🤖 New release

mpesa: 1.1.0 -> 1.1.1

Changelog

1.1.1 - 2024-01-28
Fixed

fix spelling
fix formatting

Other

Update README.md
Add discord badge
static lifetime for request path
remove unneeded lifetime
refactor impl of getting the pass
remove unused imports
Update README.md
Update CONTRIBUTING.md
Update workflow
Remove changelog
Add release github workflow
Update package version
Add changelog
Bump crate version
Add module level docs
Update dynamic qr code setter and request amount field's type to u32
Update twitter url
Remove nextest config
Simplify readme table
Update readme
Add no_run marker to c2b register
Add main function to bill manager docs code snippets
Move bill manager docs to md
Remove unnecessary lazy evaluations
Fix readme failing doc test
Update docs
Fix typo in docs
Enable doc tests in readme
Fix clippy warnings
Further fix code snippet indentation in docs
Only have core apis in doc tests
Add editor config, fix indentation inconsistencies in docs
Fix transaction reversal api 400 errors
Fix dynamic qr code doc tests
Update transaction apis docs
Fix env vars not read in doc tests
Enable and move doc tests to markdown files
(client) Generic send implementation (#89)
Bump crate version
Maintain consistency with auth response in helpers
Fix auth response deserializion errors

This PR was generated with release-plz.

@itsyaasir
This release is for the v1.x crate without the breaking changes
Should follow up with a v2 release with the breaking changes w/ new builders against master


Standard element or  use a specified component

For <can-import> it is desirable to specify another component's behavior to take over.  For example:
  <can-import from="app/home/home" can-tag="loading">
    <app-home></app-home>
  </can-import>

can-tag="loading" specifies another can.view.tag method to use for the behavior of the <can-import> method.  This is needed because <can-import>s must be statically defined.
This could also be used with standard elements like:
<div can-as="my-component"/>

Options:

as="component-name" - as is a suggested way of doing exactly this in webcomponents.
can-as - same as above but with can infront of it
can-tag - We are calling to can.view.tag, so this makes sense too.

So what happens when you put a can-as on a custom tag like?
<my-component can-as="other-component"></my-component>

I say this because <can-import> is implemented as a can.view.tag (for progressive loading).  If we switched to a more generic can-as that can be attached to any element what happens when the can-import callback is called, how does it know not to render its subtemplate?  Does it just check for the existence of a can-as?


Explain why nothing is printed

When all the tasks timings are below the threshold, nothing is printed on the output, which may be confusing to the user. Output a log statement to make it clear when this happens.

Closed via https://github.com/asarkar/build-time-tracker/pull/4. Now prints a message as follows:
All tasks completed within the minimum threshold: 60s, no build summary will be shown


[Bug report] SpectrumData.create_from_file does not record eigenvectors correctly

I'd like to initialize a qubit, ask for the spectrum (including eigenvectors) and write to a file, and then create a SpectrumData object later from that file. However I have found that doing so with too many parameter values leads to issues. For example running
number_params = 11
zero_pi = scq.ZeroPi.create()
flux_list = np.linspace(0.45, 0.55, number_params)
specdata_to_file = zero_pi.get_spectrum_vs_paramvals('flux', flux_list, evals_count=4,
                                                     get_eigenstates=True, filename='zeropitest.hdf5')

specdata_from_file = SpectrumData.create_from_file('zeropitest.hdf5')
np.allclose(np.abs(specdata_to_file.state_table), np.abs(specdata_from_file.state_table))

the last line returns false. Note oddly enough that changing number_params -> 10 or lower fixes the issue.
I have verified that the issue is qubit independent - i.e. the same failure exists for FluxQubit
OS: macOS Catalina
Python: 3.7.6
scqubits: latest version of master

Eigenvectors were in a wrong order due to a bug in converting from dict to list. This should be addressed by https://github.com/scqubits/scqubits/commit/b0a46fbfd26c2a2fc12c0bfe5a9c3c8a9634a515
@dkweiss31 Please verify the fix when you get a chance.

I believe this fixes the main issue. However I am still running into a related problem with respect to running some of my CurrentMirror tests. Running
import scqubits as qubit
import numpy as np

EJ = 20.0
EJlist = np.array([EJ for j in range(2*N)])
nglist = np.array([0.0 for j in range(2*N - 1)])
flux=0
CM = qubit.CurrentMirror(N=2, ECB=0.2, ECJ=20.0/2.7, ECg=20.0, EJlist=EJlist, nglist=nglist, flux=flux, ncut=10, truncated_dim=6)

flux_list = np.linspace(0.4, 0.6, 21)
specdata_4_CM = CM.get_spectrum_vs_paramvals(param_name='flux', param_vals=flux_list, evals_count=4, get_eigenstates=True, filename='currentmirror_4.hdf5')
specdata_4_CM_from_file = SpectrumData.create_from_file(filename='currentmirror_4.hdf5')
evecs_same = np.allclose(np.abs(specdata_4_CM.state_table), np.abs(specdata_4_CM_from_file.state_table))

passes, i.e., the previous problem is fixed. However initializing my CurrentMirror object the way it would be initialized for a test throws an error upon comparing the eigenvectors
param_list = specdata_4_CM_from_file.param_vals
evals_reference = specdata_4_CM_from_file.energy_table
evecs_reference = np.abs(specdata_4_CM_from_file.state_table)
evals_count = len(evals_reference[0])
CM_new = qubit.CurrentMirror(**specdata_4_CM_from_file.system_params)
new_spectrum = CM_new.get_spectrum_vs_paramvals('flux', param_list, evals_count=evals_count, subtract_ground=False, get_eigenstates=True)
calculated_evecs = np.abs(new_spectrum.state_table)

evecs_same = np.allclose(calculated_evecs, evecs_reference)

returns False.

As discussed off-line, your last issue is unrelated (the small mismatch appears to be due to finite precision of ARPACK, nothing to do with file IO).
See this:
import numpy as np

CM1 = scq.CurrentMirror(**{'N': 2, 'ECB': 0.2, 'ECJ': 7.4074074074074066, 'ECg': 20.0, 'EJlist': np.array([20., 20., 20., 20.]), 'nglist': np.array([0., 0., 0.]), 'flux': 0, 'ncut': 10, 'truncated_dim': 6})
CM2 = scq.CurrentMirror(**{'N': 2, 'ECB': 0.2, 'ECJ': 7.4074074074074066, 'ECg': 20.0, 'EJlist': np.array([20., 20., 20., 20.]), 'nglist': np.array([0., 0., 0.]), 'flux': 0, 'ncut': 10, 'truncated_dim': 6})

flux_list = np.linspace(0.4, 0.6, 21)
specdata1 = CM1.get_spectrum_vs_paramvals(param_name='flux', param_vals=flux_list, evals_count=4, get_eigenstates=True, filename='currentmirror_4.hdf5')
specdata2 = CM2.get_spectrum_vs_paramvals(param_name='flux', param_vals=flux_list, evals_count=4, get_eigenstates=True, filename='currentmirror_4.hdf5')

For this, np.allclose(np.abs(specdata1.state_table), np.abs(specdata2.state_table)) results in False.


add SrsRtmpClient send message function to support static message buffer or buffer whose lifecycle is managed by another class

rtmp message sending interface of SrsRtmpClient has assumed message is allocated in dynamic way
but in some case, static memory can be used as message buffer (for example, 3rd party flv parser or reader has its own buffer)
or the buffers lifecycle is managed by flv parser or reader.
in that case, SrsRtmpClient try to free repeatedly and this typically causes fault (heap corruption) in linux system.
so interfaces for sending RTMP messages are added and they don't free message buffer.

srs librtmp的协议层是从srs生成的，srs用了引用计数，所以每次发送都释放，只会真正释放一次。
你说的有些消息不应该释放的情况，应该改srslibrtmp的函数，将内容拷贝后发送。

ok, I'll add new interface to SrsRtmpClient class for sending message without freeing (releasing) it.
and send PR again

应该是直接改srs_librtmp.h，在调用底层函数前copy。

srs_librtmp新增函数。你改了底层的库，别人都是基于这个不拷贝的假设做的，都得跟着你改，肯定不行的。


[subtask][spark]Design docs for support batch insert/update/delete/merge-into

This is a sub-issue, parent task is #173
some questions should be clear at design docs.
i. pos-delete or eq-delete for unkeyed table?
ii. should batch update write log store?
iii. insert command write to base store or change store?
iv. should we keep hive compatibility visible order for writed snapshot(with flink write)

design docs
https://as9e2kjei0.feishu.cn/docx/doxcnwVRQsZPvmHrtFTtodSq9cc


Initial baremetal server release from @JimmyMa

Hi dr.max @maximilien,
Here is the Initial baremetal server release from @JimmyMa. Thanks.

Address comments and I will merge. Thx

Comments Addressed. Thanks for review!

Ok merging. This is a pretty complicated set of release ctl files. Hope you are testing this in pipeline


Merge so we can create branches

Title

Summary by CodeRabbit

New Features

Transitioned project setup from Next.js to Create React App.
Added basic structure and configuration for a React web application.
Implemented routing functionality with React Router for different screens including WelcomeScreen, SwipeScreen, LeaderBoard, and AccountPage.
Introduced AddressComponent for fetching and displaying address data.
Added Swipe component with interactive swipe functionality and dynamic UI updates.
Created Welcome component with a welcome message and wallet connection functionality.

Documentation

Updated README.md with new project setup and development instructions.

Style

Introduced styling rules for the main application layout and body element.

Tests

Added a test case to check the rendering of the "learn react" link.
Enhanced testing capabilities with custom Jest matchers for DOM node assertions.

Chores

Configured .gitignore to exclude specific files and directories from Git.

Bug Fixes

Ensured all user-agents can access all parts of the website with robots.txt.

Here is my frontend, i will continue making changes throughout the coming hours/day so I will create a new PR then.


Panic when importing a GCP service account

What happened?
Pulumi can't import a service account because it doesn't recognise the type of the resource as suggested in the API documentation.
How to reproduce
I need to import an existing service account in my GCP infrastructure.
I follow the documentation's syntax for importing this type of resource:
pulumi import gcp:serviceaccount/account:Account default projects/{{project_id}}/serviceAccounts/{{email}}

Issue
Pulumi doesn't recognise the type although that's the one suggested in the API documentation:
     Type                           Name                         Plan       Info
     pulumi:pulumi:Stack            sde-consent-api-development             1 error
 =   └─ gcp:serviceaccount:Account  service-account              import     1 error

Diagnostics:
  gcp:serviceaccount:Account (<service-account-name>):
    error: Preview failed: Resource type 'gcp:serviceaccount/account:Account' not found.

  pulumi:pulumi:Stack (<stack-name>):
    error: preview failed

Example
CLI command so no code to run for this
Output of pulumi about
CLI
Version      3.108.1
Go Version   go1.22.0
Go Compiler  gc
Plugins
NAME    VERSION
gcp     6.67.0
python  unknown
Host
OS       darwin
Version  12.7.3
Arch     x86_64
This project is written in python: executable='/Users/guilhemforey/Library/Caches/pypoetry/virtualenvs/consent-api-07kQ-glw-py3.11/bin/python3' version='3.11.4'
Backend
Name           MacBook-Pro.local
URL            gs://pulumi-state-iac
User           guilhemforey
Organizations
Token type     personal
Dependencies:
NAME               VERSION
black              22.12.0
consent-api        0.1.0
flake8-bugbear     22.10.27
flake8-docstrings  1.6.0
google-cloud-run   0.10.0
grpcio-status      1.56.2
httptools          0.6.0
ipython            8.10.0
isort              5.11.4
mypy               0.991
pep8-naming        0.13.2
pip                23.3.2
pre-commit         3.5.0
pulumi-gcp         6.67.0
PySocks            1.7.1
ruamel.yaml        0.17.21
types-SQLAlchemy   <IP_ADDRESS>
uvloop             0.17.0
watchfiles         0.20.0
websockets         11.0.3
wheel              0.42.0
Pulumi locates its logs in /var/folders/q3/p1431wsn2jjbc9x9xdn62_bh0000gn/T/ by default
Additional context
Self-hosting the state in a GCP bucket
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Hi @guilhem-fry. Thanks for opening an issue. Can you try upgrading the provider you are using to v7? This works for me with the<EMAIL_ADDRESS>


Propose a workshop for AAS 239 (Jan 2022).

The deadline sneaks up on us, so we should check on the dates and complete the proposal by the July 2021 milestone.

Workshop proposals are due August 19, 2021.


Add compiling (deconstruction, routing, optimizing) to quantum volume algorithm

#2111
This should be the last PR before we are able to run it on a real device. The QV program now not only prints out the results, but also returns a QuantumVolumeResult that contains all of the relevant information for further analysis.
This PR also contains some additions to the existing QV Jupyter notebook that adds scatter plot points for the routed and the optimized results of running on the given simulator. Finally, it adds a new Jupyter notebook which plots the expected HOG probability vs a series of device error rates for a given depth/number of qubits.

Thanks for the in-depth review, I've responded to all the comments - PTAL at your leisure :)

I had to update the travis config to get the tests to run on Python 3.7 in Mac and Linux (it was already the case for Windows), which is required to support dataclasses. That means that this benchmark now requires Python 3.7 to run as well. Let me know if that's not OK, and also if you want me to move the Travis changes to a different CL.

Sorry for the delay. Looks great now!
I think @Strilanc will yell at us if we bump the python version here. Add dataclasses to the requirements. It's available as a backport for python 3.6 (and the package is a no-op for 3.7+)

Craig has been nothing but nice to me, I'd hate to anger him with a .travis.yml update :) Added to the requirements, tests seem to pass now. Thanks!


Support recursive watching

fixes: https://github.com/zen-fs/core/issues/116

One of the tests needs some attention. Otherwise, it looks good. Let me know if this works or not.


i have problem like this "Error fetching video from webcam"

https://i.pinimg.com/originals/4a/06/89/4a06894922f37c87c3a1e265b9c46f77.png
Please help me

I solved this problem in Chrome by changing the function umSuccess(stream) in openface-demo.js with the following content:
function umSuccess(stream) {
    if (vid.mozCaptureStream) {
        vid.mozSrcObject = stream;
    } else {
        vid.srcObject = stream;
    }
    vid.play();
    vidReady = true;
    sendFrameLoop();
}

In Firefox, by the way, I get only a black screen.

Update: the black screen problem with Firefox can be solved by rewriting the function umSuccess as:
function umSuccess(stream) {
    vid.srcObject = stream;
    vid.play();
    vidReady = true;
    sendFrameLoop();
}

hi,
did you just modify the code and used the 'docker run' normally, or did you do some update in dockerfile?

I changed the file inside the docker container through a bash session.

Hi again,
Sorry to bother you, but could you please show me the steps you followed until you were able to use the web demo. I've been trying for a long time and I've modified the file as you showed it, but I can not do it at all.

I changed to face_recognition already
https://github.com/ageitgey/face_recognition
#database and webcam
https://github.com/vearutop/face-postgre
https://github.com/vearutop/face-postgre/issues/7

I changed to face_recognition already
https://github.com/ageitgey/face_recognition
database and webcam

https://github.com/vearutop/face-postgre
https://github.com/vearutop/face-postgre/issues/7

@karllacr: you should launch docker container as docker run ... ending with /bin/bash, then you will find a prompt where you can modify the file with vi and then execute openface/demos/web/start_servers.sh

@nakhonsoft: thank you, I will give a try, I was searching for a python 3 implementation!

@angelinux face_recognition
support py2 and p3

Hi again,
Sorry to bother you, but could you please show me the steps you followed until you were able to use the web demo. I've been trying for a long time and I've modified the file as you showed it, but I can not do it at all.

You need restart the browser after all changed .  I also meet the same black problem . And This is fixed by angelinux's comment.

สวัสดีอีกครั้ง
ขออภัยที่รบกวนคุณ แต่โปรดช่วยแสดงขั้นตอนที่คุณทำตามที่ฉันทำจนกว่าคุณจะสามารถใช้เว็บตัวอย่างได้ ฉันลองมานานแล้วและฉันได้แก้ไขไฟล์ตามที่คุณแสดง แต่ฉันไม่สามารถทำได้เลย

คุณต้องรีสตาร์ทเบราว์เซอร์หลังจากการเปลี่ยนแปลงทั้งหมด ฉันยังพบปัญหาสีดำเหมือนกัน และนี่คือการแก้ไขโดยความคิดเห็นของ angelinux

you try test in opera browser

thanks @angelinux

Update: the black screen problem with Firefox can be solved by rewriting the function umSuccess as:
function umSuccess(stream) {
    vid.srcObject = stream;
    vid.play();
    vidReady = true;
    sendFrameLoop();
}

Thank you brother.


image opea/tei-gaudi:v0.7 doesn't work on latest gaudi sw stack v1.16.2

Using the image opea/tei-gaudi:v0.7 on a gaudi-enabled k8s cluster doesn't work. When launch the pod, it will fail with the following error message during start up:
Traceback (most recent call last):
  File "/usr/local/bin/python-text-embeddings-server", line 8, in <module>
    sys.exit(app())
  File "/usr/local/lib/python3.10/dist-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/typer/core.py", line 716, in main
    return _main(
  File "/usr/local/lib/python3.10/dist-packages/typer/core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "/usr/src/backends/python/server/text_embeddings_server/cli.py", line 50, in serve
    server.serve(model_path, dtype, uds_path)
  File "/usr/src/backends/python/server/text_embeddings_server/server.py", line 79, in serve
    asyncio.run(serve_inner(model_path, dtype))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/backends/python/server/text_embeddings_server/server.py", line 48, in serve_inner
    model = get_model(model_path, dtype)
  File "/usr/src/backends/python/server/text_embeddings_server/models/__init__.py", line 66, in get_model
    return DefaultModel(model_path, device, dtype)
  File "/usr/src/backends/python/server/text_embeddings_server/models/default_model.py", line 23, in __init__
    model = AutoModel.from_pretrained(model_path).to(dtype).to(device)
  File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 2556, in to
    return super().to(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/habana_frameworks/torch/core/weight_sharing.py", line 173, in wrapped_to
    result = self.original_to(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1155, in to
    return self._apply(convert)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 825, in _apply
    param_applied = fn(param)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1153, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
  File "/usr/local/lib/python3.10/dist-packages/habana_frameworks/torch/core/weight_sharing.py", line 53, in __torch_function__
    return super().__torch_function__(func, types, new_args, kwargs)
RuntimeError: synStatus=26 [Generic failure] Device acquire failed.

We're using the model BAAI/bge-base-en-v1.5
However if I manually build opea/tei-gaudi image based on tei-gaudi tag synapse_1.16, it seems working.
We should release a new opea/tei-gaudi image
My test environment is:
Host Environment: Ubuntu 22.04 with kernel 5.15.0-92-generic
K8S ver: v1.29.5
containerd ver: 1.7.19
Gaudi SW stack:
$ sudo hl-smi
+-----------------------------------------------------------------------------+
| HL-SMI Version:                           hl-1.16.2-rc-fw-<IP_ADDRESS>          |
| Driver Version:                                     1.16.2-f195ec4          |
|-------------------------------+----------------------+----------------------+
| AIP  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | AIP-Util  Compute M. |
|===============================+======================+======================|
|   0  HL-225              N/A  | 0000:1a:00.0     N/A |                   0  |
| N/A   31C   N/A    83W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   1  HL-225              N/A  | 0000:b3:00.0     N/A |                   0  |
| N/A   28C   N/A    90W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   2  HL-225              N/A  | 0000:b4:00.0     N/A |                   0  |
| N/A   28C   N/A    86W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   3  HL-225              N/A  | 0000:cc:00.0     N/A |                   0  |
| N/A   30C   N/A    87W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   4  HL-225              N/A  | 0000:19:00.0     N/A |                   0  |
| N/A   28C   N/A    82W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   5  HL-225              N/A  | 0000:cd:00.0     N/A |                   0  |
| N/A   29C   N/A    97W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   6  HL-225              N/A  | 0000:43:00.0     N/A |                   0  |
| N/A   28C   N/A    84W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
|   7  HL-225              N/A  | 0000:44:00.0     N/A |                   0  |
| N/A   27C   N/A    74W / 600W |    768MiB / 98304MiB |     0%           N/A |
|-------------------------------+----------------------+----------------------+
| Compute Processes:                                               AIP Memory |
|  AIP       PID   Type   Process name                             Usage      |
|=============================================================================|
|   0        N/A   N/A    N/A                                      N/A        |
|   1        N/A   N/A    N/A                                      N/A        |
|   2        N/A   N/A    N/A                                      N/A        |
|   3        N/A   N/A    N/A                                      N/A        |
|   4        N/A   N/A    N/A                                      N/A        |
|   5        N/A   N/A    N/A                                      N/A        |
|   6        N/A   N/A    N/A                                      N/A        |
|   7        N/A   N/A    N/A                                      N/A        |
+=============================================================================+

This error generally means, it is unable to recognize the devices. And from hl-smi, it seems that you do not have any process running. Can you try the latest image please. Or can you provide me the steps that you are doing for me to be able to reproduce the issue.

The latest upstream image which is recently released seems to be working on gaudi sw v1.16.x. Maybe we should advice users to use upstream image instead of opea/tei-gaudi? I believe we created opea/tei-gaudi because by that time there is no published upstream image

yes, i was also run it with the latest image on 1.16. This image is particularly for 1.16.x release https://github.com/huggingface/tei-gaudi/pkgs/container/tei-gaudi/241185933?tag=synapse_1.16.
Yes we can include validated configurations for the examples maybe.


Rules of .gitignore files in subdirectories not applied by source control

Issue Type: Bug
Built in source control does not seem to recognize .gitignore files in subdirectories, while this should be able according GIT.
With a root directory containing a .gitignore file and one or more subdirectories containing .gitignore files, the expected behavior is for rules to be applied relative to the directory where the .gitignore file is located. However it currently seems the source control system includes changes in subdirectories, while they should be ignored by the rules defined in the .gitingore file in that directory.
VS Code version: Code 1.56.0 (cfa2e218100323074ac1948c885448fdf4de2a7f, 2021-05-04T22:09:06.405Z)
OS version: Windows_NT x64 10.0.19042
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

System Info

Item
Value

CPUs
Intel(R) Core(TM) i3-10110U CPU @ 2.10GHz (4 x 2592)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.80GB (0.60GB free)

Process Argv
--crash-reporter-id 0a60fac2-0734-4244-8882-62cedd3c4144

Screen Reader
no

VM
0%

Item
Value

Remote
WSL: Me

OS
Linux x64 5.4.72-microsoft-standard-WSL2

CPUs
Intel(R) Core(TM) i3-10110U CPU @ 2.10GHz (4 x 2592)

Memory (System)
6.04GB (2.68GB free)

VM
0%

Extensions (2)

Extension
Author (truncated)
Version

remote-wsl
ms-
0.56.1

rust-analyzer
mat
0.2.583

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602cf:30294773
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvsnew554cf:30291488
pythontb:30283811
pythonvspyt551cf:30291415
vspre833cf:30267465
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553

While the Source Control panel lists all changes, including files that should be ignored by .gitignore files, the styling in the Explorer panel seems to be correctly applied.


Can you share about how to handle table

Very thanks for this project. I am trying to copy idea to MSD Healthy Book.
Then I found that when I want to index table in html.  The search result is not good enough

Hi,
Thank you for using WikiChat. Would you be able to provide more information about what search index you are using?
In WikiChat, tables are converted to Markdown format first, then indexed. And the search results are always reranked using an LLM call.


Character creation issue

The Issue:
Whenever someone creates a new character and choose their apartment, they are greeted with an infinite black screen.
Error that pops up in console:
[script:qb-apartments] SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null.
[script:qb-apartments] >  (@oxmysql/dist/build.js:22252)
[script:qb-apartments] > processTicksAndRejections (node:internal/process/task_queues:96)
Scripts:
QB-Apartments is up to date, QB-Multicharacter and QB-Spawn (Marcostom32) is up to date and Illenium-appearance is up to date from the releases. I also updated my OXMYSQL. These worked perfectly fine on initial installation and after a couple days started giving me this error. All the installation instructions were followed.

It doesn't seem like an issue related to illenium-appearance. It is coming from qb-apartments. I would suggest opening up an issue on their repository @MriKNG

I will, i'll keep y'all updated. Appreciate it.


Bug: display of artifacts in UI doesn't refresh properly

System information

Have I written custom code (as opposed to using a stock example script provided in MLflow): Yes, but I don't think that's relevant
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.13.5
MLflow installed from (source or binary): binary
MLflow version (run python -c "from mlflow import version; print(version.VERSION)"): 0.1.0
Python version: 3.6.4
**npm version (if running the dev UI):
Exact command to reproduce:

Describe the problem
Bug: the first artifact I click on for a specific run in the UI displays properly, but then that artifact continues to be displayed when I click on other artifacts, until I collapse the "Artifacts" section and re-expand it.

Thanks, I can reproduce this myself.

Closed by #115, cheers!


LGU files seem to be sorted wrongly

I don't know if it has an impact in-game, since I haven't tested it but it seems to me thats this may be an issue as the temp files are wrongly sorted

Hey, my friend just made a pull request this should be resolved soon.

aight gotchu didn't know that was related


Modal window is not displayed correctly [Bug]

PHP: 8.1
Version: 0.2.7
In the custom form option, when creating a form, the modal window is not shown correctly, as shown in the attached images. The modal window is below the menu.

So.. the issue is styling, right?
That module is super old and effectively needs a rewrite

So.. the issue is styling, right?
That module is super old and effectively needs a rewrite

I managed to solve it, on line 37 of the file "mod_formbuilder_settings.html.twig" I changed the command "z-index:1002" to 2000 and it started to work correctly.


fix: reimplement data-failed-state in oracle events panel

Description
Resolves #345
This change reimplements data-failed-state in oracle events panel. The issue described in the original task was caused by recreating the paginated-content component every time there is data fetching which was resetting the page index back to 1.
Demo
https://github.com/aeternity/aescan/assets/46789227/615530d1-5607-403f-986a-89f1de1e611f
Checklist:

[x] I have read and followed the Contributing Guide
[x] My change does not require a change to the documentation.

Not sure how can I test this. Also, the demo does not really prove what is the issue about

@janmichek the demo shows that the pagination is working correctly after data-failed-state component was added. That was the issue description.

You can test it by opening ok_mfPcbwJ3kySdk1zsm47S87Fh8MvnpjRRWVWwmXva7M9xTc8oP details, going offline and trying to fetch the next page. In result you'll get:

The issue reimplement data-failed-state. I would like to see the Failed State component in action .) That it is presented to users when something failed

I'd argue that the issue is: "DataFailedState component does not work with pagination". I should have set the same title for this PR. Doing it right now. Nonetheless, I hope the screenshot I provided above complements the demo in the way you requested.


Seemingly odd behaviour with make_jaxpr

Hello,
I am trying to understand exactly how auto-diff works with JAX. I have an example function:
def fnc_jax(x1, x2):

    return (jnp.divide(x1,x2) - jnp.exp(x2))*(jnp.sin(jnp.divide(x1,x2)) + jnp.divide(x1,x2) - jnp.exp(x2))

Now I do jax.make_jaxpr(fnc_jax)(1.0,1.0), which gives me the following output:
{ lambda ; a:f32[] b:f32[]. let
    c:f32[] = div a b
    d:f32[] = exp b
    e:f32[] = sub c d
    f:f32[] = div a b
    g:f32[] = sin f
    h:f32[] = div a b
    i:f32[] = add g h
    j:f32[] = exp b
    k:f32[] = sub i j
    l:f32[] = mul e k
  in (l,) }

Question 1: Why is it that c, e, and h for example are doing the exact same computation? Wouldn't a better way be if we had something like this:
def fnc_jax_alt(x1, x2):
    a = x1/x2
    b = np.exp(x2)
    c = np.sin(a)
    d = a - b
    e = c + d
    g = d * e
    return g

which gives the same output for a given input as fnc_jax, but doesnt repeat computations confirmed using jax.make_jaxpr(fnc_jax_alt)(1.0,1.0). Is this a feature or a bug?
Another confusion I have is when I do jax.make_jaxpr(jax.grad(fnc_jax))(1.0,1.0):
{ lambda ; a:f32[] b:f32[]. let
    c:f32[] = div a b
    d:f32[] = exp b
    e:f32[] = sub c d
    f:f32[] = div a b
    g:f32[] = sin f
    h:f32[] = cos f
    i:f32[] = div a b
    j:f32[] = add g i
    k:f32[] = exp b
    l:f32[] = sub j k
    _:f32[] = mul e l
    m:f32[] = mul e 1.0
    n:f32[] = mul 1.0 l
    o:f32[] = div m b
    p:f32[] = mul m h
    q:f32[] = div p b
    r:f32[] = add_any o q
    s:f32[] = div n b
    t:f32[] = add_any r s
  in (t,) }

Question 2: Apart from repeated computations, what confuses me is what exactly is going on here? It seems to me like it is doing something of a forward differentiation. But if I understand correctly from the documentation, jax.grad performs reverse-mode differentiation by default. Am I wrong or mis-understanding the make_jaxpr?
If it is forward-mode differentiation, then should we not have something like the following:
{ lambda ; a:f32[] b:f32[]. let
    c:f32[] = div a b
    d:f32[] = exp b
    e:f32[] = sin c
    f:f32[] = sub c d
    g:f32[] = add e f
    _:f32[] = mul f g
    h:f32[] = div 1.0 b
    i:f32[] = cos c
    j:f32[] = mul i h
    k:f32[] = sub h 0.0
    l:f32[] = add j k
    m:f32[] = mul k g
    n:f32[] = mul f l
    o:f32[] = add m n
  in (o,) }

If it is reverse-mode differentiation, how can I get a make_jaxpr for forward-mode?
Apologies in advance for my mis-understandings. I would appreciate some clarity on these questions!
Regards,
Jay Sandesara
What jax/jaxlib version are you using?
No response
Which accelerator(s) are you using?
No response
Additional system info
No response
NVIDIA GPU info
No response

@JaySandesara For your Q1: Eager mode (not jitted) JAX runs fnc_jax op-by-op, so indeed the computations are duplicated, and jax.make_jaxpr only reflects this fact. However, if you jit your function, CSE will kick-in, and divide only occurred once:
print(jit(fnc_jax).lower(1., 1.).compile().as_text())

HloModule jit_fnc_jax, entry_computation_layout={(f64[],f64[])->f64[]}, allow_spmd_sharding_propagation_to_output={true}

fused_computation {
  param_0.2 = f64[] parameter(0)
  param_1.4 = f64[] parameter(1)
  exponential.0 = f64[] exponential(param_1.4)
  subtract.1 = f64[] subtract(param_0.2, exponential.0)
  sine.0 = f64[] sine(param_0.2)
  add.0 = f64[] add(sine.0, param_0.2)
  subtract.0 = f64[] subtract(add.0, exponential.0)
  ROOT multiply.0 = f64[] multiply(subtract.1, subtract.0)
}

ENTRY main.13 {
  Arg_0.1 = f64[] parameter(0), sharding={replicated}
  Arg_1.2 = f64[] parameter(1), sharding={replicated}
  divide.3 = f64[] divide(Arg_0.1, Arg_1.2)
  ROOT fusion = f64[] fusion(divide.3, Arg_1.2), kind=kLoop, calls=fused_computation
}

Question 1: Why is it that c, e, and h for example are doing the exact same computation?

The reason for this is that jaxprs do not produce optimized code, they merely produce an intermediate representation of the code you wrote. Because you computed jnp.divide(x, y) three times, the computation is represented three times in the jaxpr.
Never fear, though: when you JIT-compile the code, the compiler recognizes these repeated operations and will de-duplicate them, freeing you from having to worry about doing so manually. You can see this by printing the compiled HLO, though it's admittedly harder to read than the jaxpr:
print(jax.jit(fnc_jax).lower(1.0, 1.0).compile().as_text())

%fused_computation (param_0.2: f32[], param_1.4: f32[]) -> f32[] {
  %param_0.2 = f32[] parameter(0)
  %param_1.4 = f32[] parameter(1)
  %exponential.0 = f32[] exponential(f32[] %param_1.4), metadata={op_name="jit(fnc_jax)/jit(main)/exp" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  %subtract.1 = f32[] subtract(f32[] %param_0.2, f32[] %exponential.0), metadata={op_name="jit(fnc_jax)/jit(main)/sub" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  %sine.0 = f32[] sine(f32[] %param_0.2), metadata={op_name="jit(fnc_jax)/jit(main)/sin" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  %add.0 = f32[] add(f32[] %sine.0, f32[] %param_0.2), metadata={op_name="jit(fnc_jax)/jit(main)/add" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  %subtract.0 = f32[] subtract(f32[] %add.0, f32[] %exponential.0), metadata={op_name="jit(fnc_jax)/jit(main)/sub" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  ROOT %multiply.0 = f32[] multiply(f32[] %subtract.1, f32[] %subtract.0), metadata={op_name="jit(fnc_jax)/jit(main)/mul" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
}

ENTRY %main.13 (Arg_0.1: f32[], Arg_1.2: f32[]) -> f32[] {
  %Arg_0.1 = f32[] parameter(0), sharding={replicated}
  %Arg_1.2 = f32[] parameter(1), sharding={replicated}
  %divide.3 = f32[] divide(f32[] %Arg_0.1, f32[] %Arg_1.2), metadata={op_name="jit(fnc_jax)/jit(main)/div" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
  ROOT %fusion = f32[] fusion(f32[] %divide.3, f32[] %Arg_1.2), kind=kLoop, calls=%fused_computation, metadata={op_name="jit(fnc_jax)/jit(main)/mul" source_file="<ipython-input-5-923f7c7e31f1>" source_line=5}
}

Question 2: Apart from repeated computations, what confuses me is what exactly is going on here?

jax.grad is implemented in terms of reverse-mode differentiation, so the generated jaxpr reflects the gradient computed in reverse mode. There's no exact forward-mode equivalent of jax.grad, but you can get roughly the same thing by computing the jaxpr of jax.jacfwd:
print(jax.make_jaxpr(jax.jacfwd(fnc_jax))(1.0,1.0))

{ lambda ; a:f32[] b:f32[]. let
    c:i32[1,1] = iota[dimension=0 dtype=int32 shape=(1, 1)]
    d:i32[1,1] = add c 0
    e:i32[1,1] = iota[dimension=1 dtype=int32 shape=(1, 1)]
    f:bool[1,1] = eq d e
    g:f32[1,1] = convert_element_type[new_dtype=float32 weak_type=False] f
    h:f32[1,1] = slice[limit_indices=(1, 1) start_indices=(0, 0) strides=None] g
    i:f32[1] = reshape[dimensions=None new_sizes=(1,)] h
    j:f32[1] = convert_element_type[new_dtype=float32 weak_type=True] i
    k:f32[] = div a b
    l:f32[1] = div j b
    m:f32[] = exp b
    n:f32[] = sub k m
    o:f32[] = div a b
    p:f32[1] = div j b
    q:f32[] = sin o
    r:f32[] = cos o
    s:f32[1] = mul p r
    t:f32[] = div a b
    u:f32[1] = div j b
    v:f32[] = add q t
    w:f32[1] = add s u
    x:f32[] = exp b
    y:f32[] = sub v x
    _:f32[] = mul n y
    z:f32[1] = mul l y
    ba:f32[1] = mul n w
    bb:f32[1] = add_any z ba
    bc:f32[1] = slice[limit_indices=(1,) start_indices=(0,) strides=None] bb
    bd:f32[] = reshape[dimensions=None new_sizes=()] bc
  in (bd,) }

The iota stuff in the beginning comes from the fact that jacfwd is more general than grad, but the rest reflects the un-optimized forward-mode gradient.

Thanks a lot @jakevdp and @soraros for the clear explanations!

Sorry to re-open, but I have one follow up question: As you suggested, I perform forward-mode autodiff using jacfwd and reverse mode using jacrev.
From what I understand, jacrev should be far more efficient when computing the gradient of a scalar valued function with a large input. However, for a toy computation like the following, I see the opposite!
Toy function (really doesn't do anything useful, just made it this way so I can pass arbitrarily large arrays):
def fn(tuple_arr):

    x = 1.0

    for param in tuple_arr:

        x *= (param**2-param**3-param)

    return x

Timing it:
%%timeit -r1 -n1

jax.jacrev(fn)(jnp.array(np.ones(1000))).block_until_ready()

Output:
46 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

%%timeit -r1 -n1

jax.jacfwd(fn)(jnp.array(np.ones(1000))).block_until_ready()

Output:
26.5 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

Is this something to do with the function itself? Or that I am using CPU, which might be struggling with memory transfers? Considering that reverse-mode uses more memory?

A good rule of thumb is that any time you're writing for loops over array contents, you're going to end up with a very inefficient implementation. I'd probably write your function this way, in which case you see the computational characteristics you'd expect.
import jax
import jax.numpy as jnp

def fn(tuple_arr):
  return jnp.sum(tuple_arr ** 2 - tuple_arr ** 3 - tuple_arr)

%timeit jax.jacrev(fn)(jnp.ones(1000)).block_until_ready()
# 18 ms ± 2.06 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

%timeit jax.jacfwd(fn)(jnp.ones(1000)).block_until_ready()
# 46.2 ms ± 8.05 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Maybe something about autodiffing a 1000-step unrolled loop makes jacrev less efficient than jacfwd? I'm not sure.

Thank you for the clarification!


Documentation improvement

Hello! I would like to improve your documentation by adding an installation guide.

i already done it. Thank you!


Can we add support for tvos?

seems like we don't have set  tvos.development_target in all podspecs.

I have been trying to add tvOS to gRPC-Core, but because it relies on BoringSSL, I also had to add tvOS support to BoringSSL. However, I can't get to test it. pod spec lint cannot work for gRPC-Core as it relies on changes on BoringSSL upstream. So instead, I'm using a spare Podfile of this shape:
pod 'BoringSSL', :path => 'grpc/src/objective-c/BoringSSL.podspec'
pod 'gRPC-Core', :path => 'grpc/gRPC-Core.podspec'
pod 'SwiftGRPC', :path => 'grpc-swift/SwiftGRPC.podspec'

to make sure gRPC-Core uses the edited podspec of BoringSSL that supports tvOS, but BoringSSL fails to build at the ss.prepare_command trying to write the umbrella files with
/bin/bash: line 3: include/openssl/umbrella.h: No such file or directory

Anyone else working on this?

@Allezxandre were you able to solve it? I am also having the same issue, when I try to run
pod lib lint BoringSSL.podspec it fails here Add a module map and an umbrella header cat > include/openssl/umbrella.h <<EOF ...
Do you have a version of gRPC that supports tvOS?

I got BoringSSL from https://github.com/google/boringssl.
Inserted podspec from https://github.com/CocoaPods/Specs/blob/9543734012238c33ea018af5a4381459c13f0916/Specs/0/8/a/BoringSSL/10.0.6/BoringSSL.podspec.json.
Set support tvos in podspec.
After that cocoapod compile my pods successfule.

but while compilation whole project, I got compilation error:
Undefined symbols for architecture x86_64:
  "_GRPC_SHADOW_SSL_get_secure_renegotiation_support", referenced from:
      bssl::ssl_check_clienthello_tlsext(bssl::SSL_HANDSHAKE*) in t1_lib.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

gRPC is using pod BoringSSL-GRPC rather than BoringSSL

@muxi ok, thanks, I'll try connecting BoringSSL-GPRC. Currently, I have an issue on pods compilation as @Allezxandre
Add a module map and an umbrella header cat > include/openssl/umbrella.h <<EOF ...

@muxi Yes, your advice helped. Now cocoapods installed successfully with next params:
  pod 'BoringSSL-GRPC', :podspec => 'grpc/src/objective-c'
  pod 'gRPC-Core', :podspec => 'grpc'
  pod 'SwiftGRPC', :podspec => 'grpc-swift'

Now I have that error:
In file included from Pods/BoringSSL-GRPC/crypto/fipsmodule/cipher/e_aes.c:67:
Pods/BoringSSL-GRPC/include/openssl/arm_arch.h:96:5: error: "unsupported ARM architecture"
#   error "unsupported ARM architecture"
    ^

Continue researching...

I am not familiar with tvOS, but I assume the devices themselves are sonr flavor of ARM and the simulator is x86_64. Given you are even getting to that file, it seems unlikely that x86_64 is involved here.
I would suggest figuring out what flavor of ARM it is and looking into why it's not being detected by arm_arch.h.

@davidben its arm64 based on the settings I see

Not sure if this is of any help, but
3rd gen apple tv is ARMv7
and newer ones are ARMv8-a

Sorry for missing last communications.
@bimawa - I agree with @davidben that it looks like the architecture is not correctly detected here, but are you targeting a simulator or an actual device? I find it's weird that arm_arch.h is used (which usually means you are targeting an ARM device, hopefully a tvOS device) and at the same time __ARM_ARCH__ and __aarch64__ are not defined (see ref below). I wonder what exactly is the device being targeted.
Ref to related part of arm_arch.h:
#if !defined(__ARM_ARCH__)
  #if defined(__CC_ARM)
    #define __ARM_ARCH__ __TARGET_ARCH_ARM
    #if defined(__BIG_ENDIAN)
      #define __ARMEB__
    #else
      #define __ARMEL__
    #endif
  #elif defined(__GNUC__)
    #if defined(__aarch64__)
      #define __ARM_ARCH__ 8
      #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
        #define __ARMEB__
      #else
        #define __ARMEL__
      #endif
      // Why doesn't gcc define __ARM_ARCH__?  See all_architectires[] table in
      // gcc/config/arm/arm.c. On a side note it defines
      // __ARMEL__/__ARMEB__ for little-/big-endian.
    #elif defined(__ARM_ARCH)
      #define __ARM_ARCH__ __ARM_ARCH
    #elif defined(__ARM_ARCH_8A__)
      #define __ARM_ARCH__ 8
    #elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
        defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) ||  \
        defined(__ARM_ARCH_7EM__)
      #define __ARM_ARCH__ 7
    #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
        defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6M__) ||  \
        defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || \
        defined(__ARM_ARCH_6T2__)
      #define __ARM_ARCH__ 6
    #elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
        defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) || \
        defined(__ARM_ARCH_5TEJ__)
      #define __ARM_ARCH__ 5
    #elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
      #define __ARM_ARCH__ 4
    #else
      #error "unsupported ARM architecture"
    #endif
  #endif
#endif

@muxi / @bimawa we are trying to build for the simulator first, any of these produce the same result (targeting tvos 10+):

If it's the simulator, I assume that means you are trying to compile for x86_64. In that case you should look into why arm_arch.h is getting pulled in, because it should only be pulled in on ARM.
We build BoringSSL for the iOS simulator fine in Chromium, so I'm guessing there is something funny about how you are building it.

@davidben @muxi @AVVS
Guys thanks for your advice, I tried to reproduce the same error but after the update all of dependence source codes and manipulation with code in sources I compiled it successfully for x86-64 and for arm64 too.
So my worked podfile below:
#Test grpc for tv-os
pod 'gRPC-Core', :git => 'git@github.com:bimawa/grpc.git', :branch => 'feature/supportTVOS'
pod 'BoringSSL-GRPC', :podspec => 'https://raw.githubusercontent.com/bimawa/boringssl/feature/supportTVOS/BoringSSL-GRPC.podspec'
pod 'SwiftGRPC', :git => 'git@github.com:bimawa/grpc-swift.git', :branch => 'feature/supportTVOS'
pod 'SwiftProtobuf', :git => 'git@github.com:bimawa/swift-protobuf.git', :branch => 'feature/supportTVOS'

And also updated all repos in my forks. Pls. check it, and correct. Maybe can we do something with it for support tvos in swift-gRPC

@bimawa Thanks! Will do.

This thread saved my day!
There are any chances on having this released anytime soon?
Thanks!

This should be available in 1.19.0 released a few days back.

@muxi if you have some spare time, could you please help with vendoring libs in https://github.com/grpc/grpc-swift/pull/358


System.DllNotFoundException: 'Unable to load DLL 'onnxruntime-genai' or one of its dependencies (Visual Studio 2022)

I tried running .NET 6 app (C#) using nuget package Microsoft.ML.OnnxRuntimeGenAI.Cuda v0.2.0
Visual Studio 2022 gives this error when running in Debug mode X64 target.
System.DllNotFoundException: 'Unable to load DLL 'onnxruntime-genai' or one of its dependencies: The specified module could not be found. (0x8007007E)'
Exception thrown: 'System.DllNotFoundException' in Microsoft.ML.OnnxRuntimeGenAI.dll
An exception of type 'System.DllNotFoundException' occurred in Microsoft.ML.OnnxRuntimeGenAI.dll but was not handled in user code
Unable to load DLL 'onnxruntime-genai' or one of its dependencies: The specified module could not be found. (0x8007007E)
I tried repair installing VC redist for VS and also tried installing different version of CUDA Toolkit: v11.8, v12.4, v12.5 but to no avail.

CUDA 11.8, cuDNN 8.9.* and latest VC runtime.

CUDA 11.8, cuDNN 8.9.* for CUDA 11.x and latest VC runtime.
Make sure to set path environment variable so that CUDA and cuDNN dlls can be found.

I was under the impression that The ONNX runtime was cross platform and supported AMD GPUs as well as NPU/TPUs and CPUs.
Is there a way to reference this package generically and have it "just work" at runtime, regardless of the backend?

I was under the impression that The ONNX runtime was cross platform and supported AMD GPUs as well as NPU/TPUs and CPUs.
Is there a way to reference this package generically and have it "just work" at runtime, regardless of the backend?

If you look at Phi-3 mini models MS published. There's three versions for ONNX model. directml, cuda, cpu/mobile. DirectML version seems to be GPU vendor neutral where was CUDA version is Nvidia GPU specific model.
I was able to run DirectML version of the ONNX model on my AMD GPU. Now, I'm trying to run CUDA version of the ONNX model on my Nvidia GPU and Visual Studio is giving me grief.
Depending on whether you want to use DirectML version or CUDA version of ONNX model, it seems I have to use different nuget package for ONNX runtime for running .NET app

Microsoft.ML.OnnxRuntimeGenAI.DirectML
Microsoft.ML.OnnxRuntimeGenAI.Cuda

For running ONNX model on NPU, I think you have to specifically prepare the ONNX model for specifc NPU vendor.

CUDA 11.8, cuDNN 8.9.* for CUDA 11.x and latest VC runtime.
Make sure to set path environment variable so that CUDA and cuDNN dlls can be found.

Just reporting, I installed cuDNN 8.9x for CUDA 11 and tried adding PATH variable for it in various ways but it did not fix the error.

What fixed it for me was to put the CUDA 11.8 bin path above any other cuda version bin path in the PATH. Here is my env variable:

This worked for me. Could you give it a try? Also, make sure the cudnn dlls are inside the bin CUDA toolkit bin folder:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin

What fixed it for me was to put the CUDA 11.8 bin path above any other cuda version bin path in the PATH. Here is my PATH env variable:
This worked for me. Could you give it a try? Also, make sure the cudnn dlls are inside the bin CUDA toolkit bin folder:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin

I checked to see 11.8 is the only PATH entry as I had already uninstalled v12.x before installing 11.8. I also checked cuDNN files were copied to Toolkit's corresponding folders as cuDNN install instruction stated. Still didn't work but thanks anyway.
I don't need this to work so feel free to close this issue.

Please raise another issue if this continues to be a problem.


isolated-vm not up to date with latest release

In latest release there is an indication

Scaffolder now supports Node.js v22
The isolated-vm dependency has been upgraded to v5, which means the scaffolder now supports Node.js v22. It also means that running Scaffolder with Node.js v16 is no longer possible.

Expected Behavior
App should start, using isolated-vm v5.
Current Behavior
App is crashing with isolated-vm v4 when using latest version of backstage
https://github.com/laverdet/isolated-vm/blob/v5.0.1/src/isolate/environment.h
https://github.com/laverdet/isolated-vm/blob/v4.7.2/src/isolate/environment.h

Possible Solution
bump plugin-scaffolder-backend usage in scaffolder related plugins.
Workaround
in root, adding:
"resolutions": {
    ...
    "isolated-vm": "^5.0.0"
  },

to the package.json file makes the app work again.

Mentioned this in discord, but the thought here is that the modules shouldn't depend explicitly on the @backstage/plugin-scaffolder-backend package. Is there something that we're missing in OSS that we need to add?

@benjdlambert Its importing createTemplateAction from there.. but it shouldnt..

@Jenson3210 The release is going out now. Would you mind looking at retesting with the new versions of the plugins?

@punkle sure. Will get back!

@punkle all seems to be working after removing the resolution!

Brilliant thank you :)