basicAuth middleware applying on route not specified

Do you want to request a feature or report a bug?

Bug

What did you do?
Deployed two docker containers, one with basicAuth middleware and one without basicAuth middleware and but it was applied to both containers.

What did you expect to see?
I expected the basicAuth middleware to only apply to the proxy-dashboard-https route I attached it to.
What did you see instead?
I have found that when I deploy the two containers like this, going to status.domain.com will result in the same authentication prompt that proxy.domain.com has, even though the statping-https route doesn't have that middleware included. I think it has to do with the pathprefix rule because if I remove the '&& PathPrefix(/dashboard/) || PathPrefix(/api)' portion the basicAuth middleware is only pushed with the proxy-dashboard-https route and not the statping-https route.
For reference, the Statping container app that is forwarded to status.domain.com has both a /dashboard and an /api path.
Output of traefik version: (What version of Traefik are you using?)

I use Traefik CLI with docker command option to apply the Traefik configuration
      - "--log=true"
      - "--log.level=INFO"
      - "--api.dashboard=true"
      - "--serversTransport.insecureSkipVerify=true"
      - "--providers.docker=true"
      - "--providers.docker.watch=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.network=external"
      - "--providers.file=true"
      - "--providers.file.watch=true"
      - "--providers.file.filename=/etc/traefik/file.yaml"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.leCloudflareDns.acme.dnschallenge=true"
      - "--certificatesresolvers.leCloudflareDns.acme.dnschallenge.provider=cloudflare"
      - "--certificatesresolvers.leCloudflareDns.acme.dnschallenge.delayBeforeCheck=25"
      -<EMAIL_ADDRESS>      - "--certificatesresolvers.leCloudflareDns.acme.storage=/etc/traefik/acme.json"

Middlewares defined in /etc/traefik/file.yaml
---
http:
  middlewares:
    compress-content-security:
      chain:
        middlewares:
          - "compression"
          - "content-security"

    auth-basic-proxy:
      basicAuth:
        removeHeader: true
        users:
          - "username:encrypted_password"

    compression:
      compress: {}

    content-security:
      headers:
        browserXssFilter: true
        contentTypeNosniff: true
        forceSTSHeader: true
        sslRedirect: true
        stsSeconds: 315360000
        stsIncludeSubdomains: true
        stsPreload: true

    redirect-https:
      redirectScheme:
        scheme: "https"
        permanent: true

tls:
  options:
    default:
      minVersion: "VersionTLS12"

    minimalTLS12:
      minVersion: "VersionTLS12"
      cipherSuites:
        - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
        - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
        - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
        - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
        - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
        - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"

    minimalTLS13:
      minVersion: "VersionTLS13"

Traefik container using traefik:v2.0.2
labels:
      traefik.enable: 'true'
      traefik.http.routers.proxy-dashboard-https.rule: 'Host(`proxy.domain.com`) && PathPrefix(`/dashboard/`) || PathPrefix(`/api`)'
      traefik.http.routers.proxy-dashboard-https.middlewares: 'auth-basic-proxy@file, compress-content-security@file'
      traefik.http.routers.proxy-dashboard-https.service: 'api@internal'
      traefik.http.routers.proxy-dashboard-https.entrypoints: 'websecure'
      traefik.http.routers.proxy-dashboard-https.tls.certresolver: 'leCloudflareDns'
      traefik.http.routers.proxy-dashboard-https.tls.options: 'minimalTLS13@file'
      traefik.http.routers.proxy-dashboard-http.rule: 'Host(`proxy.domain.com`) && PathPrefix(`/dashboard/`) || PathPrefix(`/api`)'
      traefik.http.routers.proxy-dashboard-http.entrypoints: 'web'
      traefik.http.routers.proxy-dashboard-http.middlewares: 'redirect-https@file'

Statping container using hunterlong/statping:v0.80.63
labels:
        traefik.enable: 'true'
        traefik.http.routers.statping-https.rule: 'Host(`status.domain.com`)'
        traefik.http.routers.statping-https.middlewares: 'compress-content-security@file'
        traefik.http.routers.statping-https.entrypoints: 'websecure'
        traefik.http.routers.statping-https.tls.certresolver: 'leCloudflareDns'
        traefik.http.routers.statping-https.tls.options: 'minimalTLS13@file'
        traefik.http.routers.statping-http.rule: 'Host(`status.domain.com`)'
        traefik.http.routers.statping-http.entrypoints: 'web'
        traefik.http.routers.statping-http.middlewares: 'redirect-https@file'

Hi @hwwilliams , what is the result if you apply parenthesis to the rule to ensure the right operator order:
labels:
      traefik.http.routers.proxy-dashboard-https.rule: 'Host(`proxy.domain.com`) && (PathPrefix(`/dashboard/`) || PathPrefix(`/api`))'

=> without the parenthesis, the PathPrefix('/api') rule is applied "alone" because of operators order: it means that any request matching the pattern http://*/api is matched by the router proxy-dashboard-https/

Hey @dduportal , that's exactly what it was. My mistake for missing that, I hadn't noticed the additional parenthesis in the documentation.


Cleaner logging

Attempt at reducing clutter in the debug log to make it easier to read.

Hi @lkarsten,
Thank you for the patch. As a consequence of this changes, one of our test cases was failing. The 3rd test of the action-disruptive.json. The test was based on debug log match, which was changed by your patch.
I've merged your patch and fixed the test case. Thank you ;)

Thanks for merging!


Suppress -Wshadow warnings

This is a simple patch that renames a variable from "index" to "idx" to avoid -Wshadow warnings pertaining to the standard library function also called "index". There are no functional changes.

merged, thx!


Add an option to disable merge conflict UI

Sometimes it doesn't work correctly and leads to something like this: 533e423 (#1118) (removal of ====================)

The feature can already be disabled, it's called resolve-conflicts

Sorry, I meant to completely hide the Resolve conflicts button:

While I understand that this is a nice feature by GitHub, it's not the best tool to resolve conflicts. Sometimes I use this feature and come to a pitfall where something didn't go right and have to merge it manually.

If you don't like it don't use it. It's a great tool to resolve small conflicts on the fly, we won't just drop a whole GitHub feature. Sometimes they work, sometimes they don't, it's up to the user to decide that.


Enable AoT and CDI in wawaka

This PR enables wawaka-aot mode with Code Deployment Integrity (CDI). This introduces three new components to PDO:

WawakaCDI: This is a tool that generates a compilation report using the WASM byte code and emitted AoT code, and signs it with an ECDSA key (automatically generated when make install is run for wawaka contracts).
EnclavePolicy: This class represents a contract enclave's trusted compiler signing keys, and trusted ledger key, if specified. Please note that the use of a trusted ledger key is currently optional and not tested yet.
ContractCompilationReport: This class represents a contract compilation report that is attached to the contract code that is loaded into the contract enclave.

Testing wawaka-aot does not require any steps beyond running make test with PDO_INTERPRETER=wawaka-aot set.

would you go through the new lgtm warnings & clean them up?

would you go through the new lgtm warnings & clean them up?

Already done. Those warnings are from an old push.

@cmickeyb Thanks! I have one or two more commits to add based on the changes we talked about yesterday, so I'll squash after I push those.

2. EnclavePolicy: This class represents a contract enclave's trusted compiler signing keys, and trusted ledger key, if specified. Please note that the use of a trusted ledger key is currently optional and not tested yet.

High-level architectural question: in the case of an enclave-based compiler (which i thought is our roadmap), the policy would be unlikely be the signing key itself but the MRENCLAVE of the compiler, cpu svn values and alike with which you could verify the enclave's signing key based on the IAS verification report (or, in case for DCAP, you might safe yourself the signing key indirection and directly use the quote as (publically verifiable) attestation proof as the compilation).  So a key as policy seems kindof the wrong abstraction?

EnclavePolicy: This class represents a contract enclave's trusted compiler signing keys, and trusted ledger key, if specified. Please note that the use of a trusted ledger key is currently optional and not tested yet.

High-level architectural question: in the case of an enclave-based compiler (which i thought is our roadmap), the policy would be unlikely be the signing key itself but the MRENCLAVE of the compiler, cpu svn values and alike with which you could verify the enclave's signing key based on the IAS verification report (or, in case for DCAP, you might safe yourself the signing key indirection and directly use the quote as (publically verifiable) attestation proof as the compilation). So a key as policy seems kindof the wrong abstraction?

@g2flyer Yes, having an enclave-based compiler is still on the roadmap. I should have been much more clear that this PR is part 1 of 2. Our plan is still to use a Graphene-based compiler so when we add this, we should certainly consider changing the policy to include MRENCLAVE/DCAP quote. But since Graphene is only supported in HW mode, requires a decent amount of extra setup on its own to automate (not to mention potential OSPDT approval), and using this would probably also require adding compiler enclave registration to PDO, we felt that this warrants a separate PR. The other reason why the policy currently only contains the key is for ease of verifying the compilation report in the eservice every time we invoke the contract, though I can imagine adding in the full-fledged verification of the key via the attestation as part of the next PR.

Also, given that the compiler will have options (i guess CompilerConfiguration in compilation report is to cover that?) which almost certainly affect security, wouldn't the policy also have to capture on what are acceptable values?

This is an interesting question. The compilation report does currently include the compiler options, and we have been treating them more as part of the code provenance, but not part of the trust policy. On the one hand, I could imagine having a contract enclave that might want to restrict the code it executes further by specifying that it will only run contracts compiled in a very specific way. On the other hand, this would potentially mean that the policy expresses trusted compilations instead of trusted compilers. I'm not sure if this is where we would want to head eventually.

