Tesseract 4.0 Multilanguage issue: kor+eng and eng+kor

(Tesseract는 multi-language를 recognise하지 못합니다.)
language setting = "kor+eng"
result = ㅠ65563아는 ㅁ새-3094396를 『60090156하지 못합니다.
language setting = "eng+kor"
result = Tesseract= multi-languageS recognised =
Suggested fix: It seems tesseract works poorly with multiple sets of trained data. It needs 1 single trained data that covers multiple languages that are often used together.(Eg. Korean+English+Traditional chinese)

Please provide output of
tesseract -v
Which traineddata files are you using? tessdata_fast, tessdata_best, tessdata?
Please try with HanS, HanT and Hangul traineddata from https://github.com/tesseract-ocr/tessdata_best/tree/master/script

Please provide output of
tesseract -v
Which traineddata files are you using? tessdata_fast, tessdata_best, tessdata?
Please try with HanS, HanT and Hangul traineddata from https://github.com/tesseract-ocr/tessdata_best/tree/master/script

The tesseract version that I'm using is c# nuget package of cosine tesseract. It says <IP_ADDRESS> in their description.
The trained data is tessdata_best, tessdata.
For Hangul traineddata:(language = "Hangul";)
Result = Tesseract詞 multi-language言 recogrises和| 実計日員|
For Hangul traineddata + eng best traineddata:(language = "Hangul+eng";)
Result = Tesseract詞 multi-language吊oooaコのop中
For Hangul traineddata + eng best traineddata:(language = "eng+Hangul";)
Result = Tesseract詞 multi-language吊oooaコのop中
For HanS traineddata:(language = "HanS";)
Result = Tesseract詞 multi-language吊oooaコのop中
For HanT traineddata:(language = "HanT";)
Result = Tesseract詞 multi-language言 recogrises和| 実計日員|
Conclusion: Non of the Hangul, HanS, HanT was able to recognise Korean characters. It seems those data files are trained for chinese letters+english only.

Please use this issues tracker only for issues related to tesseeract executable or documented usage of C of C++ API (we do not support problem with tesseract wrappers).

Please use this issues tracker only for issues related to tesseeract executable or documented usage of C of C++ API (we do not support problem with tesseract wrappers).

Do you have a tesseract test website where it have latest build of tesseract with traineddata and user just have to put input image and command then tesseract show the text output? It sounds troublesome for people to download and compile new versions of tesseract everytime just to test and send bug reports.

I installed latest tesseract 4.01 version today.
For Hangul traineddata:
Result = Tesseract multi-language 를 recognise 하 지 못합니다.
For HanS traineddata:
Result = Tesseract 三 multi-language 旱 recognise 引 | 吴 土 LICH
For HanT traineddata:
Result = Tesseract 三 mult-language 告 recognise5t 入 | 史 竺 刷

Conclusion: Hangul traineddata was the closest one to get the correct result.
100% correst result = Tesseract는 multi-language를 recognise하지 못합니다.
Hangul traineddata = Tesseract multi-language 를 recognise 하 지 못합니다.
Hangul traineddata dropped "는" and there was spacing issues after the English letters.

