text:
【Mac & Android】 inconsistent rendering effect between mac and android platform

Describe the bug
In the rendering scene, there is an shoe with albedo texture and ibl lighting. I render these stuff with LinearToneMapper used in post process. However, the rendering effect in pc seems more lighter than android device. I want to know why, and how can i make these platform achieve the same rendering effect. Thanks for your time.
To Reproduce
Steps to reproduce the behavior:

run hellopbr demo at pc and config LinearToneMapper
run any demo at android device which uses filamesh to render and config  LinearToneMapper
use same ibl texture and skybox at both pc and android platform

Screenshots

left is at android device, and right is pc with metal backend.

Desktop (please complete the following information):

OS: [e.g. MAC]
Backend: [Metal]

Smartphone (please complete the following information):

Device: [e.g. SAMSUNG]
OS: [e.g. Android 11]

Additional context
This inconsistent rendering effect is also happened at ios platform. It seems that the pc and mobile platform are quite different.

ok, i will try it.

It is true for glb model rendered at both platform. But this cannot explain why obj model is rendered inconsistent.

I figure out why. It is the process which i use to decode jpeg makes the rendering effect  inconsistent. Thanks

repo: google/filament


text:
SIGABRT being caused when disposing resources?

Describe the bug
I'm getting SIGABRT crashes when Filament resources are being disposed.
On my home screen, I'm using ModelViewer to display a model I created in Blender. It's just a simple cube that has one of the sides painted blue.

When I tap the cube icon on the bottom left corner of the screen, we show another screen that is using another ModelViewer to display a more complex cube.

When I navigate to the 2nd screen from the 1st one, I usually get SIGABRT crashes (attached below) and I can't figure out how to fix it.
Here's how I'm creating the models
val buffer = assets.open("models/cube1x1_1.glb").use { input ->
	val bytes = ByteArray(input.available())
	input.read(bytes)
	ByteBuffer.wrap(bytes)
}

modelViewer.loadModelGlb(buffer)
modelViewer.transformToUnitCube()

I'm not disposing anything manually, I'm leaving it all for ModelViewer to dispose
Logs
Crash from Crashlytics: https://gist.github.com/victorbrndls/cd93f8ec4a2679956c64e32bfd719446
Crash from Logcat: https://gist.github.com/victorbrndls/82fe62f846a7c70fff876fe7b6129e87
I also noticed that most crashes show that the user had little RAM free. It usually ranges from 30mb to 130mb on Crashlytics.
Smartphone (please complete the following information):

Device: Redmi Note 7
OS: Android 10

Do you have the lines right before https://gist.github.com/victorbrndls/82fe62f846a7c70fff876fe7b6129e87 ?

https://gist.github.com/victorbrndls/9e7c3acd6e09465d1fd7878be3379352

This is the memory usage if I open the 2nd screen right after the 1st one is created. It crashes

This is the memory usage if I open the 2nd screen a few seconds after the 1st one is created. It doesn't crash

We really don't have enough to go on here. This seems like a problem specific to this application or devices. Something is calling abort() it might be the runtime because its running out of heap space, or something else.
I think this is more appropriate for discussions than issues. You could try to attach a debugger and see what happens, you could also use a debug version of filament.

source: gharchive/issue

authors: pixelflinger poweifeng victorbrndls

license_type: permissive

license_source: github-api


text:
Greg7mdp/cmake

Merged the two versions of list_licenses into a single version which should work with all compilers.

@greg7mdp Thanks for the PR, but this doesn't work for all license files. I've made the necessary changes in https://github.com/google/filament/pull/1684.

That is great, thanks @bejado!

source: gharchive/pull-request


text:
clang-cl warning fixes

This intends to replace the earlier PR (where I disabled all warnings for third party code).
I went through the warnings and fixed most of the incorrect compiler switches for clang-cl.exe.
After this PR the most prevalent warning that remains is one for unused parameters in filament. Is that intended to be enabled?

Pushed requested changes and investigated why -no-unused-params didn't take effect. Turns out I had to prepend -W4 to the warning list, otherwise it re-activated previously disabled warnings (such as unused params).

It works great now, thanks!

authors: romainguy shartte


text:
Unnecessary assert in merge_param

https://github.com/google/flax/blob/14dffa6dbe3419acf4bc9ec9459a426cf61d6079/flax/linen/module.py#L1602
I believe this assert to be unnecessary as the check for b when a is None has already been done a few lines above.

Only reason I see to do this is because the type checker cannot infer b is of type T without that assert, else I agree that its not logically required.

Indeed, if I recall correctly this was required for type inference with pytype. I'll close this for now as the assert itself doesn't hurt.

authors: cgarciae jheek tflahaul

repo: google/flax

license_source: bigquery


text:
Improves .sow() example HOWTO.

See also #1227 for motivation.
FYI @bastings

Codecov Report

Merging #1228 (c07c80d) into master (111e30e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1228   +/-   ##
=======================================
  Coverage   82.46%   82.46%
=======================================
  Files          63       63
  Lines        5263     5263
=======================================
  Hits         4340     4340
  Misses        923      923

Impacted Files
Coverage Δ

flax/linen/module.py
94.95% <ø> (ø)

Continue to review full report at Codecov.

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

authors: andsteing codecov-io


text:
Panic when running ExampleGenerativeModel_GenerateContentStream test

Code
I just change the prompt text to "count 1 to 100.". The code is copied from ExampleGenerativeModel_GenerateContentStream in the file example_test.go of this repository. I meet it everytime.
func TestExampleGenerativeModel_GenerateContentStream(t *testing.T) {
	ctx := context.Background()
	client, err := genai.NewClient(ctx, option.WithAPIKey(os.Getenv("API_KEY")))
	if err != nil {
		log.Fatal(err)
	}
	defer client.Close()

	model := client.GenerativeModel("gemini-pro")

	iter := model.GenerateContentStream(ctx, genai.Text("count 1 to 100."))
	for {
		resp, err := iter.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			log.Fatal(err)
		}
		printResponseV1(resp)
	}
}

Test Result
1, 2, 3, 4, 5, 6
---
, 7, 8, 9, 10, 11, 12, 13, 14, 1
---
5, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 3
---
--- FAIL: TestExampleGenerativeModel_GenerateContentStream (4.49s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x104db8304]

goroutine 20 [running]:
testing.tRunner.func1.2({0x104f58140, 0x1054c4c00})
	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1545 +0x1c8
testing.tRunner.func1()
	/opt/homebrew/opt/go/libexec/src/testing/testing.go:1548 +0x360
panic({0x104f58140?, 0x1054c4c00?})
	/opt/homebrew/opt/go/libexec/src/runtime/panic.go:914 +0x218
github.com/google/generative-ai-go/genai.joinContent(...)
	/Users/xxx/go/pkg/mod/github.com/google/generative-ai-go@v0.3.0/genai/client.go:298
github.com/google/generative-ai-go/genai.joinCandidateLists({0x1400006a148, 0x1, 0x1}, {0x1400006a158, 0x1, 0x105051800?})
	/Users/xxx/go/pkg/mod/github.com/google/generative-ai-go@v0.3.0/genai/client.go:271 +0x144
github.com/google/generative-ai-go/genai.joinResponses(...)
	/Users/xxx/go/pkg/mod/github.com/google/generative-ai-go@v0.3.0/genai/client.go:257
github.com/google/generative-ai-go/genai.(*GenerateContentResponseIterator).Next(0x1400009f710)
	/Users/xxx/go/pkg/mod/github.com/google/generative-ai-go@v0.3.0/genai/client.go:178 +0x228

Yes, it is actually resolved, but I think it is an exception of Gemini. When I use official web UI and ask the same question, it will stop unexpectedly. I don't know how to report this bug (maybe), can you help me?

@nullcache see https://ai.google.dev/docs/troubleshooting

I encountered the same issue.

authors: eliben nullcache zhu327

repo: google/generative-ai-go


text:
Adding a parameter when using glog.lib produces an error

If you don't add parameters and just print information, it won't report an error, which is very strange.
glog version 0.5

There's nothing strange about this given you've overridden a glog macro responsible for symbols linkage.
Make sure to take a look at the documentation how to correctly consume glog.

authors: lichangxin-code sergiud

repo: google/glog


text:
Updating default branch fails

After creating a new branch called default using client.Git.CreateRef(), I make a call to update the repo's default branch:
	client := github.NewClient(...)

        // Get repo
        repo, _, err := client.Repositories.Get(context.Background(), owner, repoName)
	if err != nil {
		// handle error
	}

       // Update default branch
       ref := "default"
       repo.DefaultBranch = &ref
       repo, _, err = client.Repositories.Edit(context.Background(), owner, repoName, repo)
	if err != nil {
		// handle error
	}

This fails with the following:
Failed to update default branch: PATCH https://api.github.com/repos/$owner/$repo: 422 Validation Failed [{Resource:Repository Field:default_branch Code:invalid Message:The branch default was not found. Please push that ref first or create it via the Git Data API.}]

I verified that the branch exists using client.Repositories.ListBranches() and client.Git.GetRef(). Some posts on google suggest you need to pass in the repo name to update the default branch, but the PATCH call works fine without it in curl and python.

Hmmm... I'm honestly wondering here if it is timing-related.
After creating a new branch, how much time transpired between creation and updating it?
I know that some operations on GitHub require that the changes propagate through their system, as I ran into something similar in the past.
First, however, I should ask... are you ever able to get the PATCH work, like after waiting a minute or so?
But if it is not timing-related, can you please share the curl example that works and then we can compare that with this client version that is failing... and hopefully fix it.
Thank you, @mdeggies !

Thanks for your note! Nope, unfortunately the PATCH call never works using go-github. It always returns a 422.
This is the successful curl call:
curl -X PATCH \
  https://api.github.com/repos/$owner/$repo \
  -H 'accept: application/json' \
  -H 'authorization: token $github_token' \
  -H 'content-type: application/json' \
  -d '{ "default_branch": "default" }'

Ah!  Thank you for the curl example.  I think I see the difference.
Could you please try the following experiment for me?
Instead of:
       // Update default branch
       ref := "default"
       repo.DefaultBranch = &ref
       repo, _, err = client.Repositories.Edit(context.Background(), owner, repoName, repo)
	if err != nil {
		// handle error
	}

could you please try:
       // Update default branch
       ref := "default"
       editRepo := &github.Repository{DefaultBranch: &ref}
       repo, _, err = client.Repositories.Edit(context.Background(), owner, repoName, editRepo)
	if err != nil {
		// handle error
	}