PS: that said, it of course makes it harder to work when you run in simulation mode or completely non-enclavized compiler. But that is in a way not different to how we handle attestation in pdo currently where we have different cases for HW and non-HW mode?

As I mentioned above, we'll be addressing the use of an enclavized compiler and attestation in the next PR. You're definitely right, that this wouldn't be all that different from how we currently handle attestation in PDO.

@g2flyer Yes, having an enclave-based compiler is still on the roadmap. I should have been much more clear that this PR is part 1 of 2.

I realized that part and understand that you don't implement everything in a single PR.  Just thought would have been nice to have architecturally already an abstraction which works in the long run.  But have to admit i don't have immediately the glorious solution which works both nicely the short term constraints and the long-term. From an implementation perspectively would be useful though to have something like a compilation-report verification module with a generic api which you currently instantiate using based on your current approach and then later could add a second implementation for the "secure" case.  Ultimately, even once you have graphene for testing/CI you need the test variant separate from the secure? By have a clean api with a header-file and the verification in a separate file you would lay the ground for step more easily? (i have to admit i didn't look through the file content  whether you already have something like that but at least from the filenames i suspect it's not the case?)

Also, given that the compiler will have options (i guess CompilerConfiguration in compilation report is to cover that?) which almost certainly affect security, wouldn't the policy also have to capture on what are acceptable values?

This is an interesting question. The compilation report does currently include the compiler options, and we have been treating them more as part of the code provenance, but not part of the trust policy. On the one hand, I could imagine having a contract enclave that might want to restrict the code it executes further by specifying that it will only run contracts compiled in a very specific way. On the other hand, this would potentially mean that the policy expresses trusted compilations instead of trusted compilers. I'm not sure if this is where we would want to head eventually.

I have to admit, i have no idea what options all exist. I initially was worried that we compile also the runtime into a single binary but i think it's only the chaincode itself which is separate?  So that would make it easier as you don't have to ensure that the compiler also included the sandbox itself.  As long as there is no compiler option which could allow the compiled code to bypass that our sandbox and directly calling some lower-level wamr function which could result in ocalls or alike and also there is no way to trigger instructions like EGETKEY then it should be fine.

From an implementation perspectively would be useful though to have something like a compilation-report verification module with a generic api which you currently instantiate using based on your current approach and then later could add a second implementation for the "secure" case. Ultimately, even once you have graphene for testing/CI you need the test variant separate from the secure? By have a clean api with a header-file and the verification in a separate file you would lay the ground for step more easily? (i have to admit i didn't look through the file content whether you already have something like that but at least from the filenames i suspect it's not the case?)

@g2flyer This sounds more like a policy rather than a compilation report issue to me. I don't understand what we gain by having the compilation report verification separate from the actual compilation report object to address this. This is exactly what the enclave policy object is intended for in the long-term. I think it should be up to the policy engine to handle this, that is, eservices implement/override a generic Verify() method for their specific policy, in which case, they may instead choose to verify the full DCAP quote, for example. When can then also decide if the compilation report needs to contain additional information to aid in the verification of the policy.

I have to admit, i have no idea what options all exist. I initially was worried that we compile also the runtime into a single binary but i think it's only the chaincode itself which is separate? So that would make it easier as you don't have to ensure that the compiler also included the sandbox itself.

Yes, the AoT compiler emits a contract code-only binary, which is entirely separate from the actual WASM runtime. And we're also running a single WASM module in the enclave right now, but this will become more of a concern if/when we run multiple modules in the same runtime.

As long as there is no compiler option which could allow the compiled code to bypass that our sandbox and directly calling some lower-level wamr function which could result in ocalls or alike and also there is no way to trigger instructions like EGETKEY then it should be fine.

Hmm, this might be a good question for Xin and team.


Choco install fails in Win11 64bit with same error as in #391.... " import-module.... path not found.... "

posh-git version/path:
"C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1"
PowerShell version:
Major  Minor  Build  Revision
5         1          22000  282
Git version:
git version 2.34.1.windows.1
Operating system name and version:
OS Name	Microsoft Windows 11 Home
Version	10.0.22000 Build 22000
Issue Description:
'Import-Module posh-git' is giving the error mentioned in #391 (Closed).... ie'...file not found...'
but using the full path seems to work...
Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1'
ie no errors reported ......
'gc $profile' returns..
Import-Module "C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1"
'gc $profile.CurrentUserAllHosts' returns error
as '$profile.CurrentUserAllHosts' doesn't exist
is this the problem?  how would I create an all hosts profile?
Novice programmer so excuse if I've not framed this question very well....
Harry

my Issue is Fixed......
I initially followed the read.md for Chocolatey install, but this didn't install the module correctly, it needed the code below...
PS C:\Users\harry> install-module posh-git
PS C:\Users\harry> import-module posh-git
C:\Users\harry> Add-PoshGitToProfile
ie
'import module' must be preceded by 'install module....'
Its working now...
might be something to add to the read.md under the Chocolatey install....
Harry


NoMethodError at /sitemap.xml

Hi, I just installed middleman-search_engine_sitemap version 1.3.0 to my Middleman site, and added the lines
set :url_root, 'http://localhost:4567'
activate :search_engine_sitemap

to the config.rb file
But when I go to http://localhost:4547/sitemap.xml, I getting the error:
NoMethodError at /sitemap.xml
undefined method `call' for nil:NilClass

not sure if I'm doing something wrong or if this is a bug. A couple of weeks ago I configered middleman-search_engine_sitemap version 1.3.0 exactly the same way for another project and everything worked fine.
greetings,
Anthony

Hi Anthony,
How have you installed the gems. I've hit a problem where I get this error:
== Request: /sitemap.xml
       error  build/sitemap.xml
undefined method `call' for nil:NilClass

when I've installed gems using bundle install --path local_path, but switching to system installed gems (bundle install --system) fixes it.
Regards,
Rob.

Hi @acandael and @robwestwood –
Can you post the full stack trace, or is that the whole error?

Hi @Aupajo,
Thanks for taking a look.
Here's the output from a session first building it with gems install to vendor/bundle then installing them to system. I've snipped the output to keep it short enough not to get totally lost.
$ bundle install --path vendor/bundle
Using CFPropertyList (2.3.1)
.
.snip
.
Using padrino-support (0.12.5)
Using padrino-helpers (0.12.5)
Using rack (1.6.4)
Using rack-test (0.6.3)
Using middleman-core (3.3.12)
Using sprockets (2.12.3)
Using sprockets-helpers (1.1.0)
Using sprockets-sass (1.3.1)
Using middleman-sprockets (3.4.2)
Using uglifier (2.7.1)
Using middleman (3.3.12)
Using middleman-blog (3.5.3)
Using middleman-bootstrap-navbar (2.0.0)
Using middleman-favicon-maker (3.7)
Using middleman-google-analytics (1.1.0)
Using rack-livereload (0.3.15)
Using middleman-livereload (3.4.2)
.
.snip
.
Your bundle is complete!

There were errors during this build
$ bundle install --system
Using CFPropertyList (2.3.1)
.
.snip
.
Using padrino-support (0.12.5)
Using padrino-helpers (0.12.5)
Using rack (1.6.4)
Using rack-test (0.6.3)
Using middleman-core (3.3.12)
Using sprockets (2.12.3)
Using sprockets-helpers (1.1.0)
Using sprockets-sass (1.3.1)
Using middleman-sprockets (3.4.2)
Using uglifier (2.7.1)
Using middleman (3.3.12)
Using middleman-blog (3.5.3)
Using middleman-bootstrap-navbar (2.0.0)
Using middleman-favicon-maker (3.7)
Using middleman-google-analytics (1.1.0)
Using rack-livereload (0.3.15)
Using middleman-livereload (3.4.2)
.
.snip
.
Your bundle is complete!

Regards,
Rob.

Thanks, @robwestwood. I think this is the same issue as #2.
Middleman's file watcher (a part of Middleman that tracks where each file lives), is set to ignore certain directories, such as vendor.
This gem provides a template for the sitemap.
The problem is that if you bundle your gems into a vendor directory, Middleman will lose awareness of the sitemap template. There's not a whole lot I can do about this (well, with some work). There is one workaround, but it's a solution you want to be wary using.
Ultimately, I suppose, Middleman should either open the door to using templates in extensions, or I should rewrite this gem not to use templates.

Related: https://github.com/middleman/middleman/issues/1217

Hi @Aupajo,
Many thanks for the explanation; we're happy to install the gems as system.
@acandael is this what you were seeing?
Regards,
Rob.

@robwestwood Alternatively, you can keep your bundled gems in a different path (e.g. bundle install --path gems).

Hi @Aupajo, good idea, works a treat! Many thanks. Regards,
Rob.

As far as I can tell, this issue has now been addressed and fixed in Middleman 4.
If you're on Middleman 4, you can update your project by altering your Gemfile as follows and then running bundle:
gem 'middleman-search_engine_sitemap', '~> 1.4.0'

Let me know if you run into any issues with the new version!

Hmm, I'm seeing this error only on Travis, not locally. I'm still on v3 of Middleman, 1.3 of this lib.
Has anyone see that before? Pretty strange given the gem lock.


Exceptions