For kor+eng best traindata setting in tesseract 4.01
Result = Tesseract= multi-language 를 [60090156 하 지 못합니다.
For eng+kor and kor+eng, result was the same.
Hyper sensitive spacing glitch after different language letters exists. 하지 is recognised as 하 지 after the eng characters as well.

I can confirm the results by @whatohyou. It is interesting to note that the results highly depend on the selected page segmentation mode:
$ tesseract /tmp/test.jpg - -l kor+eng
ㅠ65563아는 ㅁ새-3094396를 『60090156하지 못합니다.
$ tesseract /tmp/test.jpg - -l eng+kor
Tesseract= multi-languageS recognised = ELICH
$ tesseract /tmp/test.jpg - -l kor+eng --psm 7
Tesseract= multi-language를 [60090156하지 못합니다.
$ tesseract /tmp/test.jpg - -l eng+kor --psm 7
Tesseract= multi-language 를 [60090156 하 지 못합니다.

Could it be the case that script detection and page segmentation are the source of the inconsistencies?

@wrznr Page segmentation as a source of inconsistencies has been reported in other issues also.
Came across another example today, though this is just with a single language.

$ tesseract -v
tesseract 5.0.0-alpha-479-g247c
 leptonica-1.78.0
  libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.9 : zlib 1.2.11 : libwebp 0.4.4 : libopenjp2 2.3.0

$ tesseract num-comma.png - --oem 1 --psm 3 -l eng --tessdata-dir ~/tessdata_best
1092000
924000

504,000
546,000
546,000
882,000
588,000
546,000
462,000

1,092,000
924,000

000,504,000
000,546,000
000,546,000
000,882,000
000,588,000
000,546,000
000,462,000
001,092,000
000,924,000

504,000.00
546,000.00
546,000.00
882,000.00
588,000.00
546,000.00
462,000.00
1,092,000.00
924,000.00

$ tesseract num-comma.png - --oem 1 --psm 6 -l eng --tessdata-dir ~/tessdata_best
1092000 1,092,000 001,092,000 1,092,000.00
924000 924,000 000,924,000 924,000.00

psm 6 is recognizing only last two lines in image while psm 3 starts with last two lines in column 1 but recognizes all lines in other columns. It might have something to do with the fact that the second last line which is the first to be recognized is indented to left.

Same result with all 3 traineddata repos and oems.
ubuntu@tesseract-ocr:~/TEST$ tesseract num-comma.png - --oem 1 --psm 6 -l eng --tessdata-dir ~/tessdata_best
1092000 1,092,000 001,092,000 1,092,000.00
924000 924,000 000,924,000 924,000.00
ubuntu@tesseract-ocr:~/TEST$ tesseract num-comma.png - --oem 1 --psm 6 -l eng --tessdata-dir ~/tessdata_fast
1092000 1,092,000 001,092,000  1,092,000.00
924000 924,000 000,924,000 924,000.00
ubuntu@tesseract-ocr:~/TEST$ tesseract num-comma.png - --oem 1 --psm 6 -l eng --tessdata-dir ~/tessdata
1092000 1,092,000 001,092,000 1,092,000.00
924000 924,000 000,924,000 924,000.00
ubuntu@tesseract-ocr:~/TEST$ tesseract num-comma.png - --oem 0 --psm 6 -l eng --tessdata-dir ~/tessdata
1092000 1,092,000 001,092,000 1,092,000.00
924000 924,000 000,924,000 924,000.00
ubuntu@tesseract-ocr:~/TEST$ tesseract num-comma.png - --oem 2 --psm 6 -l eng --tessdata-dir ~/tessdata
1092000 1,092,000 001,092,000 1,092,000.00
924000 924,000 000,924,000 924,000.00

Have there been any updates on this issue? I also see that order matters a lot when providing multiple languages to Tesseract.
On all the other issues related to multi-language problems I have seen a drift in the discussion as it happened here. PSM might be a different issue.
There seems to clearly be a problem with the order at which languages are provided to Tesseract. How do I know which order is the best one without cross-checking the results with the image manually? (Kind of defies the necessity of doing OCR in the first place)
I am using version v5.0.0-alpha (2020-03-28 version for Windows from the UB Mannheim)

I did some more testing today. It seems to me that multi-language is not supported for the LSTM engine, is that correct?
The legacy engine returns a lot better results for the different languages, but sadly makes more spacing- and noise-errors.
Is it possible to combine the advantages of both worlds and enable the LSTM engine to read multi-language inputs?


python311Packages.approvaltests: 10.2.0 -> 10.3.0

Description of changes
Diff: https://github.com/approvals/ApprovalTests.Python/compare/refs/tags/v10.2.0...v10.3.0
Changelog: https://github.com/approvals/ApprovalTests.Python/releases/tag/v10.3.0

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 284654 run on x86_64-linux 1

6 packages marked as broken and skipped:

python312Packages.approvaltests
python312Packages.approvaltests.dist
python312Packages.robotframework-selenium2library
python312Packages.robotframework-selenium2library.dist
python312Packages.robotframework-seleniumlibrary
python312Packages.robotframework-seleniumlibrary.dist

10 packages built:

python311Packages.approval-utilities
python311Packages.approval-utilities.dist
python311Packages.approvaltests
python311Packages.approvaltests.dist
python311Packages.robotframework-selenium2library
python311Packages.robotframework-selenium2library.dist
python311Packages.robotframework-seleniumlibrary
python311Packages.robotframework-seleniumlibrary.dist
python312Packages.approval-utilities
python312Packages.approval-utilities.dist


Enable image widget by default (without any image load/codec support)

This is a non-breaking change that allows using images loaded with a different library in your program, or raw pixel buffers without including all of the bloat that image-rs is.
It's another attempt at #2244 that is backwards compatible with existing applications because they will already use the image feature if they want the widget.

Superseded by #2244,


Could not connect to development server

Hello there,
i can't understand why the MetroBundler it's not working.
Description
As soon as i start the app, it throws me this error that won't let me connect to my metro bundler. I checked everything, from the port 8081 status and i don't understand why.
Via the simulator it's working, but with my real device it's not.
I have an iPhone XR with iOS 13.6
React Native version:
System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
    Memory: 442.25 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.20.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.1
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.69<IP_ADDRESS>26763
    Xcode: 11.6/11E708 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.0 => 0.62.0
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce
I tried this steps

yarn start --reset-cache
yarn start
cd ios && pod cache clean --all && pod deintegrate && rm Podfile.lock && pod install
rebuild from Xcode and clean the build folder
rm -rf node_modules and yarn to install the packages again

Expected Results
The app should connect to the MetroBundler.
Screenshot:

The ip you see in the image is the right one.

Hi @Derewith is your physical device on the same network as where the metro server is running?

Yeah it is on the same network

Might be related to https://github.com/facebook/react-native/issues/29433 which is also unresolved

checked info.plist

@riadhriadh what do you mean?

@Derewith cheked
this issues https://stackoverflow.com/questions/38501012/is-it-safe-to-add-localhost-to-app-transport-security-ats-nsexceptiondomains

@riadhriadh this is my info.plist and i think it's everything okay with it..

https://stackoverflow.com/questions/42064283/could-not-connect-to-react-native-development-server-on-android

@riadhriadh i'm on iOS so i'cant test on android what's going on

Any updates?

@Derewith can you provide a repro that consistently does this so I can take a look?

I was having similar issues, thought it must be cached versions
so cleared everything

rm -rf node_modules
rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-*
watchman watch-del-all
npm install
npm start -- --reset-cache

It works!

rm -rf node_modules
rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-*
watchman watch-del-all
npm install
npm start -- --reset-cache

Thank you @timbielawski, this worked for. I also had to reset the iOS simulator in order to get it to work.

My devices are running on the same network as the metro bundler. Android connects well with it, but there is always an issue with iOS devices. I'm first building the app with XCode. XCode has its own output log, but I prefer to view the logs in one window.

This worked: Dev Menu in app -> Configure Bundler, and set to my Mac's specific address.
IP: 192.168.0.x
Port: 8081
Entrypoint: src/index (we have a custom path)

Type into terminal ifconfig and under en0 you will find your ipaddress next to inet (and before netmask).

Source: [this comment].

There seems to be a problem with watchman, removing it I was able to connect.

npm start -- --reset-cache helps!

There seems to be a problem with watchman, removing it I was able to connect.

I did brew uninstall watchman and it resolved the issue, thanks @marcosdourado . I'm not quite sure why or how it resolved it. A mystery for another day.

I confirm brew uninstall watchman after a macOS update to Monterey worked

I was having similar issues, thought it must be cached versions so cleared everything
* rm -rf node_modules

* rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-*

* watchman watch-del-all

* npm install

* npm start -- --reset-cache

It works!

This is it thanks so much,
Phil

This worked: Dev Menu in app -> Configure Bundler, and set to my Mac's specific address.
IP: 192.168.0.x Port: 8081 Entrypoint: src/index (we have a custom path - just 'index' is more common)

Type into terminal ifconfig and under en0 you will find your ipaddress next to inet (and before netmask).

Source: [this comment].

Thank you! This is the only solution that worked for me.

Or I used this solution, and it worked for me .


Need more information on SSH then xrdp

The note in this article mentions the following: "From a security perspective, you may wish to connect to your VM with an SSH tunnel using key-based authentication and then connect to xrdp." Can you provide more information or an example on how to do this?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 077ee673-528a-d893-5832-7656b91dbec8
Version Independent ID: 2180e845-1ead-3b47-03be-c26aee00c6f7
Content: Use Remote Desktop to a Linux VM in Azure
Content Source: articles/virtual-machines/linux/use-remote-desktop.md
Service: virtual-machines-linux
GitHub Login: @cynthn
Microsoft Alias: cynthn

Thanks for the question! We are investigating and will update you shortly.

@kaywilliams Here is a [MSDN thread] (https://social.msdn.microsoft.com/Forums/en-US/938bd6e5-44a0-414a-b1b7-6c281dea0573/cannot-connect-to-azure-linux-virtual-machine?forum=WAVirtualMachinesforWindows#0c080b73-686b-41df-b221-24c9520606f9) which has the detailed answer to your question. Let me know if that helps. Thanks.

@kaywilliams Did that help? Please let me know. Thanks.

@kaywilliams We will now close this issue. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Error in the first PowerShell sample

Your first sample PowerShell code for New-AzureRmServiceFabricCluster contains an error: the -Location parameter is specified twice.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6202fb05-c2b0-b87f-71c9-5683e54f5e0c
Version Independent ID: 39505638-9926-fbc6-a795-3d7699859cde
Content: Create an Azure Service Fabric cluster from a template
Content Source: articles/service-fabric/service-fabric-cluster-creation-via-arm.md
Service: service-fabric
GitHub Login: @ChackDan
Microsoft Alias: chackdan

@lant3rn1969 Thanks for the feedback! We are currently investigating and will update you shortly.


re-arranged the screen overlay and modified the health bar

Summary
This PR enhances the overlay layout and modified the health bar a bit
i included the health bar in the overlay instead of main
this means it will be affected by the color changes caused by the sky and the day transition effect
also modified the color lerping functions a bit and fixed some issues with the emotes hiding a large part
of the health bar
i also changed the drawing order for the seed and tools in the overlay since seeds are bigger now
Media

Checklist

[X] I have tested this change locally and it works as expected.
[X] I have made sure that the code follows the formatting and style guidelines of the project.

Labels
type: enhancement, type: bugfix, game-ui

okay maybe the tool overlay_position should be pushed 3 more pixels to the right… sorry


update_checkout: add a --skip-tags option

When fetching the sources, the tags take a very long time due to the
daily tags.  Add an option to skip fetching tags.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

CC: @shahmishal @drodriguez @edymtt

@swift-ci please python lint

@swift-ci smoke test

@swift-ci please smoke test Linux platform

The Windows failure is addressed by https://github.com/apple/swift/pull/38416

@swift-ci please python lint

@swift-ci please smoke test Linux platform

@swift-ci please test Linux platform

Build failed
Swift Test Linux Platform
Git Sha - f7bddc4557259cf1360324b429fce8c165213f24

@swift-ci please test Linux platform


Legends should hide when their layer is hidden

Right now, if I hide a layer, the legend keeps on showing.

The expected behaviour is that whenever I hide a layer, the legends of that layer should hide as well.

Yeah, totally agree, we haven't taken into account that behaviour. We used to not let the user "interact" with the layer-selector in the previous editor, but know the layer selector "works" in the private Builder and we should take into account.
cc @alonsogarciapablo @nobuti

hey, one thing that might do things easier. What if we just show the layer selector when the user is on the ´settings´section? That is closer to the desired behaviour.

Well, not sure it will make things easier, we would need to bind the change in any case if the user clicks over the layer selector in order to "test" it.

Hey, @arianaescobar, but when a layer is hidden, the legend should keep being visible but with the grey colors.

Why?
I would hide them completely. I also asked @saleiva last week and he said the same.

Let me make the same question, why not? 😂 . In the public view I feel it is super common to hide a layer just a second to see if there is any data below and then click again. Is it harmful to have the legend disabled when the layer is not enabled?.
Adding @piensaenpixel @alonsogarciapablo to the discussion because they implemented in that way.

Also, I find confusing the fact that layer selector affects layers visibility too, but in this case, the legend keeps visible in order to let the user to click again in the layer selector.

The way it worked initially was... when the a layer was hidden:

Check for that layer in the "layer selector" got unchecked.
Legends for that layer got grayed out.

Isn't this the behaviour anymore?

Here's an screenshot of what I just described:

We all (design team) just spoke about it and we agree that the best behaviour is:

If I hide a layer on the Builder, the legend hides as well (not faded).
If I turn off a layer in the Layer Selector, the legend hides (not faded) [only the leyend, not leyend + selector]. If I turn off that layer again on the Layer Selector, the legend appears.

:(

Still think we should only show the layer selector on the ´settings´part. We already have this funcionality on the layer list.

Answering your questions:
Is it harmful to have the legend disabled when the layer is not enabled?.
It's not that it's harmful, but unnecesary and might even be annoying. if it's not a matter of a few seconds to check something, but that you actually want to hide a layer for a while, having a leyend occupying a premium location on the screen, that's it's faded (so, not in optimal reading conditions)  and not being able to collapse/hide it, it might be too much. Specially with longer legends.
but in this case, the legend keeps visible in order to let the user to click again in the layer selector.
Our proposal it's only hiding the legend, not the layer selector. You can turn the layer and legend back on in any moment by clicking again on the layer selector checkbox.
Isn't this the behaviour anymore?
We think this should be the behaviour

I completely agree on only showing the layer selector on the settings + public view @saleiva


Download VPN Configuration file issue

When I attempt to Download the VPN Configuration file, I see the following error:
"There was an error provisioning the resource group 'microsoft-network-centralus'.
Additional details from the underlying API that might be helpful: The client<EMAIL_ADDRESS>with object id '0e0f7ad1-6413-482d-bc72-0ca5393dd6ee' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourceGroups/read' over scope '/subscriptions/9512788d-90b2-42d7-aa25-f172e4969c82/resourceGroups/microsoft-network-centralus' or the scope is invalid. If access was recently granted, please refresh your credentials. "
Suggestion on accessing this file would be appreciated.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6d62470b-a511-4b32-5498-2ae5182ec585
Version Independent ID: df2d4c2e-8afb-14ae-6667-9a504a5f8197
Content: Azure Virtual WAN: Create Site-to-Site connections
Content Source: articles/virtual-wan/virtual-wan-site-to-site-portal.md
Service: virtual-wan
GitHub Login: @cherylmc
Microsoft Alias: cherylmc

@sollender , We are looking into this query and will update you as soon as possible.

@sollender , Appreciate your patience. The error indicates that you are not authorized identity to access the resource group "resourceGroups/microsoft-network-centralus". You should possess a contributor role for that particular resource group to access. so, you should be part of the users list or group who can access the resource group. Access can be given through access control (IAM) on the blade.
We are closing this issue for now. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.

Thank you so much, been looking for a good free VPN for a while now.


Execute edpm_bootstrap_command during download_cache

Since the registration of the EL nodes is performed during the edpm_bootstrap_command task in the edpm_bootstrap role, we moved that task into a new task file called bootstrap_command.yml so it can be called by the edpm_download_cache role without invoking the entire role. We also added a marker that will avoid to execute the task twice if it's been already executed.

recheck
NODE_FAILURE

recheck


NoMethodError in ArticlesController#create undefined method `name' for nil:NilClass

I received the following error after adding checkbox in article view (_form)
NoMethodError in ArticlesController#create undefined method `name' for nil:NilClass
Extracted source (around line #52): 50 51 52 53 54 55
@article = Article.new(article_params)
@article.user = current_user
if @article.save
flash[:success]="Your Tip has been Created"
redirect_to article_path(@article)
else
this is the view page _form in article view:
<%=render'shared/errors',obj: @article%>

     <%= form_for(@article, :html => {class: "form-horizontal", role: "form"}) do |f| %>

    <%= f.label :title %>

    <%= f.text_field :title,class:"form-control",placeholder:"Title of Tip",autofocus:true %>

    <%= f.label :description %>

    <%= f.text_area :description,rows:10,class:"form-control",placeholder:"Make it short" %>

               <%= f.collection_check_boxes :category_ids, Category.all, :id, :name do |cb| %>
                   <% cb.label(class: "checkbox-inline input_checkbox") {cb.check_box(class: "checkbox") + cb.text} %>
               <% end %>

      <%= f.submit class:'btn btn-danger btn-lg'%>

    [<%= link_to 'Cancel and Back to Tips',articles_path%>]

<% end %>

this is the article controller :
class ArticlesController < ApplicationController
before_action :set_article,only: [:edit ,:update ,:destroy,:show]
before_action :require_user,except: [:index,:show]
before_action :require_same_user,only:[:edit,:update,:destroy]
def home
redirect_to articles_path
end
def index
@articles = Article.all.order("created_at DESC").paginate(page:params[:page], per_page: 6 )
end
def new
@article = Article.new
end
def destroy
@article.destroy
redirect_to articles_path
flash[:danger] = "ِYour Tip has been Deleted"

end
def edit
end
def update
if @article.update(article_params)
   flash[:success] = "ِYour Tip has been Updated"
   redirect_to article_path(@article)
else
  render 'edit'
end

end
def show
end
def create
@article = Article.new(article_params)
@article.user = current_user
if @article.save
flash[:success]="Your Tip has been Created"
redirect_to article_path(@article)
else
render 'new'
end
end
private
def set_article
@article = Article.find(params[:id])
end
def article_params
params.require(:article).permit(:title, :description, category_ids:[])
end
def require_same_user
if current_user !=  @article.user and !current_user.admin?
flash[:danger]="You can only Edit your own Tips"
redirect_to articles_path
end
end
end
I have added check box to let user select category to his article, but received the mention error.
this is the Repository Link : https://github.com/essam11/Tips-Gator`
enter code here
UPDATE: this is the error that i see in cmd
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now

=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://<IP_ADDRESS>:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
[2017-01-25 14:26:27] INFO  WEBrick 1.3.1
[2017-01-25 14:26:27] INFO  ruby 2.2.4 (2015-12-16) [x64-mingw32]
[2017-01-25 14:26:27] INFO  WEBrick::HTTPServer#start: pid=3884 port=3000
Started POST "/articles" for <IP_ADDRESS> at 2017-01-25 14:26:28 -0800
ActiveRecord::SchemaMigration Load (1.0ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by ArticlesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"PhHhY2JjMjNVM+bT8UmXTRcduOdq9DRKJxKzJz3OfIQ=", "article"=>{"title"=>"xxxxxxxxxxxxxxx", "description"=>"xxxxxxxxxxxxxxxx", "category_ids"=>["1", ""]}, "commit"=>"Create Article"}
User Load (7.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 9]]
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:75: warning: circular argument reference - reflection
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:79: warning: circular argument reference - reflection
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:83: warning: circular argument reference - reflection
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activerecord-4.0.0/lib/active_record/associations/has_many_association.rb:102: warning: circular argument reference - reflection
Category Load (0.0ms)  SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1  [["id", 1]]
(0.0ms)  begin transaction
Category Exists (1.0ms)  SELECT 1 AS one FROM "categories" WHERE ("categories"."name" = 'Windows' AND "categories"."id" != 1) LIMIT 1
SQL (42.0ms)  INSERT INTO "articles" ("created_at", "description", "title", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?)  [["created_at", Wed, 25 Jan 2017 22:26:29 UTC +00:00], ["description", "xxxxxxxxxxxxxxxx"], ["title", "xxxxxxxxxxxxxxx"], ["updated_at", Wed, 25 Jan 2017 22:26:29 UTC +00:00], ["user_id", 9]]
SQL (1.0ms)  INSERT INTO "article_categories" ("article_id", "category_id") VALUES (?, ?)  [["article_id", 66], ["category_id", 1]]
(57.0ms)  rollback transaction
Completed 500 Internal Server Error in 470ms
NoMethodError (undefined method name' for nil:NilClass):   app/controllers/articles_controller.rb:52:in create'
Rendered C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (2.0ms)
Rendered C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (13.0ms)
Rendered C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms)
Rendered C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.0.0/lib/action_dispatch/middl

Please use the mailing list or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only.


Use checkboxes for blueprint type in save modal

Updates the advanced section of the save to catalog modal dialog to use checkboxes instead, with more helpful text labels

a few comments.  pretty straightforward but the checkboxes semantics don't seem right.

LGTM.  There was one extra blank line change which I've undone (as it conflicted with #108), and merged to master.


Update tutorial-load-balancer-port-forwarding-portal.md

#sign-off

@mahipdeora - This PR is in the public repo. I'll close it now so you can instead submit it in the private repo, as you've done in these previous PRs.


Add Minhaj Uddin Siddiqui to Contributers list

Hi  @minhaj3, I'm quite elated about your pull request. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a pull request and learned that I merged it?
We’ve recently added social share  to our web app. Could you please go to https://roshanjossey.github.io/first-contributions/#social-share and share your first contribution to open source?
Also, check out projects with easy issues while you’re there.

I had been using Github for a long time but still, this was my first pull request. It was a very easy process and the description is very detailed. Thank you for that.
But I did face some problem which others may also face. I was trying clone with SSH and my ssh keys were not set in my system and due to this I bash showed error. So I tried the clone by HTTPS by simply copying the repository link. The explanation under "Clone the repository" says to clone by SSH but cloning by HTTPS is more simple and easy and takes less time. So maybe you can change the description and picture associated with it. I can also do that if you like. It would be my another contribution. Thanks again.


Add C-Eval inference scripts

Description
This PR adds the scripts for evaluating the models on C-Eval benchmark.
The results presented in the technical report can be reproduced by the scripts.
wiki:

zh: https://github.com/ymcui/Chinese-LLaMA-Alpaca/wiki/C-Eval评测结果与脚本
en: https://github.com/ymcui/Chinese-LLaMA-Alpaca/wiki/C-Eval-performance-and-script

Example Usage
cd scripts/ceval
python eval.py \
    --model_path ${model_path} \
    --cot False \
    --few_shot False \
    --with_prompt True \
    --constrained_decoding True \
    --temperature 0.2 \
    --n_times 1 \
    --ntrain 5 \
    --do_save_csv False \
    --do_test True \
    --output_dir outputs

Related Issue
Close https://github.com/ymcui/Chinese-LLaMA-Alpaca/issues/561

GPT-4 with Code Interpreter made some suggestions.
Please make any changes that seem valid and appropriate.

Here's a high-level review of your code.
Code Organization
You've done a good job of breaking down the code into different modules based on their purpose. For instance, eval.py is the main execution script, evaluator.py is the base class of the evaluator, and llama_evaluator.py is a specific implementation of the evaluator.
Code Quality
The code is generally well-written and easy to understand, following most of the standard Python practices. However, there are a few improvements that could be made:
1. Docstrings:
While the functions are named clearly, adding docstrings would help provide additional context on what each function does, what the arguments are, and what is returned. This is essential for maintaining the code in the long run and for anyone else who might need to understand the code.
2. Type Hints:
Consider adding type hints to your function definitions. This will make the code easier to understand and reduce the likelihood of errors.
3. Variable Naming:
Some variable names could be improved to be more descriptive. For example, cot, k, sA_id, etc.
4. Handling Boolean Arguments:
For boolean command-line arguments, you could use action='store_true' or action='store_false'. This way, you won't need to convert them from strings to booleans later.
5. Hardcoded Parameters:
Some parameters are hardcoded in your scripts. Consider making these configurable via command-line arguments or a configuration file.
6. Exception Handling:
There are some places in your code where an error could occur. Adding more robust error handling would make your code more resilient. For example, when loading JSON files or reading CSV files, the file might not exist or could be in an unexpected format.
7. Use of Print Statements:
There are several print statements used for logging purposes. Consider using a dedicated logger such as the logging module in Python, which provides more flexibility and control.
8. Directories and File Paths:
The directories 'data/val', 'data/dev', 'data/test' and the file 'subject_mapping.json' are hardcoded. Make these configurable to improve the flexibility of the script.
9. Code Duplication:
There's some duplicated code in eval_subject method of Llama_Evaluator. For instance, correct_num += 1 and correct = 1 vs correct = 0 could be simplified.
10. Magic Numbers:
There are some magic numbers in your code (e.g., top_k=40, top_p=0.9, repetition_penalty=1.1, max_new_tokens=20). It would be good to either make these configurable parameters or define them as constants at the top of your file.
Overall, it's a well-structured and clean codebase. With a few improvements, it can be even better!


Two factor authentication

How to set up this with account that has 2FA enabled?

For Plex right? Just use your Plex token. Discord shouldn't matter as it connects to the Discord already logged in on the same PC.
If you need help on how to setup the program in general this covers most you need to know: https://github.com/phineas05/discord-rich-presence-plex/issues/20#issuecomment-625757212


Problem installing idb-connector

Hi,
I'm having a problem trying to install idb-connector through npm 3.10.10 and node 6.17.0 on IBM i V7R2M0. The debug log is attached to this ticket.  Partial npm output is below. From the npm output, it looks like the filename that npm is trying to download is incorrect as it's missing "64" from the filename (db2ia-v1.2.0-napi3-ibmi-ppc.tar.gz  vs.  db2ia-v1.2.0-napi3-ibmi-ppc64.tar.gz that the website shows)?
npm output:
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/IBM/nodejs-idb-connector/releases/download/1.2.0/db2ia-v1.2.0-napi3-ibmi-ppc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v48 ABI, unknown) (falling back to source compile with node-gyp)
gyp WARN install got an error, rolling back install
Thanks for your help and best regards,
John
npm-debug.log

@jsev1x Looks Like the latest release removed support for node 6.x
https://github.com/IBM/nodejs-idb-connector/releases/tag/1.2.0
You could try an older version just to get started.  Then plan to upgrade node if possible.
See: https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-online-install-instructions-without-acs-open-source-management-tool

Thanks.  Node 6.17.0 seems to be the latest version that available for v7.2 (updated via yum a few weeks ago).
I'll look at installing the previous version.

Hmm, this is a bit new to me and I'm not sure what this means when I try to install the prior version.  Apologies if this isn't the correct place to ask this.
$ npm install<EMAIL_ADDRESS>
<EMAIL_ADDRESS>install /home/jsev/node_modules/idb-connector
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.10/db2ia-v1.1.10-node-v48-ibmi-ppc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v48 ABI, unknown) (falling back to source compile with node-gyp)

According to issue #63 it looks like they were running node 10 on v7r2.
Look here #63 specifically the post from @abmusse. You may just have a path issue.
Not sure why you would get a 403 on the pre-compiled binary -- I still have node 6.14 installed and<EMAIL_ADDRESS>installs for me this morning without falling back on build from source.

Thanks all.  After reading the above issue, the person had a path issue which it appears I had as well (though mine was caused by a CCSID issue with the .profile file).  After correcting, I have managed to install it OK.
I don't know how the person managed to install node 10 as issuing yum check-update shows no available updates (as does the ACS method).  I can only assume it's been installed from a non-IBM i site.

Hello @jsev1x ,  Node.js v6.x is not part of the yum packages. It is a deprecated option of 5733OPS.
To install Node.js 10, you may call yum install nodejs10 if you have the yum environment installed. Node.js 8/10 can co-exists with Node.js v6.x because they have different install paths.

Thanks again, you people have been very helpful.
It has confused me somewhat though.  I entered "yum list installed" and noticed the following in the list:
nodejs10.ppc64                         10.15.3-0                @ibm/$releasever
However, when I entered "node -v", I got:
v6.17.0
Not sure why the system was using v6 however I tried using yum to install it again (I didn't specify the version as v10 was already there) and it installed v8:
Installed:
nodejs8.ppc64 0:8.15.1-0
And a list shows both versions now:
nodejs10.ppc64                         10.15.3-0                @ibm/$releasever
nodejs8.ppc64                          8.15.1-0                 @ibm
However, now when I issue "node -v", it shows as v10:
v10.15.3.
Confused however it seems to have sorted itself out.  I guess I can probably remove v8 now.
Thanks to everyone for their inputs!


MS3 README v2

heh, look good to me now, I'll ask our advisor for comments

@joulev joulev self-requested a review as a code owner now

eh what?

Draft sent to prof, once approved this PR will be merged and a new release candidate version is released.

Got approval, merging.


SRIOV migration based hotplug

What this PR does / why we need it:
This PR adds support for migration based SRIOV hotplug.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

Add support to migration based SRIOV hotplug.

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-kind-1.27-sriov

/retest

/retest

/test pull-kubevirt-e2e-kind-1.27-sriov

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-kind-1.27-sriov

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-kind-1.27-sriov

/test pull-kubevirt-e2e-k8s-1.26-sig-network-multus-v4
/test pull-kubevirt-e2e-k8s-1.26-sig-network
/test pull-kubevirt-build
/test pull-kubevirt-build-arm64
/test pull-kubevirt-generate
/test pull-kubevirt-manifests
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-kind-1.27-sriov

What about SR-IOV unplug, is it going to be supported?

What about SR-IOV unplug, is it going to be supported?

Not planned in the near future.

What about SR-IOV unplug, is it going to be supported?

Not planned in the near future.

Please consider it, as you may know attaching SR-IOV interfaces is expensive, providing the option to remove them could come in handy and could save resources no less then regular interfaces.

/approve
Increasing 2 lgtms to approve.

/unhold

/retest


Nodejs v17 support

Pls, provide binaries for node v17,
Thanks.

@xrnss You see your error because there are no pre-compiled binaries for the node 17, You need to wait.

The binaries in binaries branch works on v17. Not on Windows yet and something is messy with DH params with SSL.


Make profile image shade darker when mouse over

Like on twitter.

And also show a modal with profile info on scroll over profile image, like in Twitter.

https://github.com/squeaknode/squeaknode/pull/2181


support HTTP over SOCKS5 and ensure compatibility with existing mitmproxy configuration files

1、support HTTP over SOCKS5
2、reuse mitmproxy configuration files and certificate
thank you！

Hello, sorry for late answer but:

SOCKS5 is a functinoality definitely a feature to have, this is not my main project but I try to implement new functionalities from time to time, I think next step might be to split gui and the main functionality and to add a tui. I don't think SOCK5 is super difficult to implement so it will probably one of next improvements.
This is not exactly what I want, althought proxelar is strongly inspired by mitmproxy I don't consider it like a clone, however, with last pr I simplified the certificate installation process :)

Thanks for the feedback :)


Azure Key Vault ACL

Latest tfsec (0.25.0) introduced AZU020 which warns about key vaults without ACL. Currently this rule is ignored but we should consider implementing this.
https://github.com/XenitAB/terraform-modules/blob/54f749f8d3778c84c6e98f2723974cf2c0b4ccbd/modules/azure/governance-regional/delegate-kv.tf#L1

Above link no longer works, so this is a working link to AZU020.


[UI] [Container] If you start to add a container and leave the page, various settings are reset and others are not.

Rancher Version: v0.11.1
If I started to add a container and clicked out of the "Create Container" page, some options are reset while others are not.
Settings that are reset:
Name
Port Map
Command Tab: Command, User, Environment Vars
All options in the Volumes Tab, Networking Tab, Security/Host Tab
Settings that are not reset:
Select Image Location
Select Image Name
Command Tab: Console, Auto Restart
We should be consistent in resetting all options in the Advanced Options (i.e. Console/Auto Restart) on the "Create Container" page. It makes sense to keep the "Select Image" settings as what the user had previously used.
Should the "Advanced Options" be collapsed every time you try to create a new container? This would have the user assume that all Advanced Options settings have been reset.

Registry & Image not resetting was intentional, the rest should be reset.  Changed in rancherio/ui#109 (will be in v0.13.1 shortly):

Console is reset to "-it"
Auto restart set to 'never'
Advanced is collapsed

Memory Limit on the Security/Host Tab is not being reset.

Fixed memory limit and entrypoint, I thinks that's all of them.

v0.16.0
Verified Fixed


Editor: crop story poster image and publisher logo upon selection

Feature Description

Currently, when I select an image from the WP media library to use as my story poster image or as the publisher logo, the image is used in the existing dimensions. This causes problems with images that are either (1) two small and/or (2) in the wrong dimensions.
The proposal is to:

Only allow the user to select an image that meets the minimum size requirements. For poster image a minimum of 640x853px is required and for publisher logo a minimum of 96x96.
After the user selects the image, add a step to crop to the right size and aspect ratio. The aspect ratio should be fixed based on the requirements. For poster image 3:4 and for publisher logo 1:1. And the minimum size chosen should not be below the minimum requirements per step 1.

This should make it easy and clear for the creator to set the right poster and publisher logo sizes.
NOTE: we should consider both the workspace/editor panels and the settings page for publisher logo.
Adding video from @swissspidy on existing WP solution we can leverage.
https://user-images.githubusercontent.com/13389997/119665601-90979f80-be02-11eb-9a6e-a5ce1687834e.mov
Alternatives Considered

Additional Context

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria

Implementation Brief

Code used by WP for the cropping: https://github.com/WordPress/wordpress-develop/blob/2382765afa36e10bf3c74420024ad4e85763a47c/src/js/_enqueues/wp/customize/controls.js#L4711-L4735

It should be possible to get a PoC for cropping poster images & publisher logos in the editor based on the precedence set by WP core on cropping within a media modal.
Difficulty of adding e2e tests for that has been mentioned, but that can be neglected when there's thorough manual QA.
Plus, a nice benefit of this is that we can probably remove the web-stories-poster-portrait image size in PHP, as the user will do manual cropping in the editor.

Testing in PR 8067 in QA Environment
If I opt to Skip Cropping here:

The editor crashes:

Verified in QA


ast: add new field in create view stmt

What problem does this PR solve?
Fix panic when create view using prepare.
What is changed and how it works?
For https://github.com/pingcap/tidb/pull/10651

Previously, when we build the create view statement, the Fields of select statement will be rewritten with only name info, so the Expr will be nil when we try to execute the prepare statement, which will cause panic. This PR adds a new field in CreateViewStmt to record the select schema.

Check List
Tests

No code

Code changes

None

Side effects

None

Related changes

None

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: lamxTyler:x: zz-jasonYou have signed the CLA already but the status is still pending? Let us recheck it.


__dockview_internal_drag_event__ appearing in editor text after drag/drop of panel.

Occasionally, when I drag a panel that contains a text editor (tested on both Monaco and Codemirror), a __dockview_internal_drag_event__ is injected into the text that the editor is viewing.
dockview_bug_1.webm

Released in 2.0.0. See https://github.com/mathuo/dockview/releases/tag/v2.0.0


use wasm

i would implement the resize function with wasm bindgen in rust, for better prefs.
FYI please check https://github.com/image-rs/image

I've tried a few wasm files, even that one, but it didn't work. I'll give it a try again in the near future.

cool!


Guide to build PDF for non-ASCII language

Small guide for users that want to build docs on Chinese or Japanese languages, for example.
Related to #5437

Doesn't this depend on the user having the feature flag enabled? Are we waiting to merge this until we remove the flag?

Doesn't this depend on the user having the feature flag enabled?

Yes. It depends on the flag being enabled.

Are we waiting to merge this until we remove the flag?

Not sure. I was about to add a note saying something like: "Please if you need to use this, contact the core team to enable this feature" linking to the "Feature flags" page. This way we can start promoting this more and get more projects using the flag. What do you think?

This way we can start promoting this more and get more projects using the flag. What do you think?

👍

@humitos or @ericholscher I would like to be a guinea pig by enabling this feature flag on Pyramid's documentation, please. We use some Unicode characters to represent a project's tree directory structure. I currently have disabled PDF builds because it fails, but I can re-enable it. Thank you!

@stevepiercy I've added the flag to your project. Please try now and open a new issue to keep discussing about this if any. Thanks!

@stevepiercy I've added the flag to your project. Please try now and open a new issue to keep discussing about this if any. Thanks!

Thanks @humitos! Opened #5503 to continue discussion.


fix: netlify check

issue was identified- the netlify.toml in the web-components package was causing the issue and simply needed to be removed. should be resolved in this PR https://github.com/carbon-design-system/ibm-products/pull/6204
closing this out.


Claymorhism form effect

Project title
Claymorphism Form Design
Project Description
A site that shows claymorphsim effect using HTML, CSS, JS. Contributor at GSSOC'22.
Stack:
And in order to tick the check box just but x inside them for example - [x] like this. Please delete options that are not relevant.

[x] Html
[x] CSS
[x] JavaScript
[ ] ReactJS

/assign


Fix incorrect comment

AFAIK the wording of the comment is wrong.

Looks good! Thanks!
If you have the branch already open and you dont mind adding the a in the comment sentence, please add that.  Otherwise LGTM.

@oshalygin ready.. :)

Wait maybe, it would be better if it says something like this:

Load scriptjs dynamically, since we don't wan't the module to be used server-side or if the component is not rendered

Because AFAIK it not just server-side stuff we do here, but also if the component is not used in a page, then we don't what to add the extra dependency..

Agreed! I'm going to merge this for now though because it minimizes confusion and the sooner we get it out there the better for the community.

Released v7.3.0


Fix target_arch for x86_64

The target_arch should be x86_64 as mentioned here https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch
Otherwise the compilation is broken on wsl with x86_64-unknown-linux-gnu target

Thank you!


Migrating Blog from Medium.com

Migrate this Medium Blog: https://medium.com/linear-algebra/part-2-operations-on-matrices-3caab542aebd
to this jekyll blog with same name, title, contents, etc.
You can use this as guide: https://github.com/bovem/bovem.github.io/blob/master/_posts/README.md
Example of a migrated blog: https://github.com/bovem/bovem.github.io/blob/master/_posts/2020-01-07-Linear-Equations.markdown
You don't have to write formulas in latex you can reuse the images used in Medium blog.

@silentwraith03 Take a look this issue


NuGet Server creates large numbers of temp files in C:\Windows\Temp\nuget on build server

I have searched a number of locations on the net to find solutions but have not found any.
We have a build server that also doubles as a nuget private server.
When we have builds that pull nuget packages from this server,  it creates a large number of file/folders in  C:\windows\temp\nuget
these folders are named similar to whats below
jvlm0lgn.v10\lib\net451\   (Files)
gmxfxu44.llh\lib\net451\    (Files)
1lspx2v4.fpk\lib\net451\    (Files)
it looks like the files are a set of dll's that are part of a nuget package.
My big question is how do we move this temp folder location to another drive?
We cant keep filling up the C: drive on the build server since it fills up quickly

It looks like the stamped dll version of nuget.server.dll is  <IP_ADDRESS> or 3.0.0-preview.
where do we find the newer version and any upgrade instructions?
With the new version are these files cleaned up as they are unpacked or does the new update provide an option for where to unpack these?

I figured out how to rebuild the server with the latest version of nuget.server.  However we are getting a permission error on a cache.bin file.   C:\projects\packages is the defined in the web.config .   The site's app pool runs under network service which has permissions in that folder and for that file.
Any ideas what I might be missing?
Error:
Message: Access to the path 'c:\projects\packages\corp-build01.cache.bin' is denied.
StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at NuGet.PhysicalFileSystem.CreateFile(String path)
at NuGet.Server.Core.Infrastructure.ServerPackageCache.Persist()
at NuGet.Server.Core.Infrastructure.ServerPackageCache.PersistIfDirty()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()

@llyons , it's hard to debug remotely 😃 I would check if the file is marked "readonly"/used by another process. Try to delete it and see if that works?

ok I didnt know I could delete it but I will give that a try.
Is there any difference in how the packages are stored in the package folder between <IP_ADDRESS> (what we had) and <IP_ADDRESS>?
Is the cache.bin new with 3.1.2?
Was there any upgrade instructions that might spell out what needed to be done to move from <IP_ADDRESS> and <IP_ADDRESS>?
Sorry if I am not giving enough info.  I do realize it makes it difficult to debug and understand.

Also,  where are the log files that the nuget server writes out too?  We are having a 404 error when trying to push a package with the new server.  This error shows as...
WARNING: No API Key was provided and no API Key could be found for 'http://machine.domain.local:8001/'. To save an API Key for a source use the 'setApiKey' command.
Pushing ContentManagement.WebAPI.ApiClient.1.0.12.nupkg to 'http://machine.domain.olh.local:8001/'...
PUT http://machine.domain.local:8001/api/v2/package/
NotFound http://machine.domain.local:8001/api/v2/package/ 18ms
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at NuGet.CommandLine.PushCommand.d__16.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at NuGet.CommandLine.PushCommand.d__16.MoveNext()<---

ok I didnt know I could delete it but I will give that a try.

Yes, it's just a cache of all of the package metadata on disk. If you delete it, NuGet.Server will rebuild it.

Is there any difference in how the packages are stored in the package folder between <IP_ADDRESS> (what we had) and <IP_ADDRESS>?

The packages should be stored the same way, but it's possible that the cache file changed format.

Is the cache.bin new with 3.1.2?

No, it should have existed since 3.0.0-beta (and even in 2.x for a while).

Was there any upgrade instructions that might spell out what needed to be done to move from <IP_ADDRESS> and <IP_ADDRESS>?

Aside from update the package, you should be fine. If you have deleted the cache file no other steps should need to be taken.

Also, where are the log files that the nuget server writes out too? We are having a 404 error when trying to push a package with the new server. This error shows as...

You can try enabling server-side logs like this:
https://github.com/NuGet/NuGet.Server/blob/fe2231b0373b9ecc3333a51695f8ec8864fc1368/src/NuGet.Server/App_Start/NuGetODataConfig.cs.pp#L25-L26

WARNING: No API Key was provided and no API Key could

You should provide an API Key to authenticate against the server. Here's the CLI reference: https://docs.microsoft.com/en-us/nuget/tools/cli-ref-push
You can get/set the API Key in the web.config: https://github.com/NuGet/NuGet.Server/blob/master/src/NuGet.Server/Web.config#L17

i am deliberately not using an API key.  That should not be the issue right?

Thanks Joel,    Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0246	The type or namespace name 'TextWriterTraceListener' could not be found (are you missing a using directive or an assembly reference?).
Trace is not recognized.  Is there another reference that needs to be included?

@llyons, you need this at the top of your file:
using System.Diagnostics;

yep thanks and system.web.hosting;

still getting this error.  we are able to pull from the nuget server but the push is failing.
we are doing a
nuget.exe pack ContentManagement.WebAPI.ApiClient.csproj -IncludeReferencedProjects
then we are doing
nuget.exe push ContentManagement.WebAPI.ApiClient.1.0.11.nupkg -s http://machine.domain.local:8001/
error:
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at NuGet.CommandLine.PushCommand.d__16.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at NuGet.CommandLine.PushCommand.d__16.MoveNext()<---

Try pushing to http://machine.domain.local:8001/nuget.
If there is no path on the domain that you are pushing to, nuget.exe assumes the path is /api/v2/package so I think it's actually pushing to http://machine.domain.local:8001/api/v2/package which is not supported.

that did it.  Thanks.

Thanks Joel.   I have one last question.    After adding the logging, I see this kind of message for almost every nuget package we publish.

Thanks Joel,  You and Skoffman1 have been very helpful.


Add functions into namespace

question: how can i add host object, type into a namespace?
i'm asking because i have functions from multiple categories and i want to keep them in separete files while still accessing them from under some namespace
example:
class Foo{
  void FooFunc(...){...}
}
class Bar{
  void BarFunc(...){...}
}

and in js:
namespace.fooFunc(...)
namespace.barFunc(...)

Hi @CrosRoad95,
Please help us understand your scenario.

namespace.fooFunc(...)
namespace.barFunc(...)

Since FooFunc and BarFunc are instance methods, you must specify an instance of the appropriate class in order to invoke them. Your desired JavaScript syntax doesn't appear to accommodate that requirement.
Thanks!

Please reopen this issue if you can provide more information about this topic. Thank you!


getModelJSON fails with a bundler (see reproduction)

Describe the bug
Hi there, I'm trying to use remote models in a basic web app that relies on a bundler (parcel).getModelJSON doesn't seem to load models correctly. I put together a minimal reproduction, see below.
(Note: no issue observed when not using a bundler, and e.g. using CDN transformers instead)
This may be a duplicate of, or related to, #364.
Thanks!
How to reproduce
Bug repro repo: https://github.com/maudnals/bug-repro-transformersjs/tree/main
Steps to reproduce:

Clone this repo and navigate to its root
Run yarn install
Run yarn parcel index.html
Observe the code in script.js. We're simply calling await pipeline('sentiment-analysis')
Open http://localhost:1234 in your browser, or whichever URL parcel gives you
Open DevTools
Observe the error logged in the DevTools console upon model loading:

Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at getModelJSON (hub.js:551:17)
    at async Promise.all (:61216/index 0)
    at async loadTokenizer (tokenizers.js:52:16)
    at async AutoTokenizer.from_pretrained (tokenizers.js:3826:48)
    at async Promise.all (:61216/index 0)
    at async loadItems (pipelines.js:2193:5)
    at async pipeline (pipelines.js:2139:19)
    at async app.js:9:14

Expected behavior
The model should load properly.
Logs/screenshots
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at getModelJSON (hub.js:551:17)
    at async Promise.all (:61216/index 0)
    at async loadTokenizer (tokenizers.js:52:16)
    at async AutoTokenizer.from_pretrained (tokenizers.js:3826:48)
    at async Promise.all (:61216/index 0)
    at async loadItems (pipelines.js:2193:5)
    at async pipeline (pipelines.js:2139:19)
    at async app.js:9:14

Environment

Transformers.js version: "@xenova/transformers": "^2.6.2"
Browser (if applicable): Chrome 118
Operating system (if applicable): MacOS

Addtional context
When adding a breakpoint in getModelJSON, the model path seem fine (openai/...).
I wonder if the issue lays in path rewriting somewhere alongside the bundling steps?

Hi there 👋  Thanks for making the repro 👍
I believe the problem is the following:

By default, transformers.js (like the python library) checks your local server for the model files.
If the model files are found locally, we use those.
If not, the model files are loaded from the HF hub.
The way we detect whether the files are found locally or not, is by looking at the status code being 404. If this is not the case, the file is assumed to be found locally, and the JSON parsing occurs (in this case, for the config.json, tokenizer.json, or tokenizer_config.json file)
I haven't tested with the bundler you seem to be using ("Parcel" I think it's called?), but I think that it's returning some HTML page for the 404 page (hence the error being unable to parse JSON due to unexpected character).

Could you try the following:

Start the server and visit http://localhost:1234/models/Xenova/distilbert-base-uncased-finetuned-sst-2-english. This should fail and result in a 404 page. Could you open dev tools to see what the error code or status of the page is? It should be 404 too.
Update script.js to include the following:import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;

This will bypass the local file check and download from the HF hub instead.

Hi there, facing this exact issue at the moment. I thought about disallowing local models and I am glad to see it suggested here but it does not work for me : I keep getting the error.

I digged a bit into the generated Parcel code and the source map support is kind of broken (making it hard to inspect values and setting breakpoints), but from a bit of testing I figured that this works at least:
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
env.useBrowserCache = false;

Entire test script:
script.js
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
env.useBrowserCache = false;
console.log('✅ Pipeline function is correctly loaded: \n', pipeline);
console.log('❌ But attempting to create a pipeline fails: ');
// Allocate a pipeline for sentiment-analysis
(async function () {
  const pipe = await pipeline('sentiment-analysis');
  console.log("pipe", pipe);
})();

Thanks, I got to the same conclusion : it only works if you force the download form the remote URL. I could not get to the bottom of it.
I was hopeful that another solution existed because, for the project I am working on, this work-around means that users would download the model over and again

I digged a bit into the generated Parcel code and the source map support is kind of broken (making it hard to inspect values and setting breakpoints), but from a bit of testing I figured that this works at least:
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
env.useBrowserCache = false;

Entire test script:
script.js
import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = false;
env.useBrowserCache = false;
console.log('✅ Pipeline function is correctly loaded: \n', pipeline);
console.log('❌ But attempting to create a pipeline fails: ');
// Allocate a pipeline for sentiment-analysis
(async function () {
  const pipe = await pipeline('sentiment-analysis');
  console.log("pipe", pipe);
})();

This really helped me! I know it's only tangentially related to the original post, but I ran into the same JSON parsing error when trying to build the client-side example from Hugging Face's Next.JS tutorial (https://huggingface.co/docs/transformers.js/tutorials/next#client-side-inference) and adding the line env.useBrowserCache = false; to my worker is what fixed it for me. After that, I had no issues using the library.

I don’t think it is only tangentially related, I think it is the same bug everywhere : before downloading the tokenizer from HF, transformers.js checks if it exists locally or in browser cache by following a specific path for each option. If the
path does not exist, a 404 error is thrown. I think that the option (local or cache) is supposed to be ignored in case of 404 error but it isn’t. At one point the problematic path is just replaced by the root of your app (typical fall back) and this is why an HTML page is parsed instead of a json.
What I need to figure out now is when (at which point) the root is swapped in

Also hit this issue and spent some time debugging. Several things contributing to this issue:

Making request to local url instead of remoteURL
Caching bad response with local key
In the next requests, looking up cache by both local and remote urls
Not invalidating the cache after receiving bad response

I Also hitting this, and In my debugging

I think cache.match(name) Seems to get data from an abnormal url.

this is what cache.match(name) return data and I don't know exactly, but it's confirmed that url is " "
In addition, I Think there is a problem that is likely to be a dev environmental problem in next.js with high confirmation, the build result works normally in the space of huggingface.

Those using allowLocalModels=false and useBrowserCache=false... are you downloading the model every single time? Is there a way to handle the caching of the model yourself?

@masylum Yes. I'm using it in a React app, and it re-downloads models on each HMR reload. The production build seems okay from what I can tell.

Same

are you all saying that it browser caching actually works in production build? I obviously did not think about trying given it crashed all the time in dev.

are you all saying that it browser caching actually works in production build?

The problem here is the appalling ignorance of build tools like vite. I always disliked them, but many people are still in their traps and pitfalls... in the best possible scenario, there would be no build tool while testing/developing for quickest possible iteration aka scientific exploration. Makes sense? Let that sink in.
It all boils down to that vite really believes it's a good idea to return a HTTP response code of 200 when a file doesn't exist:

https://stackoverflow.com/questions/69701743/how-can-i-configure-vites-dev-server-to-give-404-errors

You can test that yourself in this example: https://github.com/xenova/transformers.js/tree/main/examples/text-to-speech-client

Run npx vite
Go to http://localhost:5173/DoesNotExist
Check Network tab:

Even non-programmers know about the famous 404 when a page doesn't exist. What are they thinking? Only god knows, but what you should know: drop tools that at best slow you down and at worst introduce bugs in good code.
Solution?

Use a sane web server like lighttpd (as simple as apt install lighttpd) or XAMPP on Windows
Use ESM with importmaps
Rewrite JSX into pure JS
Use a bundler only at the very end for building a minified production artifact

Of course it requires some extra work, but in the long run you can thank yourself to not waste time on non-issues and the freedom of not being required to open dozens of terminals and messing around with shell commands just to use a simple HTML file.
Programming should be simple, fast and working, compare that to over-engineered, slow and non-working. Hence this issue exists.

for that one project, it was indeed vite...
Thanks for the solution
(and lol for the rant)

hey usually in single page applications, all the 404 requests go to your root index.html, so your spa routes can deal with it. this is how vite behaves when you're running a spa. i'm working with vue, but it should be the case generally with react or any other frontend framework. so when your models are not found it goes to the default index.html, and the status code will be 200 with the HTML that your spa returns.
you can add a vite plugin to overwrite this behaviour for the files concerning transformers.js using the configureServer plugin option from vite. read about the api here
here is a simple config that should work. i havent researched into better ways to do this. i'm just setting up a simple prototype to test out transformers.js.
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import fs from "fs";
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    {
      name: "out-json-404",
      configureServer(server) {
        server.middlewares.use((req, res, next) => {
          // check if the request is for a json file or onnx file
          if (req.url.endsWith(".json") || req.url.endsWith(".onnx")) {
            // check if the file exists
            const filePath = path.join(server.config.root, req.url);

            // if it doesnt exist, return a 404
            if (!fs.existsSync(filePath)) {
              res.statusCode = 404;
              res.end(JSON.stringify({ error: "JSON file not found" }));
              return;
            }
          }

          // continue as normal otherwise
          next();
        });
      },
    },
  ],
});