I'm betting here that all that extra information in the original repo struct is getting sent to GitHub, and you don't want any of that other information to change.  All you want to change is the DefaultBranch, so that is all we are going to send (as demonstrated in the curl call). I'm hoping that this will solve the issue.  Please report back.  Thank you, @mdeggies !

Ahh, sorry about that -- I should have caught it earlier! Sending in just the default branch did work. Thanks for your help! :)

Glad it worked! No problem. Closing issue.

authors: gmlewis mdeggies

repo: google/go-github


text:
Google API Authentication stopped working today 2024-09-18

Important gapi.auth2 notice: gapi.auth2 has been deprecated and replaced with Google Identity Services. Please see https://developers.google.com/identity/sign-in/web/deprecation-and-sunset for more information. If you have questions related to authentication/authorization please look at the associated documentation or post questions on Stack Overflow with the google-oauth tag.
Summary
Google API Authentication stopped working today 2024-09-18
Browser(s)/Version(s)
Version 129.0.6668.59 (Official Build) (64-bit)
Expected Behavior
Should authenticate with Google sign-in popup and load the page
Actual Behavior
The Authentication popup appears, I perform sign-in, the popup closes, but the page is blank.
The website was working for years, including yesterday.
This morning it stopped working.
In the console, I see multiple error messages like:
Cross-Origin-Opener-Policy policy would block the window.closed call.
cb=gapi.loaded_0?le=scs:425
POST https://play.google.com/log?format=json&hasfast=true&authuser=0 net::ERR_BLOCKED_BY_CLIENT

Steps to Reproduce
Open a website, authenticate in the sign-in popup window.

It is likely this failure is due to iframe permissions-policy or Content Security Policy changes, please read Google Sign-in with FedCM APIs and let me know if you're able to resolve the issue.

For some reason it began working again after a couple of days.

Good. During the transition period that the client library is currently in, some percentage of requests will use the new sign-in flow and some will use the existing flow. So there may be differences between sign-in attempts, even if nothing changes with your code and app. If you do see failures again I'd recommend testing with use_fedcm:true  to confirm that it is not responsible.

authors: brdaugherty slishnevsky

repo: google/google-api-javascript-client


text:
Create file returns nil when using WebMock gem to stub_request

Hi there!
I'm testing some functionality of my application that will store file Id's to update them at some point in the future. The app works fine however I'm having some issues with the tests.
This is my stub
    stub_request(:post, "https://www.googleapis.com/upload/drive/v3/files").
         to_return(status: 200, body: '{"kind": "drive#file","id": "123456", "name": "File Name", "mimeType": "application/vnd.google-apps.document"}', headers: {"Content-Type"=> "application/json"})