Carbon could use an exception model similar to .NET, allowing applications to react based on the type of error encountered. This means the introduction of a Carbon.Exception class.
The function signature of a method with an error will stay the same (nil, error), and exceptions will have a __tostring metamethod to be properly handled with existing Lua methods like error and assert.
Additionally, exceptions should have a :Throw() method and contain a default way of conveying an error message, either through a property (Message) or through a getter.
Applications can then inherit from the basic Exception class to specify what went wrong, throwing exceptions like DivideByZeroException or FileNotFoundException, similar to what is found in other statically-typed systems. The difference with Carbon exceptions will be that they do not immediately terminate execution of the program if not caught -- that will be opt-in functionality as promoted by Lua's built-in assert.

This has been solved in one of the later updates.


"device not connected to internet" option is no longer present

Firstly, thanks for making the snap - it vastly simplified the experience of installing Clip Studio Paint!
When loading up, I get to the logging in screen as you describe in the instructions but then the option for "Device not connected to internet" is not there and it just offers me "Contact support". Is it still possible to activate Clip Studio Paint on Linux?
(I haven't yet bought a license - I'm trying it out to see if it's what I want before doing so and for that I can use the Trial version which does seem to work.
Thanks!

You have to be offline for the option to show up. For the next step, you'll have to go online again.


No audio through speaker when running in Background

Description
The sample application contains a function called "toggleAudioRoute:(BOOL)toSpeaker".
In our application, we programmatically initiate an outgoing call. I have used toggelAudioRoute to force the call through speaker. This is working fine with the iOS app running in foreground, but it does not work when the app is running in the background (either locked iPhone or just with the app in the background). From both ends of the line, nothing can be heard. Any thoughts?
Voice iOS SDK
TwilioVoice sdk 3.1.1
Xcode
10.3
iOS Version
12.4
iOS Device
Any device

Tried with iOS 13.3.1 but this seems to still be an issue. No updates in the developer forum thread indicating this has been fixed. We will mark this one as a known issue.

I've ran into the same issue with iOS 14 when app is in the background. Wonder if you have found a solution or workaround?

Hi @odieatla
Is it possible to provide some detail such as the steps you did that lead to the problem or SDK/device logs?

Hi @bchen-twilio
Our app is continuously running in the background. It automatically performs a call to a pre-determined number in some situations. The app doesn't receive calls. Also it doesn't make sense for us to use appWillResignActive to place calls, as the call will be later. As mentioned the app is designed to keep running which works, only when initiating an outgoing call without CallKit, the audio has stopped working as mentioned since iOS 12.4. When using CallKit methods, it does work, but this is not desirable for our case, as we do not want to have the default CallKit "phone screen UI" that CallKit triggers when the app starts calling with the phone locked.
This is quick code snippet of initiating the call using the Non-CallKit method:
TVOConnectOptions *connectOptions = [TVOConnectOptions optionsWithAccessToken:self.twilioToken
block:^(TVOConnectOptionsBuilder *builder) {
builder.params = @{kTwimlParamTo: self.twilioPhoneNumberToBeCalled};
}];
self.twilioCall = [TwilioVoice connectWithOptions:connectOptions delegate:self];
self.callKitCompletionCallback = completionHandler;
self.phoneIsCallingTwilioVoip = YES;

Hi @bobiechen-twilio, my use case is pretty similar to this one. I see it's marked as a known issue for iOS 13. I wonder if you have a fix for iOS 14?

Thanks for the update @odieatla.
This seems to still be true on iOS 14. Just to confirm:

Does the audio issue happen when the call is made in the foreground?
Does it happen if CallKit is integrated with the call?

We can also use device logs or SDK logs if it's not too much trouble for you to get the logs.


cuda_11.1.0_456.43_win10 + cudnn-11.1-windows-x64-v<IP_ADDRESS> + master branch= some errors

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): windows 10 20H1
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary):
TensorFlow version (use command below): build from master branch
Python version: 3.6
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: cuda_11.1.0_456.43_win10 + cudnn-11.1-windows-x64-v<IP_ADDRESS>
GPU model and memory: nvidia 1070 ti / 8Gb

I successfully built Tensorflow from master brach with cuda optimization.
cuda_11.1.0_456.43_win10 + cudnn-11.1-windows-x64-v<IP_ADDRESS>
when I try to train a model I get errors that I don't understand.
tensorflow 2.3 the model was built without errors.
Log:
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2020-10-18 17:32:44.007532: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-10-18 17:32:44.386490: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-10-18 17:32:44.604977: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-10-18 17:32:44.632185: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-10-18 17:32:44.866696: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_11.dll
2020-10-18 17:32:45.041032: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-10-18 17:32:45.055357: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-10-18 17:32:45.055986: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-10-18 17:32:45.059177: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Instructions AVX2
2020-10-18 17:47:53.948993: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-10-18 17:47:55.715569: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-10-18 17:47:55.716176: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2020-10-18 17:47:55.729870: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1070 Ti computeCapability: 6.1
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2020-10-18 17:47:55.729946: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-10-18 17:47:55.735471: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-10-18 17:47:55.738640: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-10-18 17:47:55.739592: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-10-18 17:47:55.747533: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_11.dll
2020-10-18 17:47:55.750147: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-10-18 17:47:55.750569: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-10-18 17:47:55.750671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-10-18 17:47:55.751166: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-10-18 17:47:55.751629: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1070 Ti computeCapability: 6.1
coreClock: 1.683GHz coreCount: 19 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s
2020-10-18 17:47:55.751780: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2020-10-18 17:47:55.752125: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-10-18 17:47:55.752364: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2020-10-18 17:47:55.752607: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2020-10-18 17:47:55.752854: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_11.dll
2020-10-18 17:47:55.753097: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2020-10-18 17:47:55.753343: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2020-10-18 17:47:55.753635: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2020-10-18 17:47:56.173367: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-18 17:47:56.173485: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2020-10-18 17:47:56.173812: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2020-10-18 17:47:56.174571: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6696 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
2020-10-18 17:47:56.175262: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
Model: "sequential"

Layer (type)                 Output Shape              Param #
embedding (Embedding)        (None, 131, 64)           18151104

lstm (LSTM)                  (None, 131, 64)           33024

lstm_1 (LSTM)                (None, 64)                33024

dense (Dense)                (None, 5000)              325000

dense_1 (Dense)              (None, 5000)              25005000

dense_2 (Dense)              (None, 1)                 5001

activation (Activation)      (None, 1)                 0
Total params: 43,552,153
Trainable params: 43,552,153
Non-trainable params: 0

None
2020-10-18 17:47:56.892579: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 1)
Epoch 1/5
2020-10-18 17:47:58.976202: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:596] layout failed: Invalid argument: Size of values 2 does not match size of permutation 4 @ fanin shape insequential/dense/BiasAdd-0-TransposeNHWCToNCHW-LayoutOptimizer
2020-10-18 17:47:59.278004: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2020-10-18 17:47:59.600803: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
199/200 [============================>.] - ETA: 0s - loss: 0.6893 - accuracy: 0.50622020-10-18 17:48:18.028039: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:596] layout failed: Invalid argument: Size of values 2 does not match size of permutation 4 @ fanin shape insequential/dense/BiasAdd-0-TransposeNHWCToNCHW-LayoutOptimizer
200/200 [==============================] - 22s 93ms/step - loss: 0.6892 - accuracy: 0.5062 - val_loss: 0.5702 - val_accuracy: 0.5098
Epoch 2/5
122/200 [=================>............] - ETA: 6s - loss: 0.4413 - accuracy: 0.50562020-10-18 17:48:29.581544: E tensorflow/stream_executor/cuda/cuda_event.cc:29] Error polling for event status: failed to query event: CUDA_ERROR_LAUNCH_FAILED: unspecified launch failure
2020-10-18 17:48:29.581677: F tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc:220] Unexpected Event status: 1
Errors:
tensorflow/core/grappler/optimizers/meta_optimizer.cc:596] layout failed: Invalid argument: Size of values 2 does not match size of permutation 4 @ fanin shape insequential/dense/BiasAdd-0-TransposeNHWCToNCHW-LayoutOptimizer
tensorflow/stream_executor/cuda/cuda_event.cc:29] Error polling for event status: failed to query event: CUDA_ERROR_LAUNCH_FAILED: unspecified launch failure
2020-10-18 17:48:29.581677: F tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc:220] Unexpected Event status: 1
what do these errors mean?

@Expert73
please refer to these issues causes due to mismatch and let us know if it helps resolve.
#42608 #41169 #33536  link

the problem like #41169. There is an assumption that the fault may be nvidia drivers for windows. Now there are the latest ones available on the Nvidia website. How do I report this issue to them? Technical support will redirect you to tensorflow developers. That is, here.
what about layout failed: Invalid argument: Size of values 2 does not match size of permutation 4 @ fanin shape insequential/dense/BiasAdd-0-TransposeNHWCToNCHW-LayoutOptimizer ?

We are building with CUDA 11.0, not 11.1. Adding @sanjoy and @pkanwar23 for future work.

@Expert73
Is this still a issue


pip compile with local disk package without hard dependency on uv?

This is my situation,
In my project i have a pyproject.toml which contains my dependencies and maps my lib directory as a local package.
When i run pip install . it installs my dependencies and my lib directory as my project name (my-project for example) and version specified in my pyproject.toml (version is actually dynamic).
In order to have uv pip compile also include my local package, i needed to create a requirements.in which contains only . (i have a separate one for requirements-dev.in containing -e .[dev] for additional development dependencies).
When I run uv pip compile requirements.in -o requirements.txt, it generates the file as expected except for the line;
my-project @ .
When I run uv pip compile requirements-dev.in -o requirements-dev.txt, it generates the file as expected except for the line;
-e .
Now, when I run vanilla pip install -r requirements-dev.txt it works as expected, but when I run pip install -r requirements.txt, it complains that the line my-project @ . is not valid. This works fine however when running uv pip install -r requirements.txt but my goal is to not have a hard dependency on uv when installing already pinned versions like this. Is it possible to accomplish this?