@amk-dev It would be great if this library allowed providing models manually. I would love the ability to load ONNX files with react-query. The 404 issue could be avoided.

Updated to v3; Now I'm getting the following error:
@parcel/core: Failed to resolve '#onnxruntime-webgpu' from<EMAIL_ADDRESS>/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@huggingface/transformers/src/backends/onnx.js:29:27
28 | // @ts-ignore

29 | import * as ONNX_WEB from '#onnxruntime-webgpu';
|                           ^^^^^^^^^^^^^^^^^^^^^
30 |
31 | export { Tensor } from 'onnxruntime-common';

@parcel/resolver-default: Cannot read properties of undefined (reading 'message')
TypeError: Cannot read properties of undefined (reading 'message')
at new ThrowableDiagnostic (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/diagnostic/lib/diagnostic.js:128:26)
at ResolverRunner.resolve (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/core/lib/requests/PathRequest.js:296:72)
at async Object.run (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/core/lib/requests/PathRequest.js:92:16)
at async RequestTracker.runRequest (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/core/lib/RequestTracker.js:637:20)
at async AssetGraphBuilder.runPathRequest (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/core/lib/requests/AssetGraphRequest.js:333:18)
at async $31bd78e367586e0a$export$2e2bcd8739ae039._runFn (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/utils/lib/index.js:34236:13)
at async $31bd78e367586e0a$export$2e2bcd8739ae039._next (/Users/maudn/Code/ML/temp/bug-repro-transformersjs/node_modules/@parcel/utils/lib/index.js:34229:9)

