wamr-compiler compilation keeps failing in MacOS

After executing build_llvm.sh, execute the following commands:
mkdir build
cd build
cmake ..
build

then it fails.
➜  build git:(master) make
Scanning dependencies of target vmlib
[  2%] Building C object CMakeFiles/vmlib.dir/Users/zhujinpeng/workspace/webasm/wasm-micro-runtime/core/shared/platform/linux/platform_init.c.o
clang: error: unknown argument: '-mindirect-branch-register'
clang: warning: -Wl,-z,noexecstack,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
make[2]: *** [CMakeFiles/vmlib.dir/Users/zhujinpeng/workspace/webasm/wasm-micro-runtime/core/shared/platform/linux/platform_init.c.o] Error 1
make[1]: *** [CMakeFiles/vmlib.dir/all] Error 2
make: *** [all] Error 2

How did you configure the building environment? By the way, you should try to build the runtime on Linux since the one you used was supposed to be used in linux.

How did you configure the building environment? By the way, you should try to build the runtime on Linux since the one you used was supposed to be used in linux.

Yes, I build it successfully on my Linux cloud machine. But I still want to build it on my MacOS laptop. Could you tell me how to build it on MacOS?

@dpinthinker , could you please comment the -mindirect-branch-register flag in wamr-compiler/CMakeLists.txt, and build again?
if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
endif ()

to
if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
endif ()

After comment the -mindirect-branch-register flag, this error is gone.
But another issue come out.
[ 50%] Building ASM object CMakeFiles/vmlib.dir/Users/zhujinpeng/workspace/webasm/wasm-micro-runtime/core/iwasm/common/arch/invokeNative_em64.s.o
/Users/zhujinpeng/workspace/webasm/wasm-micro-runtime/core/iwasm/common/arch/invokeNative_em64.s:9:5: error: unknown directive
    .type invokeNative, @function
    ^
make[2]: *** [CMakeFiles/vmlib.dir/Users/zhujinpeng/workspace/webasm/wasm-micro-runtime/core/iwasm/common/arch/invokeNative_em64.s.o] Error 1
make[1]: *** [CMakeFiles/vmlib.dir/all] Error 2
make: *** [all] Error 2

Yes, could you please try modifying:
.globl invokeNative
     .type    invokeNative, @function

to
.globl _invokeNative

and build again?

Thanks for your help! I have figured it out

Yes, could you please try modifying:
.globl invokeNative
     .type    invokeNative, @function

to
.globl _invokeNative

and build again?

.type error is gone. Another ld error.
[100%] Linking CXX executable wamrc
ld: unknown option: --gc-sections
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [wamrc] Error 1
make[1]: *** [CMakeFiles/wamrc.dir/all] Error 2
make: *** [all] Error 2

After I commented this line in CMakeList.txt
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")

It still output an error.
[100%] Linking CXX executable wamrc
Undefined symbols for architecture x86_64:
  "_invokeNative", referenced from:
      _wasm_runtime_invoke_native in libvmlib.a(wasm_runtime_common.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [wamrc] Error 1
make[1]: *** [CMakeFiles/wamrc.dir/all] Error 2
make: *** [all] Error 2

Could you try modifying  ".globl _invokeNative" to ".globl invokeNative"?

sting not working

Here is all my changes.
diff --git a/core/iwasm/common/arch/invokeNative_em64.s b/core/iwasm/common/arch/invokeNative_em64.s
index 739e84e..b975e71 100644
--- a/core/iwasm/common/arch/invokeNative_em64.s
+++ b/core/iwasm/common/arch/invokeNative_em64.s
@@ -6,7 +6,7 @@
     .align 2
 #ifndef BH_PLATFORM_DARWIN
 .globl invokeNative
-    .type    invokeNative, @function
+#    .type    invokeNative, @function
 invokeNative:
 #else
 .globl _invokeNative
diff --git a/wamr-compiler/CMakeLists.txt b/wamr-compiler/CMakeLists.txt
index 336e317..b43a009 100644
--- a/wamr-compiler/CMakeLists.txt
+++ b/wamr-compiler/CMakeLists.txt
@@ -76,7 +76,7 @@ add_definitions(${LLVM_DEFINITIONS})
 message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
 message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+#set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections \
                     -Wall -Wno-unused-parameter -Wno-pedantic")

@@ -102,7 +102,7 @@ include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
 # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion")
 if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
+#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
 endif ()
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong --param ssp-buffer-size=4")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,noexecstack,-z,relro,-z,now")

Hi, the codes of #else branch should work for MacOS, we are able to build iwasm of platform darwin in MacOS (product-mini/platforms/darwin), in which BH_PLATFORM_DARWIN is defined:
#ifndef BH_PLATFORM_DARWIN
.globl invokeNative
.type    invokeNative, @function
invokeNative:
#else
.globl _invokeNative
_invokeNative:
#endif /* end of BH_PLATFORM_DARWIN */
So could you please modify these codes to
.globl _invokeNative
_invokeNative:
Or modify
#ifndef BH_PLATFORM_DARWIN
to
#if defined(BH_PLATFORM_DARWIN) || defined(APPLE)
to let #else branch take effect and try again?

@wenyongh Thank you so much! It is finally compiled successfully.
Follow is the changes.
diff --git a/wamr-compiler/CMakeLists.txt b/wamr-compiler/CMakeLists.txt
index 336e317..dcaa98a 100644
--- a/wamr-compiler/CMakeLists.txt
+++ b/wamr-compiler/CMakeLists.txt
@@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 2.8)

 project (aot-compiler)

-set (WAMR_BUILD_PLATFORM "linux")
+set (WAMR_BUILD_PLATFORM "darwin")

 # Reset default linker flags
 set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
@@ -76,7 +76,7 @@ add_definitions(${LLVM_DEFINITIONS})
 message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
 message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
+#set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections \
                     -Wall -Wno-unused-parameter -Wno-pedantic")

@@ -102,7 +102,7 @@ include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
 # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion")
 if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
+#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register")
 endif ()
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong --param ssp-buffer-size=4")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,noexecstack,-z,relro,-z,now")

Fixed by #265


feat(slugrunner): add readiness check for the slugrunner pod

Summary of Changes
Add readiness probe which check whether the downloded slug has started running
Issue(s) that this PR Closes
Associated End To End Test PR(s)
Associated Documentation PR(s)
Associated Design Document(s)
Testing Instructions

Create a Deis Cluster
deploy a build pack app and simultaneously do watch on kubectl get pods in another window
Once the app is deployed you should see a state where the pod is in running state but doesn't show it as ready.

Pull Request Hygiene TODOs
Please make sure the below checklist is complete.

[x] Your pull request is concise and to the point (make another PR for refactoring nearby code)
[x] Your commits are squashed into logical units of work
[x] Your commits follow the commit style guidelines

:cherry_blossom: Thank you! :cherry_blossom:

Btw... where did all the junk in the OP come from?  It looks like some of our contributing docs.  How did it get in here?


linznetz.import_report not importing data

Version of the custom_component
VERSION = "0.0.1" (60c79bd)
Configuration
none
Describe the bug
I'm running linznetz.import_report but no data is imported, i.e. the sensor isn't updated.
In the debug log I can see that the file is processed successfully. Also the data in the output looks reasonable.
service: linznetz.import_report
data:
  entity_id: sensor.home_energy
  path: /config/attachments/<zähler>_QH_20230514.csv

Debug log
I've removed most of the csv file's data for brevity.
2023-05-16 13:29:24.496 DEBUG (MainThread) [custom_components.linznetz] Import Report executed with path: /config/attachments/<zähler>_QH_20230514.csv
2023-05-16 13:29:24.496 DEBUG (MainThread) [custom_components.linznetz] Entity: Home Energy; Entity_ID: sensor.home_energy; Unique_ID: <zähler>_energy
2023-05-16 13:29:24.501 DEBUG (MainThread) [custom_components.linznetz] <_io.TextIOWrapper name='/config/attachments/<zähler>_QH_20230514.csv' mode='r' encoding='UTF-8'>
2023-05-16 13:29:24.510 DEBUG (MainThread) [custom_components.linznetz] Last inserted stat:
2023-05-16 13:29:24.510 DEBUG (MainThread) [custom_components.linznetz] defaultdict(<class 'list'>, {'sensor.home_energy': [{'start':<PHONE_NUMBER>.0, 'end':<PHONE_NUMBER>.0, 'sum': 13.903}]})
2023-05-16 13:29:24.521 DEBUG (MainThread) [custom_components.linznetz] Inserted stats:
2023-05-16 13:29:24.521 DEBUG (MainThread) [custom_components.linznetz] defaultdict(<class 'list'>, {'sensor.home_energy': [{'start':<PHONE_NUMBER>.0, 'end':<PHONE_NUMBER>.0, 'state': 0.221, 'sum': 0.221}]})
2023-05-16 13:29:24.522 DEBUG (MainThread) [custom_components.linznetz] Overlap detected, start sum with 0.000000.
2023-05-16 13:29:24.528 DEBUG (MainThread) [custom_components.linznetz] [{'start': datetime.datetime(2023, 5, 13, 22, 0, tzinfo=datetime.timezone.utc), 'state': Decimal('0.221'), 'sum': Decimal('0.221')}]
2023-05-16 13:29:24.529 DEBUG (MainThread) [custom_components.linznetz] {'unit_of_measurement': 'kWh', 'source': 'recorder', 'name': 'Home Energy', 'statistic_id': 'sensor.home_energy', 'has_mean': False, 'has_sum': True}

Oh I see! Yeah the data is on the energy dashboard. Thanks :)

Does Cost work for you? For me it always shows €0.00.

Sadly not since I think the cost calculation (that uses the configured cost value) is only triggered when a "current" value is set but this integration only add statistics values directly to the DB (hence the problem with the unknown value). This might be a good idea for a feature request if the cost values can be pupulated like the statistic ones. Currently this integration is more a workaround and cheap solution to get the values somehow into the energy dashboard until the SmartMeter Addon from the company Ginzinger is available to purchase:
https://www.ginzinger.com/de/wissen-events/techtalk/ginzinger-zubau-news-1/
https://www.ginzinger.com/de/wissen-events/techtalk/ginzinger-entwickelt-smart-meter-schnittstelle/