manually replacing "my-project @ ." with "." makes it work with pip, but there must be a better way?

Yes, pip does not support relative paths with named dependencies, and we always output with names. You can track and chime in here if you'd like: https://github.com/astral-sh/uv/issues/3180


Federal Register :: Reader Aids :: Developer Resources

https://www.federalregister.gov/reader-aids/developer-resources

This issue appears have been opened accidentally. I'm going to close it now, but feel free to open a new issue or ask any questions in discussions!


Build fail due to change in GitHub Actions

I think GitHub Actions made a backwards-incompatible security change, which fails the CI, see workflow

I will port the project to .NET 5 on this occasion and use dotnet cli to build the project instead


clean up redundant/colliding decision

Description

Types of changes

[x ] Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):
How Has This Been Tested?

About to be tested!

@blueorangutan package

@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-365

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-371

I've manually tested this one, and it works fine as long as we respect the expectation that the usage server is installed once both the db.properties and the key files are present in the mgmt server folder.


New incident types

Request for incident types 911 email and missing person. We have had enough of these types that I think it warrants having a field separate from admin.

Incidents that aren't closed but we're not actively working on them should be put in the "Oh Hold" state.  Maybe those should be filterable… Filed #48 for that.
I need to talk to OODs about the incident type list, but for now I'll add:

Courtesy Notice
Missing Person

Fixed in d4e7d0d3d8f98c0d4ad87ecbb8f7877f5449f273