@maudnals This should be handled in https://github.com/huggingface/transformers.js/blob/7ebd50ce92fb1f9bad551b06076a5e5713eaa89f/package.json#L24-L29. Is this perhaps a parcel issue?

Most likely a parcel issue! I was able to repro the issue with parcel, but indeed Vite works fine:

Bug repro (parcel)
Non-bug repro (Vite)

I've filed a bug against the parcel repo:
https://github.com/parcel-bundler/parcel/issues/10012

I am getting this issue with Angular v18.
The recommended solution didn't work:
  constructor() {
    this.initializeQnA();
  }

  async initializeQnA() {
    this.qnaPipeline = await pipeline('question-answering');
    env.allowLocalModels = false;
    env.useBrowserCache = false;
  }

The issue still exists:
dialog-agent.component.ts:39 ERROR SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at hub.js:581:17
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (zone.js:369:28)
    at Object.onInvoke (core.mjs:7251:33)
    at _ZoneDelegate.invoke (zone.js:368:34)
    at ZoneImpl.run (zone.js:111:43)
    at zone.js:2538:40

Is there a known workaround?


bazel_7: init at 7.0.0rc2

Description of changes

Introduce bazel 7
What works ?

building a functional bazel binary and most tests for

[X] x86_64-linux
[ ] aarch64-linux
[X] x86_64-darwin
[X] aarch64-darwin