However on my code, when I do response.id on the tests it says the following:
RuntimeError: Additional error (RuntimeError: Additional error (NoMethodError: undefined method `id' for nil:NilClass

The code works fine as the app does what I want it to do, also the stubs work for other libraries/parts of the application. I just can't figure out how to make it work with this library so when I stub that request I get the proper file based on that mocked data.
Success - #<Google::Apis::DriveV3::File:0x007f984a625590
 @id="123456",
 @kind="drive#file",
 @mime_type="application/vnd.google-apps.document",
 @name="File Name">

Thanks!

Can you provide a more detailed stack trace of the error?
You may also want to try adding the response header "X-Goog-Upload-Status: final". Since the client uses the resumable upload protocol which typically involves 2+ HTTP requests, it's not interpreting the response correctly. Setting that header should direct the client to interpret the mocked response as the final response in the upload process.

Hey @sqrrrl ! Thanks for your quick reply. The backtrace doesn't help much as the library itself is not failing, it was just returning null and the error was on my side so I couldn't really figure out what was wrong.
Adding the header X-Goog-Upload-Status: final did the trick. Thank you very much! :)

authors: abmartinr sqrrrl

repo: google/google-api-ruby-client


text:
ARM portability

I was trying to build for ARM-based architecture but failed to do so since it depends for pcap to be cross compiled. Since this was not trivial, I am currently building on the raspberry pi itself, which seems not the best option in case someone has to do it for pi boards of different versions. Is there any suggestion to do host workstation base build?

I was trying to build for ARM-based architecture but failed to do so since it depends for pcap to be cross compiled. Since this was not trivial, I am currently building on the raspberry pi itself, which seems not the best option in case someone has to do it for pi boards of different versions. Is there any suggestion to do host workstation base build?

Is this library only support amd, I want to use it on arm64 android is it possible?

You could try using pcapgo instead of pcap. It is supposedly implemented in pure go without the libpcap dependency. Haven't tried it myself though.
https://github.com/google/gopacket/blob/master/pcapgo/doc.go

repo: google/gopacket


text:
Cause the Homebrew build to use newer source

I'm using the Guetzli build with Homebrew. When compressing smaller images I'm getting a segmentation fault. The file in question is 419 bytes, and can be found at https://www.coastercms.org/themes/coaster/img/line.jpg.

This has been fixed by #51, but the Homebrew build has to be updated yet.

@robryk Can you create a bugfix release for guetzli, e.g. 1.0.1?
Then we can bump the guetzli homebrew Formula to that.

@fkistner I was just doing it. Here it is: https://github.com/google/guetzli/releases/tag/v1.0.1
I would very much appreciate if you made the appropriate modifications to the Homebrew formula.

@robryk On its way: Homebrew/homebrew-core#11428

Resolved in Homebrew/homebrew-core@837d78f79437fca5855cb7a013e5f9f9c48684b9.
Now also available on Yosemite.

Thanks @robryk and @fkistner it's now working perfectly.

authors: fkistner robryk tliesnham

repo: google/guetzli


text:
Swapping [] -> CD and . -> _ in the VM calling convention.

This makes it easier to write simple 1:1 shim functions/wrappers without needing to special case characters or void/empty args/results.
Progress on #4736.

Lgtm

authors: benvanik stellaraccident

repo: google/iree


text:
Draft new website homepage, forked from root README.md.

Preview is staged at https://scotttodd.github.io/iree/
Progress on https://github.com/google/iree/issues/5461
The sections introduced here relate to the naming discussion at https://github.com/google/iree/issues/5555

Given this is marked as draft, I'd assume you just wanted to seek high-level comments? A few points that I can think of:

I think we should further trim down the technology density by using more general terms. Reading a landing page with too many of those can be difficult. :)
I think we should place more focus on what user needs IREE can help to address. Like what framework/platforms/hardware are (gonna be) supported, what flexibility are provided (e.g., not forcing to take on the full stack), why it is better than existing solutions (e.g., native machine code for faster execution, smaller binary size, etc.). Essentially sell a bit more. ;)
It would be nice to have some graphs/pictures.  Like using some openly available icon set or whatever? You certainly know better than me. (This one is really nice to have so don't spend too much time on it.)

Given this is marked as draft, I'd assume you just wanted to seek high-level comments? A few points that I can think of:

I think we should further trim down the technology density by using more general terms. Reading a landing page with too many of those can be difficult. :)
I think we should place more focus on what user needs IREE can help to address. Like what framework/platforms/hardware are (gonna be) supported, what flexibility are provided (e.g., not forcing to take on the full stack), why it is better than existing solutions (e.g., native machine code for faster execution, smaller binary size, etc.). Essentially sell a bit more. ;)
It would be nice to have some graphs/pictures.  Like using some openly available icon set or whatever? You certainly know better than me. (This one is really nice to have so don't spend too much time on it.)

Yep, looking for high level comments, or offers to help with some of the sections. The "Workflow overview" section is most complete, while the introduction and other sections need more thought.
Agreed on all points. Starting with major features, supported platforms, binary size in different configurations, performance targets/benchmarks, etc. sounds good. I started to distill some of the ideas on https://github.com/google/iree#architecture-and-goals here, but we can go further.
I reused the diagram from our README, but it's due for an update. Kojo also requested diagrams on a different page: https://github.com/google/iree/pull/5485#discussion_r617074753.

Ready for a real review now. I've incorporated your comments @antiagainst :

Trimmed technical language
Added more icons and whitespace
Discussed features and supported platforms
Filled in missing sections

Awesome. Looks nice to me. Let's land and then iterate.
(One thing that would be nice to improve is that we have quite a few unordered list, which makes the page a bit lengthy. If they can be grouped together with just icons for them, that would be fantastic. But I guess that means more HTML/CSS magic. We can get to it later. :)

Yep. I was working with https://fontawesome.com/icons?d=gallery&p=2&s=brands&m=free since it was convenient, but we could include logos for more items and put them side by side.

authors: ScottTodd antiagainst


text:
Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

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

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

@googlebot I signed it!

repo: google/it-cert-automation-practice


text:
Closes: #1

Updated the validations.py python script
Fixed the behavior of validate_user function in validations.py
Fixes #<issue_number_goes_here>

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

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

I've signed the CLA, kindly check again
Thanks


text:
Create python-publish.yml

Fixes #<issue_number_goes_here>

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

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

Okay


text:
jax.grad(jnp.log) returns non-nan for out-of-domain inputs

Description
Hi, and first of all, thanks all the amazing work on jax and its ecosystem!
Title says it all: MVCE below.
In [1]: import jax.numpy as jnp
   ...: from jax import grad

In [2]: jnp.log(-1.)  # nans expected
Out[2]: Array(nan, dtype=float32, weak_type=True)

In [3]: grad(jnp.log)(-1.)  # nans ALSO expected!
Out[3]: Array(-1., dtype=float32, weak_type=True)

The above behavior contradicts the definition of a derivative of a function $f$, defined only on the domain of $f$ ( $(0, +\infty)$ in that case). I believe the jvp rule for jnp.log, currently defined as
lambda g, x: div(g, x))

should  perform a domain-check before returning.
What jax/jaxlib version are you using?
jax v0.4.1, jaxlib v0.4.1
Which accelerator(s) are you using?
No response
Additional system info
Python 3.9.15, CPU version, MacOS Big Sur
NVIDIA GPU info
No response

Thanks for the report! I'll take a look

authors: jakevdp pierreglaser

repo: google/jax


text:
Entry function 'fusion_2' uses too much parameter space

Jax jit works fine most of the time, but occasionally I get the following error, which I don't know how to interpret.

2019-05-05 21:59:48.182440: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:125] Can't find ptxas binary.  Will back to the GPU driver for PTX -> sass compilation.  This is OK so long as you don't see a warning below about an out-of-date driver version.
2019-05-05 21:59:48.182510: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:126] Searched in the following directories:
2019-05-05 21:59:48.182670: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:130]   ./cuda_sdk_lib
2019-05-05 21:59:48.182692: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:130]   /usr/local/cuda
2019-05-05 21:59:48.182715: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:130]   .
2019-05-05 21:59:48.182733: W external/org_tensorflow/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:132] You can choose the search directory by setting xla_gpu_cuda_data_dir in HloModule's DebugOptions.  For most apps, setting the environment variable XLA_FLAGS=--xla_gpu_cuda_data_dir=/path/to/cuda will work.
2019-05-05 21:59:49.158345: E external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:625] failed to load PTX text as a module: CUDA_ERROR_INVALID_PTX: a PTX JIT compilation failed
2019-05-05 21:59:49.158413: E external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:630] error log buffer (185 bytes): ptxas application ptx input, line 34370; error   : Entry function 'fusion_2' uses too much parameter space (0x1898 bytes, 0x1100 max).
ptxas fatal   : Ptx assembly aborted due to error
2019-05-05 21:59:49.158640: F external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:888] Check failed: module != nullptr
Aborted

It would be helpful if you could share a small reproduction of the problem — this is a problem we should probably hand off to the fine folks who work on XLA.

It would also be helpful to know what versions of jax and jaxlib you have installed.

I was using the git version from last weekend. Unfortunately the code is quite complex and I cannot share it at the moment.

I think it's going to be hard to make progress on this one without a way to reproduce it. We have some guesses as to how to trigger it, but we aren't completely sure.

Thanks. I believe the underlying cause is that the computation graph I give to jit is simply too large (about 10,000 np operations).

I managed to isolate the code that produces the error:
bug.zip
As I thought, it's probably due to the jit compiler running out of memory. The file also shows a way in which I'm trying to avoid this blow-up of the compiler, by isolating sub-functions to be compiled. This works, but compilation is still very slow, and it would be nice if there were ways to speed it up or parallelize simultaneous jit of many functions on the CPU (cf. #679).

Thanks for the reproducer. I have played around with it, and tried several layer sizes. With your workaround you are making sure that several XlaModules are created. The size of the emitted LLVM IR code grows linear with the size of the XLAModule, however it seems that the PTXAS memory usage is more than linear in the size of the IR code. PTXAS is not under our control, but arguably XLA or Jax should automatically split modules that are too large for PTXAS to handle.

Good news, at long last! This bug doesn't repro anymore :) I think the compiler was fixed.
Compilation is still super slow, and there are probably ways we'd want to adapt this code to make it more amenable to JAX. But for the narrow scope of this bug, we're good!
For posterity, I tested with the below revised version of the script (just to replace index_update with .at[...].set, and handle lists in static_argnums arguments). It executes to completion without a compiler error, producing the output below:
$ python bug.py

Jit compiling with layer size 128
1st batch took 144.22 sec
2nd batch took 135.62 sec
It would be great to use multi-core for the initial jit compilation of all independent layers, in order to reduce this huge upfront cost.
Jit compiling with layer size 10000 (this will trigger a bug in the compiler, and use about 60GB of RAM on my server)
2022-08-15 19:02:58.365163: E external/org_tensorflow/tensorflow/compiler/xla/service/slow_operation_alarm.cc:65]
********************************
[Compiling module jit__lambda_.143] Very slow compile?  If you want to file a bug, run with envvar XLA_FLAGS=--xla_dump_to=/tmp/foo and attach the results.
********************************
2022-08-15 19:03:28.264408: E external/org_tensorflow/tensorflow/compiler/xla/service/slow_operation_alarm.cc:133] The operation took 2m29.899393287s

********************************
[Compiling module jit__lambda_.143] Very slow compile?  If you want to file a bug, run with envvar XLA_FLAGS=--xla_dump_to=/tmp/foo and attach the results.

# -*- coding: utf-8 -*-

import numpy as onp
import time
import itertools

import jax.numpy as np
from jax import jit, device_put
from jax import random
# from jax.ops import index, index_add, index_update

def pos_lit(v):
  return v-1

def neg_lit(v, num_features):
  return num_features+v-1

def parse_lc(lines, num_features):
  wiring = list(parse_lc_gen(lines, num_features))
  return (num_features, len(wiring)+2*num_features, -1, wiring)

def parse_lc_gen(lines, num_features):
  node_map = {}
  inode_ct = itertools.count(2*num_features)

  def inode(id1):
    if not id1 in node_map:
      inode = next(inode_ct)
      node_map[id1] = inode
    return node_map[id1]

  for x in lines:
    spl = x.split()
    if x.startswith('T'):
        id1 = spl[1]
        v = int(spl[3])
        node_map[id1] = pos_lit(v)
    if x.startswith('F'):
        id1 = spl[1]
        v = int(spl[3])
        node_map[id1] = neg_lit(v, num_features)
    if x.startswith('D'):
        id1 = spl[1]
        elements = [el.split(" ") for el in x.replace(')', '').split("(")[1:]]
        elements = [[inode(c) for c in e[0:2]] for e in elements]
        yield [inode(id1), 'D', elements, -1]

def parse_lc_file(file, num_features):
  return parse_lc(open(file, "r"), num_features)

def one_hot(x, k):
  """Create a one-hot encoding of x of size k."""
  return np.array(x[:, None] == np.arange(k), np.float32)

key = random.PRNGKey(0)

my_batch_size = 1024
num_features = 28*28
num_labels = 10

big_circuit = parse_lc_file("mnist.circuit",num_features)

def batch_node_probs(inputs, circuit, layer_size):
  num_inputs, num_gates, num_wires, wiring = circuit
  probs = j_batch_node_probs_init(inputs, num_inputs, num_gates)
  for i in range(0, len(wiring), layer_size):
    probs = j_batch_node_probs_layer(probs, i, i+layer_size, wiring)
  return probs

def batch_node_probs_layer(probs, start, end, wiring):
  for node in wiring[start:end]:
    op = node[1]
    if(op == 'D'):
      id, op, elements, weights = node
      probs = batch_node_probs_dec(probs, id, elements)
    else: raise Exception(f"unknown operand: {op}")
  return probs

def j_batch_node_probs_layer(probs, start, end, wiring):
    return jit(lambda probs: batch_node_probs_layer(probs, start, end, wiring))(probs)
# j_batch_node_probs_layer = jit(batch_node_probs_layer, static_argnums=(1,2,3))

def batch_node_probs_init(inputs, num_inputs, num_gates):
  num_instances = inputs.shape[0]
  probs = np.empty((num_gates,num_instances))
  probs = probs.at[0:num_inputs].set(np.transpose(inputs))
  return probs.at[num_inputs:2*num_inputs].set(1-probs[0:num_inputs])
  # probs = index_update(probs, index[0:num_inputs], np.transpose(inputs))
  # return index_update(probs, index[num_inputs:2*num_inputs],

j_batch_node_probs_init = jit(batch_node_probs_init, static_argnums=(1,2))

def batch_node_probs_dec(probs, id, elements):
  el_probs = [np.prod(probs[np.array(el)], axis=0) for el in elements]
  el_probs = np.stack(el_probs, axis=0)
  return probs.at[id].set(np.sum(el_probs, axis=0))
  # return index_update(probs, index[id], np.sum(el_probs, axis=0))

# random data
random_flattened_images = device_put(random.normal(random.PRNGKey(1), (my_batch_size, num_features)))
random_targets = device_put(one_hot(onp.random.randint(0,10,size=(my_batch_size,)),num_labels))

layer_size = 128
print(f"Jit compiling with layer size {layer_size}")

start_time = time.time()
batch_node_probs(random_flattened_images, big_circuit, layer_size)
print("1st batch took {:0.2f} sec".format(time.time() - start_time))

start_time = time.time()
batch_node_probs(random_flattened_images, big_circuit, layer_size)
print("2nd batch took {:0.2f} sec".format(time.time() - start_time))
print("It would be great to use multi-core for the initial jit compilation of all independent layers, in order to reduce this huge upfront cost.")

layer_size = 10000
print(f"Jit compiling with layer size {layer_size} (this will trigger a bug in the compiler, and use about 60GB of RAM on my server)")

batch_node_probs(random_flattened_images, big_circuit, layer_size)

Hey everyone and especially @mattjj
I'm getting the "uses too much parameter space" error, and I wonder whether it's another bug similar to this, or maybe I'm doing something wrong.
I'm running RL experiments using my private fork of https://github.com/Silent-Zebra/POLA and sometimes when I use sufficently-big parameters, I get exceptions like these:
Traceback (most recent call last):
  [...]
  File "/opt/conda/lib/python3.10/site-packages/jax/_src/compiler.py", line 238, in backend_compile
    return backend.compile(built_c, compile_options=options)
jaxlib.xla_extension.XlaRuntimeError: INTERNAL: ptxas exited with non-zero error code 65280, output: ptxas /tmp/tempfile-peeps-d6bd1d5d-31951-61e3e7489cab5, line 3889; error   : Entry function 'loop_broadcast_fusion_1537' uses too much parameter space (0x1450 bytes, 0x1100 max).
ptxas /tmp/tempfile-peeps-d6bd1d5d-31951-61e3e7489cab5, line 3889; error   : Feature 'Kernel parameter size larger than 4352 bytes' requires PTX ISA .version 8.1 or later
ptxas fatal   : Ptx assembly aborted due to errors
: If the error message indicates that a file could not be written, please verify that sufficient filesystem space is provided.

I tried looking at /tmp/tempfile-peeps-d6bd1d5d-31951-61e3e7489cab5 but that file doesn't exist.
My code is secret, but if it helps I can share it with you privately.

Oh, I now tried upgrading JAX and rerunning, and instead of this "uses too much parameter space" error I got a segfault :( Opened separate issue: #22700

authors: akuegel cool-RR guyvdbroeck hawkinsp mattjj


text:
document class methods in autodiff autosummary

... to better render docs for custom_jvp and custom_vjp.

Looks great!
One suggestion for ease of review / future understandability: split this into two commits: in the first, add a copy of the default class template to JAX. In the second, modify the template.

authors: froystig jakevdp


text:
Disable remat pass

--xla_disable_hlo_passes=rematerialization is a flag that is frequently passed to the compiler. This patch adds a configuratin option in JAX to pass that flag by default

@nouiz

Follow up in https://github.com/google/jax/pull/23738


text:
Remove unnecessary code in autodiff colab

Fix a typo in the autodiff colab.
Remove unnecessary future code.

I followed the Update notebooks documentation, but please check the format of new colabs and let me know if they need to be further modified.

Hi, thanks for this contribution! It's super hard to tell from the github diff, but it looks like this change is also removing the outputs from a few cells (at least according to a Google-internal tool that does a better job of rendering the diff). Would it be possible for you to manually edit the existing notebook files in this case instead of regenerating them, so we can see the actual diff and make sure there aren't other unintended changes? We run these notebooks as part of the presubmit, so it'll raise an error if they don't run.
(I realize this isn't what the "Update notebooks" documentation says right now -- I'm looking into finding a workflow that allows us to easily update the notebooks and also see a meaningful diff, lemme know if you have any suggestions!)

@skye, hey! I have created a new pr #2623, which seems much clear. Please have a look!

Hi, thanks for this contribution! It's super hard to tell from the github diff, but it looks like this change is also removing the outputs from a few cells (at least according to a Google-internal tool that does a better job of rendering the diff). Would it be possible for you to manually edit the existing notebook files in this case instead of regenerating them, so we can see the actual diff and make sure there aren't other unintended changes? We run these notebooks as part of the presubmit, so it'll raise an error if they don't run.
(I realize this isn't what the "Update notebooks" documentation says right now -- I'm looking into finding a workflow that allows us to easily update the notebooks and also see a meaningful diff, lemme know if you have any suggestions!)

Is it possible to see a diff of the output? I am afraid that cherry-picking the cells contents manually may put a tall barrier to colab changes. The cost would be disproportionately high for small fixes, and completely unmanageable for large ones.

I'm looking into better ways to see the diff so we don't have to make manual changes like this. One possible lead I have is that creating a notebook in one notebook editor and then modifying it in another can cause enough minor differences to screw up the diff (e.g. mixing Colab and Jupyter). @djdongjin were you using Colab to make changes to and export the notebook, or something else?

I'm looking into better ways to see the diff so we don't have to make manual changes like this. One possible lead I have is that creating a notebook in one notebook editor and then modifying it in another can cause enough minor differences to screw up the diff (e.g. mixing Colab and Jupyter). @djdongjin were you using Colab to make changes to and export the notebook, or something else?

Hey, for this closed pr with a lot of diffs, I use colab and export in place of the old notebooks (as in the doc). For the other new pr with fewer diffs, I just modify the notebook in vscode, without running the modified cells.

Thanks for the info. I'm guessing these notebooks were created and subsequently edited in Colab before your made this PR, so maybe the different editors theory is out... I'll have to try playing around with saving new versions of Colabs and see if I can produce meaningful diffs.

@skye The tensorflow instruction seems reasonable, e.g., open colab by feeding the notebook link in github repo, instead of uploading the notebook in your local repo. Then download it in place of the old one in your local repo and send a pr.
another thing I am not sure is whether the notebook should include outputs. If not include outputs, some figures may be missing. If include outputs, I suggest that, for each notebook, use the run all option in colab to make the execution_count in order, which can reduce some unnecessary diff.

Ah good find with the TF instructions! We do include outputs in the notebooks, so adding the "Run all" workflow to our instructions is also a good idea. Thank you!

authors: djdongjin gnecula skye


text:
Ensure reproducibility of images.

From https://github.com/GoogleCloudPlatform/minikube-build-tools-for-java/issues/61
Building from the same source files should produce the same image on different computers. This means erasing timestamps (and other variations such as user ids) from files.

The current plan for this is :

sort entries by name
set mtime = 0
set userId = 0
set groupId = 0
set userName = ""
set groupName = ""

Sounds great!

authors: coollog loosebazooka

repo: google/jib


text:
support go modules projects

This is the continuation of #19, I made some bad pushes and the PR was closed, so I'm opening this again.
Fixes #7

@jonjohnsonjr I think I have addressed all your last requests.
About the test project that is copied to the /tmp folder I have considered using the same from cmd/ko/test but I think it would be better to simply duplicate it, as it allows this two tests projects be independent and I haven't found an elegant way to use that folder and add a go.mod file.
If you think that duplicating these files is not the way to go I can try it again.

One thing to mention is that there is a lot of code duplication on the tests. I have changed it, but I think it would make this PR too overwhelming. So I'm making it to another PR as a follow-up.

Going to think out loud a bit here, let me know if I'm misunderstanding something about go modules or have missed something:
In a world with just GOPATH, there was a single namespace for packages. They were all rooted at GOPATH, and you could simply read from the filesystem to find the package.
With go modules, there is a second namespace introduced by the go.mod file. The "module" directive gives a root for the current directory that doesn't require you to be on GOPATH. Any packages in that directory (or subdirecties) should be prefixed by the module path.
So here's what I'm thinking:
We call go list -mod=readonly -m once. If successful, this should print the current module path. We can look for this prefix on any importpaths to determine if we should try to build the package. We might need to still call out to go list to determine if it's a main package (or something), but it should be much faster than calling go list on everything.
If go list -mod=readonly -m fails, we should just do what we currently do, which is look for the package on GOPATH.

Some things I'm not sure about:
Should we still fall back to looking in GOPATH for packages if a project is using go modules? Or do we only expect to build/reference packages that are within a single project?
Is it okay that we only look in the current directory for go.mod files? I believe that's how modules are expected to work, but I'm not sure how people do mono-repos with go modules.

@jonjohnsonjr  as for I know, in go-module enabled project (which is also located outside GOPATH) , we still run go build -o bin/account-srv ./srv/account in project root(where go.mod is located) to build binary.  no additional setting needed.
I think the build process is same for regular projects located in GOPATH as well.
i this it is fair to expect only to build/reference packages that are within a single project/monorepo
The flow you stated above should  work.
If it is go-module enabled project, and importpaths prefixed with namespace  from go list -mod=readonly -m , then subtract the   namespace  and then run go build  ..., otherwise use full importpaths   as source path.
you can use my repo for testing as it is monorepo and using go-module

authors: jonjohnsonjr paivagustavo xmlking

repo: google/ko


text:
Hide / Show Classes

what is the class of showing and hiding content by device via media query?
In bootstrap we have .visible-xs-*, .hidden-sm, etc...
i want to hide some section when viewing small devices like tablet portrait (600x800). etc,,
thank you in advace
-Abet

just figured out
Configuration options
https://github.com/google/material-design-lite/tree/master/src/layout

The grid docs cover what is available in the CSS Config section. mdl-cell--hide-{whatever} classes.

authors: Garbee abetsagaral

repo: google/material-design-lite


text:
Disable landmarks visibility for pose tracking Unreal Engine

Hello guys! Could you please tell me, I use Unreal engine plugin (https://github.com/wongfei/ue4-mediapipe-plugin ) I need to hide landmarks from the video image. Is there such a possibility? Thanks!

Hi @LightQniX ,
Yes, it can be done by removing input_stream: "landmark_render_data"or input_stream: "VECTOR:0:multi_hand_landmarks_render_data" from AnnotationOverlayCalculator config.

Please tell me where it can be found this file "AnnotationOverlayCalculator". I found files like these
pose_landmarks.txt
but .pbtxt

Hi @LightQniX ,
Landmarks are rendered by AnnotationOverlayCalculator which is controlled by "LandmarksToRenderDataCalculator",  which is invoked in graphs such as:
google3/third_party/mediapipe/graphs/hand_tracking/subgraphs/multi_hand_renderer_gpu.pbtxt
One approach would be to remove these calculators from the "multi_hand_renderer_gpu.pbtxt" graph.

Thank you very much! You have helped a lot!!!

authors: LightQniX sureshdagooglecom

repo: google/mediapipe


text:
switch back to WebGL1Renderer

Fixes #2915
There's a bunch of discussion in three.js and apparently there's a chrome bug in webGL2 around a particular sRGB format. Hopefully a better fix will be coming soon, but until then, it  seems our best way around this performance issue is to go back to WebGL1 for the moment.

👍

authors: elalish timmmeh

repo: google/model-viewer


text:
oauth2client.appengine module docs are not being built

See: http://oauth2client.readthedocs.org/en/latest/source/oauth2client.appengine.html

I have a hack in place to make this work, but it doesn't seem to be sufficient. (I swear it used to work :grinning: )

Looking in a build: https://readthedocs.org/projects/oauth2client/builds/3273352/
The line
python /home/docs/checkouts/readthedocs.org/user_builds/oauth2client/envs/latest/bin/sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html

has an ImportError
/home/docs/checkouts/readthedocs.org/user_builds/oauth2client/checkouts/latest/docs/source/oauth2client.appengine.rst:4: WARNING: autodoc: failed to import module u'oauth2client.appengine'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/oauth2client/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 385, in import_object
    __import__(self.modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/oauth2client/checkouts/latest/oauth2client/appengine.py", line 30, in <module>
    from google.appengine.api import app_identity
ImportError: No module named google.appengine.api
looking for now-outdated files... none found

This isn't true anymore. It fixed itself!


text:
Publish Python library to PyPi.

This allows users to install the library using pip.
https://pypi.org/project/openlocationcode/

#137

Need to investigate why the test can't find the module anymore.

repo: google/open-location-code


text:
Do not count duplicate nodes as a separate visit in the vehicle.

I use the VehicleRouting from OR Tools for pickups and deliveries(in C#). I want to set the constraint that a vehicle can visit only 3 pickup points at max.This I have been able to do with following:
RoutingModel routing = new RoutingModel(manager);
routing.AddConstantDimension(1, 4, false, "maxNodesToVisit");

The problem is that there are multiple pickup points which are actually from the same location and I don't want them to be counted as two separate visits in the route.
For example: If there are 3 nodes indexed 1,2,3 and node = 1 is already present in the vehicle and node 2 is being visited by the same vehicle, I do not want this visit to be counted again.
I reckon the approach would be to add capacity dimension which will update the visits. I know which nodeIndexes are actually the same location and if I know which nodes are already present in the vehicle I will decide to increment the visit count or not.
What I need to know is how to find the nodes that a current vehicle has visited? Then I can decide whether to increment the visits count or not.
If there is another approach, that would be great as well.

This is difficult because it is hard to know what nodes a vehicle has visited.  The callback functions only get the from and to node at most, not the vehicle and not its state.  So any solution is going to have to be of the "clever hack" variety.
An idea I had that is bad and inefficient but might work:  create "gateway" dummy nodes, one per vehicle per real location.  Only these nodes increment the counter.
So if you have 3 vehicles and one location to visit, and that location has 3 pickups, you'd generate three dummy Gateway nodes, GA1, GA2, GA3, and three dummy visit nodes, A1, A2, A3.  Each of the GA nodes can ONLY visit any and all of the A nodes (so remove all other nodes from next node set, or make the travel time to other nodes some large value) but put a constraint on the G nodes such that only vehicle 1 can visit GA1, V2 can visit GA2, and V3 can visit GA3.  Then, when V1 visits GA1, the visit count goes up.
The problem with this of course is that it means each vehicle only gets one chance to visit the A nodes.  It might be the case, say, that a vehicle is full after visiting A1 and needs to come back after dropping off loads to finish picking up loads from A2, A3.  Maybe that won't be the case. Anyway, it's a start.

Agreed, I do not think there are good solutions to this.
Closing the issue. Please reopen if somebody has an idea :-)

Sorry,
instead of using unary callbacks at each node, use a binary callback.
If you are arriving at any of the 3 duplicate nodes from the rest of the graph, increase by 1.
If you are transitioning between duplicate nodes, do not increase the count.
It should solve your problem.

authors: YashSharma79 jmarca lperron

repo: google/or-tools


text:
Restricting route to defined maximum distance is working abruptly

Hi,
I have created a python script to optimise my route of vehicles on the basis of the cost of vehicle, the capacity of vehicle and load on every node.
I have added max distance constraint to my code which does work ok when the number of vehicles are in excess but as soon as I reduce the quantity of vehicle it starts picking up the higher end cost vehicles and also the max distance of the routes increase significantly.
Please let me know what's wrong with my code.
workfile.pdf
vehicledetails_csvdata.pdf
LocationData_csv.pdf

Are you sure the solution produced is not a good one ?
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le mer. 11 sept. 2019 à 10:41, shanuu1809 notifications@github.com a
écrit :

Hi,
I have created a python script to optimise my route of vehicles on the
basis of the cost of vehicle, the capacity of vehicle and load on every
node.
I have added max distance constraint to my code which does work ok when
the number of vehicles are in excess but as soon as I reduce the quantity
of vehicle it starts picking up the higher end cost vehicles and also the
max distance of the routes increase significantly.
Please let me know what's wrong with my code.
workfile.pdf
https://github.com/google/or-tools/files/3599776/workfile.pdf
vehicledetails_csvdata.pdf
https://github.com/google/or-tools/files/3599777/vehicledetails_csvdata.pdf
LocationData_csv.pdf
https://github.com/google/or-tools/files/3599778/LocationData_csv.pdf
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3KEG6IGNTQQV3KDJ63QJCVJ7A5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKUZVMQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3PHDHS2WVCCPDZXF3TQJCVJ7ANCNFSM4IVQ646Q
.

Yes... Ideally, the max distance for all individual routes should not exceed more than 500km but it does exceed for few routes if I reduce no. of vehicles.
Example:-
Case 1
Lets say I have 20 vehicles whose capacity is 50 and cost of every vehicle is between 80 to 100. Optimise solution picks up 18 vehicle and leave 2 with highest cost.
This case is correct
Case 2
If I remove 2 vehicles and increase the cost of one vehicle to 500. I do get an optimised solution but one of the route distance becomes more than 1000km and thats not correct.
This is incorrect

So, you are trading the cost of a new vehicle against the cost of the
extended route ?
500 vs 500km seems a good tradeoff.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le mer. 11 sept. 2019 à 10:57, shanuu1809 notifications@github.com a
écrit :

Yes... Ideally, the max distance for all individual routes should not
exceed more than 500km but it does exceed for few routes if I reduce no. of
vehicles.
Example:-
Case 1
Lets say I have 20 vehicles whose capacity is 50 and cost of every vehicle
is between 80 to 100. Optimise solution picks up 18 vehicle and leave 2
with highest cost.
This case is correct
Case 2
If I remove 2 vehicles and increase the cost of one vehicle to 500. I do
get an optimised solution but one of the route distance becomes more than
1000km and thats not correct.
This is incorrect
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3IXBJNDTJNVCLAYZF3QJCXJFA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZCTI#issuecomment-530288973,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3LNQTZ4C6FWSQ5OJALQJCXJFANCNFSM4IVQ646Q
.

Yes. How can we fix the route to less than 500 in this scenario
On Wed, 11 Sep 2019 at 2:32 PM, Laurent Perron notifications@github.com
wrote:

So, you are trading the cost of a new vehicle against the cost of the
extended route ?
500 vs 500km seems a good tradeoff.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68
53
00
Le mer. 11 sept. 2019 à 10:57, shanuu1809 notifications@github.com a
écrit :

Yes... Ideally, the max distance for all individual routes should not
exceed more than 500km but it does exceed for few routes if I reduce no.
of
vehicles.
Example:-
Case 1
Lets say I have 20 vehicles whose capacity is 50 and cost of every
vehicle
is between 80 to 100. Optimise solution picks up 18 vehicle and leave 2
with highest cost.
This case is correct
Case 2
If I remove 2 vehicles and increase the cost of one vehicle to 500. I do
get an optimised solution but one of the route distance becomes more than
1000km and thats not correct.
This is incorrect
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3IXBJNDTJNVCLAYZF3QJCXJFA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZCTI#issuecomment-530288973
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/ACUPL3LNQTZ4C6FWSQ5OJALQJCXJFANCNFSM4IVQ646Q
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=AIT3IS4UPGRBF2UEJWW4P2DQJCXZNA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZPBI#issuecomment-530290565,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIT3IS27U2NSPUIYKT76P7DQJCXZNANCNFSM4IVQ646Q
.

Max distance constraint doesn't work if I increase the cost of a few
vehicles and decrease the no. of vehicle.
On Wed, Sep 11, 2019 at 2:37 PM shantam gupta shantamgupta91@gmail.com
wrote:

Yes. How can we fix the route to less than 500 in this scenario
On Wed, 11 Sep 2019 at 2:32 PM, Laurent Perron notifications@github.com
wrote:

So, you are trading the cost of a new vehicle against the cost of the
extended route ?
500 vs 500km seems a good tradeoff.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68
53
00
Le mer. 11 sept. 2019 à 10:57, shanuu1809 notifications@github.com a
écrit :

Yes... Ideally, the max distance for all individual routes should not
exceed more than 500km but it does exceed for few routes if I reduce
no. of
vehicles.
Example:-
Case 1
Lets say I have 20 vehicles whose capacity is 50 and cost of every
vehicle
is between 80 to 100. Optimise solution picks up 18 vehicle and leave 2
with highest cost.
This case is correct
Case 2
If I remove 2 vehicles and increase the cost of one vehicle to 500. I do
get an optimised solution but one of the route distance becomes more
than
1000km and thats not correct.
This is incorrect
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3IXBJNDTJNVCLAYZF3QJCXJFA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZCTI#issuecomment-530288973
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/ACUPL3LNQTZ4C6FWSQ5OJALQJCXJFANCNFSM4IVQ646Q
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=AIT3IS4UPGRBF2UEJWW4P2DQJCXZNA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZPBI#issuecomment-530290565,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIT3IS27U2NSPUIYKT76P7DQJCXZNANCNFSM4IVQ646Q
.

These constraints are heavily tested. I doubt they are wrong. I could be
wrong :-)
Please simplify  your model and check it thoroughly.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
Le mer. 11 sept. 2019 à 11:12, shanuu1809 notifications@github.com a
écrit :

Max distance constraint doesn't work if I increase the cost of a few
vehicles and decrease the no. of vehicle.
On Wed, Sep 11, 2019 at 2:37 PM shantam gupta shantamgupta91@gmail.com
wrote:

Yes. How can we fix the route to less than 500 in this scenario
On Wed, 11 Sep 2019 at 2:32 PM, Laurent Perron <notifications@github.com
wrote:

So, you are trading the cost of a new vehicle against the cost of the
extended route ?
500 vs 500km seems a good tradeoff.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42
68
53
00
Le mer. 11 sept. 2019 à 10:57, shanuu1809 notifications@github.com a
écrit :

Yes... Ideally, the max distance for all individual routes should not
exceed more than 500km but it does exceed for few routes if I reduce
no. of
vehicles.
Example:-
Case 1
Lets say I have 20 vehicles whose capacity is 50 and cost of every
vehicle
is between 80 to 100. Optimise solution picks up 18 vehicle and leave
2
with highest cost.
This case is correct
Case 2
If I remove 2 vehicles and increase the cost of one vehicle to 500. I
do
get an optimised solution but one of the route distance becomes more
than
1000km and thats not correct.
This is incorrect
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<

https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3IXBJNDTJNVCLAYZF3QJCXJFA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZCTI#issuecomment-530288973

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/ACUPL3LNQTZ4C6FWSQ5OJALQJCXJFANCNFSM4IVQ646Q

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=AIT3IS4UPGRBF2UEJWW4P2DQJCXZNA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NZPBI#issuecomment-530290565
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AIT3IS27U2NSPUIYKT76P7DQJCXZNANCNFSM4IVQ646Q

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1570?email_source=notifications&email_token=ACUPL3ISV5CDJMEGAH7KOEDQJCZBVA5CNFSM4IVQ6462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6N2NGI#issuecomment-530294425,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3PWRXGKGDUI2HIVZELQJCZBVANCNFSM4IVQ646Q
.


text:
VRP with pickups and deliveries and load balancing

Hi, I wonder if i can use the ortool to solve this problem.
It is a VRP problem with pickups and deliveries and multiple vehicles, but instead of finding out the minimum total travelling distance, I would like to make the longest route for the vehicles as short as possible (to some extent like load balancing?).
Also, for the pickup and delivery part, the vehicle must go to the delivery point immediately after pickups. What first comes into my mind is to add the capacity constraint for it. Setting the demands for pickup points as 1 and delivery points as -1. Is it a good way to do?

Hello,
I have done about the same thing as you mention.
Regarding the Pickups and Deliveries I followed the excellent guide at the OR homepage.
Considering the re-loading, a big help for me was this example. See especially lines 182 - 186 which I think sets a Slack on the Delivery points (the ones with negative demand) which effectively unloads the vehicle.
Regarding loadbalancing see line 154 if the example above. That will put a large cost on the vehicle with the longest route, meaning that the solver will try to make that as small as possible which leads to a balancing effect on the vehicles' traveled distances.
If you want to restrict the vehicle to go directly to the delivery after pickup, you should also set the vehicle capacity to 1.

Another option for saying the vehicle must do the delivery immediately after the pickup is to add a custom constraint that says so. Something along the lines of:
routing_model.solver().Add(routing_model.NextVar(pickup_index) == delivery_index)

Hope this helps.

authors: lantica routemegood wnglnd


text:
Projects with 0 build rate but are likely fixable

Derived from latest full experiments (2024-11-19, 2024-11-30, 2024-11-30) and will be used as baselines for later fixes.

The lint error is irrelevant.

repo: google/oss-fuzz-gen


text:
How to disable tracing when not needed?

I want to profile my application only for certain builds while disabling it for anything else. Looking at the code I can't see any definitions that allow to turn the tracing off during the compilation. Sure, I can exclude all categories from the tracing, but that's not the same as disabling it completely, leaving only empty noop macroses.

The overhead of tracing macros when tracing is disabled is very very close to zero so we've not invested in build time support for stripping the macros. Also because of the very diverse range of ways in which Perfetto can be used, there's no likely to be a one size fits all approach to how people want to do stripping.
The suggestion would probably be wrap the macros from Perfetto to integrate with your own build system to ifdef the macros.

authors: LalitMaganti nikitanodar

repo: google/perfetto


text:
Fix #388: Serve the global home page without redirect.

This makes the home page loading faster and make its URL nicer.

Thanks! Merged.

repo: google/personfinder


text:
How to access google.protobuf.FieldOptions extensions?

Is there a way to read the FieldOption extension values for some proto field?
Say for FieldBehavior https://github.com/googleapis/googleapis/blob/master/google/api/field_behavior.proto
If I have a proto such as
message Message{
  string text = 1 [
      (google.api.field_behavior) = REQUIRED
  ];
}

That gets generated to dart, how can I read the FieldOption value on the text field?

We don't give direct access to the field options. The ones that the plugin handles are: the standard packed and deprecated options, and these Dart specific extensions. The rest are ignored.
I'm curious about the use case. Do you really need the REQUIRED option, or was this just as an example? If you really need it, what's the difference from marking the field as required? Then you can get the field from BuilderInfo and use isRequired.


text:
Question on Type Annotation and Docstring

Does the following two things perform differently in pyglove?
class Foo:
    field_a: int = 42
    "field_a docstring"

and
class Foo:
    field_a: Annotated[int, "field_a docstring"] = 42

PyGlove only supports the latter syntax. For the former one, the field_a string is not associated with the field.

Yeah, it seems that the latter syntax is the official way of attribute annotation. Because the second args can go far beyond the string type, it was originally designed to attach some metadata in the annotation.

I know :-) In my opinion Annotated is more scalable in providing extra information for a field, based on which we can easily support value spec & field metadata in near future. These features are already part of pg.members.
We may consider support the "official" attribute annotation if our fellow users prefer this way, although I personally don't like it for its poorer readability and scalability. But let me know if you are in a urgent need.

lol, no urgent need. The external IDEs do not view Annotated[.., x]'s s as annotation and thus will ignore them, just a heads up on the incompatibility of those common softwares vs. the practice in PG~

Good to know.
It seems the "former" form of field annotation (a new line of string following the field definition) was proposed in PEP-224 but got rejected. So maybe we should wait a bit see the necessity of this support.

authors: D-X-Y daiyip

repo: google/pyglove


text:
Fastboot Boot support, Android 9 fix, Fixed PycryptodomeAuthSigner's sign method

Fixed implementation of PycryptodomeAuthSigner.sign() method to properly resign the provided token.  Also made minor fix to stripping delimiters from the InteractiveShell output, eliminating a TODO

Coverage decreased (-0.5%) to 43.018% when pulling bc7b879230b3d6d32b983af6e5309bc04fdf8fd4 on greateggsgreg:master into d9b94b2dda555c14674c19806debb8449c0e9652 on google:master.

@alusco Any chance this could be reviewed for merge?

Hey I can look at merging it, though I maintain this at best effort.  Give me a bit to review it at least at a high-level.

Few minor questions but otherwise will merge it

@alusco Completely missed the feedback you provided months ago, sorry!  I've made corrections to the comments as requested and answered some of the questions you had above.  Please let me know if there is anything else you need!

authors: alusco coveralls greateggsgreg

repo: google/python-adb


text:
How to generate subroutine/nested subroutine tests?

Need to verify branch predictor

Can you elaborate a bit more? Do you want a mix of backward to forward branch instructions? or you mean nested jump instructions?

I meant emulation of C like functions which call another functions or call itself recursively . Our CPU has return stack logic in branch predictor.  This logic needs nested functions calls/returns pairs to be tested.
From: taoliug notifications@github.com
Sent: Wednesday, September 4, 2019 6:16 PM
To: google/riscv-dv riscv-dv@noreply.github.com
Cc: Alexander Grobman Alexander.Grobman@wdc.com; Author author@noreply.github.com
Subject: Re: [google/riscv-dv] How to generate subroutine/nested subroutine tests? (#116)
CAUTION: This email originated from outside of Western Digital. Do not click on links or open attachments unless you recognize the sender and know that the content is safe.
Can you elaborate a bit more? Do you want a mix of backward to forward branch instructions? or you mean nested jump instructions?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/google/riscv-dv/issues/116?email_source=notifications&email_token=AK5G5443BT5OZJ4MQI33KH3QIA6RTA5CNFSM4ITXLR72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD55JP5Q#issuecomment-528127990, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK5G54YTSYHPJJ6YCX5TAT3QIA6RTANCNFSM4ITXLR7Q.

Try this test
https://github.com/google/riscv-dv/blob/master/yaml/testlist.yaml#L95
Increase the number of sub-programs to generate a deeper stack.
For more details of the call stack generation, you can refer to this file:
https://github.com/google/riscv-dv/blob/master/src/riscv_callstack_gen.sv

BTW, recursive call to itself is not supported, it can be added as a directed instruction stream.

thanks for support

authors: agrobman taoliug

repo: google/riscv-dv


text:
Player hangs when progress button dragged to end of video...

Start playing a video
Right click on the player and set to 'loop'
Play video until it finishes and restarts
While it is playing the second time, drag the progress button to the very end of the video
Playback hangs - With verbose logging on, the statement 'A new segment is not needed or is not available' is repeatedly logged.

This is reproducible using at least the following two pieces of content:
'Oops' - assets/oops_cenc-20121114-signedlicenseurl-manifest.mpd
'Big Buck Bunny' - http://sit-mp5content.quickplay.com/integration/u/qpmezzdisneycommxlbbbclear1feature/master.ism/master.mpd

Confirmed. Thanks for the report. We'll take a look!

authors: sanbornhnewyyz tdrews

repo: google/shaka-player


text:
Seekbar behaves weird when arrow key is pressed for long .

Have you read the FAQ and checked for duplicate open issues?
Yes
Is your feature request related to a problem? Please describe.

No
Describe the solution you'd like

When you select seek bar by navigating through the 'tab' button and keep the arrow key(left or right) pressed it behaves
weird. It does what it is intended to do move 5s forward or backward when the key is released but while the key is kept pressed it works weird. If seek bar is not an active element it works fine.
this behavior only happens when the seek bar is an active element.
The below video shows the bug.
https://user-images.githubusercontent.com/71056993/111308805-606c9d00-8618-11eb-9488-0b00a0234905.mp4
Describe alternatives you've considered

I think this happens because when activeElement.classList.contains('shaka-seek-bar') is true the browser tries controlling the
seek bar as per user that is decrease or increase the current time which collides with this.timeAndSeekRangeTimer_.tickEvery(/* seconds= */ 0.125);  causing the bug. It's not that big of a deal but it is still a bug. I would like to add a feature to tackle this bug. when the arrow key(left or right) is pressed down and not released for more than 1.5sec then the seek bar keeps reducing its current time by 5sec. Some users prefer using this method to browse the video.
Additional context

@joeyparrish @TheModMaker
That feature can be added by adding this logic to onKeyDown_() :  .writing an if condition to check for key up for 1.5sec.  .if false add tickevery()tothis.seek_` with switch cases
.and stop when keyup is triggered .
As per my knowledge, this won't create any kind of conflicts and would fix the bug.
I would like to work on a PR for this, but wanted to confirm if i could proceed with this approach.
Thank you.

Thanks for the report!  I'm going to fix this in a different way than you suggested in your PR, though.

@joeyparrish I taught it was better to add code in the existing function rather than creating a new event and adding a separate function. I did listen to key events on windows but added an if condition which would run the code below only if the video container is in focus. After watching your solution my code does seem very complicated and I also kind of feared breaking the code if I change the names of functions 😅 because I haven't fully completed reading this project. I think there was a reason for listening to key-up events because this.pressedKeys_.delete(event.key); should only run when the key is released. this definitely should create some kind of bug. I'll check for bugs if any, caused by that change.

@joeyparrish I guessed it right, removing onKeyUp() does cause few bugs. everything works fine when only the 'tab' key is pressed but when you use 'shift+tab' everything after that doesn't work properly. I am unable to select elements in the overflow menu other than the first and last child. and when I press enter on the first child, instead of opening the setting menu it shifts the focus to the last child element, and also the focus doesn't stay in the overflow menu. the below video shows the bug.
https://user-images.githubusercontent.com/71056993/111869161-2d3d4d00-893b-11eb-84db-7417cf8f27ba.mp4

This happens because this.pressedKeys_.delete(event.key); is inside onControlsKeyUp() . when tab key is pressed , key event gets added to pressedKeys_ array from onWindowsKeyDown() and if that key event is already present in pressedKeys_ it gets deleted from that array due to  onControlsKeyUp() . now when shift is pressed it gets added to  pressedKeys_  due to onWindowsKeyDown() and then tab is pressed so even tab key event gets added to pressedKeys_  due to onWindowsKeyDown() . Now the pressedKeys_  has two elements 'tab' and 'shift'. when I release the shift key, it doesn't get deleted from the pressedKeys_ array. when I press the shift key again it gets added to the array again due to onWindowsKeyDown() and the previously existing shift gets deleted. but there is still a shift key inside an array, so once the shift key is pressed it never gets deleted from the array. so, even if I press 'tab' or 'enter' it doesn't matter because due to keepFocusInMenu_() if the shift is found and the first element is active it goes to last-child thus no other elements get selected. The focus doesn't stay in the overflow menu because when the last child element is in focus, the pressedKeys_ array has 'shift' so the else condition which should change the focus to a first child fails, and focus exits the overflow menu.
I should work on giving small explanations 😂
I think probably for tackling the addition and deletion of key events onKeyUp() function was created and then it suited for adding seek functionality too.  😊
It could be fixed by adding a key-up event. I'll add a PR for a possible solution.

@joeyparrish sorry its onControlsKeyDown() not onControlsKeyUp()

@joeyparrish I taught it was better to add code in the existing function rather than creating a new event and adding a separate function.

Well, I find that "better" usually depends on context.  It can be tough to judge when you're new to a project.

Thank you for the fix in PR #3259.  Thankfully, the bug I introduced in my earlier fix is not in any release versions yet.  You fixed it just in time!

Well, I find that "better" usually depends on context. It can be tough to judge when you're new to a project.

True.

Thank you for the fix in PR #3259. Thankfully, the bug I introduced in my earlier fix is not in any release versions yet. You fixed it just in time!

when will this version be released, can I get a date. This feature still has some bugs, I am working on an explanation for it and also a possible solution. I am a bit confused about how to explain it, cause I don't understand the bug properly yet.

There are two bugs with the seek bar when the arrow key is used for navigation.

when an arrow key is used for navigating the video. the seek bar stops updating, I don't know how I missed this before
when the video is navigated through arrow keys and the value of the current time exceeds the max time of the video, the video stops loading, the video keeps buffering for an infinite time after clicking on the reset button or changing the time in seek bar.

The video below shows the problem
https://user-images.githubusercontent.com/71056993/111944843-c6807680-8a95-11eb-8a45-d6db1019b4d3.mp4
Hopefully, I'll have a PR Before you watch this.
God save us all from the big buck bunny. ;)

In changeto()  function in range_element.js file this.isChanging_ was set to true but never set to false which caused  updateTimeAndseekRange() in controls.js to fail. this fixes the first bug .
I am still working on the second bug. This bug I think is not caused by your changes, but the previous versions handled it by moving the video 1s backwards when the end key is pressed or when the video is navigated beyond the end by arrow keys. It still wasn't perfect I was able to reproduce the bug in the previous versions too but not as easily as the present one. I think the bug is caused when the value of the video is set to max. because the value of max is not accurate, the value that is beyond the video time limit gets assigned and the video keeps getting data for that time. I haven't worked on it, it's just an assumption seeing the bug.
i have to dig more into the problem. Do you know any possible cause?
Thank you .

@joeyparrish the second bug was caused because the video.currenttime was set to this.bar.max. I don't know why but the video doesn't get loaded at its max time and after starting to buffer at its max time it never stops buffering. I don't know why it doesn't buffer at its max time but instead of setting  video.currenttime to the max value, we could set it to (max-0.125) this wouldn't make any difference because the time difference is very small but it does prevent that bug and video being stuck at buffer state. I'll add the changes to the previous pull. Nothing much changed. Could you please review it?
Thank you.

Hello @surajkumar-sk ,
Please understand that we have our limited capacity now and would not be able to provide close guidance until the GSoC officially starts in the summer. You are welcome to send us a PR once you have a complete, fully-tested, ready-for-review solution as a general contributor, and we'll review it as a general contribution when we are available.
Please be kind and only @us for urgent issues on Github regarding your questions or PRs, since that might spam the other developers, or the team members who are not GSoC mentors. Thank you for your understanding!
We'll have more updates coming soon to our Google Group and website.

@michellezhuogg this just fixes some issues created by previous change. The present shaka-player has major bugs which are very easy to produce and can be solved by very small changes. So i added them .


text:
Addition of replay icon

Description
Addition of replay icon after ending of video
Fixes #3247
Screenshots

Type of change

[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code

I signed @googlebot @google-cla

@googlebot I consent

@googlebot I consent.


text:
Cleanup whitespace and remove unused code.

From cl/461028967 review.

(The unrelated commits will be squashed and removed. I created some extra merges in my fork that led to this. Will reset it afterward.)

repo: google/summit-ast


text:
Add --filter-not setting

Currently we support --filter for an inclusive regular expressions to select benchmarks. Sometimes when benchmarks have similar names it's useful to be able to also have a negated version of the filter to further narrow-down the list of benchmarks.

Note: It is actually possible to express this with --filter already. For example to exclude benchmarks that have x10 in their name one could pass --filter '^((?!x10).)*$, but it's not great to have to type and remember this pattern. --filter-not is much more intuitive.

repo: google/swift-benchmark


text:
sys/linux: add CET(Control-flow Enforcement Technology) user space SH…

…STK(Shadow Stack) test file
CET(Control-flow Enforcement Technology) is a security feature that includes shadow stack and end branch to prevent ROP(Return Oriented programming)/JOP (Jump Oriented Programming) attack from the root cause. User space SHSTK which prevents ROP attack for user space process is in Linux tip repo:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/shstk Add CET user space SHSTK test file in syzkaller to cover related fuzzing tests.

Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md

Thanks for comments for this pull request.
As Dmitry's mentioned: there is KCOV BUG https://bugzilla.kernel.org/show_bug.cgi?id=198443 in kernel.
But it still could help to hit new kernel code quickly.
Thanks!
BR.

@dvyukovhttps://github.com/dvyukov, @a-nogikhhttps://github.com/a-nogikh:
Could you please take a look at this PR?
As Dmitry mentioned: there is KCOV BUG https://bugzilla.kernel.org/show_bug.cgi?id=198443 in kernel.
But it still could help to hit new kernel SHSTK code quickly.
Thanks!
BR
Pengfei
From: codecov[bot] @.>
Sent: Tuesday, May 2, 2023 21:53
To: google/syzkaller @.>
Cc: Xu, Pengfei @.>; Author @.>
Subject: Re: [google/syzkaller] sys/linux: add CET(Control-flow Enforcement Technology) user space SH… (PR #3859)
Codecovhttps://codecov.io/gh/google/syzkaller/pull/3859?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google Report
Merging #3859https://codecov.io/gh/google/syzkaller/pull/3859?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google (ccfd152https://github.com/google/syzkaller/commit/ccfd1529ecd13977a3fbd1e7bf211882898bcd1c) into masterhttps://codecov.io/gh/google/syzkaller/commit/a5625da37fd55922bfad3161db3f041a54140fac?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google (a5625dahttps://github.com/google/syzkaller/commit/a5625da37fd55922bfad3161db3f041a54140fac) will not change coverage.
The diff coverage is n/a.
—
Reply to this email directly, view it on GitHubhttps://github.com/google/syzkaller/pull/3859#issuecomment-1531519435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AG2B7UF2IYPH4VY2LP7PAH3XEEGVNANCNFSM6AAAAAAXTCOLCQ.
You are receiving this because you authored the thread.Message ID: @.***>

Thanks Dmitry Vyukov!

repo: google/syzkaller


text:
dashboard: order bugs in a reminder by their priority

Display high prio bugs on top of the list and low prio bugs at the bottom.

@dvyukov PTAL


text:
Adds qualification form and creates first step

Video after changes
http://screencast/cast/NTc3ODc0OTQ1Nzk1Njg2NHwxNjkyZTczZC1iYw
Tests

This is missing the shield icon for device qualification and I don't think the image is the correct one that was used in the designs?

@jboddey agree, updated

authors: jboddey sofyakurilova

repo: google/testrun


text:
Losetup device issues in post/pre processing.

As I was running some load tests, I discovered an issue with the Losetup devices not being deleted properly and may be either an issue with how partitions are being mounted or removed, either due to the PartitionEnumeration code or due to an unknown error. What makes it even more difficult is that so far, I've only been able to reproduce the error when the whole infrastructure is deployed in GKE, with running Worker pods that get scaled and descaled and unable to put a debugger on where the error is happening.
Sample of errors observed
"Evidence post-processing for test-disk-25gb-1:/p15 failed: Could not delete losetup device /dev/loop1"
"Evidence post-processing for test-disk-25gb-4:/p1 failed: Could not delete losetup device /dev/loop1"
"Evidence post-processing for test-disk-25gb-3:/p15 failed: Could not delete losetup device /dev/loop1"
"Evidence post-processing for test-disk-25gb-1:/p1 failed: Could not delete losetup device /dev/loop1"

Getting some help from @aarontp, recommended that I try adding some Retry logic when the block device is being mounted to confirm that it is a block device.
Added IsBlockDevice in processors.mount_local.py
def IsBlockDevice(path):
  """Checks path to determine whether it is a block device.

  Args:
      path: String of path to check.

  Returns:
      Bool indicating success.
  """
  if not os.path.exists(path):
    return False
  mode = os.stat(path).st_mode
  return stat.S_ISBLK(mode)

and retry logic in processors.mount_local.PreprocessLosetup
    # Make sure we have a proper block device
    for _ in range(RETRY_MAX):
      if IsBlockDevice(losetup_device):
        log.info(
            'Block device {0:s} successfully attached'.format(losetup_device))
        break
      if os.path.exists(losetup_device):
        log.info(
            'Block device {0:s} mode is {1}'.format(
                losetup_device,
                os.stat(losetup_device).st_mode))
      time.sleep(1)
    message = None
    if not os.path.exists(losetup_device):
      message = 'Device path {0:s} does not exist'.format(losetup_device)
    elif not IsBlockDevice(losetup_device):
      message = 'Device path {0:s} is not a block device'.format(losetup_device)
      if message:
        log.error(message)
        raise TurbiniaException(message)

After running some tests, the above code doesn't seem to properly check if the device block is actually attached (due to seeing some errors trying to access the block devices manually)

@aarontp recommended to try calling losetup -a instead for checking if the Device has been properly attached.
In processors.mount_local.py replaced the IsBlockDevice function with IsLosetup
def IsLosetup(path):
  # Check that the device was attached
  losetup_cmd = ['sudo', 'losetup', '-a']
  log.info('Running: {0:s}'.format(' '.join(losetup_cmd)))
  try:
    output = subprocess.check_output(losetup_cmd)
  except subprocess.CalledProcessError as e:
    raise TurbiniaException(
        'Could not check losetup device status {0!s}'.format(e))
  if output.find(path.encode('utf-8')) != -1:
    return False
  log.info('losetup device [{0!s}] deleted.'.format(path))
  return True

Updated processors.mount_local.PreprocessLosetup to call IsLosetup instead
    # Make sure we have a proper block device
    for _ in range(RETRY_MAX):
      if IsLosetup(losetup_device):
        log.info(
            'Block device {0:s} successfully attached'.format(losetup_device))
        break
      if os.path.exists(losetup_device):
        log.info(
            'Block device {0:s} mode is {1}'.format(
                losetup_device,
                os.stat(losetup_device).st_mode))
      time.sleep(1)
    message = None
    if not os.path.exists(losetup_device):
      message = 'Device path {0:s} does not exist'.format(losetup_device)
    elif not IsLosetup(losetup_device):
      message = 'Device path {0:s} is not a block device'.format(losetup_device)
      if message:
        log.error(message)
        raise TurbiniaException(message)

After running some tests, there still seems to be an issue with detaching some of the loop devices by partition.

@aarontp next suggestion to also try adding the retry logic for when the loopback device is being detached to ensure that there is enough time for it to detach.
    losetup_cmd = ['sudo', 'losetup', '-d', device_path]
    for _ in range(RETRY_MAX):
      log.info('Running: {0:s}'.format(' '.join(losetup_cmd)))
      try:
        subprocess.check_call(losetup_cmd)
      except subprocess.CalledProcessError as e:
        turbinia_failed_loop_device_detach.inc()
        raise TurbiniaException(
            'Could not delete losetup device {0!s}'.format(e))
      # Check that the device was actually removed
      losetup_cmd = ['sudo', 'losetup', '-a']
      log.info('Running: {0:s}'.format(' '.join(losetup_cmd)))
      try:
        output = subprocess.check_output(losetup_cmd)
      except subprocess.CalledProcessError as e:
        raise TurbiniaException(
            'Could not check losetup device status {0!s}'.format(e))
      if output.find(device_path.encode('utf-8')) != -1:
        log.info(
            'Block device {0:s} mode is {1}'.format(
                device_path,
                os.stat(device_path).st_mode))
        else:
           break
      time.sleep(1)
    # Check if device failed.
    if output.find(device_path.encode('utf-8')) != -1:
      turbinia_failed_loop_device_detach.inc()
      raise TurbiniaException(
          'Could not delete losetup device {0!s}'.format(device_path))
    log.info('losetup device [{0!s}] deleted.'.format(device_path))

I ran some tests to see if the preprocess logic properly detected that the loop device is not a block device.
Error running preprocessor for test-disk-25gb-15:/p1: Device path /dev/loop101 is not a block device
Device path /dev/loop101 is not a block device
Error running preprocessor for test-disk-25gb-15:/p1: Device path /dev/loop100 is not a block device
Device path /dev/loop100 is not a block device

I no longer see the Could not delete losetup device error message indicating that the preprocess is likely failing before the Task runs (given not equivalent device). However now seeing more failed Tasks as a result.
* YaraAnalysisTask (test-disk-25gb-6:/p1): Task Result was auto-closed from task executor on turbinia-worker-5899cf6d9c-48wkm likely due to previous failures.  Previous status: [YaraAnalysisTask Task failed with exception: [Evidence DiskPartition:test-disk-25gb-6:/p1:None being processed by Task YaraAnalysisTask requires Evidence to be in state ATTACHED, but earlier pre-processors may have failed.  Current state is [MOUNTED: False, ATTACHED: False, DECOMPRESSED: False, CONTAINER_MOUNTED: False]. See previous logs for more information.]]
--
* DockerContainersEnumerationTask (test-disk-25gb-7:/p1): Task Result was auto-closed from task executor on turbinia-worker-5899cf6d9c-gtwjd likely due to previous failures.  Previous status: [DockerContainersEnumerationTask Task failed with exception: [Evidence DiskPartition:test-disk-25gb-7:/p1:None being processed by Task DockerContainersEnumerationTask requires Evidence to be in state ATTACHED, but earlier pre-processors may have failed.  Current state is [MOUNTED: False, ATTACHED: False, DECOMPRESSED: False, CONTAINER_MOUNTED: False]. See previous logs for more information.]]
--
* StringsAsciiTask (test-disk-25gb-8:/p15): Task Result was auto-closed from task executor on turbinia-worker-5899cf6d9c-mcp5j likely due to previous failures.  Previous status: [StringsAsciiTask Task failed with exception: [Evidence DiskPartition:test-disk-25gb-8:/p15:None being processed by Task StringsAsciiTask requires Evidence to be in state ATTACHED, but earlier pre-processors may have failed.  Current state is [MOUNTED: False, ATTACHED: False, DECOMPRESSED: False, CONTAINER_MOUNTED: False]. See previous logs for more information.]]
--
FsstatTask (test-disk-25gb-9:/p1): Task Result was auto-closed from task executor on turbinia-worker-5899cf6d9c-tzflh likely due to previous failures.  Previous status: [FsstatTask Task failed with exception: [Evidence DiskPartition:test-disk-25gb-9:/p1:None being processed by Task FsstatTask requires Evidence to be in state ATTACHED, but earlier pre-processors may have failed.  Current state is [MOUNTED: False, ATTACHED: False, DECOMPRESSED: False, CONTAINER_MOUNTED: False]. See previous logs for more information.]]

@aarontp this is where I got stuck, if you have time and can PTAL per our chats around this.

Part 1. temp fix in #1144 and part 2. fix related to race condition in #1145

repo: google/turbinia


text:
Apply delta_ip and delta_stp from side table

Apply delta_ip and delta_stp from side table in exec.rs.
#46

The entire test suite passes, but when CI/hw-host runs target/wasefire/applet.wasm, it points out a bug, which (the WASM module) is unfortunately too big to debug. Maybe you could find the bug in review. I'll try to debug in the meanwhile.

Forgot to ask: How can I enable debug feature when running hwci.sh? I'd like to print logs for the applet.wasm error.

Forgot to ask: How can I enable debug feature when running hwci.sh?

You can apply the following patch:
diff --git a/scripts/hwci.sh b/scripts/hwci.sh
index 4c222fd0..1f4ac986 100755
--- a/scripts/hwci.sh
+++ b/scripts/hwci.sh
@@ -77,7 +77,7 @@ full() {
 }

 case $1 in
-  host) full unix host --arg=--protocol=unix ;;
+  host) full unix host --arg=--protocol=unix --features=wasefire-interpreter/debug ;;
   # P1.01, P1.02, and P1.03 must be connected together (gpio_test).
   nordic) full usb nordic ;;
   *) run --protocol=${1:-usb} "$2" ;;