Please verify with [Incidents 3.0a1] (https://github.com/burningmantech/ranger-ims-mac/releases/tag/v3.0a1).


[Draft] Join, Sync, Heartbeat during Migration

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

I think that we don't need this anymore. Closing.


etcdctl: can not set value that begins with '-'

Tested on 0.4.6 and 2.0.8
Trying to set the value that begins with '-' symbol:
etcdctl set /kev/val '-param'
an get error:
Incorrect Usage.

NAME:
   set - set the value of a key

USAGE:
   command set [command options] [arguments...]

OPTIONS:
   --ttl '0'			key time-to-live
   --swap-with-value 		previous value
   --swap-with-index '0'	previous index

This is a duplicate one with https://github.com/coreos/etcd/issues/2020


Search view, keep last term, add clear button

"keep last term"?

Last search query, word.

Last search query, word(s).

I do find the "Clear button" useful, but not preserving the search. Since it's a different activity, I would have to save it under the settings (or similar), not only in memory for the current instance. I mean, can searches get that sofisticated? Do you mean for the case where the user misclicks the incorrect string and they'd have to search it again?

No, multiple results.
Now you have to write the search query, see 5 results, edit one, press search, write search query again,.... :(

edit one, press search, write search query

Now that makes more sense. Do you think the search should be conserved so the spinner on the Translate activity only showed those filtered strings? If so, how could we provide some feedback to the user so they knows not all the strings are shown because they're filtered?

I guess preserving the search results might be trickier, I don't care, search them again.
You could select that text (and maybe raise the keyboard, although that makes it a bit annoying as you need to dismiss it).
That being said, 2 ideas:

do not show any results if there is no search query (button for show all needed?)
don't notify the user in any way, s/he has come here to search, so s/he should enter a query, right?

I guess preserving the search results might be trickier

Nah, that's as simple as preserving the search query, then show only those results. No need to preserve the results themselves.

You could select that text (and maybe raise the keyboard, although that makes it a bit annoying as you need to dismiss it).

I did not understand this.

do not show any results if there is no search query

I think it is useful to show the results, no matter what the query is. For example, an user might leave query empty to read the strings from that activity instead?

don't notify the user in any way, s/he has come here to search

But I mean, since we'd be preserving/saving the query, applying the query on the Translate activity, not the Search activity. In the very same way you can filter by "Show translated" or not, it would filter with that query.
Although perhaps my idea would be somewhat counter-intuitive ("if I was only looking for a string, why are more strings missing now?", that's why I wanted some feedback, like "this filter is currently applied")

applying the query on the Translate activity,

That's something else, I would like that (too) indeed.
That would need some sort of banner on top "Showing XXXX only" with a Dismiss/Showall button at the end.
But that is different, you would not be able to actually see the strings, and I like to see the strings/translation quick in one view in search, so it's a different/separate thing.

I did not understand this.

Focus that text field, select the text, bring the keyboard on screen, so the user sees "hey this is now used, I can edit it, delete it, or not"

That would need some sort of banner on top "Showing XXXX only" with a Dismiss/Showall button at the end.

I thought it to be the title of the activity, but that would make no room for the Dismiss or Clear search buttons. So, where should that "banner" be shown? Above the "Selected locale" you say? I like the snackbar, but sadly, that's more like a toast which should not stay there for long.

so it's a different/separate thing.

It actually makes sense to implement them both in a row, since if I save the query to persist after the Search activity has been closed, it would also be accessible to the translate activity.

Focus that text field, select the text

But the search text field is actually focused when you open the Search activity already, and the keyboard is shown. I still don't get your point 😓

I still don't get your point

Did not notice that, indeed they are.

some sort of banner on top "Showing XXXX only"

My two ideas are either:

or

First could be better as the title area might be small on some devices.


Fix peerDependencies

Not to get annoying warnings on install

@jainkuniya Any more clarifications from my side?

This PR will resolve #48

@todorone Thanks for the PR 🙏

:tada: This PR is included in version 1.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


How to implement a ScrollView inside a Swipeable Modal

I'm using the latest release of react-native-modal that implement the swipe feature
I'd like to add a ScrollView inside my modal.
https://snack.expo.io/ryRylJFHz
I'll keep working on this. If you manage to make it work, i'm just right there 😄
I did also open a stackoverflow issue ⭐

I can confirm that SrollView iside RNM works just out of the box - sure, with swipeDirection left or right.
http://gph.is/2nIDH3N

I was in the same situation as you @LouisJS - and I did manage to solve it somewhat.
If you put a <TouchableHighlight /> or one of its siblings inside the child scrollview and make it cover the view, things will magically start working with nested scrolling.
I tried to implement the PR mentioned by @mmazzarolo but to no avail. Saw a suggestion for touch component somewhere and got it to work in the end. But, as I mentioned, it seems that the <TouchableWhatever /> needs to be on top in the scroll view and cover it.

Thanks @hkwaller for taking the time to add your suggestion in the thread.

Could someone provide an example ? I can't manage to reproduce it.
Also, that does looks like a cheap trick to avoid the issue 😄
That would be awesome if react-native-modal handled it by default

Since @theohdv did implement the Swipe feature in this lib, maybe he could explain why it happens, and maybe we can try to find a fix for this

I also noticed this issue, the problem is that the ScrollView in the modal won't take the touch event (and I don't know how to solve this conflict). It looks that the panResponder has more "importance" even if the ScrollView is its child. I tried to fix that by adjusting the gesture responder system but I didn't find a good solution.
@hkwaller workaround is working well (it is what I'm doing in my project).
But I agree with @mmazzarolo, a proper solution would be to implement a "swipeTarget" feature (I would love to implement it when I'll have some spare time).

Can you try to explain us how to implement this workaround starting from https://snack.expo.io/ryRylJFHz ?
I don't know where to put the

As far as I know you need it to be on top of the <ScrollView /> and make sure it covers it. For instance with absolute-positioned style.

I tried on top of ScrollView, as child of ScrollView, covering it relative and absolute.
It just doesn't make it.

I updated the snack, @LouisJS. See the <TouchableOpacity /> on line 56
Or am I thoroughly misunderstanding what you're trying to do? :)

Thanks for the snack @hkwaller. But the swipe down is not working anymore then ! 😄
What i'm trying to achieve is : Couple the modal swipe down feature with a ScrollView inside.
So when you scroll bottom-up, it scrolls the scrollview.
When you scroll up-down, it scrolls the scrollview until its y position is 0, then if you scroll up-down again, it swipe down the modal.

ah, gotcha. that sounds like something else.
i would kinda question if that is actually good UX. swiping up/down should in my mind mean similar things. how would you get back up in the scrollview if you scrolled down, without dismissing the modal?

@hkwaller  @LouisJS this is a pattern used in the Uber eats app. When you open up a menu item to customize it, a modal pops up.

If you swipe bottom to top, it will modal's scroll content like a scroll view.
If you scroll top to bottom, and there is no more vertical scrolling to be done, it will drag the modal down to dismiss it.
If you scroll top to bottom, and there is vertical scrolling, it will scroll.

It's little complex, does anyone know if this is possible with react-native-modal as it is now? I was able to get really close with a  child in the scroll view that I disabled when the  scrollTop = 0, but it's not smooth. Is it possible to basically preventDefault() on a scroll event, and instead transfer the event to a PanResponder?

The behavior is absolutely standard - take a look at Apple Music: when you open a song that is currently playing - you can scroll the song, and also swipe the modal away. Once you scroll the song, you can scroll it back, and the modal will not swipe away, no matter how hard you try. But if you start scrolling when it is at scrollTop=0 - you can swipe it away.
I see it in every app I use, it's trending!

@pistonsky @LouisJS I was able to do this! I was overthinking it using a PanResponder. You can do this if you have a  with a transparent background positioned absolutely above the content you'd like to to scroll over.
<Animated.ScrollView
                scrollEventThrottle={16}
                onScroll={this._onScroll.bind(this)}
                onScrollBeginDrag={this._onScrollBeginDrag.bind(this)}
                onScrollEndDrag={this._onScrollEndDrag.bind(this)}
                contentContainerStyle={this.props.contentContainerStyle}
                alwaysBounceVertical={true}
                style={{
                    top: 0,
                    left: 0,
                    right: 0,
                    position: 'absolute',
                    height: Dimensions.get('window').height,
                    backgroundColor: this.state.isTransparentBackground ? 'transparent' : '#fff',
                    transform: [
                        {
                            // this value will animate from Dimensions.get('height') --> 0 on componentDidMount
                            translateY: this.state.cardLocation
                        }
                    ]
                }}
            >
                <View
                    style={{
                        minHeight: Dimensions.get('window').height,
                        // this value will change based on if user is scrolled on scrollview (if contentOffset.y > 0, we want to shadow to disapear)
                        shadowColor: this.state.isTransparentBackground ? '#333' : '#fff',
                        shadowOffset: {
                            height: 0
                        },
                        shadowOpacity: .3,
                        shadowRadius: 10,
                        backgroundColor: '#fff'
                    }}
                >
                    {this.props.children}
                </View>
            </Animated.ScrollView>

@mmitchellgarcia the wrapper component, I should be wrapper my children component in your view? and it should work?

@aligfl yes, this worked for my case.

This feature should be now available thanks to #149

still, have this problem when there is Button or other elements with Touchable component. I found another workaround that works for me
<ScrollView>
  <TouchableOpacity>
    <TouchableWithoutFeedback>
      <View>
        {content here}
      </View>
    </TouchableWithoutFeedback>
  </TouchableOpacity>
</ScrollView>

We can continue discussing this in #236

For those still looking for an answer, it is now available in the library here.

The Happiness and joy that I felt after being stuck on it for 3 hours.

Para quem ainda está procurando uma resposta, ele já está disponível na biblioteca aqui.

@JimTeva I could adapt it to a functional component using React Hook

I was in the same situation as you @LouisJS - and I did manage to solve it somewhat.
If you put a <TouchableHighlight /> or one of its siblings inside the child scrollview and make it cover the view, things will magically start working with nested scrolling.
I tried to implement the PR mentioned by @mmazzarolo but to no avail. Saw a suggestion for touch component somewhere and got it to work in the end. But, as I mentioned, it seems that the <TouchableWhatever /> needs to be on top in the scroll view and cover it.

you save me <3

still, have this problem when there is Button or other elements with Touchable component. I found another workaround that works for me
<ScrollView>
  <TouchableOpacity>
    <TouchableWithoutFeedback>
      <View>
        {content here}
      </View>
    </TouchableWithoutFeedback>
  </TouchableOpacity>
</ScrollView>

Thanks for this solution! Really helped me out, was struggling with this stuff for quite a while :)


feature request: improve documentation of menu/nav bar, dropdowns

I realize this takes second place to bugfixes but I think it would help many people to have clear and complete documentation of how to customize the 'black' menu bar and the '2nd' menu bar in the dropdowns example as follows:
how to change the navbar and its menu items' colors, especially changing black to all-white, this is particularly difficult because there's extra padding and box-shadow stuff which doesn't really need to be there????
how to center all the navbar content instead of flush left
how to vertically center navbar content if logo height > navbar height
how to easily use the dropdowns etc. with automated CMS systems??
all the above applies to the sample dropdown list menu in the dropdowns example...
which classes in bootstrap.css and responsive.css affect the menu bar and how
This could be a community project into a wiki someplace?? I've figured out some of this but not all of it...I'd put my stuff into there if I could...
Thank you, Tom

Thanks for bringing this up Tom.  Do you have info on how to center all navbar content?  I've been hacking at this and can't quite figure it out.

see this thread: http://groups.google.com/group/twitter-bootstrap/browse_thread/thread/d69b5b6779a94e85#


模型推理问题 Model inference issue

我在完成环境的配置后尝试运行example中chatglm2的代码，但是发现结果输出非常慢，gpu也没有跑满，速度远不及在cpu上运行
After completing the environment setup, I attempted to run the code for the chatglm2 example, but I noticed that the output results were extremely slow. Additionally, the GPU was not fully utilized, and the speed was much slower compared to running it on the CPU.
性能监测图片如下：
Performance monitoring image as follows:

终端截图如下，如下的回答大概用了十分钟才输出结果，但是推理时间却显示为1.89s
The terminal screenshot is as follows. The response took approximately ten minutes to output the result, but the inference time is displayed as 1.89s.

代码如下
code follows
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import torch
import time
import argparse

from transformers import AutoModel, AutoTokenizer
from bigdl.llm import optimize_model

# you could tune the prompt based on your own model,
# here the prompt tuning refers to https://huggingface.co/THUDM/chatglm2-6b/blob/main/modeling_chatglm.py#L1007
CHATGLM_V2_PROMPT_FORMAT = "问：{prompt}\n\n答："

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Predict Tokens using `generate()` API for ChatGLM2 model')
    # parser.add_argument('--repo-id-or-model-path', type=str, default="THUDM/chatglm2-6b",
    #                     help='The huggingface repo id for the ChatGLM2 model to be downloaded'
    #                          ', or the path to the huggingface checkpoint folder')
    parser.add_argument('--prompt', type=str, default="AI是什么？",
                        help='Prompt to infer')
    parser.add_argument('--n-predict', type=int, default=32,
                        help='Max tokens to predict')

    args = parser.parse_args()
    model_path = r'D:\Code\chatglm2-6b'

    # Load model
    model = AutoModel.from_pretrained(model_path,
                                      trust_remote_code=True,
                                      torch_dtype='auto',
                                      low_cpu_mem_usage=True)

    # With only one line to enable BigDL-LLM optimization on model
    # When running LLMs on Intel iGPUs for Windows users, we recommend setting `cpu_embedding=True` in the optimize_model function.
    # This will allow the memory-intensive embedding layer to utilize the CPU instead of iGPU.
    model = optimize_model(model)

    model = model.to('xpu')

    # Load tokenizer
    tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

    # Generate predicted tokens
    with torch.inference_mode():
        prompt = CHATGLM_V2_PROMPT_FORMAT.format(prompt=args.prompt)
        input_ids = tokenizer.encode(prompt, return_tensors="pt").to('xpu')
        # ipex model needs a warmup, then inference time can be accurate
        output = model.generate(input_ids,
                                max_new_tokens=args.n_predict)

        # start inference
        st = time.time()
        output = model.generate(input_ids,
                                max_new_tokens=args.n_predict)
        torch.xpu.synchronize()
        end = time.time()
        output = output.cpu()
        output_str = tokenizer.decode(output[0], skip_special_tokens=True)
        print(f'Inference time: {end-st} s')
        print('-'*20, 'Output', '-'*20)
        print(output_str)

我再次运行了一次，这里显示的推理时间异常地长

Please try https://bigdl.readthedocs.io/en/latest/doc/LLM/Quickstart/benchmark_quickstart.html

It looks like you forget set SYCL_CACHE_PERSISTENT=1, see https://bigdl.readthedocs.io/en/latest/doc/LLM/Overview/install_gpu.html#runtime-configuration.

问题是没有进行预热

问题是没有进行预热


Add config for todo bot to convert Todo's to issues

Sometimes devs use the keyword TODO in the source code in order to
remind themselves to come back and fix that. Let's have a bot
looking for that and creating a GH issue for it automatically.
Note: An admin of AAO repo needs to install the TODO bot https://github.com/marketplace/actions/todo-actions
REF: OSD-6207

We don't have support for github actions, so let's close this for now.


speechSynthesis.speak() without user activation is no longer allowed

Current Dasher Version Six logs the following error on load in some cases:

[Deprecation] speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details

This happens if Speak On Stop is selected at page load time. I think it's because Dasher speaks the phrase "Speech is now active" at that time to warn the user that their browser will make noises.
Not sure what to do about this but maybe defer speaking the warning until the user moves the pointer or does something else that counts as activation.
Looks like current code to speak the warning is here:
https://github.com/dasher-project/dasher-web/blob/debdb6022d42f378b0931071ccdd376455ce7df1/browser/dasher/userinterface.js#L264
That's the UI listener though, which gets invoked by the control panel value loader. Awkward.

That seems a rather big pain.. deferring might be best approach.

I had similar issues with morse-learn. I used hound in the end because it seemed mostly to hack around the issue, but it wasnt totally reliable https://www.npmjs.com/package/hound
We could solve this problem for the desktop version by offloading the synthesis to the main process in electron. You also might be able to override the security check in electron somehow.
Although this doesn't help us when we go to other platforms.


Update install-the-tools.md

Docs Build status updates of commit 2cf6b5d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/install-the-tools.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 1cc11b6:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/install-the-tools.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


keep getting 403 'forbidden' 'Request not allowed' when trying demo

Hello, I am a tier1 user and successfully tried to use model at workbench:

However, when I try to create a ts server to call Claude API, I keep having forbidden error.
I also tried to use the demo:
#!/usr/bin/env -S npm run tsn -T

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
    apiKey: 'my_key',
});

console.log(client.apiKey)

async function main() {
  const result = await client.messages.create({
    messages: [
      {
        role: 'user',
        content: 'Hey Claude!?',
      },
    ],
    model: 'claude-3-5-sonnet-20240620',
    max_tokens: 1024,
  });
  console.dir(result);
}

main();

But I still get 403 error:
PermissionDeniedError: 403 {"error":{"type":"forbidden","message":"Request not allowed"}}

{status: 403,
  headers: {
    'cf-ray': '89cdc7d74e3e2512-SJC',
    connection: 'keep-alive',
    'content-encoding': 'gzip',
    'content-type': 'application/json',
    date: 'Tue, 02 Jul 2024 09:59:01 GMT',
    server: 'cloudflare',
    'transfer-encoding': 'chunked',
    vary: 'Accept-Encoding'
  },
  error: { error: { type: 'forbidden', message: 'Request not allowed' } }
}

I also printed out checked my API key to check it is correctly placed. I also tried changing IP address from US to Australia but it didn't help too.
Anybody knows why this would happen? Thanks

please fix. same problem here. Curl and python sdk both work

Hi, I am not able to reproduce the issue and that feels like a problem on Anthropic side.
The demo example does authenticate correctly as far as I can tell.
Could you try the following from the root of the repository:

delete the node_modules directory
run scripts/bootstrap
run scripts/build
then run ANTHROPIC_API_KEY=<your key> ./examples/demo

If you're still facing the same problem, please reach out to Anthropic support with details to help them figure out why requests sent with API Key are rejected.

I'm going to go ahead and close this issue because it seems more likely to be a problem with your API key than the SDK. If you're able to share repro steps of using the same ANTHROPIC_API_KEY environment variable in both the Python & Node SDK, and the request only fails in the Node SDK, we can reopen.


Some Tuple type-hints should be variadic or more specific (or not there at all)

The type hints in the definition of Distortion are currently

radial: typing.Tuple[float]
tangential: typing.Optional[typing.Tuple[float]] = None
model: typing.Optional[typing.Tuple[str]

An example Distortion from test_model.py is Distortion([1.0,2.0,3.0], [1.0,2.0], "Brown-Conrady D-U"). Some observations:

the type hint for Distortion.radial only allows a single-element tuple but the example above provides three elements. If we believe (I don't) that all radial distortion models have three elements then the proper hint is Tuple[float, float, float] or if you know you are running Python 3.9 or later, tuple[float, float, float]. More flexibly, if we want to allow any number of floats for radial distortion we can type-hint as typing.Tuple[float, ...] or tuple[float, ...]. This latter style (whether from typing or builtin) is the one I would probably recommend.
the type hint for Distortion.tangential has the same issue.
the use of typing.Tuple in the definition of the Distortion.model attribute seems wrong.

The type hint for VersionedProtocol.version should be typing.Tuple[int, int, int].
My IDE (PyCharm) flags the above issues; it doesn't flag the arguments to the assignments of clip attributes in (e.g.) test_serialize() in test_model.py, probably because when the descriptors implementing the clip attributes are created, they have no type hints.
If there's consensus that we know the type of arguments above but not their number (except for the case of VersionedProtocol.version) I would be happy to make those hints variadic.

The number of radial distortion coefficients is anything between 1 and 6 (currently) but there is a (very slim) chance of needing more in the future, so that should be a variadic structure allowing any number of elements. The same is true for the tangential coefficients, being a maximum of 2 currently but in the future there is a (very slim) chance of needing more. But even the protocol version could have anything between 1 and 3 elements (and even more? hopefully not), so [1] means version 1.0.0, [1, 2] means version 1.2.0, [1, 2, 3, 4] would be version <IP_ADDRESS> (I don't think we should go that far, though, and stop at 3 elements).

I've actually seen a fourth component on versions but it's usually not numeric; it's some sort of alpha, beta, or other "hey this isn't even fully baked for a patch release" designator.
Going back to distortion models and distortion coefficients though, as @jamesmosys elsewhere pointed out (or perhaps implied by something he pointed out) there are interesting implications for what Clip.append() should do if incoming samples have multiple sets of distortion coefficients because a device is sending simultaneously more than one model's worth, e.g. a device might package together distortion coefficients for Brown-Conrady, 3DE and an in-house (think Wētā, ILM, Framestore-level facility) model.
Even if one sets aside multiple simultaneous models' coefficients arriving, should Clip.append() insist that the model stay the same when appending, and that number of coefficients for each component (radial and tangential) likewise remains constant?

Since we now have the ability to inject previously unknown distortion and undistortion model into the JSON without needing to revise the schema, can we now get rid of the 'custom' lens parameter?

Agreed. Will remove.

Resolved in https://github.com/SMPTE/ris-osvp-metadata-camdkit/pull/125


support for HTTP/1.1 Transfer-Encoding: chunked

Flask seems to choke on chunked encoded requests (I've only tried with Content-Type: application/json). This results in an error when parsing the request body (and being able to deal with chunked encoding is a requirement of HTTP 1.1).

By the way, cherryPy seems to have chunked support (haven't tested it yet), which may give guidance with the implementation.

Then the consumer should reject the request, instead of trying to parse the body and failing, no?
Also, this changelog: http://code.google.com/p/modwsgi/wiki/ChangesInVersion0300 indicates that mod_wsgi, for one, is capable of parsing chunked requests (even though it doesn't support actual buffering of them).

Then the consumer should reject the request, instead of trying to parse the body and failing, no?

Werkzeug does not generate responses by itself, that's up for the developer. The question is if we should automatically reject chunked requests in Flask and there I don't know yet. I was always hoping that WSGI servers would advertise their ability to handle chunked requests but it does not seem like there is a consistent way they do that.

Also, this changelog: http://code.google.com/p/modwsgi/wiki/ChangesInVersion0300 indicates that mod_wsgi, for one, is capable of parsing chunked requests (even though it doesn't support actual buffering of them).

Yes. But from the view of Werkzeug I cannot find out if a WSGI server extends the WSGI spec to support chunked requests.  And if I assume it does I can cause a timeout on the client.
The problem is that WSGI specifies that one should read up to Content-Length. This header is missing if chunked requests are being handled. But then there are two situations. Either the WSGI server unpacks the chunked requests for us and we're good to read from the stream until the stream stops by itself or the WSGI server does not and if we try to do we request too much data from the client and the connection stalls waiting for more bytes that never get transmitted.

I see, thanks for the explanation.
Not happy with WSGI right now :(

What I could do would be changing werkzeug to listen to a 'werkzeug.support_chunked' environment variable. In that case if the application is hosted on mod_wsgi you can flip that flag with a middleware and it magically starts working.

That would be great, however I'm using flask on its own as a simple REST API endpoint, putting it on mod_wsgi would surely be overkill.

Well, CherryPy as a server instead of the builtin one would do the trick as well I guess. Will check that after Christmas.

Thanks!
Flask itself is a joy to work with.

@mitsuhiko @DasIch I think you guys missed @a13xb's comment...PEP 333 and PEP 3333 explicitly state:

WSGI servers must handle any supported inbound "hop-by-hop" headers on their own, such as by decoding any inbound Transfer-Encoding, including chunked encoding if applicable.

The WSGI spec unfortunately cannot be implemented with regards to chunked. We have hidden support to dealing with severs can decode it on the fly (wsgi.input_terminated).

You mean something about the design makes it technically impossible to implement official support for chunked encoding?

I see other people saying things like

It is a limitation of the WSGI specification itself in as much as the WSGI specification prohibits use of chunked request content by requiring a CONTENT_LENGTH value for request.
Does this mean the WSGI spec contradicts itself?

I tried to fix this problem a few years back and I introduced a hint called wsgi.input_terminated to make the content length optional. If a WSGI servers supports chunked and sets that key to True then Flask/Werkzeug will support chunked as well.

I see, strange.  Thanks for the tip!


Order indices in dynamic filter form

As far I'm aware, the number in the fltN_ part of filter name refers to the filter order in the form, intended to retain said order on page refresh; and in the form itself it's handled by the lastCount variable.
The way it's currently handled, however, is as follows:

initially existing filters have stable indices (increasing by 1, starting from 0);
this means filter indices are reset on form resubmission (which is also done by static links such as in pagination)
new filters are added with a gap of 1 (so if there's 3 filters initially with indices up to 2, the next one to be added will have index 4, and if there's none, the first one added will have index 1);
this means new filter indices differ from the ones they get on form resubmission
if subtype of an existing filter is changed (i.e. by selecting a different one), it's assigned a new index as if it was a new filter added to the bottom of the list;
this means the order of rows in the filter form will change after the form submission if any of them had their types modified in-place

Is this actually the intended behaviour? Because I'm pretty sure the intuitively expected behaviour would be for the filters to retain their indices and UI order across page refreshes (except for when a filter is removed, anyway).

Case in point: in a table without sortable columns, I've implemented sorting as a custom ‘filter’. This had a side effect of allowing to sort by multiple fields (e.g. “sort records by title in reverse order, and sort those with the same title by URL instead”)
?flt0_order_by_title=desc&flt1_order_by_url=asc

Now suppose the user wants to change the primary sorting field without changing the secondary one. He'll be expecting for the filters he set to retain their order after pressing ‘Apply’, right?

And yet what he gets after submitting his changes will be…
?flt3_order_by_tags=desc&flt1_order_by_url=asc

Example of filters being reordered when following pagination links:
Page 1 (initial)

Page 2 (opened from page 1)

Page 3 (opened from page 2)

An external ad-hoc fix was implemented in this pull-request (see bukuserver/static/bukuserver/js/filters_fix.js for the frontend fixes, and bukuserver/views.py for the backend fixes).
Note that since it's an external fix, the pagination links are fixed in the JS (the part starting with .pagination a:not([href^=javascript]) selector search), instead of fixing their generation code.


Add missing RAV4H_TSS2_2022 engine f/w

@Rocks#8913 2021 RAV4 Hybrid (Italy)  DongleID/route 081a1d5f242294c0|2022-07-10--18-37-26
Continental camera p/n 8646C-0R090...
https://discord.com/channels/469524606043160576/524327905937850394/995781101903679558

Are we sure it's a 2021? I can't decode the VIN on most sites

Right, I mentioned that to him in the Discord... 6-th digit issue w/ VIN...
https://discord.com/channels/469524606043160576/524327905937850394/995778928650235944
In another recent firmware submission, I also had to really poke the fellow to verify his car was actually a 2022, instead of a 2021.  Anyway, don't forget the car in question is in Italy, where the cars could be more unusual in general.

Same thing with an Austrailian car. Owner swore up and down it was a 2021 but when looking at the VIN, it conformed to 2022 some regulations in AUS, along with it being identical to a 2022. So it was likely a 2022.
Can we get this user to upload rlogs for a driving route? Want to make sure it has the radar sending ACC and has the new radar track message.

Can we get this user to upload rlogs for a driving route? Want to make sure it has the radar sending ACC and has the new radar track message.

His C3 is inside his home on WiFi, but I'm unable to get the rlogs to upload via Connect request (and there's no raw log toggle anymore).

I'm uploading them now

Confirmed rlogs uploaded for 081a1d5f242294c0|2022-07-12--18-02-25 (and possibly other routes).

Oh yeah, the 2022 classification is definitely correct.


Can cage run on a different GPU than my X11 session?

I couldn't find any documentation or online mentions of the question. My use-case is running waydroid on my desktop PC. My dedicated GPU is from NVIDIA, and waydroid doesn't support hardware acceleration for NVIDIA cards. I therefore wanted to run it on my (now unused) integrated Intel GPU.
My thought process was that, if cage runs on my iGPU, so will waydroid. Thanks for your help!

By default, cage should run on the integrated GPU. You can check with wayland-info.
It's possible to ask cage to run on a different GPU via WLR_DRM_DEVICES.

Thank you very much for the WLR_DRM_DEVICES hint!


Update PR status on CI rebuilds

Sometimes a greenkeeper build will fail for uninteresting reasons (such as CI npm cache not updated; other root-cause modules getting publishes &c.).  If CI builds are re-run for a greenkeeper pr and turn green, the greenkeeper PR should reflect that.
See #256 as an example.

This would be a nice enhancement since we end up with a scary looking PR message about things being broken and successful build status.


Ionic 4/5 support

Is there a forecast for any version that is compatible with Ionic 4 or 5?

yes it will be available next month.

Thanks. beautiful work

Is there ionic4/5 client branch

Is there an ionic 4/5 client branch?

Is any branch was created for ioni 4/5


multiple object task

hello, thanks for your contribution to the segmentation community!
I am designing a multi-objective task based on smp but failed. Does the framework support custom objective functions and training of multi-output models?

Hi @water367, can you provide a bit more details on that?


[DOC] Add document for TABLE_BLOCKLET_SIZE

Document for table property TABLE_BLOCKLET_SIZE is added

[X] Any interfaces changed?
No

[X] Any backward compatibility impacted?
No

[X] Document update required?
Yes

[X] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.

[X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
NA

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder2.1/737/

Build Failed with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/935/

Build Success with Spark 2.3.1, Please check CI http://<IP_ADDRESS>:8080/job/carbondataprbuilder2.3/9003/

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder2.1/743/

Build Success with Spark 2.3.1, Please check CI http://<IP_ADDRESS>:8080/job/carbondataprbuilder2.3/9009/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/941/

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder2.1/755/

Build Success with Spark 2.3.1, Please check CI http://<IP_ADDRESS>:8080/job/carbondataprbuilder2.3/9021/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/953/

LGTM


ALBERT on TF Hub does not work?

Hi all,
I've tried to test the ALBERT model on TF Hub. I got the following error when just trying to load ALBERT from TF Hub:
python
Python 3.6.8 (default, May 16 2019, 05:58:38)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36.0.1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow_hub as hub
>>> albert_module = hub.Module(
...     "https://tfhub.dev/google/albert_base/1",
...     trainable=True)
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "/home/opc/vuh/tools/pyvenv3-gpu-tf-hub/lib64/python3.6/site-packages/tensorflow_hub/module.py", line 170, in __init__
    tags=self._tags)
  File "/home/opc/vuh/tools/pyvenv3-gpu-tf-hub/lib64/python3.6/site-packages/tensorflow_hub/native_module.py", line 340, in _create_impl
    name=name)
  File "/home/opc/vuh/tools/pyvenv3-gpu-tf-hub/lib64/python3.6/site-packages/tensorflow_hub/native_module.py", line 382, in __init__
    op.name for op in self._meta_graph.meta_info_def.stripped_op_list.op})
  File "/home/opc/vuh/tools/pyvenv3-gpu-tf-hub/lib64/python3.6/site-packages/tensorflow_hub/native_module.py", line 822, in register_ops_if_needed
    % missing_ops.difference(set(cpp_registry_ops.keys())))
tensorflow.python.framework.errors_impl.NotFoundError: Graph ops missing from the python registry ({'BatchMatMulV2'}) are also absent from the c++ registry.

Do anyone know why? Thanks so much in advance?
FYI, in my python3 venv, I am using:
tensorflow-datasets      1.1.0
tensorflow-estimator     1.13.0
tensorflow-gpu           1.13.1
tensorflow-hub           0.6.0
tensorflow-metadata      0.14.0
tensorflow-probability   0.7.0
tf-sentencepiece         0.1.83
sentencepiece            0.1.82

tensorflow-gpu >= 1.14.0

Thanks. It works.


feat: support fido2 metadata

Resolves #11

The metadata service is working, but none of the aaguid values generated on my local machine during attestation match the ones in the default MDS server (https://mds.fidoalliance.org/).

This is what metadata support now looks like:

Per the comment in the issue, the official FIDO Alliance MDS was not sufficient to source all of the common authenticators out there and ended up going with an alternative data source. Since we're not using the metadata to enforce any authorization, and just using it for display purposes (in the /profile page), this is OK and very helpful to the user.


POST errors to thrift exceptions in http server

Internal errors in POST (used for thirft) requests were returned
as http errors which could not be parsed by thrift client
(results are expected in json format).
Convert the errors to TApplicationException which can be
processed by the thrift clients.

Where is this bad_api_handler.py?

@Xazax-hun https://github.com/Ericsson/codechecker/blob/master/libcodechecker/server/api/bad_api_version.py

@whisperity I understand the other solution, but that needs an extra api call in the client which should not be forgotten by the client developer.

@gyorb Meanwhile I realised after you wrote the comment that we can't escape one manual packet creation. My method suggested that we create the exception via Python, but that would have required manually creating a request to that particular API handler and calling its processor() method... which is yet again a .writeMsgBegin() and such calls.
To prevent an internal Thrift change from breaking this method, a test should be added to cover this thing. Perhaps the easiest is trying to query runs through a non-existent product URL endpoint is the easiest route for that test.

If I comment this line out:
https://github.com/Ericsson/codechecker/blob/master/libcodechecker/libclient/client.py#L266
And then do CodeChecker cmd runs --url whisperity the following happens:
Serverside
[12:05:26] {SERVER} - server.py:248 do_POST() - <IP_ADDRESS>:45292 -- [Anonymous] POST /whisperity/v6.3/CodeCheckerService
[ERROR] [12:05:26] {SERVER} - server.py:310 do_POST() - The product whisperity does not exist.
[12:05:26] {SERVER} [22547] <140202920007424> - server.py:659 process_request_thread() - The product whisperity does not exist.
----------------------------------------
Exception happened during processing of request from ('<IP_ADDRESS>', 45292)
Traceback (most recent call last):
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 72, in __init__
    server)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 311, in do_POST
    raise Exception(error_msg)
Exception: The product whisperity does not exist.
----------------------------------------

Clientside
[12:05:26] {SERVER} - server.py:248 do_POST() - <IP_ADDRESS>:45292 -- [Anonymous] POST /whisperity/v6.3/CodeCheckerService
[ERROR] [12:05:26] {SERVER} - server.py:310 do_POST() - The product whisperity does not exist.
[12:05:26] {SERVER} [22547] <140202920007424> - server.py:659 process_request_thread() - The product whisperity does not exist.
----------------------------------------
Exception happened during processing of request from ('<IP_ADDRESS>', 45292)
Traceback (most recent call last):
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 72, in __init__
    server)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/home/ericsza/CodeChecker/install/CodeChecker/lib/python2.7/libcodechecker/server/server.py", line 311, in do_POST
    raise Exception(error_msg)
Exception: The product whisperity does not exist.
----------------------------------------

I switched back the to catch all of the Exceptions instead of ValueError's only. It is possible that some other type of exception is thrown and the code is not prepared to handle that.

The more detailed error is logged at the server side, but we should improve the clients, to handle the new errors better (in the browser and in the command line too). I do not know if we should send back all of the error details to the clients. I did not planed to improve the clients in this pull request.

I am in favor of presenting enough information on the client side so one can start to debug this without looking at the server side. This is especially useful when the server is running on another host controlled by someone else (e.g.: if someone sets up a central server that should be used within a company and the result is sent there from the clients on other hosts).

I've printed the exception message at the client side too.


User model in Laravel 5.1.24

Hello.
I seem to be having most trouble with the user.php setup in Laravel.
Does any one have a working example please?
this is mine now:
<?php
use Zizaco\Entrust\Traits\EntrustUserTrait;

class User extends Eloquent
{
    use EntrustUserTrait;

    protected $table = 'users';
    protected $fillable = ['name', 'email', 'password'];
    protected $hidden = ['password', 'remember_token'];
}

I get this error:

FatalErrorException in EloquentUserProvider.php
line 126: Class '\App\User' not found

You must define a namespace in your model:
<?php namespace App;

use Zizaco\Entrust\Traits\EntrustUserTrait;

class User extends Eloquent
{
  use EntrustUserTrait;
  ...
}


Proxy CONNECT aborted on HTTPS redirection

Hello,
Excellent work, but that does not seem to work with HTTP to HTTPS redirection, for example:
http://github.com/fabienvauchelles/scrapoxy
HTTP :
$ curl -i --proxy http://<IP_ADDRESS>:8888 http://github.com/fabienvauchelles/scrapoxy
HTTP/1.1 301 Moved Permanently
content-length: 0
location: https://github.com/fabienvauchelles/scrapoxy
connection: close
x-cache-proxyname: i-ae00b817
Date: Tue, 08 Dec 2015 23:33:56 GMT

HTTPS :
$ curl --proxy http://<IP_ADDRESS>:8888 https://github.com/fabienvauchelles/scrapoxy
curl: (56) Proxy CONNECT aborted

Regards,

Hello,
Thanks for your feedback :)
That is a normal behavior.
For HTTP/HTTPS, there are 2 methods:
Method REQUEST for HTTP