[X] Extracting MODULE.bazel.lock into a repository_cache / bindir nix derivation :tada:

What does not work ?

[x] Trimming bazel external repos required for tests
[x] Protobuf tests (full rewrite I think)
[x] MODULE.lock generation is broken, a GSON issue I guess.
[x] Java toolchain is hardcoded using aggressive system bazelrc.
[x] cleanup of useless files
[ ] Comment every piece for future me/us
[x] (re)Implement updater
[ ] Split the bootstrap steps into different derivations (I have loost too much time failing in the last ten seconds after 10 minutes of compiling)

More details in a follow-up comment, but here is a PR with two weeks of work, to avoid duplicating work.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[X] x86_64-darwin
[X] aarch64-darwin

[X] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[X] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[X] Fits CONTRIBUTING.md.

This is now ready for review. Any insight welcome.
I did test it with
nix-build -E'(import ./. { system = "'{{x86_64,aarch64}-darwin,x86_64-linux}'"; })'.bazel_{4,5,6,7}.tests

And while bazel_6 fails to build on darwin, I consider this pretty unrelated, as it fails to find codesign, so probably a sandbox / patching issue.
Tests do pass on linux for all bazel versions, and on darwin for bazel_7.

aarch64-linux compiles too here :+1:

I know I am long overdue here, but there are still some pending issues, and we are very close to bazel 7.0.0 official release. I will try to release that directly.