And then simply run ./scripts/hwci.sh host as usual.

@ia0 I'd like to know how to get around the following "cannot borrow *self as mutable more than once at a time" error. Thanks.
In Thread::step(), I basically use the following function to take the jump
fn take_jump(&mut self, ls_idx: Option<usize>, side_tables: &[Vec<SideTableEntry>]) {
    let parser =  &mut self.parser;
    self.frame().take_jump(parser, ls_idx, side_tables);
}

where self.frame() returns &mut Frame<'m>.

I'd like to refactor incrementally. After storing side_table: &'m [SideTableEntry] in Frame, there appear to be some lifetime and " cannot borrow *self as mutable because it is also borrowed as immutable" errors. Inserted the errors in the code. PTAL.

repo: google/wasefire


text:
Redesign: Canvas page selection

Feature Description
Update design for page selection rectangle based on Figma.
Note: This is about what happens when you click on the background element, be it a solid shape or a media element.

[ ] Update selection shape, thickness, size and corner radius

Current design
New design

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

Implementation Brief

This might be more than 2 points. Currently, Moveable seems to be used for the background, however, it shouldn't really be since rotating, dragging, resizing aren't enabled for the background anyway as for the other elements.
Replacing using Moveable in this case would fix the issue of displaying resize indicators for background even though it can't be resized:

This issue would then include removing using Moveable for the background element and adding a custom selection indicator instead.

Verified in QA

authors: barklund csossi miina

repo: google/web-stories-wp


text:
Dashboard: Create Story Button border should be 1px

Feature Description
Currently the 'Create new Story' outline/border is 2px in left nav of dashboard. It should be 1 px.
Alternatives Considered

Additional Context

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

Implementation Brief

Verified in QA

confirmed and closing (UAT is too full and this is a really basic update)

authors: BrittanyIRL csossi


text:
remember the order in which selections were added

cancel_operation (#324) should only leave the selection that was added first and select_next (#325) should operate on the selection that was added last.

The concept of a primary selection could also be used by front-ends to set the position of the input method window.

repo: google/xi-editor


text:
visibility_detector  Update

Please update the visibility_detector

Hi, it does not directly conflict in my app, but I would like to update to visibility_detector 0.4.0 because of the improvements

I want to use the package markdown_widget and google_mobile_ads but they conflict because markdown_widget depends on visibility_detector ^0.4.0+2. So please update the dependencies of google_mobile_ads

This looks like a Flutter request as opposed to a GMA Flutter plugin request.
Flutter 3.7 introduces a fix that makes usage of visibility_detector for impression tracking obsolete for the GMA Flutter plugin. We recommend updating to version 2.4, which adds a new flag, AdWidget.optOutOfVisibilityDetectorWorkaround. Setting this to true lets you opt out of the fix added for https://github.com/googleads/googleads-mobile-flutter/issues/580.

As what I see is that this package has nothing changed and it still conflict with markdown_widget because of difference in the version of dependency visibility_detector, why this issue marked as completed ? Actually i'm new to Github so please explain if I have anything misunderstand, thank you.

@huycozy do you guys have any plan on updating the visibility_detector dependency for this package ?

@timothyhoang-google I think the visibility_detector should be upgraded to the latest version since it's conflicted with other packages. Users can use GMA Flutter plugin version 2.4 and above, but it's still being used visibility_detector: ^0.3.3.
Meanwhile, for anyone facing the issue, you can use dependency_overrides as a workaround for this:
dependency_overrides:
  visibility_detector: ^0.4.0+2

@huycozy - thanks for flagging this issue.
We will need to do another major version release to increase the min Flutter version required and increase the visibility detector version. @jjliu15 will work on this.

This is closed, but no fix is available for this issue yet...

While waiting for the update you can add this :
google_mobile_ads:
git:
url: https://github.com/googleads/googleads-mobile-flutter.git
ref: 9dabf7b0d1865866f5deb6934f1ae510989c00e9
path: packages/google_mobile_ads/

authors: Knackynouille aintend-com coderof19clc7 huycozy jj-hoeksema mulderpf timothyhoang-google

repo: googleads/googleads-mobile-flutter


text:
Add test coverage to NodeJS GAPIC clients.

Refreshed and added test coverage (mocha unit test support) to the following APIs:

Errorreporting
Language
Logging
Monitoring
Pubsub
Speech
Trace
Vision

Issues found:

gax.StreamType.BIDI_STREAMING is not found in the test. This issue affects Pubsub and Speech. (https://github.com/googleapis/toolkit/issues/871)
All other tests have passed.

How-to-run:
Under the corresponding API directory, run npm install & npm test
cc @bjwatson @garrettjonesgoogle

Update: The gax.StreamType.BIDI_STREAMING issue is now resolved by updating the gax version to 0.10.6.
@jmuk @landrito PTAL

repo: googleapis/api-client-staging


text:
fix --local runs

Fixes #649. The protoc versions PR #637 broke --local runs. My understanding is that the PR approach is just wrong and it should be reverted and/or changed, but if we don't revert it right now, let's at least make local runs work by not failing because of the missing script and having reasonable default value for protoc command (which is, obviously, just protoc without any specific version).

@vam-google If you have a merge conflict while reverting, feel free to add me and I'll fix it. Or, feel free to revert both since my change does not make any sense without #637.

repo: googleapis/artman