A client makes an HTTP request to a proxy, in REQUEST mode;
The proxy replays the same HTTP request to the target.

Method CONNECT for HTTPS

A client makes an HTTP request to a proxy, in CONNECT mode;
The proxy creates a TCP tunnel between the client and the target.

=> The proxy only views a TCP redirect. Content cannot be understand by the proxy.
This a huge problem because Scrapoxy changes HTTP headers on-the-fly (useragent).
To bypass the problem
Scrapoxy accepts only HTTP proxy. For HTTPS request, you must URL with HTTPS with REQUEST mode.
See Tutorial
Why cURL doesn't work ?
cURL cannot works with HTTPS on REQUEST mode. If cURL detects an HTTPS URL, it will ask a CONNECT mode.
The Scrapy framework accepts HTTPS on REQUEST mode.
You must specify 'noconnect' in you proxy URL:
PROXY = 'http://<IP_ADDRESS>:8888/?noconnect'

Hope it will help,
Fabien.


Botframe

Proposed changes:

fixes #3159

Status (please check what you already did):

[x] made PR ready for code review
[ ] added some tests for the functionality
[ ] updated the documentation
[ ] updated the changelog

@akelad can you help me what this fail means?

@paulaWesselmann it looks like there's a change from a different PR in here, can you please close this one and reopen with only the commit that is relevant to this PR