If merged with latest master it starts to fail on darwin like so
x86_64-darwin:
...
ld: warning: dylib (/nix/store/x4s0wi6d2z38wa0jb4yf769sl1c0c50z-libcxx-16.0.6/lib/libc++.dylib) was built for newer macOS version (10.12) than being linked (10.11)
Undefined symbols for architecture x86_64:
  "vtable for std::out_of_range", referenced from:
      std::out_of_range::out_of_range[abi:v160006](char const*) in libijar_cc_binary_main.lo(classfile.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "___cxa_end_catch", referenced from:
      std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::overflow(int) in libijar_cc_binary_main.lo(classfile.o)
      std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:v160006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libijar_cc_binary_main.lo(classfile.o)
...

aarch64-darwin:
...
Undefined symbols for architecture arm64:
  "vtable for std::out_of_range", referenced from:
      std::out_of_range::out_of_range[abi:v160006](char const*) in libijar_cc_binary_main.lo(classfile.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "___cxa_end_catch", referenced from:
      std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::overflow(int) in libijar_cc_binary_main.lo(classfile.o)
      std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:v160006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libijar_cc_binary_main.lo(classfile.o)
  "typeinfo for std::bad_array_new_length", referenced from:
      std::__throw_bad_array_new_length[abi:v160006]() in libijar_cc_binary_main.lo(classfile.o)
...

Thanks for the report, I will rebase and try to fix. Any idea what the fix could be though ? I have access to a Darwin builder, but not much knowledge.
Le 9 décembre 2023 12:25:29 GMT+01:00, Dmitry Ivankov @.***> a écrit :

If merged with latest master it starts to fail on darwin like so
x86_64-darwin:
...
ld: warning: dylib (/nix/store/x4s0wi6d2z38wa0jb4yf769sl1c0c50z-libcxx-16.0.6/lib/libc++.dylib) was built for newer macOS version (10.12) than being linked (10.11)
Undefined symbols for architecture x86_64:
 "vtable for std::out_of_range", referenced from:
     std::out_of_range::out_of_range[abi:v160006](char const*) in libijar_cc_binary_main.lo(classfile.o)
 NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
 "___cxa_end_catch", referenced from:
     std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::overflow(int) in libijar_cc_binary_main.lo(classfile.o)
     std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:v160006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libijar_cc_binary_main.lo(classfile.o)
...

aarch64-darwin:
...
Undefined symbols for architecture arm64:
 "vtable for std::out_of_range", referenced from:
     std::out_of_range::out_of_range[abi:v160006](char const*) in libijar_cc_binary_main.lo(classfile.o)
 NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
 "___cxa_end_catch", referenced from:
     std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::overflow(int) in libijar_cc_binary_main.lo(classfile.o)
     std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:v160006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libijar_cc_binary_main.lo(classfile.o)
 "typeinfo for std::bad_array_new_length", referenced from:
     std::__throw_bad_array_new_length[abi:v160006]() in libijar_cc_binary_main.lo(classfile.o)
...

--
Reply to this email directly or view it on GitHub:
https://github.com/NixOS/nixpkgs/pull/262152#issuecomment-1848380021
You are receiving this because you were assigned.
Message ID: @.***>

7.0.0 was released: https://github.com/bazelbuild/bazel/releases

Looks like 7.x darwin build breaks after https://github.com/NixOS/nixpkgs/pull/263535

 (cd /private/tmp/nix-build-bazel-7.0.0.drv-3/bazel_eVl8TlHS/out/execroot/_main && \
  exec env - \
    PATH=/nix/store/ai4hd8f1xhr0rfjdr17bxx1rwi42sx97-python3-3.11.6/bin
/nix/store/bg77k830j2z1xjslll7d31y55d3hnmip-unzip-6.0/bin
/nix/store/79yyc6yisbxkcpgavm2c756ysy5r3jbm-which-2.21/bin
/nix/store/pwhi3qhn5fi7m64hxyn2wkgy3b4l91zi-zip-3.0/bin
/nix/store/xd8i1lilimkhn4zcxyd3icddzb7r088z-cctools-port-973.0.1/bin
/nix/store/3fpl3hs6ii820yxp0rbafx5phnmj8ng7-clang-wrapper-16.0.6/bin
/nix/store/a5v30qll5i02vr9y97bk1rdx3mm6kvlm-clang-16.0.6/bin
/nix/store/h0fgpyxfav7ybnw5sdg8jpyv9f95x4w0-coreutils-9.3/bin
/nix/store/ydcx9rj4gf3dxm1kc0lx7l5d5vrjdwp2-cctools-binutils-darwin-wrapper-16.0.6-973.0.1/bin
/nix/store/vpnp0c420cjmx82g05jq3nm5skdrblvk-cctools-binutils-darwin-16.0.6-973.0.1/bin
/nix/store/k5xqpf63xm8m0v8m0bsb34w4w4l7yids-zulu17.44.53-ca-jdk-<IP_ADDRESS>/bin
/nix/store/x1xxsh1gp6y389hyl40a0i74dkxiprl7-bash-5.2-p15/bin
/nix/store/94j70ziq1zp2mj0fs2fzi49j7q3mdhba-diffutils-3.10/bin
/nix/store/ckbx2qla8zxic5k2d549qdhkbwrpa4q6-file-5.45/bin
/nix/store/zr6klxfjzpdr2674ly1f4fix7ig57mjr-findutils-4.9.0/bin
/nix/store/blggp459hvq6swvr8nlxblkdn7ayw8y7-gawk-5.2.2/bin
/nix/store/98v0v3bwzgkcwsz4anjip62d2k3gz352-gnugrep-3.11/bin
/nix/store/zapwwg8vnc47j7ciyrd7hb7rhwfrrs5c-patch-2.7.6/bin
/nix/store/nddzbf5pifm77kksh25xwiy2g9kqqm9f-gnused-4.9/bin
/nix/store/g9z0hg6snhg5834p14yw4bx6ilcffr8b-gnutar-1.35/bin
/nix/store/6g3nq5hply5p2v3xzlg0i9qqgzr30w1d-gzip-1.13/bin
/nix/store/h0fgpyxfav7ybnw5sdg8jpyv9f95x4w0-coreutils-9.3/bin
/nix/store/zr6klxfjzpdr2674ly1f4fix7ig57mjr-findutils-4.9.0/bin
/nix/store/94j70ziq1zp2mj0fs2fzi49j7q3mdhba-diffutils-3.10/bin
/nix/store/nddzbf5pifm77kksh25xwiy2g9kqqm9f-gnused-4.9/bin
/nix/store/98v0v3bwzgkcwsz4anjip62d2k3gz352-gnugrep-3.11/bin
/nix/store/blggp459hvq6swvr8nlxblkdn7ayw8y7-gawk-5.2.2/bin
/nix/store/g9z0hg6snhg5834p14yw4bx6ilcffr8b-gnutar-1.35/bin
/nix/store/6g3nq5hply5p2v3xzlg0i9qqgzr30w1d-gzip-1.13/bin
/nix/store/dq6dsprg57r5wqlc4yzcnkbfxdhfcd3f-bzip2-1.0.8-bin/bin
/nix/store/6kxdgmbgwdq4y42r9qhgdky312v5d7x0-gnumake-4.4.1/bin
/nix/store/x1xxsh1gp6y389hyl40a0i74dkxiprl7-bash-5.2-p15/bin
/nix/store/j34fimsig5s1zsf2f5dkw9a8sv5zpskg-patch-2.7.6/bin
/nix/store/96bznf6bjdghshgj3a2hm16gk3nngbcx-xz-5.4.4-bin/bin
/nix/store/ckbx2qla8zxic5k2d549qdhkbwrpa4q6-file-5.45/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  external/bazel_tools~cc_configure_extension~local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt-exec-ST-fad1763555eb/bin/external/rules_java~7.1.0~toolchains~remote_java_tools/ijar_cc_binary-2.params)
# Configuration: ab192274ab21bdc5bb8e345e4cc8bd36536328aa117b8df888873da443d114d6
# Execution platform: //:default_host_platform
Undefined symbols for architecture arm64:
  "vtable for std::out_of_range", referenced from:
      std::out_of_range::out_of_range[abi:v160006](char const*) in libijar_cc_binary_main.lo(classfile.o)
...

It looks like there's some instability around libcxx and apple sdk version that is going to be addressed in master (after 23.11 release, so ~now). But not exactly sure what goes wrong here

Seems to be https://github.com/NixOS/nixpkgs/issues/166205
And might be fixable with something like https://github.com/NixOS/nixpkgs/pull/268829/commits/51451ac4069e18b5813b38d57cb68cd72b7ec51e

https://github.com/layus/nixpkgs/pull/12 fixes compilation for me with recent nixpkgs/master on aarch64-darwin

Does this bazel_7 package also suffers from https://github.com/NixOS/nixpkgs/issues/273500? I've not tested it yet. Just wondering.

Oddly enough no, but I observed it a few times. I think it boils down to getting the right Java version to compile Bazel, with the right Java language version flags. But I am not sure.
Le 14 décembre 2023 16:11:16 GMT+01:00, Hoang Nguyen @.***> a écrit :

Does this bazel_7 package also suffers from https://github.com/NixOS/nixpkgs/issues/273500? I've not tested it yet. Just wondering.
--
Reply to this email directly or view it on GitHub:
https://github.com/NixOS/nixpkgs/pull/262152#issuecomment-1856028534
You are receiving this because you were assigned.
Message ID: @.***>

I think this doesn't have the bashWithDefaultShellUtils as a shell instead of ${bash}/bin/bash that was recently added to bazel_6:
https://github.com/NixOS/nixpkgs/blob/459e800b0475d6804808798f67a5f58e3294a6e4/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix#L452-L454
Does this introduce a regression for #265040? If so: Is this intended?

@FollieHiyuki I have added a test for https://github.com/NixOS/nixpkgs/issues/265040 to prevent regressions. At least the binary we produce will not have the issue, while the origin is still unknown.
@malt3 "Backported" remote build fixes from bazel_6, and removed the corresponding patch. Would you mind testing it for remote execution. I never encountered that issue with remote execution myself.

@layus Hello, when I tried to use bazel-repository-cache.nix without passing the requiredDepNamePredicate argument, it threw an error that the value is a set, while a string was expected. The problem is in _main~bazel_bazel_build_deps~workspace_repo_cache, because sha256 here is an array with the pair archive -> hash, instead of str.
I don't know how to fix this in a better way or if it should be done. But I figured it should be reported.

@name-snrl I have fixed that use case, because I needed the files it bundled. I cannot however support all repository_rule attributes, so the script should be made more robust to failure. I have improved that a bit.

Okay, so now all tests pass :tada:
As long as ofborg is happy, I am going to merge (or let anyone else merge).

Is there any reason why remote_java_tools_linux not patcheelf'ed?
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:530: "execvp(external/remote_java_tools_linux/java_tools/ijar/ijar, 0x1a6db30)": No such file or directory

It is not because patching Bazel to apply patchelf on downloaded tarballs is an heavy change, and probably unexpected by users.
There is however a fix for that issue which relies on using a local Java toolchain and recompiling ijar from sources. The core parameters are in the hardcoded bazelrc file near the top of the nix file.
Ensure you have JAVA_HOME set, and use toolchain resolution debug flag to see why the non_prebuilt toolchain is not used
Le 3 janvier 2024 03:54:07 GMT+01:00, timothy @.***> a écrit :

Is there any reason why remote_java_tools_linux not patcheelf'ed?
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
src/main/tools/linux-sandbox-pid1.cc:530: "execvp(external/remote_java_tools_linux/java_tools/ijar/ijar, 0x1a6db30)": No such file or directory

--
Reply to this email directly or view it on GitHub:
https://github.com/NixOS/nixpkgs/pull/262152#issuecomment-1874790433
You are receiving this because you were mentioned.
Message ID: @.***>

Is bazel7 in nixpkgs missing the action_env patch that exists in bazel6? I seem to be hitting the case that was solved in bazel 6 by https://github.com/NixOS/nixpkgs/pull/146389 after upgrading to bazel7, where build --action_env=PATH=/nix/store/...coreutils:/nix/store/...stuff isnt being propagated to ctx.action.run

@Strum355 I hit a few cases last night during my upgrade to Bazel 7 where things in actions.run() is missing coreutils and setting use_default_shell_env=True fixes it but I'm not sure if that's correct.  Without it, it looks like the command is being run with zero environment (whereas in Bazel 6, the patched PATH was still there).  I suspect needing use_default_shell_env=True is wrong though because I'm not sure how non-Nix usages would work either without some base amount of PATH given how many things assume the presence of coreutils.

I had the same problem with my deployment. And I just re-added the patch (locally) for now. What bugs me is that the environment ends up empty, but I see no path yet in the code where it can happen.
Re-adding the patch is the quickest fix.
My best guess is that the patch made us use run() in an incorrect way, assuming that coreutils is present when it is not by default. Bazel add PATH to the action digest, so for tools that need no path, it's better to have none. The patch fooled us into thinking that run() can be used that way. Not too sure yet, I need to investigate using a vanilla bazel.
Oh, and not gonna work on that in the next few days sadly, but probably end of next week.

Is bazel7 in nixpkgs missing the action_env patch that exists in bazel6? I seem to be hitting the case that was solved in bazel 6 by #146389 after upgrading to bazel7, where build --action_env=PATH=/nix/store/...coreutils:/nix/store/...stuff isnt being propagated to ctx.action.run

Correction on this, it appears that what I thought was a case of this patch causing the passing through action_env wasnt actually the case, but it was masking the fact that action_env wasnt being passed through by hard-coding just enough to make some rules that depend on e.g. coreutils run successfully. A lot of convolution around action_env and where/what passes through $PATH, but the patch is just "good enough" for me to keep working. Ideally everything would pass down action_env, as it would mean I could avoid rebuilding bazel by having to to set a different defaultShellPath :/

With --repo_env and --action_env it's possible to set PATH and even LD_LIBRARY_PATH but some rules override that and pretend to be in control while in reality they rely on implicit non-hermetic dependencies in FHS locations.
Another rabbit hole with this is it's possible to undo nixos glibc&bazel patches, tweak bazel build once, and then run builds in specially-crafted buildFHSEnv. So rules that expect to work with empty env/path will fallback to fhs through glibc (hence need to unpatch it, nixos disables fhs fallback) and find whatever is put into fhs (and needs to be in fhs as this is where glibc would look on empty env). To make it bazel cache friendly probably still makes sense to add --repo_env and --action_env to bazelrc


Update priority.lua

Update apt command to overcome error during build process.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Reflect https requirement in link:// endpoint

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

#sign-off


Figma files are in 404 (because not open to everyone) on the Theming documentation

Duplicates ❌

[X] I have searched the existing issues

Which Figma library is concerned?
Not related to one Figma library
Current behavior 😯
https://www.decathlon.design/726f8c765/p/88a9a6-theming/b/354a0f
This page is not open (tested in private nagivation). So, people that aren't in Decathlon's Figma organization cannot see it.
Expected behavior 🤔
Could be nice to see it :)
Thanks!
Context 🔦
No response
Screenshots / Videos 📸

Done :)