add multiple active adapters tests

What does this PR do?

Add multiple active adapters tests

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Weird bug on Mac OS Dir operations

The following code works on Linux:
Dir.open("/") do |dir|
  dir.each do |file|
    puts file.inspect
  end
end

But on Mac OS X (10.10.5) I get:
Error: File / does not exist

I'm also running 10.10.5 with crystal 0.7.6 and that code does successfully print out my root directory, dotfiles included. What version of crystal are you using?

Crystal 0.7.6 [eb13f75] (Thu Aug 13 22:00:15 UTC 2015)

Well, it's not a bug - I was just running this with an extra argument "/", due to a previous test with ARGV being passed, and that's why I got a Crystal error... :cry:

Hmm, that's interesting. I'm no expert, so hopefully someone more familiar with that part of the standard library can chime in. Just wanted to share that I was on same OS version and your code worked. Sorry! :smiley:


Systemd support

This is systemd support for zookeeper cookbook.

@ljesmin thanks for your contribution! Would you mind adding tests? That requires: Serverspec assertions, a suite for the Test Kitchen configs, and an update to the Travis config to run that test in addition to the existing ones.
I still need to figure out how to get the tests to run when others do a PR, but at least they’ll run when I merge this in & we can get a green badge at that point.

@ljesmin I cleaned up the commits a bit to make for a more concise history, added the tests to the .kitchen.cloud.yml and updated the Travis config.
Published as v7.1.0!


AWS cli create domain association issue