Removal of Redundant CSS

Fixes

Fixes #71  by @justaskulkarni
Description

Removal of unused greenbanner CSS selector.
Screenshots

The only search result corresponding to the id greenbanner is in the style.css file.
There is no HTML div with id greenbanner corresponding to it.

Therefore, the following piece of code is redundant:

To add to my point:

Here, the image is as shown in the picture below:

Therefore, the green color of the CC logo comes from the image itself and has no relation with the greenbanner selector.
Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[ ] My pull request targets the default branch of the repository (main or master).
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no
visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@justaskulkarni Thanks for this contribution! ❤


toml::encode does not work with serde

Even after having feature = ["serde"] some functions still expect to have rustc_serialize traits implemented.
I believe #117 is related

This is going to be handled in https://github.com/alexcrichton/toml-rs/pull/128, so I'm going to close in favor of that.


model agnosticism

Lost in the monorepo split. We really only support OpenAI again (we might have Anthropic?).
Tried some Ollama stuff, but it doesn't support function calling in its APIs yet.

This issue basically means jettisoning llm-api. Currently a stretch for 2.0


new wrap: bdwgc

I have a simple wrap for the single threaded non-parallel build of bdwgc.

Could you please clarify if this is https://github.com/ivmai/bdwgc? Or what is the main page of the project?