Just added this for the next release of our doc:


functions-bindings-service-bus-trigger.md Docker + Terraform?

How to deploy with Terraform and wrap in Docker container?
Getting this error:
2022-02-16T22:52:26.589Z ERROR - Container redacted didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1d50399c-0873-e903-35ca-1845c84b6c6c
Version Independent ID: 1a3150b4-5eb9-0ac5-ee2b-d1bb6b6fd63e
Content: Azure Service Bus trigger for Azure Functions
Content Source: articles/azure-functions/functions-bindings-service-bus-trigger.md
Service: azure-functions
GitHub Login: @craigshoemaker
Microsoft Alias: cshoe

@brandonros Can you share the document that you are following?
MicrosoftDocs Github issue is mainly related to the document issue. For any error/exception/triubleshhoting I would recommend you to create a thread on the forums - Microsoft Q&A or Stack Overflow
Once you post your issue on forums, it will have visibility across the community which is a better suited audience for such types of issues.

@brandonros Following up to see if you have followed any document for which you have observed the issue. If not then I will suggest you to reach out on the forums - Microsoft Q&A or Stack Overflow

@brandonros We will now proceed to close this thread as there was no response. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Better error when recovery key doesn't match

Problem

The error doesn't provide any context.
Context is in command line:

Expected Behavior
Show error saying that given seed phase doesn't match the account id.
Steps to reproduce