Hi,
I am trying to run this command, but every time this command fails to create domain association with my new branch and my domain.
If i check my commands cli-skeleton, it returns :
{
"appId": "",
"domainName": "",
"enableAutoSubDomain": true,
"subDomainSettings": [
{
"prefix": "",
"branchName": ""
}
]
}
According to this my enableautosubdomain flag is true.
When i actual run this command:
It automatically becomes false.
{
"domainAssociation": {
"domainAssociationArn": "arn:aws:amplify/d2po5bkxstg6hw/domains/yyyyyyyy",
"domainName": "yyyyyyyyyy",
"enableAutoSubDomain": false,
"domainStatus": "AVAILABLE",
"certificateVerificationDNSRecord": "_f2377b9bdf6b5542726513f2d27ec699.yyyyyyyyyy. CNAME _e39f00fe985c8b167001afbc10ed31b1.olprtlswtu.acm-validations.aws.",
"subDomains": [
{

@kontrol-debug the enableAutoSubDomain setting is not supported right now even though it is visible in the API docs. You cannot use this field at this moment.

Hi @swaminator,
Then what is the way out if i want to redirect a new branch url  from test.yyyyy.amplifyapp.com to test.mydomain.com using aws command line.??

aws amplify update-domain-association --app-id xxxxxxx --domain-name mydomain.com --sub-domain-settings "[{"prefix": "test","branchName": "test"}, {"prefix": "","branchName": "master"}]"
basically, each time you add a sub domain, you need to include every existing subdomains to the new request.

@VividKnife ,
Thankyou for the help.


Explicitly document that a plugin can be "disabled" with 'if' keyword

I learned that a plugin can be disabled when reading documentations about dein#recache_runtimepath() and dein#tap(), but I couldn't find how I can achieve it.
Finally, Shougo kindly told me that we could disable a plugin by if keyword.
I think it should be documented in a searchable way, so I added some topical words, like "disabled", to the explanation of *dein-options-if*.

Thanks


python3Packages.torchinfo: init at 1.6.2

Motivation for this change
Add torchinfo python package.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.05 Release Notes (or backporting 21.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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Thanks for the input @SuperSandro2000
I think it should be fixed now. Also had to skip one test that required network connection to download pretrained weights for a model.

@oborg build python3Packages.torchinfo


doom sync -up fails with "unable to access https://mumble.net/.../paredit.git/ : SSL certificate problem

What did you expect to happen?
doom sync completes without errors.
What actually happened?
After doing rm -rf ~/.emacs.d/.local/straight/ the command doom sync -up fails with the following error:
 > Building clj-refactor > Cloning paredit...
      x The package manager threw an error
      x Last 25 lines of straight's error log:
        $ cd /Users/zand/.doom-emacs/.local/straight/repos/
        $ git clone --origin origin --no-checkout https\://mumble.net/\~campbell/git/paredit.git /Users/zand/.doom-emacs/.local/straight/repos/paredit/ --depth 1 --single-branch --no-tags
        Cloning into '/Users/zand/.doom-emacs/.local/straight/repos/paredit'...
        fatal: unable to access 'https://mumble.net/~campbell/git/paredit.git/': SSL certificate problem: certificate has expired
        [Return code: 128]
        $ cd /Users/zand/.doom-emacs/.local/straight/repos/
        $ git clone --origin origin --no-checkout https\://mumble.net/\~campbell/git/paredit.git /Users/zand/.doom-emacs/.local/straight/repos/paredit/ --no-single-branch
        Cloning into '/Users/zand/.doom-emacs/.local/straight/repos/paredit'...
        fatal: unable to access 'https://mumble.net/~campbell/git/paredit.git/': SSL certificate problem: certificate has expired
        [Return code: 128]
        $ cd /Users/zand/.doom-emacs/.local/straight/repos/paredit/
        $ git branch -r
        [File error while Setting current directory]
      ! Extended backtrace logged to ~/.doom-emacs/.local/doom.error.log

Describe your attempts to resolve the issue
Removing paredit from init.el would probably solve the issue but I rely on paredit to edit Clojure code so that's not an option for me.
I verified that the web interface to the named paredit repo is available if you visit the url in the browser i.e.: https://mumble.net/~campbell/git/paredit.git
This web interface also appears to work when you specify the SSL port as in the following url:
https://mumble.net:443/~campbell/git/paredit.git
Bypassing git ssl certificate checking with git config --global http.sslVerify false resolves the ssl certificate error.
However testing the git command manually at the command line results in another error:
➜  .doom-emacs git:(develop) ✗ git clone --origin origin --no-checkout https\://mumble.net/\~campbell/git/paredit.git /Users/zand/.doom-emacs/.local/straight/repos/paredit/ --depth 1 --single-branch --no-tags
Cloning into '/Users/zand/.doom-emacs/.local/straight/repos/paredit'...
fatal: dumb http transport does not support shallow capabilities

Removing the --depth 1 option allows the manual git command to complete successfully on the command line:
 .doom-emacs git:(develop) ✗ git clone --origin origin --no-checkout https\://mumble.net/\~campbell/git/paredit.git /Users/zand/.doom-emacs/.local/straight/repos/paredit/ --single-branch --no-tags
Cloning into '/Users/zand/.doom-emacs/.local/straight/repos/paredit'...
Fetching objects: 694, done.
➜  .doom-emacs git:(develop) ✗

Then doing doom sync -up returns the following error:
   - No packages need rebuilding
    > Updating packages (this may take a while)...
      > Repository "paredit" has a dirty worktree:

        D  COPYING
        D  CREDITS
        D  NEWS
        D  check.sh
        D  genhtml.sh
        D  paredit.el
        D  test.el

           1) Abort
           2) Stash changes
           3) Discard changes (Choose this if unsure)

        How to proceed? (1, 2, 3; don't know? Pick 3)

Choosing option 3 allows doom sync to complete successfully.
Steps to reproduce
Please see the attempts to solve the issue section above.
System Information
https://pastebin.com/JV6ejvL5

This is peculiar. Straight should fall back to a full clone if a shallow clone fails. It's possible this certificate error is fooling it. See if this works:
;; add to ~/.doom.d/packages.el
(package! paredit :recipe (:host github :repo "emacsmirror/paredit"))

Then run doom sync -u.

Manually deleting the paredit directory from .emacs.d/.local/straight and then doing doom sync -u works as expected:
➜  .doom-emacs git:(develop) ✗ rm -rf .local/straight/build-27.2/paredit
➜  .doom-emacs git:(develop) ✗ bin/doom sync -up
> Executing 'doom sync -up' with Emacs 27.2 at 2021-10-04 14:13:40
  > Synchronizing your config with Doom Emacs...
    > Regenerating envvars file at "~/.doom-emacs/.local/env"
      ✓ Successfully generated "~/.doom-emacs/.local/env"
    > Installing packages...
      > Building paredit...
      ✓ Installed 1 packages
    > (Re)building packages...
      - No packages need rebuilding
    > Updating recipe repos...
    > Updating packages (this may take a while)...
      ✓ All 210 packages are up-to-date
    > Purging orphaned packages (for the emperor)...
      - No builds to purge
      - No ELPA packages to purge
      - No repos to purge
      > Regrafting 198 repos...
        ✓ repos/ns-auto-titlebar cannot be compacted further
        ✓ repos/osx-trash cannot be compacted further
        ✓ Finished regrafting. Size before: 0.0KB and after: 0.0KB (0.0KB)
    > (Re)generating autoloads file...
      > Generating autoloads file...
      > Byte-compiling autoloads file...
      ✓ Generated .local/autoloads.27.2.elc
    - Restart Emacs or use

This issue should now be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

That was fast! ;-) Yes, confirmed resolved.


server: add unix socket capability

DiceDB now supports tcp://, dice:// and unix:// variant addresses
WIP: add support for environment variables

@codeasashu can you please resolve the conflicts?

@codeasashu closing the PR for now, please feel free to raise again with resolved conflicts and adding an issue.

@lucifercr07 New PR has been drafted with no conflicts: https://github.com/DiceDB/dice/pull/941


Some GLSL if statements being ignored by debugger

This is a weird one so I've included an example project. Some simple if statements are not being evaluated when debugging. In the video I'm doing a check if z < 0.0 which is ignored when it's part of a longer list of conditions, but does work when on its own. I'd expect this to cause a lot of problems for other people, but no one else has mentioned it? Maybe I'm doing something weird?
weird-conditions.zip
https://user-images.githubusercontent.com/3372/124845078-0e49f000-dfea-11eb-80dc-d08721d82d3d.mp4

Thank you so much for reporting this issue!
There was a bug in the VM where certain OpLabel instructions were skipped and OpPhi wouldn't work then.
It should work now:

I appreciate the report so much!


Ensure consistency of keyCode values for keyboard events on HTML5

Not going to track TODO items as issues :smile:


js: Fix spelling of Received functions

Hi @Srile,
This is a fairly simple fix, but confused someone using the library, so might be helpful for the future.
I left deprecated aliases for the old naming so that code continues to work.

@Srile Any chance you could have a quick look sometime? :)

LGTM


Does LLaVA's package dependencies conflict with those of MedCLIP?When I replace the vision encoder of LLaVA with MedCLIP, the following error occurs

Question
When I replace the vision encoder of LLaVA with MedCLIP, the following error occurs.
RuntimeError: Error(s) in loading state_dict for MedCLIPModel:         Unexpected key(s) in state_dict: "text_model.model.embeddings.position_ids".

@20191864218 Hi, can you let me know how you resolved this issue? What changes do we need to make to integrate MedCLIP?


Android permission check

Added a simple permission check and request to prevent crashing on api 23+

Can one of the admins verify this patch?

ping for @andrewharp

Hi, thanks for the PR. We had previously merged a commit to add a permissions check (https://github.com/tensorflow/tensorflow/pull/926), but reverted it because at the time it was causing some Google-internal build complications.
Instead it was easier to change the app to build at API level 21, where all required permissions are granted on install automatically (are you trying to build at API 23? If so, maybe adb install -g will work for you in the short term?)
My major concern here is bringing in the Android support libraries as a dependency, since that complicates the build. I can test the previous PR again and see if that builds internally now, if this works for you.

I checked, and I can no longer reproduce the internal issue with the previous change.
Also, it does make more sense to put the authorization code in CameraActivity.java and to additionally request the storage permission, as you've done. Would you mind modifying your commit remove the use of the Android support libraries (you can use the previous solution for reference)?

@andrewharp made the change. Do you want to set the target at 23 in the same commit?

Thanks!
With the runtime checks on Android M for devices at API < 23, yes it should be safe (and required) to set the target level to 23.

@andrewharp let me know if everything looks good.

@tensorflow-jenkins: test this please

@andrewharp ready to merge?


Internalization

Is your feature request related to a problem? Please describe.
Ya ploho govorit' po-russki, no po drugomu ya govorit' ne umeyu
Describe the solution you'd like
Add an i18n. A full eng/rus translations. Buttons and everything.
NOW

OKAY I'M SOWWY IT'S THERE IT'S THERE NOW #101


Update encoder-decoder-coupling.lua

supports mini-batch training

I suppose it should be nn.SplitTable(1,2) since we are dealing with 3-d data in min-batch mode. I have made the changes.

@cheng6076 Yes you are right! Thank you :)


Add #[context()] for the function which has the return type impl Iterator<Item = xxx>, get error[E0562]

When using
Please indicate the precise nightly build you are using; try rustc --version
# rustc --version
rustc 1.74.0 (79e9716c9 2023-11-13) (Fedora 1.74.0-1.fc39)

What I tried to do
Please include sample code or links to your project!
If add #[context()] for the function which has the return type impl Iterator<Item = xxx>, get error[E0562]: impl Trait only allowed in function and inherent method return types, not in closure return types.
use fn_error_context::context;

#[context("Scan all tmpfiles conf and save entries")]
fn empty_iterators() -> impl Iterator<Item = String> {
    std::iter::empty::<_>()
}

fn main() {
    let _ = empty_iterators();
}

What happened
Describe what happened in as much detail as possible.
For compiler ICEs, a good idea would be to include the output with RUST_BACKTRACE=1.
When run above code, get error:
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in closure return types
 --> src/main.rs:4:25
  |
4 | fn empty_iterators() -> impl Iterator<Item = String> {
  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0562`.

What I expected
When remove #[context()] line, no error. But it should support.

I think the tricky thing here is that due to the use of the fn-error-context crate it's not immediately obvious (to someone starting work on a codebase that uses the crate without being familiar with its implementation) that the macro rewrote the function to use an inner closure.
Hmm, I wonder if it'd be possible to change that crate to use an inner fn instead of a closure...thinking about it briefly it seems likely.
I'm not a maintainer for this repository but I suspect there's not much immediately actionable for the Rust trait maintainers.
Ah, there's already an issue: https://github.com/andrewhickman/fn-error-context/issues/7 so I think we should probably discuss there.

Thanks @cgwalters for the clarification, then I will close this issue and track in https://github.com/andrewhickman/fn-error-context/issues/7


core(progress-circle): default aria-label value

Summary

What is the change?

Add a default aria-label="Loading…" on the cds-progress-circle component. When value is used, this could instead be Loading: ${value}%….

Why should it go in Clarity?

Some Core components currently contain a default aria-label, such as the modal close button. This would be in line to provide a similar experience.

Does this change impact existing behaviors? If so how?

It would impact existing use cases but not if the aria-label is already used: explicitly providing one would override the default value.

If this change introduces a new behavior, is this behavior accessible?

I believe this would increase the accessibility of the existing component. There are internationalization considerations to keep in mind, but this would be no different than the modal close button label or similar other elements.
Use case
At CloudHealth, we are replacing our existing circular progress component with Clarity's. Our component currently contains a default aria-label and we would like to avoid requiring all our developers to remember to add aria-label as it would be forgotten most of the time.
API
There is no change to the existing API. However, if it is desirable to maintain the possibility to have no aria-label, one could explicitly give aria-label="". It is probably not a good idea to not include an aria-label in general, so it seems like a good idea to make exceptions visually identifiable.

this sounds reasonable to me. it may take us a few weeks to get to it though...

Thanks @mathisscott! Let me know if I can help, I'd be happy to :)


Fixed: batching lead to faulty results, crashes and men wielding bananas.

Without this fix, the rotary embedding code had a buffer overrun for the rotation coefficient tables which would lead to incorrect results and sometimes CUDA error: an illegal memory access was encountered. The reason is that we were viewing the input as position * number of heads rows of head dimension elements each, assuming a single batch. When we had processed all rows for a position, we "incremented" (in a manner of speaking) the position and kept going, without checking if we crossed into the next batch. So in the best case we would apply the wrong rotary embedding for batch 1, pos 0 forward, worst case we'd try to apply an embedding for position 2049, which we never generated.
The fix is to stick each batch in its own cuda block and do the right number of rows per batch. One could instead have taken the modulus to find the correct positional ordinal (assuming a contiguous x over the batch dimension), but this solution seemed cleaner.
This PR also adds a batch generation validator.
Before
In the test below using Llama 13B, the first 4 generations should be identical, being greedy sampling on the exact same input, just done in batch. But they are not. Also note the poor quality generations like "The 196000000" -- this is likely caused by garbled positional embeddings messing with the model's reading comprehension.

'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nThe first thing to do is to get the'
'When you have eliminated the impossible, whatever remains, ... however improbable, whatever remains, however improbable, however improbable, however impro'
'When you have eliminated the impossible, whatever remains, ... however, there is no other explanation.\nThe 196000000'
'When you have eliminated the impossible, whatever remains, ... however improbable it may be, must be the truth.\nThe first step in the scientific'
'When you have eliminated the impossible, whatever remains, must be considered ... the impossible.\nThe first step is to get the data.\nThe second step is to eliminate'
'When you have eliminated the impossible, whatever remains, ought to be ... the truth.\nThe only thing that is impossible is the impossible.\nThe only thing that is'
'When you have eliminated the impossible, whatever remains, (and some scholars say this is ... the impossible, however improbable, must be the truth.\nThe first thing to do is'
'When you have eliminated the impossible, whatever remains, however improbable, is a banana. ...\nA man with a banana.\nA man with a banana.\nA man with'

After
With the fix in place, the first 4 generations are identical as expected. The remaining 4 indicate better understanding of what went before them. The model is now more skeptical about the banana's place in contemporary Conan Doyle literary analysis.

'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nThe first thing to do is to get the'
'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nThe first thing to do is to get the'
'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nThe first thing to do is to get the'
'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nThe first thing to do is to get the'
'When you have eliminated the impossible, whatever remains, must be considered ... the truth.\nThe first thing to do is to eliminate the impossible.\nThe second thing to'
'When you have eliminated the impossible, whatever remains, ought to be ... the truth.\nThe first thing to do is to get rid of the idea that the word "'
'When you have eliminated the impossible, whatever remains, (and some scholars say this is ... the most important part of the quote) must be the truth.\nThe quote is often attributed to'
'When you have eliminated the impossible, whatever remains, however improbable, is a banana. ...\nI'm not a fan of the "banana" theory. I think it's'

Refs #50.

This is great. I was meaning to get around to fixing batched inference but stuff just keeps getting in the way.
I'm a little puzzled that it works, though, since cuda_ext.exllama_ext.rope_ is also called in ExLlamaAttention.forward, i.e. the non-fused attention. And it shouldn't even call q4_attn if the hidden states have more than one row. Hmmmmm.

This is great. I was meaning to get around to fixing batched inference but stuff just keeps getting in the way.

Yeah, this wasn't exactly on my roadmap either! I was writing a better benchmarking tool and using a larger batch size is a great way to expose strengths and weaknesses. In my case, exllama is CPU limited for some reason so I wanted to see what it could do with less kernel launch overhead. But it crashed and sometimes I just have to fix things. (I'm like a bad guided missile, I work relentlessly towards random targets.)

I'm a little puzzled that it works, though, since cuda_ext.exllama_ext.rope_ is also called in ExLlamaAttention.forward, i.e. the non-fused attention. And it shouldn't even call q4_attn if the hidden states have more than one row. Hmmmmm.

Yep, I didn't see fused being used for batching, just like you say. Still, it didn't seem to hurt to put a fix in there too for future use. I tested that it works with batch size 1 with no change to perplexity, so although I can't guarantee the fix works (since this code path isn't exercised), it's at least no worse than before.
The ExLlamaAttention.forward path is fixed by the change to cuda_ext.exllama_ext.rope_, and the fused attention is fixed by forwarding the batch size to rope_cuda in q4_attn.cu (theoretically 🤞).

So I'm testing it on 7B and 13B with no issues, but 33B is acting weird.
 1. 'When you have eliminated the impossible, whatever remains, ... # packageeign The # The When the, When the, the When When the When the When'
 2. 'When you have eliminated the impossible, whatever remains, ... # packageeign The # The When the, When the, the When When the When the When'
 3. 'When you have eliminated the impossible, whatever remains, ... # packageeign The # The When the, When the, the When When the When the When'
 4. 'When you have eliminated the impossible, whatever remains, ... # packageeign The # The When the, When the, the When When the When the When'
 5. 'When you have eliminated the impossible, whatever remains, must be considered ....\n When The,, the, the, the, the, the, the, the,'
 6. 'When you have eliminated the impossible, whatever remains, ought to be ... When When the,\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
 7. 'When you have eliminated the impossible, whatever remains, (and some scholars say this is ... the meaning of the word "Torah") is the Torah.\nThe Torah is'
 8. "When you have eliminated the impossible, whatever remains, however improbable, is a banana. ...\nI'm not sure if I'm a fan of the new look. I'm"

The last two sequences in the batch seem to be okay, though. I don't think it has to do with splitting across GPUs, because i can split 7B and 13B and still get sensible results. Must be something to do with the dimension.

Hmm wow certainly looks like the quality goes up as batch size goes down Sounds like maybe there's still some edge case where we read or write out of bounds? Something about divisibility with the number of heads, 52? Probably too late at night for me to spot it right now. Agree, highly mysterious, though!

Yeah I have to call it quits today too. I've tried with all the various tuning parameters, avoiding half2, forcing SDP attention, skipping the fused MLP... none of which should make a difference, and it doesn't. But I'll try again tomorrow.

Okay, so I tried splitting the batch in the attention function, applying RoPE to each sequence individually and rebuilding the batch afterwards, and there is no difference. I also brought back the PyTorch RoPE function from a much earlier version and it behaves exactly the same. So I don't think the problem is with the positional embeddings.
It works with 8 identical sequences in a batch, though, which is telling. Even more telling, with 7 identical sequences and a single different one at the end, the last one ends up correct (presumably) while the first 7 are messed up. It doesn't appear that the order matters, either, if I make the unique sequence the first one in the batch.
I also saw it on a 7B model, so I don't think it has to do with dimension after all. There's obviously a broadcasting error somewhere, a place where it's implicitly assuming bsz == 1, so bsz * q_len == q_len.

Yeah I just double-checked the rope kernel myself to verify we're getting complete coverage (hitting all the rows, using the right position for each) and although I just had a short time to play with it, it looked fine, with and without past_len.
The fact that identical generations work gives me the idea that maybe some operation is reading or writing the wrong batch (presumably always going for batch 0) , maybe in the cache or something. So as long as the generations are identical, it doesn't matter which batch state you reference since they're all the same anyhow.

Here's something, I think. Adding ids = ids[:, 10:] before generating, to crop out the padding tokens, I at least get consistent output regardless of the ordering:
 1. 'eliminated the impossible, whatever remains, must be considered ... as the truth.\nSherlock Holmes, the famous fictional detective, used this'
 2. 'eliminated the impossible, whatever remains, ought to be ... the truth.\nSherlock Holmes: Elementary, my dear Watson.'
 3. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 4. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 5. 'remains, (and some scholars say this is ... the most likely scenario), that the church was built on the site of the palace of Caiaphas'
 6. ', however improbable, is a banana. ...\nThe banana is a fruit that is not only delicious but also very healthy. It'
 7. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 8. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'

 1. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 2. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 3. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 4. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 5. 'eliminated the impossible, whatever remains, must be considered ... as the truth.\nSherlock Holmes, the famous fictional detective, used this'
 6. 'eliminated the impossible, whatever remains, ought to be ... the truth.\nSherlock Holmes: Elementary, my dear Watson.'
 7. 'remains, (and some scholars say this is ... the most likely scenario), that the church was built on the site of the palace of Caiaphas'
 8. ', however improbable, is a banana. ...\nThe banana is a fruit that is not only delicious but also very healthy. It'

 1. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 2. 'eliminated the impossible, whatever remains, must be considered ... as the truth.\nSherlock Holmes, the famous fictional detective, used this'
 3. 'eliminated the impossible, whatever remains, ought to be ... the truth.\nSherlock Holmes: Elementary, my dear Watson.'
 4. 'remains, (and some scholars say this is ... the most likely scenario), that the church was built on the site of the palace of Caiaphas'
 5. ', however improbable, is a banana. ...\nThe banana is a fruit that is not only delicious but also very healthy. It'
 6. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 7. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 8. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'

 1. 'eliminated the impossible, whatever remains, must be considered ... as the truth.\nSherlock Holmes, the famous fictional detective, used this'
 2. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 3. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 4. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 5. 'When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\nSherlock Holmes, The Sign of'
 6. 'eliminated the impossible, whatever remains, ought to be ... the truth.\nSherlock Holmes: Elementary, my dear Watson.'
 7. 'remains, (and some scholars say this is ... the most likely scenario), that the disciples were mistaken about the resurrection, then the'
 8. ', however improbable, is a banana. ...\nThe banana is a fruit that is not only delicious but also very healthy. It'

Which... leads me to notice that it's not doing anything to mask out the padding tokens during attention.

Yeah, definitely need to mask out the padding:
                attn_mask = torch.zeros(batch_size, 1, seq_len, past_len + seq_len, dtype = torch.float16, device = devs[0])
                attn_mask_triu = torch.triu(torch.full((seq_len - 1, seq_len - 1), torch.finfo(torch.float16).min))
                attn_mask[:, :, : seq_len - 1, past_len + 1: past_len + seq_len] = attn_mask_triu

                for seq in range(batch_size):
                    padding_len = 0
                    while padding_len < seq_len and input_ids[seq, padding_len].item() == 0:
                        padding_len += 1
                    if padding_len > 0:
                        attn_mask[seq, :, :, :padding_len] = torch.finfo(torch.float16).min

Not sure if there's a way to still use is_causal = True in scaled_dot_product_attention.

Nice catch! Can confirm, fixing this leads to normal looking generations. I'm pushing the most obvious quick and dirty fix: padding with spaces instead.
Super strange symptoms, like why would 33B find token 0 more attention-worthy? And even if it does, why'd it jump between batches? But you're totally right. My bad. The model forward method doesn't accept an attention mask so I just put int zeroes and crossed my fingers. Should have checked.
Regarding the correct way to do it, in transformers you can specify the special token -100, AFAIK, to have it be masked out in the automatically generated mask. Also you can give it an attention mask.

Generation using 33B with the quick and dirty fix:
 ** Batching sanity check: 1-4 should be identical. All should be reasonable for the model you're using.

 1. '                    When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\n> \n> \n> \n'
 2. '                    When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\n> \n> \n> \n'
 3. '                    When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\n> \n> \n> \n'
 4. '                    When you have eliminated the impossible, whatever remains, ... however improbable, must be the truth.\n> \n> \n> \n'
 5. "              When you have eliminated the impossible, whatever remains, must be considered ... as the truth.\n\nComment: @JonathanLeffler: I'm not"
 6. "              When you have eliminated the impossible, whatever remains, ought to be ... the truth.\n\nComment: @JonathanLeffler: I'm not sure"
 7. '  When you have eliminated the impossible, whatever remains, (and some scholars say this is ... the most important part of the quote) however improbable, must be the truth.\n\n'
 8. "When you have eliminated the impossible, whatever remains, however improbable, is a banana. ...\nI'm not sure if I'm a fan of the new look. I'm"

I'm not fully understanding it either. The models probably have a different embedding vector for token 0, but I tried just  setting that to all zeros, which as I understand it should have the same effect as masking it out, but it doesn't. Maybe I'm overlooking something, and maybe the attention mask fix just masks another bug somewhere.
Anyway, I'll include it as is for now, then maybe add a utility function to generate a mask for padded sequences, along with a nice way of passing it to the model.

Maybe the 33B model was accidentally trained on some padding tokens, but it was rare in the training data and so became a very strong signal to generate something particular?
Yeah, agree that setting the embedding of token 0 to all zeroes should bring you pretty close to something that won't be attended, since the dot product of a zero vector and any vector is zero. And the rotary embeddings are multiplicative, not additive, so should not get in the way of that... Hmm, I guess there might be a bias term in the linear projection going into the attention that could turn it into something non-zero? As far as I remember there's no bias in the Llama projections though. Would have to double-check.
The quantisation might affect it, making it less clean mathematically. Quantisation might transform 0 * <something> into <almost zero> * <something>?  I mean this is an interesting puzzle in its own right. Not sure if it's worth pursuing, but it could lead to finding some other bug somewhere. A lot of discoveries start with "hmm, that's funny".
And, to emphasise this again, the other thing that doesn't sit right with me is that one of the identical prompts generated a different continuation in your testing. Even if the model attends to these padding tokens, you don't attend to other batches! So whatever it does it should do repeatably for each batch.

Yep, there's no bias anywhere, so a zero embedding should just remain zero throughout. It seems like that's also the case. But it suddenly occurs to me that attention uses softmax normalization, so there's an implicit exponentiation there. To actually get zero attention on a token you'd need a dot product of -inf. I don't think there's a way for an embedding to produce a key that reliably creates a negative dot product with any query. Maybe the query is usually mostly positive? Idk. I imagine it's the sort of thing that could differ between models, though.
As for the difference in output, the forward pass is never entirely deterministic due to how the quantized matmul works, relying on atomicAdd instead of reduction. It doesn't normally make a big difference, even with FP16, but it might be amplified by whatever weird state results from attending to padding tokens.
With -mmrt 1 it falls back on cuBLAS, and I think the cuBLAS matmul is deterministic. I guess that's worth testing.


feat(headless): add case assist API client

https://coveord.atlassian.net/browse/SFINT-3844
This PR adds the CaseAssistAPIClient to headless. As the name suggests, it is meant to perform Case Assist specific calls to the platform API.
At this point, it retrieves:

case classifications
document suggestions

The caseAssistId is mandatory when performing Case Assist API calls. When using Case Assist, caseAssistId has to be specified in the engine configuration (under the caseAssist section). Also, the client have been added to the ThunkExtraArguments to be available to thunk actions.

Not sure if I'm late here or uninformed, but for the PreprocessRequest, not the deprecated one, but the newer, part of the HeadlessConfigurationOptions has a clientOrigin parameter which can be AnalyticsClientOrigin | 'searchApiFetch'.
My guess is that should be augmented in order to support 'caseAssistFetch' or something similar.
It's in the file packages/headless/src/api/preprocess-request.ts

@ThibodeauJF You are right,  PreprocessRequest would have to be updated to include the caseAssistApiFetch value. However, since the integration with the engine has been removed from this PR, I guess it is too soon to update the type and the engine configuration documentation.
Based on other discussions we had regarding how API clients are bound to engines, I guess PreprocessRequest might change as well to support API clients in a more dynamic way.


CAC data: parse address components

StorePoint expects street address, city, state and postal code to be parsed out individually. The CAC data just has a single string. The GiSCorps data has a single string with the full address along with state & city parsed out. We could attempt to use this to extract just the street address from the full address but CAC has some data that GiSCorps didn't provide.
CAC actually did provide the individual components but recently changed. See this issue I opened for background: https://github.com/codersagainstcovidorg/covid19testing-backend/issues/10
I think we need to proceed under the assumption that this won't be fixed. It may have been an explicit decision for some reason.
I think we're going to need to run the data through Google's Geocoding API to parse out address components. We could use the StreetAddress gem but the Geocoding API is much more sophisticated as it can parse non-standard addresses such as intersections. This is slightly wasteful as we don't need the lat / long since it's provided in the CAC data but it's not that expensive, as long as we  and not
StorePoint expects just the street address in the address field. In the other export code I was able to piece this together from the results from Google's Geocoding API see Listing.street_address, with a fallback to the StreetAddress address parsing gem.
So, we'll need to do something similar here. Even though we already have lat / long I think it's fine to run this through Google Geocoding. It's relatively inexpensive, as long as we continue to cache results in geocoder_results.json as we have been to ensure we don't geocode the same address twice.
This task will involve:

[x] 1. Refactoring TestSites::Geocoder. The geocode method currently loops through the locations from TestSites::Source. We need to make this flexible so it can accept data from CAC as well.
[x] 2. Extracting the logic in TestSites::Listing that deals with addresses into its own class that we can use with either data source. (update: this has been done. The new class is ComponentizedUSAddress).
[x] 3. Modifying CACLocation to use the resulting address.

Note: let's continue to the use the lat / long we get from the CAC API rather than whatever we get from Google Geocoding. Most of the data is from GiSCorps and the lat / long may have been manually adjusted, e.g. in a case where the test site is a specific parking lot within a large park or hospital campus, so we should trust their lat / long over whatever Google gives us.
This task will require further analysis but hopefully this is enough direction.

@neilberkman I believe #54 addressed all the above three items, but I haven't been able to confirm the results. Can't get rake geocode_cac_locations with the API key set to complete locally, probably due to my unstable net connection.

👍🏽


fix(detail): Empty field can not be save.

Issue: https://github.com/openshiftio/openshift.io/issues/2438

Codecov Report

Merging #2491 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #2491      +/-   ##
=========================================
- Coverage    9.91%   9.91%   -0.01%
=========================================
  Files         195     195
  Lines       12601   12604       +3
  Branches     1776    1777       +1
=========================================
  Hits         1250    1250
- Misses      11282   11285       +3
  Partials       69      69

Impacted Files
Coverage Δ

...grx/work-item-detail/work-item-detail.component.ts
0.81% <0%> (-0.02%)
:arrow_down:

Continue to review full report at Codecov.

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

@vikram-raj fabric8/fabric8-ui:SNAPSHOT-PR-2491-5 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2491-fabric8-planner.badger.fabric8.io

@vikram-raj fabric8/fabric8-ui:SNAPSHOT-PR-2491-10 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2491-fabric8-planner.badger.fabric8.io

There is an issue, Please follow these steps:
-Open quick preview and try saving empty title.
-We are getting error
-Now Close the quick Preview and again open Title is empty.

@Raunak1203 fix is issue in https://github.com/fabric8-ui/fabric8-planner/pull/2491/commits/12bbf6ef674b7d02007a445dca62cd127b9e87db

@vikram-raj fabric8/fabric8-ui:SNAPSHOT-PR-2491-11 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2491-fabric8-planner.badger.fabric8.io

@vikram-raj fabric8/fabric8-ui:SNAPSHOT-PR-2491-12 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2491-fabric8-planner.badger.fabric8.io


prevent flash message destruction on mouseover

Thanks for the addon!
Here is an attempt to implement #18
Not ready to be merged Yet! Unit tests and cie are missing!

I have some issue with the acceptance test writting.
Somehow: triggerEvent('selector', 'click'); is working while it does not look like triggerEvent('selector', 'mouseEnter'); is.
Any idea?

I'll have a look! Thanks for contributing

As a side note, I wonder if there's a performant way of keeping track of how much time is left on the run.later call, so we can resume it instead of restarting it...

About tracking the time: the solutions I found online consits mainly of using a custom method to setup the run.later and keep track of when it was fired and for how long which doesn't seem super efficient but why not?
I'm wondering if it is really something that should be implemented though: let's say there is a flash msg that interests me and I was a bit slow to react, the timeleft is now about 20 ms, I move my pointer over the message and in my hurry I go beyond the flash message, the timeleft has been set back to what was left of the 20 ms and now the popup is gone.
Perhaps we should use a second delay for mouseover-ed flash messages, something like 250ms and whenever the mouseleft event is triggered call destroyLater with that value.
What do you think?

Hey @leojpod, how's this going? Need any help getting it over the line?

Hey!
Sorry I have been pretty busy lately...
The feature seems to work but there is no test written for it yet.
I wanted to try writing some by reopening the flash object and overriding the destroy method to call assert.ok instead and coupling it with assert.expect to make sure the correct number of tests are called but I haven't had time to get it done yet unfortunately.
I'll try to get that done by the end of the week.

This is getting pretty frustrating ... Using Flash.reopen is working to test the "correctness" of the mouseover-ed feature but I can't figure out how to limit the "reopening" to one test... As it stands now, every most tests passing after the reopen will fail. Any idea?


LFS-850: When loading a patient chart, an unnecessarily large amount of fetch calls to /Forms/.deep.json are made

To test:

Build the LFS-850 branch
Create a new Demographics Form and associated Subject
Enter some values for the Demographics Form and save
Visit the Dashboard
Open the browser's Network Inspector and filter for URLs containing /Forms/
Click on the link for the newly created Subject to open the patient chart
Only one request in the browser's Network Inspector should be displayed with the /Forms/ URL filter in effect

retested

retested

One thing still wrong: there are 2 fetch requests for Forms.paginate for each sub-subject on the chart.

One thing still wrong: there are 2 fetch requests for Forms.paginate for each sub-subject on the chart.


Conflict with Fontawesome 5 SVG with JS option

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Framework7 Version: 2.0.7

Platform and Target:  IOS, ANDROID

When adding a Floating Action Button
addclose
 the class "fab" conflicts with  fontawesome 5's icon class of "fab" and the floating action button is converted to an svg by fontawesome 5's javascript.
What is expected is that the Floating Action Button will be rendered appropriately but it is not if Fontawesome 5 is used.

On https://github.com/FortAwesome/Font-Awesome/blob/c8166a2f65c3ca3cfada68b7614c51ef540f5c6f/advanced-options/use-with-node-js/fontawesome-free-webfonts/scss/_core.scss, change the prefix from fab to anything else.
It's far more easy for a simple icon library change some generated CSS than an entire framework change just because Font Awesome did a pretty lousy job conflicting their classes with a well-known Android feature, don't you think?

I agree but I don’t actually use the fab icons (brands) or have the fab class in my project  . The issue occurs due to the JavaScript acting on the fab class.


Etag take3

Bringing PR #4879 up to date with series/0.23.  Fixes #2826. This preserves @qwbarch original changes.

cc @armanbilge

Know there has been a lot of back and forth here but I think everything discussed thus far has been addressed.

Thanks! Can we add a test(s) for this?

Added three tests.  I'm not thrilled with them but it's not clear to me how to improve for testing the buit-in etag generator.  I can't mock out URLConnection.
I hard-coded the desired outcome.  I tried to use the Last-Modified/Content-Length headers but that doesn't work because Last-Modified header encodes epochSeconds and the etag calculator uses the more precise epochMilliseconds.  I could change the etag calculator to use seconds instead but that seems like going backwards.  Open to any suggestions if you think this isn't enough.


Questions about list of simulated functions

Thank you for always answering my questions kindly.
I recently use the stonne simulator again.
In my case, "torch.add/torch.sub / torch.Basic matrix arithmetic functions such as "matmul" are used a lot.
"Matmul" confirmed that there was a function simulated by the STONNE engine.
However, there seems to be no add/sub. I wonder if I understand well.
In addition, I wonder where I can find the list of functions simulated in STONNE engine.
Thank you for releasing useful software.
I hope you are always happy.

Hi,
Unfortunately, STONNE does not implement any function to simulate ADD or SUB operations since they are not the target of DNN accelerators such as MAERI. They only focus on GEMM operations, which have a higher complexity order. ADD and SUB operations can be performed fast even in a CPU since it does not require data reuse or similar difficulties.
About the functions supported by STONNE in PyTorch, there are 2:

torch.nn.SimulatedConv2d: performs a 2D convolution. Example: https://github.com/stonne-simulator/stonne/blob/master/minibenchmarks/dogsandcats.py
torch.nn.SimulatedLinear: performs a general matrix multiplication operation. Example: https://github.com/stonne-simulator/stonne/blob/master/minibenchmarks/linearbenchmark.py

The syntax of these methods uses the same parameters as their original PyTorch equivalents but adds the configuration file, the tile specification, the sparsity ratio and (only for SimulatedConv2) the number of groups
We will add this information to the STONNE documentation in the future.

THX!!!

torch.nn.SimulatedLinear Looks like using FC tiling method
Is it correct?

Hi,
I don't understand what you mean exactly. torch.nn.SimulatedLinear receives a filename as parameter which contains the tile to be used when computing the GEMM. Take a look to the example available at the repository. Thus, yes, it applies tiling


Date range in page collection

how to use date range in page collection
we have displayed all event on the page. before current date all the event it should be hidden. after current data, all the event are should be displayed on our page.

Have you tried this? https://learn.getgrav.org/16/content/collections#date-range


getChatMember method does not work

Hi! I am trying to call getChatMember api to know if the user who entered the bot has joined my telegram channel so that then I can send him a link to free checklist. And whenever I pass user_id which is 298499497 in my case, the api gives me the error - user not found.
Do you know why it is happening?

It can return "User not found" only if the user never contacted the bot in private.

Got it, so the user should contact the bot in private but what does it mean exactly? Also, what should I do to make it work?

If the user sent a private message to the bot, then bot will be able to find the user.

User should have already /start the bot.


implement Timur's progress bar on the Elegant tab

Assigning this to Mark, because he is already thinking about closely related issues.

Timur's program (https://gist.github.com/bruhwile/07fb33d77faaf24215d4) doesn't track the progress of an Elegant simulation, only when it starts and stops. I've created a new gist to show the output from an example run with 4,000,000 particles: https://gist.github.com/MZHarrison/ad0c20fd8faee9fc2812
The run time is given in seconds along the left. Notice the jump of 18 seconds from line 141 to line 142. The entire Elegant simulation happens between those two lines. There is no intermediate progress reported.
I'm thinking that monitoring an Elegant simulation is impossible since there is no console output while it is running. Elegant only outputs the simulation settings (essentially a copy of the input files) and a summary of the results after the simulation completes.

Progress bar implemented in commit 5937bb58d3eedb694fd17eb7f4467ebfe31ea5a0.


[fix] Breaking test due to platform-specific directory separator

PR Description
This PR addresses the issue #219 .
The test failure is observed when running flutter test, where the getFileExtension test case is failing due to a discrepancy in the file path format on Windows systems.
Recognized that the discrepancy is due to differences in escape characters, particularly on Windows platforms.
Implemented a fix to ensure consistent file path formatting across different platforms, as MacOS and Linux share common separator being /.
Related Issues

Related Issue #219
Closes #219

Checklist

[x] I have gone through the contributing guide
[x] I have run the tests (flutter test) and all tests are passing

Added/updated tests?

[ ] Yes
[x] No, and this is why: Awaiting confirmation if tests are required for breaking tests fixes.
[ ] I need help with writing tests

Closing the PR as it is resolved by #257


Anybody know any working alternatives for this repo?

This repository doesn't seem to be in a working condition.

You can also try these alternatives:

https://github.com/zombodb/zombodb
https://www.elastic.co/logstash
https://pypi.org/project/pg-replicate-elastic/

Closing this as it is not an addressable issue


Add OBO middleware [Feature request]

Describe the feature you'd like
It would be nice to have the framework allow more than one API scope. The case where this is needed, is if you have multiple business applications that need access to the same API. (For example like how both Teams and Outlook has access to your calendar). Features like this is supported in .NET frameworks by making a list of valid isuers and audiences, instead of enforcing just one (see this StackOverflow example for how the .NET AddJwtBearer middleware works)
The "correct way" of dealing with these cases is to add middleware implementing the OBO ("On-Behalf-Of") flow. Usually this is handled by the client, but for third party applications and/or plugins, we cannot initiate OBO client-side.
Additional context
If I supply an access token with an audience that I've added to the my application's knownClientApplications list, the token validation should pass.

I'm not sure I understand this question.
The audience of the access token is the application's clientId, not the consumers clientId. You shouldn't have to add an application to it's own knownClientApplications list. The consumers clientId is not validated in this package (and isn't in .NET by default either), so who can create access tokens to your application is dependent of what the issuer allows.
Application that isn't multi-tenant but still has separate app registrations in different tenants something that could be implemented though, but I'm not sure that's what you're asking.

We have multiple App Registrations set up for authentication over many different applications in our Azure portfolio. The feature I'm looking for, is the option to allow fastapi_azure_auth to accept tokens issued to any one of these app registrations, not just one specific one.
That way, as long as you are logged into any one of our app registrations, you can access the Web API.
With the current setup, fastapi_azure_auth only allows one app_client_id in a SingleTenantAzureAuthenticationCodeBearer. A consequence of this is that the API will only accept tokens that are logged into that single app registration.
I.e. expand this
azure_scheme = SingleTenantAzureAuthorizationCodeBearer(
    app_client_id="00001111-2222-3333-4444-555566667777",
    tenant_id="88889999-aaaa-bbbb-cccc-ddddeeeeffff",
    scopes={
        "api://00001111-2222-3333-4444-5555666667777/.default"
    }

to something like
azure_scheme = SingleTenantAzureAuthorizationCodeBearer(
    app_client_ids=[
        "00001111-2222-3333-4444-555566667777",
        "00001111-2222-3333-4444-555566667778",
        ...
    ],
    tenant_id="88889999-aaaa-bbbb-cccc-ddddeeeeffff",
    scopes={
        "api://00001111-2222-3333-4444-5555666667777/.default",
        "api://00001111-2222-3333-4444-5555666667778/.default",
        ...
    }

I'm still unsure as to why you would want to accept access tokens issued to another application. If the consumers have been granted the scopes to the API in Azure, they should have no problems requesting tokens to the API without any additional configuration in the API.

Sorry, I’ve been away so didn’t have time to look into this.
I’m also struggling to understand the use case here.

The feature I'm looking for, is the option to allow fastapi_azure_auth to accept tokens issued to any one of these app registrations, not just one specific one.

Can you give me some specific examples of a setup here? Or Microsoft documentation?
Seems to me that your application should just fetch multiple tokens.

TL;DR: fetching multiple tokens is not an option.
Use case: users are logged into a Grafana instance.
Since this is an out-of-the-box Azure product, we cannot directly control how this app handles user login sessions, i.e. cannot fetch multiple tokens. OAuth setup in Grafana connects to one specific app registration (the secondary app), which is strictly different to our FastAPI instance (primary app).
The current state of the fastapi-azure-auth library makes it great as a standalone product, but makes it somewhat lacking when trying to plug in with pre-existing solutions. For now we'll have to make do with some workarounds (which, if you're interested, is to create two azure_achemes, and split the FastAPI instance in two)

The reason why this could be a nice feature is that if you want to integrate with a third party software which you do not develop and have control over .
One example could be the JSON Plugin to Grafana which makes it possible to execute requests against any arbitrary backend and this could forward the JWT token the browser already has.
I agree that it would be more correct to use the On-Behalf-Of flow and fetch a new token which has the expected audience - but as a practical and pragmatic solution it would be nice to have a feature that allows use to specify multiple audiences.
In the possible to specify multiple audience in for example Dotnet Core using the TokenValidationParameters class so I do not think this is a very specific and limited use case.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.tokenvalidationparameters.validaudiences?view=azure-dotnet#microsoft-identitymodel-tokens-tokenvalidationparameters-validaudiences

Who will be the issuer of these tokens? Your tenant or a generic Microsoft tenant (making it multi-tenant)? As far as I can see, the only parameter that we need to support a list for is the audience.
Since we don't actually manually pass in audience, I think this could be an audience: list[str] | None = None parameter. This way we don't have to change any documentation or have any breaking changes, but one could manually pass in audience if one wants to.
In other words, this should be audience or client_id if token_version == 2 else f'api://{client_id}'... Unfortunately, I checked python-jose, and it does not support a list of audiences. In other words, we'd have to do audience verification manually, or (preferabily) try to implement this in python-jose.

https://github.com/mpdavis/python-jose/issues/302

Closing. PRs welcome, but I do not intend to implement this without python-jose request getting approved.


style(queue): fix linter error

Fix master failure caused by https://github.com/Kong/kong/pull/10721 introducing a linter error.

Duplicate of https://github.com/Kong/kong/pull/10733


Question regarding note

"When the Azure Monitor agent fully supported VM insights, Azure Security Center, and Azure Sentinel, then it will completely replace the Log Analytics agent, diagnostic extension, and Telegraf agent."
Can you please clarify what the note above means?   Thanks!

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

ID: 97668e66-f4fd-5ddd-5abb-8e489612fca0
Version Independent ID: 18bbde24-2173-a1a6-f37d-a56d5042571e
Content: Monitor virtual machines with Azure Monitor - Azure Monitor
Content Source: articles/azure-monitor/vm/monitor-virtual-machine.md
Service: azure-monitor
Sub-service: virtual-machines
GitHub Login: @bwren
Microsoft Alias: bwren

@ssanchez227 Thank you for reaching out with your query , we will review it and get back to you at the earliest.

It looks like we have a typo that I'll fix. Should be "When the Azure Monitor agent fully supports..." What that means is that when those services support AMA, you won't need those other agents. You'll get the same functionality with AMA.

Fixing now.
#please-close


KeyError: 'name' when try to load saved model with tf.keras.models.load_model()

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win10
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on a mobile device: None
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): 2.2.0
Python version: 3.7.7
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: 10.1
GPU model and memory: NVIDIA GeForce GTX 750 Ti 10GB (2GB Dedicated Memory; 8GB Shared Memory)

Describe the current behavior
I keep getting an KeyError: 'name' when trying to load a saved model (.pb) with tf.keras.models.load_model(path)
Describe the expected behavior
Load the model successfully.
Standalone code to reproduce the issue
Snippet where the error happens.
import tensorflow as tf

# Load model
model = tf.keras.models.load_model("models/bs-32-ep-10-1595106737.3691123/") # Error happens here

# Do stuff
...

Other info / logs
My model is being saved within a class that inherits from tf.keras.models.Sequential().
I haven't got any errors while training or saving my model.
def train(self):
        self.compile(
            loss=self.loss,
            optimizer=self.optimizer(lr=0.0001, decay=1e-6),
            metrics=[*self.mtcs]
        )

        self.fit(
            x=self.train_data[0],
            y=self.train_data[1],
            batch_size=self.batch_size,
            epochs=self.epochs,
            validation_data=(*self.test_data,),
            callbacks=[*self.callbacks]
        )

        if self.save_after_training:
            self.save("models/{}".format(self.NAME)) # Save Model

The Error:
Traceback (most recent call last):
  File "RNN.py", line 63, in <module>
    model = tf.keras.models.load_model("models/bs-32-ep-10-1595106737.3691123/")
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\save.py", line 190, in load_model
    return saved_model_load.load(filepath, compile)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 116, in load
    model = tf_load.load_internal(path, loader_cls=KerasObjectLoader)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\saved_model\load.py", line 604, in load_internal
    export_dir)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 188, in __init__
    super(KerasObjectLoader, self).__init__(*args, **kwargs)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\saved_model\load.py", line 123, in __init__
    self._load_all()
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 215, in _load_all
    self._finalize_objects()
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 510, in _finalize_objects
    self._reconstruct_all_models()
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 528, in _reconstruct_all_models
    self._reconstruct_model(model_id, model, layers)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\saving\saved_model\load.py", line 564, in _reconstruct_model
    config, created_layers={layer.name: layer for layer in layers})
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\engine\network.py", line 2019, in reconstruct_from_config
    process_layer(layer_data)
  File "C:\Users\EWC\github\GLAI_\venv\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1993, in process_layer
    layer_name = layer_data['name']
KeyError: 'name'

If more code is required, please let me know. Thank you

Could you link the whole code snippet, so I can check it out?

Link to colab.

Have you found the solution?

@gustavo-dev
Please follow this link as you have not saved the model, and let us know

I did save it

This error also occurs in 2.3.0

Was able to reproduce the error with tf 2.3.0. Heres the gist

Same with 2.3.0 with models reloaded from  https://github.com/chrisfcarroll/ml-faster/tree/2020-Oct-16
Also with models in a class inheriting from Sequential

Encountered when saving in 2.2.0. Module is a class inherited from Sequential.

My experience with KeyError: 'name' with tf.keras.models.load_model() was because of the get_config() implementation of a custom layer that did not include the base config from the parent (tested with tensorflow 2.2.0).
More details: https://github.com/tensorflow/models/issues/8692#issuecomment-727033061

I went digging and found that when keras tries to reload a model which is a subclass of sequential, it attempts to reload it as a functional model instead of a sequential model.
Digging into the load/save code I found this - which seems to be perhaps a proximal cause.
An subclass of sequential will not have the class name Sequential which forces saving and loading as a Functional model. I'm not sure why this causes the 'name' KeyError, but at the very least there is a work around which is to avoid sub-classing keras.models.Sequential

Was able to replicate the issue in TF 2.6.0-dev20210530,please find the gist here..Thanks !

Hi @gustavo-dev ! I think issue is getting resolved in 2.8 version.

@google-ml-butler This is still an issue. @gustavo-dev can you please reopen.

Hi @rickstaa ! This issue replicated in 2.3 even after saving the loading of the model. The same pattern was not observed in 2.8.
Anyway , I removed the self.save_after_training condition from below snippet in the train block and added a print line to show the model path name too. I was able to run without error then. (Refresh from folder in Colab once before you load the model)
 if self.save_after_training:
            self.save("models/{}".format(self.NAME)) # Save Model .

Attaching fresh gist for reference.
Please raise a fresh ticket in Keras repo if you are still looking for assistance. Thanks!


[draft] Restore non-PEP563 annotation behaviour

Note: draft PR - I'm submitting it mainly to see the test results. I don't know whether it's the approach we want to take or not yet. I don't think it's worth reviewing until we've decided if we want it.
On the basis that PEP563 looks unlikely to be the annotation behaviour that Python uses in future, this PR:

restores the old (annotations evaluated when function/class is created) behaviour
Fixes a few some scoping issues with the old behaviour
Supports PEP563 (annotations as strings) with from __future__ import annotations
(i.e. it's as close as possible to what Python currently does)

There was a recent discussion on the future state in Python in
https://discuss.python.org/t/type-annotations-pep-649-and-pep-563/11363
<EMAIL_ADDRESS>

There was a recent discussion on the future state in Python in<EMAIL_ADDRESS>(Also https://discuss.python.org/t/type-annotations-pep-649-and-pep-563/11363)

Yes - that discussion was largely what prompted me to think that this might be needed.
The only thing worth adding is that I think PEP 649 (if accepted) looks like it might be complicated to add to Cython: there's some odd scoping rule and decisions about how to handle compile-time errors in annotations that'd be runtime errors in Python.

This is currently broken by https://github.com/cython/cython/pull/4603... will update properly when that is merged

I'm coming to the conclusion that there's too many corner cases for my current approach (some of them just to do with what modules are available for testing but some of for fiddly problems like the scope that dataclass generated functions are evaluated in). And thus it probably needs the cruder approach of:

evaluate all annotations with error_on_unknown_names locally off
Wrap the evaluation of annotations in a try block, and return the string if it fails at runtime (which isn't perfectly compatible, but is probably the best compromise)

@scoder
I'm marking this as "ready". I think this is probably as close as it's sensible to get to evaluated annotations without breaking when they fail to evaluate (which is pretty often, because it includes basically every cython.int type annotation).
Personally I think it does make sense to switch back to evaluated annotations by default, as being closer to the future behaviour (https://github.com/cython/cython/issues/5147) even if it's a not-100% compatible implementation

I think it's too late to make a change like this in Cython 3.0.

I'm inclined to agree.
I think if it's being postponed we'll most likely want to do pep649 properly, rather than do this. I'm inclined to mark this as draft and say "don't review it" for now, and we can pick it up again in future if useful (or more likely do something else)


Update Generic Pages “about”

Automatically generated by Netlify CMS

👷 Deploy Preview for shiny-babka-998c7e processing.

Name
Link

🔨 Latest commit
9ede0af0943dcb6409a3429791b2088deaf63e2f

🔍 Latest deploy log
https://app.netlify.com/sites/shiny-babka-998c7e/deploys/6436c9153ea4aa0008e2e787


rails 5.0.0.beta1 release

support :
actionpack ~> 5.0
activemodel ~> 5.0

3.2.1 is out with the updated dependency constraints.


Send password to an email when click forget password

Hello everyone,
How can I send password to an email when click forget password?
I tried to get mPincode and mOldPincode but the string i got always was  ""
How can I resolve it?
Thanks a lot,

Hello @Duckyishandsome
That's normal you can't retrieve the plain text password, we never store that value, only the hash of it, otherwise it would be a security issue.
Cheers

Hi @olivierg13,
I know I can't retrieve the plain text password.  Now I don't send to user the plain text password, I'll send them a random plain text and when they feedback exactly plain text, I give them permission to reset password.


Use contact manifolds instead of single contacts for collisions

Currently, each collision only uses one contact. When a box is on the ground, the contact point oscillates between the corners, which can often cause significant instability and positional drift.
This PR changes this behaviour by computing multiple contact points using contact manifolds. This allows all four corners of a cube to be in contact at the same time, which essentially eliminates drifting, closing #85.
Comparison
Before:
https://github.com/Jondolf/bevy_xpbd/assets/57632562/5aeaa265-ce15-465b-9eab-42a732a1f657
After:
https://github.com/Jondolf/bevy_xpbd/assets/57632562/a4136550-0872-442c-ad36-cbf4d105e1d0
As you can see, the cubes now land in a much more stable way, drifting is almost nonexistent, and explosions or small jumps are significantly reduced.
Caveats and future work
Small jumps
Despite drifting being essentially removed and explosions being heavily reduced, there are still occasional jumps, which might be because the constraint only uses the initial penetration depths (from Parry) instead of computing them based on the current state, which would cause the applied correction to be too large.
This seems to be mitigated by manually computing the penetration depth based on contact points computed at the current state, just like the XPBD paper recommends:
let p1 = body1.position.0
    + body1.accumulated_translation.0
    + body1.rotation.rotate(self.local_r1);
let p2 = body2.position.0
    + body2.accumulated_translation.0
    + body2.rotation.rotate(self.local_r2);
let penetration = (p1 - p2).dot(normal);

However, this causes problems with trimesh colliders, so I didn't add it yet. This will have to be investigated later.
Performance
As you might expect, using multiple contact points instead of one can be more expensive, but the difference seems to actually be quite small.
Parry supports reusing the previous contact manifold to speed up the computation, so it could even be faster than the old method if implemented correctly. I didn't implement this yet due to facing more problems, but it will have to be tried again, as it should give a significant performance boost.
API change
Collisions are no longer just singular contacts, so I added a Contacts struct for a collision between two entities. It contains the entities and a Vec<ContactManifold>, where each contact manifold contains the entities, a normal, and the contacts, which are represented as Vec<Contact>.
This is quite a few added layers, so it would be nice to add simple methods to e.g. get all contacts as a flat structure or to compute the deepest contact.

I made a few more changes. I noticed that this causes convex meshes (like the cubes) to sink into non-convex meshes (like trimeshes), so I had to revert it so that collisions involving non-convex meshes keep the old single contact point behaviour. This means that collisions against trimeshes will still be a bit buggy for now, but collisions between convex shapes should be much better. I will open an issue for this later.
Additionally, I changed the penetration constraint to compute the penetration depth for convex colliders based on the current state like I described in my previous message. This seems to eliminate pretty much all of the remaining explosiveness, as I'm no longer seeing any jumping cubes. However, for non-convex colliders the problem still persists as I said.
Finally, I also changed the computation of r1 and r2 to take into account the current pose of the bodies instead of using the original world_r1 and world_r2. I'm not 100% sure if this is how it should be implemented, but other people and the original paper seem to suggest so. I'm not seeing a noticeable difference, but I believe it's now correct.
I'll probably merge these changes this evening and open an issue for the non-convex collider case.


tikv: add server closed check in SplitRegion and KvGC

These two handlers don't acquire server ref count and check closed flag.
This will cause panic like https://github.com/pingcap/tidb/issues/18236

PTAL @coocood

LGTM


1.15

Please, publish a new release 1.15 (or higher). Don't forget to update us here regularly (at least once a week), as explained in this article.

@yegor256 The description of the task was changed (see above). If anybody has any questions or concerns about this change, please express them right now. Otherwise, please work with the new version

@yegor256 The description of the task was changed (see above). If anybody has any questions or concerns about this change, please express them right now. Otherwise, please work with the new version

@yegor256 Thanks, closed


WHAT I LEARNED IN DAY 01 OF WEB DEV BOOTCAMP

@FURQAN123098
##feedbacks
-all good

Please do the assignments in the correctly
You have to submit an assignment, not feedback here. @FURQAN123098


CentOS7 Python3 on YARN can not run the command to save images and labels as CSV files

When I try Run MNIST example, Convert the MNIST zip files into HDFS files, on CPU mode, no CUDA.
My environments:
CentOS 7.4
Spark2.1.2
Python3.5
JDK1.8
using pip3 install:
tensorflow (1.4.0)
tensorflowonspark (1.1.0)
I find Python3 don't support pydoop, so I'm not install pydoop.
set environment variables:
export HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
export PYSPARK_PYTHON=/usr/local/bin/python3
export SPARK_YARN_USER_ENV="PYSPARK_PYTHON=/usr/local/bin/python3"
export QUEUE=default
export JAVA_HOME=/usr/java/default
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAVA_HOME}/jre/lib/amd64/server:/usr/lib64
export LIB_HDFS=/usr/lib64
export LIB_JVM=$JAVA_HOME/jre/lib/amd64/server
run on CPU mode on YARN:
${SPARK_HOME}/bin/spark-submit
--master yarn
--deploy-mode cluster
--queue ${QUEUE}
--num-executors 2
--executor-memory 1G
--archives hdfs:///user/${USER}/mnist.zip#mnist TensorFlowOnSpark/examples/mnist/mnist_data_setup.py
--output mnist/csv
--format csv
the message shows:
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
18/01/31 15:45:01 INFO Client: Requesting a new application from cluster with 1 NodeManagers
18/01/31 15:45:01 INFO Client: Verifying our application has not requested more than the maximum memory capability of the cluster (1536 MB per container)
18/01/31 15:45:01 INFO Client: Will allocate AM container, with 1408 MB memory including 384 MB overhead
18/01/31 15:45:01 INFO Client: Setting up container launch context for our AM
18/01/31 15:45:01 INFO Client: Setting up the launch environment for our AM container
18/01/31 15:45:01 INFO Client: Preparing resources for our AM container
18/01/31 15:45:03 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
18/01/31 15:45:08 INFO Client: Uploading resource file:/tmp/spark-7e15bbd1-9be7-419e-8e2b-8e19bed7ff6f/__spark_libs__7347337582947703179.zip -> hdfs://hd6:8020/user/hd/.sparkStaging/application_1517384590412_0001/__spark_libs__7347337582947703179.zip
18/01/31 15:45:10 INFO Client: Source and destination file systems are the same. Not copying hdfs:/user/hd/mnist.zip#mnist
18/01/31 15:45:10 INFO Client: Uploading resource file:/home/hd/TensorFlowOnSpark/examples/mnist/mnist_data_setup.py -> hdfs://hd6:8020/user/hd/.sparkStaging/application_1517384590412_0001/mnist_data_setup.py
18/01/31 15:45:10 INFO Client: Uploading resource file:/opt/spark2/python/lib/pyspark.zip -> hdfs://hd6:8020/user/hd/.sparkStaging/application_1517384590412_0001/pyspark.zip
18/01/31 15:45:10 INFO Client: Uploading resource file:/opt/spark2/python/lib/py4j-0.10.4-src.zip -> hdfs://hd6:8020/user/hd/.sparkStaging/application_1517384590412_0001/py4j-0.10.4-src.zip
18/01/31 15:45:10 INFO Client: Uploading resource file:/tmp/spark-7e15bbd1-9be7-419e-8e2b-8e19bed7ff6f/__spark_conf__6997817628267034726.zip -> hdfs://hd6:8020/user/hd/.sparkStaging/application_1517384590412_0001/spark_conf.zip
18/01/31 15:45:11 INFO SecurityManager: Changing view acls to: hd
18/01/31 15:45:11 INFO SecurityManager: Changing modify acls to: hd
18/01/31 15:45:11 INFO SecurityManager: Changing view acls groups to:
18/01/31 15:45:11 INFO SecurityManager: Changing modify acls groups to:
18/01/31 15:45:11 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(hd); groups with view permissions: Set(); users  with modify permissions: Set(hd); groups with modify permissions: Set()
18/01/31 15:45:11 INFO Client: Submitting application application_1517384590412_0001 to ResourceManager
18/01/31 15:45:11 INFO YarnClientImpl: Submitted application application_1517384590412_0001
18/01/31 15:45:12 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:12 INFO Client:
client token: N/A
diagnostics: N/A
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: root.users.hd
start time:<PHONE_NUMBER>452
final status: UNDEFINED
tracking URL: http://hd6:8088/proxy/application_1517384590412_0001/
user: hd
18/01/31 15:45:13 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:14 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:15 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:16 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:16 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:16 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
18/01/31 15:45:16 INFO Client: Application report for application_1517384590412_0001 (state: ACCEPTED)
the state is keep ACCEPT, but can't run the mnist to save images and labels as CSV files.
How to resolve the problem?

Can you run a simple pyspark --master yarn job that doesn't use Tensorflow?  Just to check if the basic operability of spark/yarn/hadoop, e.g.
# pyspark --master yarn
sc.parallelize(range(1000),2).saveAsTextFile("foo")

This should produce a foo directory on your HDFS home dir with two part files containing the numbers 0-499 and 500-999.

when I run pyspark --master yarn, shows this error:
In [1]: sc.parallelize(range(1000),2).saveAsTextFile("foo")
NameError                                 Traceback (most recent call last)
 in ()
----> 1 sc.parallelize(range(1000),2).saveAsTextFile("foo")
NameError: name 'sc' is not defined

Yeah, I'd recommend re-installing your hadoop/spark/pyspark until you can get some basic jobs submitted before adding the TFoS stuff.

I have changed to using python2, then the example can go through. The example don't support python3.


I got bad results when reproducing

Nice work! But I got some problems when reproducing. This is my config:
--data_path ../raw_data/
--log_dir ./logdir/
--model_name res_640x192
--eval_split eigen
--backbone resnet_lite
--height 192
--width 640
--batch_size 16
--num_epochs 25
--scheduler_step_size 15
--num_layers 50
--num_features 256
--model_dim 32
--patch_size 16
--dim_out 64
--query_nums 64
--eval_mono
--post_process
--load_pretrained_model
--load_pt_folder ./pretrained/
--pretrained_pose
--pose_net_path ./pretrained/
I downloaded pretrained models (depth.pth, encoder.pth and pose.pth) in the "pretrained" folder and I used jpeg images. But I got some bad results like these. Could you help me...

It seems that you did not normalize the depth map, which means you saved the raw depth values. For visualization, you should normalize the depth map to [0, 1] and then save it as an image.

Thanks! I will have a try.


Feature/2023/02

Codecov Report
Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (57c70f0) 63.24% compared to head (8064cb3) 64.28%.

Files
Patch %
Lines

2023/day02/src/types.rs
91.17%
3 Missing :warning:

solution-runner/src/main.rs
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
+ Coverage   63.24%   64.28%   +1.04%
==========================================
  Files          31       33       +2
  Lines        1023     1064      +41
==========================================
+ Hits          647      684      +37
- Misses        376      380       +4

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


Fixed the validate_user script.

Closes: #1
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!


Copy paste is causing crash

Copying code from another source and pasting into an untitled doc causes Atom to crash with no error message.  Still happening after restart.
Running Xubuntu 14.04

Does not happen every time, however - seems unpredictable

Maybe related issues: #4388 #4892

What version of Atom?

@kateklemp can you try upgrading to Atom 0.169 or above?

I'm getting this exact issue (copying code from another application, only occurs intermittently) on Ubuntu 14.04 with Atom 0.189

I am also getting this issue on Ubuntu <IP_ADDRESS> with Atom .189

I am running into this issue as well using Ubuntu <IP_ADDRESS> and Atom 0.189.

Same here, Ubuntu 14.04, Atom 0.189.

Same Ubuntu 14.04 Atom 0.189

Same here too, Ubuntu 14.04 Atom 0.189

Randomly crashes after copying from Chrome.
Tried on Ubuntu 14.04.1 and 14.04.2  / Atom 0.189

I'm also seeing this issue on Ubuntu 14.04 with Atom 0.189. The terminal from which I ran Atom eventually pops up with the error:
[3732:0406/142311:WARNING:accelerator_util.cc(181)] Invalid accelerator token:
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 787 error_code 3 request_code 40 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Also worth noting, I can't copy and paste from Atom into other applications.

As a final note, downgrading to 0.188 seems to resolve this issue, so it definitely looks like something 0.189 caused the issue.

I'm seeing the same issue. openSuse 13.1 0.189. Annoying... Going to try to downgrade tomorrow.

Same issue here on Ubuntu 14.10, tried to copy text out of RDP session in atom -> atom crashed.
Happens since 0.189

It does not appear to be theme-related. I disabled all themes that I had installed, restarted Atom and same occurs. I think I noticed that if you select a block of text, the highlighting appears as a full block highlight and not as individual rows (sorry if this doesn't make sense - I can't even be sure if this is a difference or not).

Today I updated to 0.189 and also getting the crashes - either by copying stuff from Atom window to window or by pasting something from Chrome into Atom. Also cannot copy from Atom to terminal or Chrome.

This looks very similar to #6221 which makes me think it's a duplicate of that issue. That issue should be fixed in the next release of Atom (probably out later today), but please let us know if you can still reproduce this in 0.190.0 once it's released! Thanks for all the reports.

No crashes here anymore - thanks!

Mine's all fixed, too!

Im using atom 0.190 in debian jessie RC2 and still crashes randomly when I paste something from other window


Refactoring Twig_Loader_String existing Twig environment

Fixes #863
Issue
Tests (and possibly existing code in themes) using compile_string currently use Twig_Loader_String which is not recommended and deprecated since 1.18.1
Solution
Hooks into the existing Twig environment and loads the template via that.
Impact
None
Usage
No change
Considerations
None

Indeed seems to be an error from when Timber_Loader_String wasn't escaping that