Yes that page is the main page as far as I can tell

https://github.com/mesonbuild/bdwgc


Add host overriding to Beta

I started to review this and I now think we need a wider discussion about hosts vs URLs for overriding so this is now stuck while we talk about that. Sorry :/


Repair-WindowsImage: COMException if not successful

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
When using Repair-WindowsImage, -ScanHealth and -RestoreHealth behave differently, with -RestoreHealth returning nothing if not successful.
On a healthy system, both commands behave as expected:
PS> $scan1 = Repair-WindowsImage -online -ScanHealth
PS> $scan1 | Get-Member

   TypeName: Microsoft.Dism.Commands.ImageObjectWithState

Name             MemberType Definition
----             ---------- ----------
Equals           Method     bool Equals(System.Object obj)
GetHashCode      Method     int GetHashCode()
GetType          Method     type GetType()
ToString         Method     string ToString()
ImageHealthState Property   Microsoft.Dism.Commands.ImageHealthState ImageHealthState {get;set;}
LogLevel         Property   Microsoft.Dism.Commands.LogLevel LogLevel {get;set;}
LogPath          Property   string LogPath {get;set;}
Online           Property   bool Online {get;set;}
Path             Property   string Path {get;set;}
RestartNeeded    Property   bool RestartNeeded {get;set;}
ScratchDirectory Property   string ScratchDirectory {get;set;}
SysDrivePath     Property   string SysDrivePath {get;set;}
WinPath          Property   string WinPath {get;set;}

PS> $repair1 = Repair-WindowsImage -online -RestoreHealth
PS> $repair1 | Get-Member

   TypeName: Microsoft.Dism.Commands.ImageObjectWithState

Name             MemberType Definition
----             ---------- ----------
Equals           Method     bool Equals(System.Object obj)
GetHashCode      Method     int GetHashCode()
GetType          Method     type GetType()
ToString         Method     string ToString()
ImageHealthState Property   Microsoft.Dism.Commands.ImageHealthState ImageHealthState {get;set;}
LogLevel         Property   Microsoft.Dism.Commands.LogLevel LogLevel {get;set;}
LogPath          Property   string LogPath {get;set;}
Online           Property   bool Online {get;set;}
Path             Property   string Path {get;set;}
RestartNeeded    Property   bool RestartNeeded {get;set;}
ScratchDirectory Property   string ScratchDirectory {get;set;}
SysDrivePath     Property   string SysDrivePath {get;set;}
WinPath          Property   string WinPath {get;set;}

PS> $repair1

Path             :
Online           : True
ImageHealthState : Healthy
RestartNeeded    : False

PS> $repair1 -eq $null
False

On a system with a repairable Windows installation, the repair will not work and will not return anything useful if it is unsuccessful:
PS> $scan1

Path             :
Online           : True
ImageHealthState : Repairable
RestartNeeded    : False

PS> $repair1 = Repair-WindowsImage -online -RestoreHealth
Repair-WindowsImage : The restore operation failed. Either the repair source was not found or the component store
cannot be repaired.
At line:1 char:12
+ $repair1 = Repair-WindowsImage -online -RestoreHealth
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

PS> $repair1 | Get-Member
Get-Member : You must specify an object for the Get-Member cmdlet.
At line:1 char:12
+ $repair1 | Get-Member
+            ~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-Member], InvalidOperationException
    + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand

PS> $repair1 -eq $null
True

Expected behavior
`$repair1` should never be empty, `$repair1.ImageHealthState` should always be available.

Actual behavior
PS> $repair1 -eq $null
True

Error details
No response
Environment data
PS> $PSVersionTable

Name                           Value
---
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

### Visuals

_No response_

The code for that module is not in this repo, you would need to submit feedback via the Feedback Hub.


Add further assertion to test, as suggested by Mingun

When I added this test, I decided to modify the assertion it makes to be easier to understand and verify the correctness of at a glance, at the expense of making it a less robust test of the behaviour. @Mingun indicated his disagreement with this at https://github.com/kpdecker/jsdiff/pull/488#discussion_r1491619027 and I immediately agreed he had a point, so I've added the more rigorous assertion back in alongside the readable one.
Interestingly, just directly copying @Mingun's assertion failed; @Mingun's version ends with:
        ']  ]\n',
        '}'

but with my version of the ignoreWhitespace code, the line with the ] on it isn't treated as deleted and re-inserted at all, simply as equal/preserved. I guess this is a difference in how @Mingun's logic from https://github.com/kpdecker/jsdiff/pull/219 and mine from https://github.com/kpdecker/jsdiff/pull/486 handle the case where in one text a line is the final line and doesn't have a trailing newline character. I prefer the way my code seems to handle this (i.e. ignoring the addition of a trailing newline to a line that didn't have it), so I'm glad we've got a test for it now!
Thanks again to @Mingun for nudging me into doing things better. :smile:

I prefer the way my code seems to handle this (i.e. ignoring the addition of a trailing newline to a line that didn't have it), so I'm glad we've got a test for it now!

Yes, I also agree with that.