Recover any account
Enter any seed phase
Observe an error

@marcinbodnar If we receive the above error specifically, we should show "Seed phrase is invalid for this account", as the user has entered an incorrect seed phrase for the account.


Multires dev

I think the multires_recon() function and demos should be stable enough to push into the master branch. It works on both the microscopy and shepp logan phantoms, but it makes a big difference on the microscopy phantom. If you want to try it out before accepting the merge, you can just pull the branch "multires_dev" and run the demos.

I like the recursive nature of this function!!!
Charlie, now I know what you meant by "making it the default" in the recon() function, even when using "no multi-resolution" as the default. This is because in essence this function is more general, also making the recon() function a little redundant.
However, with the current way of how it is written there are some issues. The multires_recon() function has a lot of "the same code" since many lines are just copy-paste the same.
One way is to get rid of the redundancies in multires_recon(). The use of *args and **kwargs (https://book.pythontips.com/en/latest/args_and_kwargs.html) would be a way to do this since multires_recon() is very much only a wrapper around recon(). That is, most of the arguments to both functions are the same. Actually I think all arguments are the same except for max_resolutions.
We could simply use
def multires_recon(max_resolutions, *args, **kwargs):

as a function definition so that *args are [sino, angles] and **kwargs are {center_offset=0.0, delta_channel=1.0, delta_pixel=1.0, ...}. In this way we handle the shared arguments as a list of arguments (args) and a dictionary of key-word arguments (kwargs). This way modifying the recon() function would not implicate the multires_recon() function. It would not require to maintain two sets of code every time we make a change to recon().
In the very bottom of multires_recon() we would not call recon() with all these arguments separately but instead simply call
reconstruction = recon(*args, **kwargs)

I would recommend these changes before we merge this into the master.
Thilo

Some more questions that came up:
How do the resizing operations affect the voxels outside the reconstruction region?

Due to the interpolation I assume it is likely that the voxels outside will not necessarily stay non-zero. This is something I noticed when writing the multi-resolution code for the cone-beam recon.

max_resolutions:

I don't really understand how this parameter works. Is this the maximum depth of the recursion tree? Is there a more intuitive way of doing this, for example with a recursion depth counter or something? Something that is not intuitive enough may be difficult to debug.

Resizing the sinogram

in my multi-resolution code I resize both the sonogram and the image. This way the resolution of the recon is always resolution at iso. This makes speeds up the overall computation because there is in general less data (both A and y are smaller). (In this case it is important to scale the center_offset parameter accordingly though.)

Thilo

These are excellent comments. I will implement *args, **kwargs, and the max_resolution changes.
I will probably hold off on the sinogram resizing for now. I think it is a great idea, but I first want to get this basic version sorted out.