text:
DEPTHWISE_CONV_2D fails to map to TPU with status 'Tensor has unsupported rank'

Hi,
I'm trying to compile this implementation of DeepLab v3 to Edge TPU, but at some point one of depthwise convolution layers fails to map with status Tensor has unsupported rank (up to 3 innermost dimensions mapped). Here's what i found so far:

similar operations were compiled successfully at earlier stages of the same graph
all dimensions seemed to be ok when checking graph with Netron

The inconsistency of this issue (some depthwise conv layers mapping, some not) is what really throwing me off.
I'm running compiler version 2.0.291256449, here's full compilation log
Edge TPU Compiler version 2.0.291256449
Input: models/deeplab_take2.tflite
Output: deeplab_take2_edgetpu.tflite

Operator                       Count      Status

CONCATENATION                  1          More than one subgraph is not supported
MUL                            10         More than one subgraph is not supported
QUANTIZE                       1          Mapped to Edge TPU
QUANTIZE                       1          More than one subgraph is not supported
QUANTIZE                       1          Operation is otherwise supported, but not mapped due to some unspecified limitation
CONV_2D                        15         Mapped to Edge TPU
CONV_2D                        23         More than one subgraph is not supported
DEPTHWISE_CONV_2D              10         Tensor has unsupported rank (up to 3 innermost dimensions mapped)
DEPTHWISE_CONV_2D              7          Mapped to Edge TPU
BATCH_TO_SPACE_ND              10         Operation not supported
RESHAPE                        1          More than one subgraph is not supported
SPACE_TO_BATCH_ND              10         Tensor has unsupported rank (up to 3 innermost dimensions mapped)
RESIZE_BILINEAR                2          Image-interpolation layer won't run precisely enough on Edge TPU
MEAN                           1          More than one subgraph is not supported
ADD                            17         More than one subgraph is not supported
ADD                            3          Mapped to Edge TPU

And here are the models - before compilation and compiled.
Could you please take look at this and help me find solution?

Sorry, but this isn't an easy question to answer since model changes through out the training process.
You said you have compiled it at earlier stage of training?
It is possible that x and y dimension dilation are different for one of the DepthwiseConv2d op?

@Namburger
I had a closer look at this issue and it seems that DepthwiseConv2D with dilation rate != 1 (x and y rates are equal) is not converted correctly. Quantization process of dilated DepthwiseConv2D is using SpaceToBatchNd operation which seems to introduce shape inconsistency along first dimension, and this is where compiler fails to map operation to TPU.

This is all using tensorflow version 2.1.0. Now, according to this issue, converting dilated DepthwiseConv2D as single operation is now possible, and indeed with 2.2.0rc0, this operation looks correctly converted

but unfortunately, trying to compile this model with Edge TPU Compiler version 2.0.291256449 produces
Edge TPU Compiler version 2.0.291256449

Internal compiler error. Aborting!

Sorry for the late response here, is this still an issue with compiler version 2.1.302470888?

Yes, tested it with 2.1.302470888 and still fails to map this op.
Edge TPU Compiler version 2.1.302470888

Model compiled successfully in 347 ms.

Input model: models/deeplab_take2.tflite
Input size: 2.55MiB
Output model: deeplab_take2_edgetpu.tflite
Output size: 2.53MiB
On-chip memory used for caching model parameters: 187.00KiB
On-chip memory remaining for caching model parameters: 6.83MiB
Off-chip memory used for streaming uncached model parameters: 0.00B
Number of Edge TPU subgraphs: 1
Total number of operations: 113
Operation log: deeplab_take2_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 26
Number of operations that will run on CPU: 87

Operator                       Count      Status

CONCATENATION                  1          More than one subgraph is not supported
MUL                            10         More than one subgraph is not supported
QUANTIZE                       1          Mapped to Edge TPU
QUANTIZE                       1          More than one subgraph is not supported
QUANTIZE                       1          Operation is otherwise supported, but not mapped due to some unspecified limitation
CONV_2D                        15         Mapped to Edge TPU
CONV_2D                        23         More than one subgraph is not supported
DEPTHWISE_CONV_2D              10         Tensor has unsupported rank (up to 3 innermost dimensions mapped)
DEPTHWISE_CONV_2D              7          Mapped to Edge TPU
BATCH_TO_SPACE_ND              10         Operation not supported
RESHAPE                        1          More than one subgraph is not supported
SPACE_TO_BATCH_ND              10         Tensor has unsupported rank (up to 3 innermost dimensions mapped)
RESIZE_BILINEAR                2          Image-interpolation layer won't run precisely enough on Edge TPU
MEAN                           1          More than one subgraph is not supported
ADD                            3          Mapped to Edge TPU
ADD                            17         More than one subgraph is not supported

Same issue with me..any update on this

Hi @vaibhav810 ,
Dilated DepthwiseConv2D now maps to TPU with compiler version 15.0.340273435.
Edge TPU Compiler version 15.0.340273435

Model compiled successfully in 579 ms.

Input model: /content/8a9fa4cc-4aa6-42b7-a58b-caf8f712f95b.tflite
Input size: 105.09KiB
Output model: 8a9fa4cc-4aa6-42b7-a58b-caf8f712f95b_edgetpu.tflite
Output size: 392.54KiB
On-chip memory used for caching model parameters: 98.00KiB
On-chip memory remaining for caching model parameters: 7.56MiB
Off-chip memory used for streaming uncached model parameters: 0.00B
Number of Edge TPU subgraphs: 1
Total number of operations: 4
Operation log: 8a9fa4cc-4aa6-42b7-a58b-caf8f712f95b_edgetpu.log

Operator                       Count      Status

CONV_2D                        1          Mapped to Edge TPU
QUANTIZE                       2          Mapped to Edge TPU
DEPTHWISE_CONV_2D              1          Mapped to Edge TPU

authors: Namburger vaibhav810 xadrianzetx


text:
Gtk-WARNING **: 02:43:47.869: cannot open display:

Running this command:
edgetpu_classify \

--source /dev/video1:YUY2:800x600:20/1
--model ${DEMO_FILES}/mobilenet_v2_1.0_224_quant_edgetpu.tflite \

As per this tutorial:
https://coral.ai/docs/dev-board/camera/#try-other-example-code
The server version works fine, but when I try to use my monitor... I get the above error.

is this on the dev board? Have you checked your USB camera config?
Also you may try restarting the weston service:
$ sudo systemctl restart weston

Thanks! This worked for me to get the server version running.

source: gharchive/issue

authors: Namburger Tylersuard strubell

repo: google-coral/examples-camera

license_type: permissive

license_source: bigquery


text:
Parameters

URL of codelab
In which task and step of the codelab can this issue be found?
Default Parameters
Describe the problem
The default parameters must be mentioned at last in the argument list.

Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

@lakshmi-f3
Thank you for reaching out to us.
In Kotlin that is just a guidance, not a recommended best practice.
https://kotlinlang.org/docs/functions.html#default-arguments

If a default parameter precedes a parameter with no default value, the default value can only be used by calling the function with named arguments

Hope this helps.

license_source: github-api


text:
Use function types and lambda expressions in Kotlin: Android Basics with Compose

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-function-types-and-lambda?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-2-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-function-types-and-lambda#5
In which task and step of the codelab can this issue be found?
6. Use the repeat() function, the last step
Describe the problem
Hello. I'm not sure if there's a problem, but I'm pretty confused.
On the last step of [6. Use the repeat() function] it's offered to move the call of the treatFunction() into the repeat() function's lambda expression:
repeat(4) {
treatFunction()
}
This will result in the following output:
5 quarters
Have a treat!
Have a treat!
Have a treat!
Have a treat!
No treats!             // the result of trickFunction() call, it's not interesting right now
At the same time one call of the treatFunction() results in the next output:
5 quarters
Have a treat!
Why only "Have a treat!" is repeated? Looks like 'extraTreat' lamda expression is lost after the 1st repeat() iteration. Why so?
Steps to reproduce?

Go to... Kotlin playground on the link: https://pl.kotl.in/2S46SnuP3
Click on... Run button in the top right corner
See error... The result is:
5 quarters
Have a treat!
Have a treat!
Have a treat!
Have a treat!
No treats!

My expectation the result is to be:
5 quarters
Have a treat!
5 quarters
Have a treat!
5 quarters
Have a treat!
5 quarters
Have a treat!
No treats!
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
Please follow the link on Kotlin playground: https://pl.kotl.in/2S46SnuP3

Sorry, I've seen that I duplicated the issue [#99] only after I'd posted mine.


text:
Empty release PR on release-please--branches--master is created

TL;DR
release-please-action creates release PR on release-please--branches--master branch, with an empty commit, with no description content.
Expected behavior
release-please--branches--master branch is not created, nor the release PR.
All changes are included in separate, individual release PRs so there is no need to create any additional PR.
Observed behavior
When using separate-pull-requests, monorepo-tags and node-workspace plugin in config:
{
  "bootstrap-sha": "4c0826e409e70c0e1babf60fe1266c7830edc600",
  "release-type": "node",
  "separate-pull-requests": true,
  "plugins": ["node-workspace"],
  "monorepo-tags": true,
  "pull-request-title-pattern": "chore(${component}): release ${version}",
  "packages": {...}
}

release-please-action creates release PR on release-please--branches--master branch, with an empty commit, with no description content and no labels.
Action YAML
on:
  push:
    branches:
      - master

permissions:
  contents: write
  pull-requests: write

name: release-please

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v3
        with:
          release-type: node
          package-name: release-please-action
          command: manifest
          monorepo-tags: true
          token: ${{ secrets. PERSONAL_ACCESS_TOKEN }}

Log output
Run google-github-actions/release-please-action@v3
❯ Fetching release-please-config.json from branch master
❯ Fetching .release-please-manifest.json from branch master
✔ Building releases
✔ Building strategies by path
❯ apps/docs: node
❯ apps/web: node
❯ packages/ui: node
❯ Fetching release-please-config.json from branch master
❯ Fetching .release-please-manifest.json from branch master
✔ Building pull requests
✔ Building strategies by path
❯ apps/docs: node
❯ apps/web: node
❯ packages/ui: node
❯ Fetching apps/docs/package.json from branch master
❯ Fetching apps/web/package.json from branch master
❯ Fetching packages/ui/package.json from branch master
✔ Collecting release commit SHAs
❯ release search depth: 400
❯ Fetching releases with cursor undefined
❯ Found release for path apps/web, web-v1.3.1
❯ Found release for path apps/docs, docs-panel-v1.4.0
❯ Found release for path packages/ui, ui-master-v1.4.0
❯ release for path: apps/web, version: 1.3.1, sha: d83ff80dc18776af3e33b7aae849cacd3d22ac07
❯ release for path: apps/docs, version: 1.4.0, sha: 3e1107a48913ed778e84b9126daa125989a02044
❯ release for path: packages/ui, version: 1.4.0, sha: 4b7c91416803ff150b3bbe8c97e318148dd969ad
✔ Collecting commits since all latest releases
❯ commit search depth: 500
❯ Set(3) {
  'd83ff80dc18776af3e33b7aae849cacd3d22ac07',
  '3e1107a48913ed778e84b9126daa125989a02044',
  '4b7c91416803ff150b3bbe8c97e318148dd969ad'
}
❯ Fetching merge commits on branch master with cursor: undefined
❯ Backfilling file list for commit: 5a69e3f6bac44ad5551b574d879bbdfbe66aca73
❯ Found 1 files
❯ Backfilling file list for commit: 4ffc70f60cd6d5dd90bc18fb8172f3ea06530aea
❯ Found 1 files
❯ Backfilling file list for commit: ec30c348c5a8d584fff2b997fe1c536cf4b8984a
❯ Found 1 files
❯ Backfilling file list for commit: 2ba67e5ae80f246e77ea41d916af9494cd4bd5d1
❯ Found 1 files
❯ Backfilling file list for commit: b35772e495e85a8ea6c97c4adfa2b4afb44d6229
❯ Found 1 files
❯ Backfilling file list for commit: e6cdb39615fe99b01a3aee37771387e38cf49ad8
❯ Found 1 files
❯ Backfilling file list for commit: b1b0609202c09615a6c8736027729dd00b54946d
❯ Found 1 files
❯ Backfilling file list for commit: e2787a772fe768c3460b5755afe132296602dcf4
❯ Found 1 files
❯ Backfilling file list for commit: 393aaacdd50ebbdfca0551bcf05e5c53c68f76d9
❯ Found 1 files
❯ Backfilling file list for commit: c4f05db9e687dc73c89defdd7a96f056f82fea9e
❯ Found 1 files
❯ Backfilling file list for commit: 9ff1c321b03c6cf4cf71deed57dbe683d4a5002b
❯ Found 1 files
❯ Backfilling file list for commit: 6016ebe8042354b49e713b2288ba8142470e9130
❯ Found 2 files
❯ Backfilling file list for commit: 281d60da443f60039b827bd89518ea8650816ec0
❯ Found 2 files
❯ Backfilling file list for commit: e29322524be50d857ebf29b3e08f244020e0e0e4
❯ Found 1 files
❯ Backfilling file list for commit: 3074eec5c089456e4eec0cb11dac98a5a88c2df3
❯ Found 1 files
❯ Backfilling file list for commit: 69b00b167ba05873043edc39c565114de037c564
❯ Found 1 files
❯ Backfilling file list for commit: 044077faddd8d90eb558dda0a2755cbf0466805e
❯ Found 2 files
❯ Backfilling file list for commit: 3d9f9ec95f81b2ff7041e16485131bc84453de3d
❯ Found 1 files
✔ Splitting 6 commits by path
✔ Building candidate release pull request for path: apps/docs
❯ type: node
❯ targetBranch: master
❯ commits: 2
✔ Considering: 2 commits
❯ component: docs-panel
❯ pull request title pattern: chore(${component}): release ${version}
⚠ pullRequestTitlePattern miss the part of '${scope}'
⚠ pullRequestTitlePattern miss the part of '${scope}'
✔ Building candidate release pull request for path: apps/web
❯ type: node
❯ targetBranch: master
❯ commits: 2
✔ Considering: 2 commits
❯ component: web
❯ pull request title pattern: chore(${component}): release ${version}
✔ Building candidate release pull request for path: packages/ui
❯ type: node
❯ targetBranch: master
⚠ pullRequestTitlePattern miss the part of '${scope}'
❯ commits: 2
✔ Considering: 2 commits
❯ component: ui-master
❯ pull request title pattern: chore(${component}): release ${version}
❯ running plugin: NodeWorkspace
✔ Running workspace plugin
✔ Found 3 in-scope releases
✔ Building list of all packages
❯ Found candidate pull request for path: apps/docs
❯ Fetching apps/docs/package.json from branch master
❯ Found candidate pull request for path: apps/web
❯ Fetching apps/web/package.json from branch master
❯ Found candidate pull request for path: packages/ui
❯ Fetching packages/ui/package.json from branch master
✔ Building dependency graph for 3 packages
✔ building graph order, existing package names: docs-panel,web,@workspace/ui-master
❯ visiting docs-panel, path:
❯ marking docs-panel as visited and adding docs-panel to order
❯ visiting web, path:
❯ marking web as visited and adding web to order
❯ visiting @workspace/ui-master, path:
✔ visiting docs-panel next
❯ visiting docs-panel, path: @workspace/ui-master
❯ [object Object] already visited
✔ visiting web next
❯ visiting web, path: @workspace/ui-master
❯ [object Object] already visited
❯ marking @workspace/ui-master as visited and adding @workspace/ui-master to order
✔ Updating 3 packages
❯ package: @workspace/ui-master
❯ version: 1.4.1 from release-please
❯ package: docs-panel
❯ version: 1.4.1 from release-please
❯ package: web
❯ version: 1.4.0 from release-please
✔ Updating exising candidate pull request for @workspace/ui-master, path: packages/ui
✔ Updating @workspace/ui-master to 1.4.1
✔ Updating exising candidate pull request for docs-panel, path: apps/docs
✔ Updating docs-panel to 1.4.1
✔ docs-panel.@workspace/ui-master updated to 1.4.1
✔ appending dependency notes to changelog
✔ appending dependency notes to changelog
✔ Updating exising candidate pull request for web, path: apps/web
✔ Updating web to 1.4.0
✔ web.@workspace/ui-master updated to 1.4.1
✔ appending dependency notes to changelog
✔ appending dependency notes to changelog
✔ Merging 3 in-scope candidates
✔ Merging 3 pull requests
⚠ pullRequestTitlePattern miss the part of '${scope}'
⚠ pullRequestTitlePattern miss the part of '${component}'
⚠ pullRequestTitlePattern miss the part of '${version}'
✔ Post-processing 4 in-scope candidates
✔ Looking for open release pull requests
✔ found 0 open release pull requests.
✔ Looking for snoozed release pull requests
✔ found 0 snoozed release pull requests.
❯ Fetching .release-please-manifest.json from branch master
❯ Fetching packages/ui/package-lock.json from branch master
❯ Fetching apps/docs/package-lock.json from branch master
❯ Fetching apps/web/package-lock.json from branch master
✔ Starting GitHub PR workflow...
⚠ file packages/ui/package-lock.json did not exist
⚠ file apps/docs/package-lock.json did not exist
❯ Fetching packages/ui/npm-shrinkwrap.json from branch master
⚠ file apps/web/package-lock.json did not exist
❯ Fetching apps/docs/npm-shrinkwrap.json from branch master
⚠ file packages/ui/npm-shrinkwrap.json did not exist
❯ Fetching apps/web/npm-shrinkwrap.json from branch master
⚠ file apps/docs/npm-shrinkwrap.json did not exist
❯ Fetching packages/ui/samples/package.json from branch master
⚠ file apps/web/npm-shrinkwrap.json did not exist
❯ Fetching apps/docs/samples/package.json from branch master
⚠ file packages/ui/samples/package.json did not exist
❯ Fetching apps/web/samples/package.json from branch master
⚠ file apps/docs/samples/package.json did not exist
❯ Fetching packages/ui/CHANGELOG.md from branch master
⚠ file apps/web/samples/package.json did not exist
❯ Fetching apps/docs/CHANGELOG.md from branch master
❯ Fetching apps/web/CHANGELOG.md from branch master
❯ Fetching apps/web/package.json from branch master
⚠ file changelog.json did not exist
❯ Fetching changelog.json from branch master
❯ Fetching .release-please-manifest.json from branch master
✔ Starting GitHub PR workflow...
✔ Successfully found branch HEAD sha "5a69e3f6bac44ad5551b574d879bbdfbe66aca73".
❯ Fetching apps/docs/package.json from branch master
❯ Fetching changelog.json from branch master
⚠ file changelog.json did not exist
❯ Fetching .release-please-manifest.json from branch master
✔ Starting GitHub PR workflow...
✔ Successfully found branch HEAD sha "5a69e3f6bac44ad5551b574d879bbdfbe66aca73".
✔ Skipping branch creation step...
✔ Skipping branch creation step...
✔ Got the latest commit tree
✔ Got the latest commit tree
❯ Fetching packages/ui/package.json from branch master
❯ Fetching changelog.json from branch master
⚠ file changelog.json did not exist
❯ Fetching .release-please-manifest.json from branch master
✔ Starting GitHub PR workflow...
✔ Successfully created a tree with the desired changes with SHA 673eb9ac7a667b41c819e2130fa333b2f23ddd2b
✔ Successfully created a tree with the desired changes with SHA 703c710601822d1e479d072d6c574e993b582e85
✔ Successfully found branch HEAD sha "5a69e3f6bac44ad5551b574d879bbdfbe66aca73".
✔ Skipping branch creation step...
✔ Successfully created commit. See commit at https://api.github.com/repos/alojzy231/release-please-playground/git/commits/dd1c824c1a3beeb43906a56659e2a7c3fc72edf2
✔ Updating reference heads/release-please--branches--master to dd1c824c1a3beeb43906a56659e2a7c3fc72edf2
✔ Successfully created commit. See commit at https://api.github.com/repos/alojzy231/release-please-playground/git/commits/d47e6998a3db79f1774cb41dbff767d85f833563
✔ Updating reference heads/release-please--branches--master--components--docs-panel to d47e6998a3db79f1774cb41dbff767d85f833563
✔ Got the latest commit tree
✔ Successfully updated reference release-please--branches--master to dd1c824c1a3beeb43906a56659e2a7c3fc72edf2
✔ Successfully created a tree with the desired changes with SHA b267afcf648d6616a933932d5253130bda4cf3f3
✔ Successfully updated reference release-please--branches--master--components--docs-panel to d47e6998a3db79f1774cb41dbff767d85f833563
✔ Successfully created commit. See commit at https://api.github.com/repos/alojzy231/release-please-playground/git/commits/20338541b49ac24438e8b4db8536290d91334f22
✔ Updating reference heads/release-please--branches--master--components--ui-master to 20338541b49ac24438e8b4db8536290d91334f22
✔ Successfully found branch HEAD sha "5a69e3f6bac44ad5551b574d879bbdfbe66aca73".
✔ Successfully updated reference release-please--branches--master--components--ui-master to 20338541b49ac24438e8b4db8536290d91334f22
✔ Skipping branch creation step...
✔ Got the latest commit tree
✔ Successfully created a tree with the desired changes with SHA ad7b4f10489b028f31b54d80649858feb21d39c5
✔ Successfully created commit. See commit at https://api.github.com/repos/alojzy231/release-please-playground/git/commits/ab9193c7fe10a7c43046a91c79a20a9c9c8d201d
✔ Updating reference heads/release-please--branches--master--components--web to ab9193c7fe10a7c43046a91c79a20a9c9c8d201d
✔ Successfully opened pull request available at url: https://api.github.com/repos/alojzy231/release-please-playground/pulls/17.
✔ Successfully opened pull request: 17.
✔ Successfully updated reference release-please--branches--master--components--web to ab9193c7fe10a7c43046a91c79a20a9c9c8d201d
✔ Successfully opened pull request available at url: https://api.github.com/repos/alojzy231/release-please-playground/pulls/18.
✔ Successfully opened pull request: 18.
✔ Successfully added labels autorelease: pending to issue: 17
✔ Successfully opened pull request available at url: https://api.github.com/repos/alojzy231/release-please-playground/pulls/19.
✔ Successfully opened pull request: 19.
✔ Successfully added labels autorelease: pending to issue: 18
✔ Successfully opened pull request available at url: https://api.github.com/repos/alojzy231/release-please-playground/pulls/20.
✔ Successfully opened pull request: 20.
✔ Successfully added labels autorelease: pending to issue: 20

Additional information
Edit:
Problem with an empty PR occurs when I make changes e.g. in package ui, in apps: web and docs which depend on the ui. Thanks to node-workspace plugin the update is detected in the dependant package of these apps and this change is assigned to 2 different PR in the descriptions:

so the change isn't in the grouped PR (chore: release master) and thus is empty.
When I changed the flow a little bit and pushed commits individually:

update in ui package
web
docs
"grouped PR" is created with listed dependency update:

I'd expect that the "grouped PR" isn't created but releases are created in separate PRs of the apps

Looks like it's same as https://github.com/googleapis/release-please/issues/1858

@shinebayar-g Thanks for catching this! This is probably the same problem but with different preconditions (steps to reproduce). I'll close this issue and look closely for answer in the issue you've mentioned


text:
Question about Table 2 in the paper

I have a question about the Multiplayer experiments you ran where you show the lack of transitivity (Table 2). What combination of reward function/RL algorithm did you use for these experiments? Assuming you used the "Scoring" reward function, does that indicate that different reward functions could lead to generalizability?

For such questions I'd recommend using google-research-football@google.com.
To answer your questions, for this experiment we have used OpenAI Baseline's PPO with checkpoint reward.
We have not performed this experiment with different rewards, so cannot be certain.
But my personal opinion, is that it will not generalize for other rewards too. The policy simply overfits to the opponent and as soon as you change the opponent the policy is likely to perform much worse.

repo: google-research/football


text:
[state_of_sparsity] How to get networks weights

Hi, I am trying to get weight values from the network. I am looking at get_sparsity and seem like tensor_name stays empty causing nnz to be 0.
I am using command line:
python checkpoint_sparsity.py --checkpoint /home/data/magnitude_pruning/model.ckpt-500000.index

Where /home/data/magnitude_pruning has extracted https://storage.googleapis.com/tsos/checkpoints/sparse_transformer/magnitude_pruning_0.5_100000_400000_10000_0.1_0.1.tar .
cc: @tgale96.

Okay seems like to v2, you need to pass "file prefix" of the checkpoint.
python checkpoint_sparsity.py --checkpoint /home/data/magnitude_pruning/model.ckpt-500000

repo: google-research/google-research


text:
make_credential_relying_party_entity: Remove icon check

The make_credential_relying_party_entity check requires that the authenticator supports the icon field in PublicKeyCredentialRpEntity.  This field has been removed in https://github.com/w3c/webauthn/pull/1337 so I think it should also be removed from the test suite.

CTAP 2.2 mentions this change:

NOTE: [WebAuthn-2] has removed the optional icon member. Authenticators MUST NOT error if the icon member is present, they MAY not store this value.

See the CTAP 2.2 draft: https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html
Therefore I suggest to leave the test in place?

I see, thanks for the info!  Feel free to close this issue.

authors: kaczmarczyck robin-nitrokey


text:
Update Docs and Sample to use new API for adding custom Navigators

To be merged once Nav 2.4.0 Alpha 10 is released :)
Fixes #744

Navigation 2.4.0-alpha10 is out now so I think you can update the dependency now.

Will do, thanks for the heads up! The snapshot was failing to resolve a dependency

The one test that failed was a Pager test, there shouldn't be any connection.

source: gharchive/pull-request

authors: ianhanniballake jossiwolf

repo: google/accompanist


text:
Test iojs support in Travis

Filed https://github.com/creationix/nvm/issues/815 for next-nightly support in nvm, but in the meantime it should be trivial to have a before_install that curls a suitable build from the iojs repo.

I'm not exactly sure what you are asking for? Can you add more context?

Reopen if clarification is provided.

Oops that's embarrassing, I filed that in the wrong project (was meant to go in dart-lang/dev_compiler).
Sorry for the noise!

authors: ChadKillingsworth concavelenz ochafik

repo: google/closure-compiler


text:
JSC_NEGATING_A_NON_NUMBER_ERROR not reported consistantly

This issue was imported from Closure Compiler's previous home at http://closure-compiler.googlecode.com
The original discussion is archived at:
http://blickly.github.io/closure-compiler-issues/#1158

-new Array(2, String);

is incorrectly folded to
-[2, String];

while
-new Array(2, 'String');

is correctly folded to
NaN


text:
bad case

before: new/ /.constructor
after: new / /.constructor

Could you give more details?

compiled size is 1byte larger.

I'm closing this issue. We need a FULL repo case and a complete description of the problem.
If such details are posted, you are free to reopen the issue.


text:
Rename code splitting flags from "module" to "chunk"

To avoid confusion with proper JS modules, rename the code splitting flags to use the name "chunk". Adds aliases for the old flag names for backwards compatibility.

Nice, I like it!

authors: ChadKillingsworth blickly


text:
Add [Symbol.dispose] alias to Disposable class

With explicit resource management being added to the language in the near future (supported in TypeScript 5.2), it would be nice to be able to use the using keyword with closure-library Disposables.
I think this would be as simple as this change:
if (typeof Symbol === 'function' && typeof Symbol.dispose === 'symbol') {
  goog.Disposable.prototype[Symbol.dispose] = goog.Disposable.prototype.dispose;
}

I can make this change (with some actual comments) if no one objects.

While the general ideas are related, it's not clear to me that (in practice) this would actually help much.  In particular, goog.Disposable objects tend to live for a medium-to-long amount of time, typically bounded by a "parent object"'s lifetime, which is a pretty different paradigm than a function scope.  Given that, I don't see how linking these things would be useful.
Can you provide some more concrete use cases in the context of an actual application that would benefit from this?

Sure, and yeah we have a lot of Disposables that live a long time.
The most obvious case is our unit tests:
it('should do stuff', () => {
    using injector = createInjector();
    const item = injector.get(UnitUnderTest);
   // test
});

vs.
it('should do stuff', () => {
    const injector = createInjector();
    const item = injector.get(UnitUnderTest);
    // test

    injector.dispose();
});

It would also be convenient in occasional functions that create short lived versions of classes that are disposable, just to do some processing, get a result, and return the result.
function f() {
    using someDisposable = new SomeDisposable();
    return someDisposable.someComputation();

vs.
function f() {
    const someDisposable = new SomeDisposable();
    const result = someDisposable.someComputation();
    someDisposable.dispose();
    return result;

Neither of these cases actually need the try {} finally {} behavior, as exceptions are rare and leaks aren't catastrophic, but having it certainly wouldn't harm anything.

Thanks for those use cases.  Presumably Closure Compiler will want to transpile using syntax, so it will likely be polyfilling Symbol.dispose, which we'd want to somehow piggyback on.  Given the coordination requirements, we need to do a bit of designing internally, but we'll be looking into it this next quarter or so.

While the general ideas are related, it's not clear to me that (in practice) this would actually help much. In particular, goog.Disposable objects tend to live for a medium-to-long amount of time, typically bounded by a "parent object"'s lifetime, which is a pretty different paradigm than a function scope. Given that, I don't see how linking these things would be useful.

I've been using standard disposables with using syntax lately, and they're quite useful for this case, but it took me a bit to wrap my head around this use case. DisposableStack, and its move method is key.
The first examples you see are pretty trivial, looking like:
async function getAnswer() {
  using eventSource = constructEventSource();
  using handler = new SourceHandler(eventSource);
  return handler.getAnswer();
} // `using` syntax means we can count on handler and eventSource to be disposed of, even if the function throws

But with DisposableStack, you can reliably make objects that compose other disposables:
class Answerer {
  constructor() {
    using localDisposables = new DisposableStack();
    const eventSource = localDisposables.use(constructEventSource());
    const handler = localDisposables.use(new SourceHandler(eventSource);
    this.handler = handler;
    // Here's the key point: we're moving the block-scoped disposables into
    // this.disposables. After the move, localDisposables is empty and already
    // disposed, and the returned Answerer is now responsible for eventSource
    // and handler, and they'll be disposed when it is.
    //
    // But if the constructor throws an error, all the resources it created before
    // it threw will still be disposed of, because they're tracked by localDisposables
    // which owns them up until the end of the constructor.
    this.disposables = localDisposables.move();
  }

  [Symbol.dispose]() {
    this.disposables[Symbol.dispose]();
  }
}

I think the change should be something more like:
if (typeof Symbol?.dispose === 'symbol') {
  goog.Disposable.prototype[Symbol.dispose] = function() {
    this.dispose();
  };
}

That way, if a subclass overrides dispose, then Symbol.dispose will still behave the same as dispose.

This issue is being closed as a preparation step before archiving the repository.  See the README for more detail.

authors: DavidANeil rictic shicks

repo: google/closure-library


text:
Remove goog.userAgent.X11 constant

This issue was imported from Closure Library's previous home at http://closure-library.googlecode.com
The link to the original issue is:
https://code.google.com/p/closure-library/issues/detail?id=86

Awesome, the original issue on Google Code redirects to this issue; which means the text is gone.

The work, as given by the title, can likely be handled as part of #1061
The link to the original issue no longer works.

Closing this in favour of #1061 - we will address UserAgent changes all at once there.

authors: 12wrigja mbeijen nanaze vipref


text:
Missing error message

Shared Program: https://code.world/#PYunr6ynMDzkL-PsFOvuX3g
Description
The error message isn't shown; instead, there's just a blank red screen.
Strangely, the error message is shown in continuous highlighting, just not the message area.

The plot thickens...
Here's the message sent by the compiler:
program.hs:1:1: error:
    • Couldn't match expected type Program with actual type Picture
    • In the expression: program
      When checking the type of the variable program
panic! (the 'impossible' happened)
  (GHCJS version 0.2.1, GHC version 8.0.2):
	corePrepPgm
  [False] cobox_r3KD = typeError
                         @ 'VoidRep
                         @ (Picture :: *) ~# (IO Any :: *)
                         "program.hs:1:1: error:\n\
                         \    \\226\\128\\162 Couldn't match expected type \\226\\128\\152Program\\226\\128\\153 with actual type \\226\\128\\152Picture\\226\\128\\153\n\
                         \    \\226\\128\\162 In the expression: program\n\
                         \      When checking the type of the variable \\226\\128\\152program\\226\\128\\153\n\
                         \(deferred type error)"#

Please report this as a GHCJS bug:  https://github.com/ghcjs/ghcjs/issues

The panic happens during code generation, which explains why it doesn't come up during continuous error highlighting (which is implemented with -fno-code).
Two problems:

The GHC panic is mangled by error message processing "Please report this as a GHCJS bug" is not associated with the panic, but the panic is associated with the preceeding error.

The existence of the string "(deferred type error)" in the GHC panic message, even though it only occurs as part of

Minimal example so far:
$ ghcjs -Wdeferred-type-errors -fdefer-type-errors -hide-package base -package codeworld-base -XRebindableSyntax -XImplicitPrelude -main-is Main.program Test.hs
[1 of 1] Compiling Main             ( Test.hs, Test.js_o )

Test.hs:1:1: warning: [-Wdeferred-type-errors]
    • Couldn't match expected type ‘IO t0’ with actual type ‘Number’
    • In the expression: program
      When checking the type of the main IO action ‘program’
panic! (the 'impossible' happened)
  (GHCJS version 0.2.1, GHC version 8.0.2):
	corePrepPgm
  [False] cobox_r2IU = typeError
                         @ 'VoidRep
                         @ (Number :: *) ~# (IO Any :: *)
                         "Test.hs:1:1: error:\n\
                         \    \\226\\128\\162 Couldn't match expected type \\226\\128\\152IO t0\\226\\128\\153
with actual type \\226\\128\\152Number\\226\\128\\153\n\
                         \    \\226\\128\\162 In the expression: program\n\
                         \      When checking the type of the main IO action
\\226\\128\\152program\\226\\128\\153\n\
                         \(deferred type error)"#

Please report this as a GHCJS bug:  https://github.com/ghcjs/ghcjs/issues

$ cat Test.hs
program = 5

The underlying problem looks like https://ghc.haskell.org/trac/ghc/ticket/13292 and would be fixed by upgrading GHCJS to 8.6.  I plan to do so this summer.
In the interim, one thing we can do is clean up the error message processing to actually surface this error message, by gathering everything after a GHC panic and turning it into a single message.  (We likely want to show something friendlier in place of the ghc panic, though.)

Latest changes to fix other deferred-error problems have "fixed" the problem, leaving a situation where the GHC panic is still reported, but it isn't swallowed.  That's arguably a little better... but makes it more important to clean up the GHC panic, too.

Fixed by GHCJS 8.6 upgrade.

repo: google/codeworld


text:
Uninstalling fusion without stopping it results in unexpected error message

If you don't stop the Fusion service and run ./uninstall_fusion.sh, you get an error message starting with:
mkdir: missing operand
Try 'mkdir --help' for more information.
./uninstall_fusion.sh: line 472: $UNINSTALL_LOG: ambiguous redirect

Later the message informs you that you should stop fusion before uninstalling.  However, the spurious error messages should be eliminated to prevent confusion.

Closed via PR #565

repo: google/earthenterprise


text:
Upgrading beacon to Eddystone

Hello, is it possible to flash a generic beacon to Eddystone firmware and control the frames with app/software?

Generally the "transmit these bytes" instructions are carried out in firmware on the beacon and can't be controlled in real-time via software. Many beacon manufacturers have updated their provisioning applications to allow their devices to broadcast Eddystone frames. For generic beacons (maybe you mean raw BLE chips? or Arduino/R-Pi sets?) you'll need to set the bytes to Tx manually since there's no generic provisioning app (or not that I'm aware of).

authors: mashbridge nicholasalevras

repo: google/eddystone


text:
Minimize exposure of JDK internals

Have you considered adopting a module declaration?
It would allow minimizing the exposure of JDK internals to errorprone, which would surface any abuse of these internals by other third-party libraries/annotation processors.
--add-exports jdk.compiler/com.sun.tools.javac.api=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.file=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.main=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.model=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.parser=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.processing=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.tree=com.google.errorprone
--add-exports jdk.compiler/com.sun.tools.javac.util=com.google.errorprone
--add-opens jdk.compiler/com.sun.tools.javac.code=com.google.errorprone
--add-opens jdk.compiler/com.sun.tools.javac.comp=com.google.errorprone

It seems like the right thing to do eventually, I don't have specific plans on this front.
A couple of notes:

I think there are some split package issues between the jars, the modularized jar wouldn't map 1:1 to the current jars
The installation instructions would change to use --processor-module-path, with similar changes to the build system integrations

authors: cushon delanym

repo: google/error-prone


text:
Add standalone (and backport) JSR-310 library as immutable.

The listed types are equivalent to those in java.time.*.

Thanks @JakeWharton!

authors: JakeWharton eaftan


text:
Support direct output to BigQuery

Currently, if users want to export their FHIR resources to BigQuery, they should either export to a GCP FHIR-store first OR create the Parquet files and manually import them through BigQuery tools. We should support direct output to BigQuery in our pipelines.
A related issue is #454

Just to follow up - direct output to BigQuery is a lower priority given two reasons:

If you're outputing to BigQuery, then likely you can use GCP FHIR Store, and leverage HC API to facilitate the export.
It seems like generating parquet from the FHIR-data-pipes can be loaded into GCP, so there is a workaround to getting this into GCP without adding a direct integration.

repo: google/fhir-data-pipes


text:
Fix texture swizzling crash with older Nvidia GPUs

Not all GPUs support texture swizzling on Metal. Fixes #3754

I had forgotten that NVIDIA macs actually exist!

authors: bejado prideout

repo: google/filament


text:
Feature requet: Add Keras-like API to flax.training

Keras makes it easy to train models without much boilerplate code. It would be nice to have a similar API under flax.training. Example (based on compile and fit):
def fit(
    model: nn.Module,
    optimizer: optax.GradientTransformation,
    loss: typing.Callable,
    metrics: typing.Sequence[typing.Callable],
    x,
    y,
    batch_size: int = 1,
    epochs: int = 1,
    validation_split: float = 0,
    ...
) -> dict:
    ...

history = fit(model, optax.sgd(1e-3), optax.squared_error, ...)

This saves users the trouble of writing a full training loop themselves or importing an extra library. This could be very convenient for most use cases. Thoughts?

We intentionally don't try to provide full training-loop functionality in flax.  It's out of scope as the number of design choices and opinions becomes quickly exponential as one considers different kinds of models and training tasks.
Instead we refer people to open libraries like scenic, bigvision or maxtext for full-fledged examples, or for simpler cases our own flax examples.
I'm closing this for now (but feel free to reopen).

.

@carlosgmartin I tried writing a simplistic trainer for flax. check this out.

authors: NITHISHM2410 carlosgmartin levskaya

repo: google/flax


text:
Failed to render (truly) enormous svg file

Feel free to close if this is out of scope, but I have a large (15MB) PDF file that I am trying to view, and I attempted to use forma to do it. I converted it to svg using mutool (preserving text as text), and the result was a 189 MB SVG file.
cargo run --release -p demo -- svg huge_file.svg
caused my fans to kick in and a black box to appear, but no render output. I was able to run the spaceship demo without issues before (on a 2019 MBP 16" with an AMD Radeon Pro 5300M GPU (as well as integrated graphics)).
Happy to attach a profiler if that helps you in any way! Unfortunately I can't share the PDF or SVG file directly (it is secured), but if rendering gigantic SVGs is a goal of the project, I'd like to help.

The SVG parser/renderer is in no way complete, but it would be interesting to see where this fails. forma itself should at least fail gracefully if there's too much content for it to deal with.
I presume that forma doesn't actually finish rendering anything and hang somewhere inside of that function?

I was able to reproduce similar behaviour on my Windows machine, NVIDIA GeForce RTX 3060 GPU, with this svg of a map. The window looks like this:

This issue also appears to be resolved by migrating to usvg.

authors: dragostis imor rachtsingh yisibl

repo: google/forma


text:
Can I only adjust 4 elements of safety settings for now?

According to the official documentation, the type HarmCategory says These categories cover various kinds of harms that developers may wish to adjust. and it enumerates 11 categories like below.

https://pkg.go.dev/github.com/google/generative-ai-go/genai#HarmCategory
https://github.com/google/generative-ai-go/blob/v0.5.0/genai/generativelanguagepb_veneer.gen.go#L500

// HarmCategory specifies the category of a rating.
//
// These categories cover various kinds of harms that developers
// may wish to adjust.
type HarmCategory int32

const (
	// HarmCategoryUnspecified means category is unspecified.
	HarmCategoryUnspecified HarmCategory = 0
	// HarmCategoryDerogatory means negative or harmful comments targeting identity and/or protected attribute.
	HarmCategoryDerogatory HarmCategory = 1
	// HarmCategoryToxicity means content that is rude, disrepspectful, or profane.
	HarmCategoryToxicity HarmCategory = 2
	// HarmCategoryViolence means describes scenarios depictng violence against an individual or group, or
	// general descriptions of gore.
	HarmCategoryViolence HarmCategory = 3
	// HarmCategorySexual means contains references to sexual acts or other lewd content.
	HarmCategorySexual HarmCategory = 4
	// HarmCategoryMedical means promotes unchecked medical advice.
	HarmCategoryMedical HarmCategory = 5
	// HarmCategoryDangerous means dangerous content that promotes, facilitates, or encourages harmful acts.
	HarmCategoryDangerous HarmCategory = 6
	// HarmCategoryHarassment means harasment content.
	HarmCategoryHarassment HarmCategory = 7
	// HarmCategoryHateSpeech means hate speech and content.
	HarmCategoryHateSpeech HarmCategory = 8
	// HarmCategorySexuallyExplicit means sexually explicit content.
	HarmCategorySexuallyExplicit HarmCategory = 9
	// HarmCategoryDangerousContent means dangerous content.
	HarmCategoryDangerousContent HarmCategory = 10
)

However, currently, I can only adjust 4 parameters among them as below, not corresponding to the annotation in the source code or an explanation of the SDK document, and I receive a 400 error if I add more adjustments for other defined categories in HarmCategory int32 like genai.HarmCategoryMedical. Can I get some explanation or advice about this? I wonder if I misunderstood about this feature.
model.SafetySettings = []*genai.SafetySetting{
		{
			Category:  genai.HarmCategoryDangerousContent,
			Threshold: genai.HarmBlockNone,
		},
		{
			Category:  genai.HarmCategoryHarassment,
			Threshold: genai.HarmBlockNone,
		},
		{
			Category:  genai.HarmCategoryHateSpeech,
			Threshold: genai.HarmBlockNone,
		},
		{
			Category:  genai.HarmCategorySexuallyExplicit,
			Threshold: genai.HarmBlockNone,
		},
	}

Thanks is advance!

Sorry for the late reply; yes, this sounds right. We'll be working on exposing additional adjustments. Which ones are you particularly interested in?

Well, I was just curious about the difference and the real code. I just wanted to turn everything on and off, just out of my curiosity... but currently I'm not working with Google's Gemini API in Go langauge.

We are encountering the same problem and, so far, we have only been able to set up 4 out of 11 safe settings.

authors: KnightChaser eliben jianwen-wang

repo: google/generative-ai-go


text:
Can't create workflow dispatch event by filename

Noticed that, GitHub API docs: Create a workflow dispatch event, let's you create dispatch event by both workflowID and Filename.
However, PR #1623  adds support for just workflowID, with CreateWorkflowDispatchEvent.
Can we split it into two funcs for each type, as that's the general implementation in other APIs?

Excellent catch, @n1lesh  - thank you!  Yes, that would be consistent and generally useful.
Let's do that, please.

This will be a breaking API change, but I think we should do it, so I've labeled it as such.

repo: google/go-github


text:
Fatal error: Class 'Google_Cache_File' not found

Fatal error: Class 'Google_Cache_File' not found in ~/google-api-php-client-master/src/Google/Client.php on line 641
Happens right after initiating the autoloader:
require_once 'path/to/google-api-php-client-master/src/Google/autoload.php';
Using the example code for HelloAnalytics found on https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-php
Using the master as of todays date 2015-09-16.

I downloaded the file, cloned the repo, and the Google_Cache_File class was picked up by the autoloader just fine.
Is it possible you've accidentally renamed that file or the class inside it?

No Sir. Uploaded as is. The file File.php is in it's Cache folder untouched. I will do some more debugging tomorrow what's going on inside the autoloader. I wil also checkout a new build. Stay tuned.

Invalid issue ticket. The FTP software skipped transfering folders named cache/.

How smart of it to do that :P
On Thu, Sep 17, 2015 at 5:04 AM T. Almroth notifications@github.com wrote:

Closed #676 https://github.com/google/google-api-php-client/issues/676.
—
Reply to this email directly or view it on GitHub
https://github.com/google/google-api-php-client/issues/676#event-412018187
.

This is one of those times when something very smart out of one aspect is not the brightest idea out of another. :~ A big apreciation for the fast replies. I am back on track and it's all rolling fine.

authors: bshaffer timint

repo: google/google-api-php-client


text:
Fix typo of api names yaml

It seems the beginning of quotation was forgotten at line 346 of api_names.yml. Sorry for the small pull request.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

Coverage remained the same at 94.807% when pulling 6ff1a1985684b46c4ca67ad366f0c4f5c9f6b17d on kohei12:20170101/fix_typo_of_api_names_yaml into 04e249b9f2d99f327fb1254a56335d3c168cbf03 on google:master.

repo: google/google-api-ruby-client


text:
In the Dataset tutorial, the conversion of MapDataset to IterDataset is not quite clear

The infromation in tutorial next:
Any MapDataset can be turned into a IterDataset by calling to_iter_dataset. When possible this should happen late in the pipeline since it will restrict the transformations that can come after it (e.g. global shuffle must come before). This conversion by default skips None elements.
But calling map_dataset.to_iter_dataset() converts it to PrefetchIterDataset class. What the problem? This class is not iterable. Also we can't get state from it. So it's not easy to understand why you mentioned it that way, and why it wasn't used in the tutorial at all.
Example for reproduction:
# !pip install -q jax-ai-stack[grain]==2024.11.1
import chex
import grain.python as pygrain

class Source(pygrain.RandomAccessDataSource):
    def __init__(self, x:chex.Array, y:chex.Array) -> None:
        assert (len(x) == len(y)), "must be the same length"
        self.x = x
        self.y = y

    def __len__(self) -> int:
        return len(x)

    def __getitem__(self, idx: int) -> tuple[chex.Array]:
        return self.x[idx], self.y[idx]

x = range(10)
y = [0]*5 + [1]*5
data_source = Source(x, y)

dataset = (
    pygrain.MapDataset.source(data_source)
    .shuffle(seed=seed)
    .map(lambda x: x)
    .batch(batch_size=5)
)
# from tutorila, works fine
iter_dataset = iter(dataset)
print(iter_dataset.get_state())
print(next(iter_dataset))

# creates PrefetchIterDataset with to_iter_dataset()
iter_dataset2 = dataset.to_iter_dataset()
print(type(iter_dataset2))

# AttributeError: 'PrefetchIterDataset' object has no attribute 'get_state'
print(iter_dataset2.get_state())
# TypeError: 'PrefetchIterDataset' object is not an iterator
print(next(iter_dataset2))

# works fine
iter_dataset2 = iter(iter_dataset2)
print(iter_dataset2.get_state())
print(next(iter_dataset2))

PrefetchIterDataset is an instance of IterDataset that is an Iterable. Note that Iterable and Iterator are different things. Iterable only has to implement __iter__ that will return an Iterator. Iterator implements __next__ and grain's DatasetIterator additionally implements get/set_state. So for iter_dataset2 you are missing iter(iter_dataset) call to produce an iterator that you're expecting.

repo: google/grain


text:
[Add/edit observation] Colors incorrect after Material update

From @shobhitagarwal1612:

This low priority but it irks me so I'll try to get this done in MVP Sprint 3, time permitting.

Is this issue still open? May I work on it? Can someone help me as I am new to open source contribution.

Obsolete as of #1146.

authors: gino-m pree-T

repo: google/ground-android


text:
Add x86 benchmark pipeline

This adds the x86 benchmark pipeline. It is basically copied from the current Android pipeline and the label buildkite:benchmark-x86 will trigger it. The benchmark result is post separately from the Android one.
We expect to unify the Android and x86 benchmark pipeline in the following construction of the new pipelines. Right now it "just" works to improve the x86 performance tracking.

The script currently doesn't upload the results to the dashboard. Will add once we agree on the benchmark names.

A few comments regarding the benchmark series name:

@ GCP-c2-standard-16(Intel(R) Xeon(R) CPU @ 3.10GHz) (CPU-x86\_64-CascadeLake)

Not sure we still need the (Intel(R) Xeon(R) CPU @ 3.10GHz) part. x86_64-CascadeLake already signals that this is Intel architectures. (Intel(R) Xeon(R) CPU @ 3.10GHz) is just redundant information here. CodeGen cares about microarhictures, not really specific SKUs.
Can we remove the strange \ character inside x86_64?

This adds the x86 benchmark pipeline. It is basically copied from the current Android pipeline and the label buildkite:benchmark-x86 will trigger it. The benchmark result is post separately from the Android one.

Rename buildkite:benchmark-x86 as buildkite:benchmark-amd64? amd64 is the synonym of x86_64; while x86 is not.
With buildkite:benchmark-x86, we'd need to rename and separate the current buildkite:benchmark into buildkite:benhmark-arm64 and buildkite:benchmark-mobile-gpu. Can do it later though.

This adds the x86 benchmark pipeline. It is basically copied from the current Android pipeline and the label buildkite:benchmark-x86 will trigger it. The benchmark result is post separately from the Android one.

Rename buildkite:benchmark-x86 as buildkite:benchmark-amd64? amd64 is the synonym of x86_64; while x86 is not.
With buildkite:benchmark-x86, we'd need to rename and separate the current buildkite:benchmark into buildkite:benhmark-arm64 and buildkite:benchmark-mobile-gpu. Can do it later though.

Please match what we use in the compiler/runtime instead of choosing bespoke names - x86_64 is the canonical name and matches what clang/the android ndk/etc uses as well.

A few comments regarding the benchmark series name:

@ GCP-c2-standard-16(Intel(R) Xeon(R) CPU @ 3.10GHz) (CPU-x86_64-CascadeLake)

Not sure we still need the (Intel(R) Xeon(R) CPU @ 3.10GHz) part. x86_64-CascadeLake already signals that this is Intel architectures. (Intel(R) Xeon(R) CPU @ 3.10GHz) is just redundant information here. CodeGen cares about microarhictures, not really specific SKUs.
Can we remove the strange \ character inside x86_64?

Agree on the series name, removed the CPU model part.
The strange \ is an issue in markdown_strings library and it doesn't affect the hyperlink and the series name. I think we can fix it later.

This adds the x86 benchmark pipeline. It is basically copied from the current Android pipeline and the label buildkite:benchmark-x86 will trigger it. The benchmark result is post separately from the Android one.

Rename buildkite:benchmark-x86 as buildkite:benchmark-amd64? amd64 is the synonym of x86_64; while x86 is not.
With buildkite:benchmark-x86, we'd need to rename and separate the current buildkite:benchmark into buildkite:benhmark-arm64 and buildkite:benchmark-mobile-gpu. Can do it later though.

Please match what we use in the compiler/runtime instead of choosing bespoke names - x86_64 is the canonical name and matches what clang/the android ndk/etc uses as well.

I also prefer to use x86_64, make it consistent with other names. Besides that, I decide to rename all x86 and x86-64 to x86_64, make it a single name for x86_64.

SG. I don't have strong opinions there; so either x86_64 or amd64 works for me. Just not x86, which is different from x86_64. :)

The results with new series name have been posted.

Added the task to push results to the dashboard. Will merge once everything passes.

authors: antiagainst benvanik pzread

repo: google/iree


text:
Updated validations.py python script.

Fixed the behavior of validate_user function in validations.py
Closes #1
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

@googlebot I signed it!

repo: google/it-cert-automation-practice


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

This is an example pull request as part of a coursera course.


text:
Closes #1

Clarified 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

Huh


text:
Updated validations.py python script.

Fixed the behavior of validate_user function in validations.py.
Closes: #1
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

@googlebot I signed it!

CLAs look good, thanks!
ℹ Googlers: Go here for more info.

I can't able to open that link. Showing me "Access not possible."


text:
lax.conv_transpose has different convention than TF, document it and make switching easy?

See screenshot:

Though the example uses Haiku, Haiku is just calling through to lax.conv_transpose.
The difference is in reversing the spatial axes of the kernel.
We can do at least two things to make this less surprising and more easily fixable:

document the difference, and
add an argument to lax.conv_transpose to instead use the TF convention.

Hi @mattjj,
I was looking at this issue and found this documentation on line 293 of jax/_src/lax/convolution.py:

transpose_kernel: if True flips spatial axes and swaps the input/output
  channel axes of the kernel. This makes the output of this function identical
  to the gradient-derived functions like keras.layers.Conv2DTranspose
  applied to the same kernel. For typical use in neural nets this is completely
  pointless and just makes input/output channel specification confusing.

Any chance 2 has been implemented already? I agree the documentation could be more conspicuous.
Thank you!

@mattjj Hi, I find it as good first issue. I want to contribute this repo for the my first github contribution. Do u have something I can help?

Hi @mattjj I have taken a look at this issue regarding the difference in reversing the spatial axes of the kernel between Haiku's call and lax.conv_transpose. I understand the potential sources of confusion and believe that the proposed solutions, both documenting the difference and adding an argument for the TF convention, are valuable.
I'm eager to contribute and work on this issue.

authors: MaanasArora NaokiDohi alhridoy mattjj

repo: google/jax


text:
Using ir.F64Type() for hlo.CustomCallOp's out_type

Description
Hi!
I have been trying to bind my c++ method into a jax primitive. The C++ backend essentially takes in an array and outputs a double. I was unable to make it work with specifying the out_type as ir.F64Type() which is what I would expect the type to be if my c++ backend function returns a double. What I ended up with is the following code below:
from functools import partial
import sys
import numpy as np

import jax
import jax.numpy as jnp
import jax._src.test_util as jtu

from pyleftfield import pylefty, Registrations

from jax import core, dtypes
from jax.interpreters import xla, mlir
from jax.lib import xla_client

from jax.interpreters.mlir import ir
from jaxlib.hlo_helpers import custom_call
from jax.abstract_arrays import ShapedArray

#-------------------------------------------------
# Inspired from:
#   https://github.com/dfm/extending-jax/
#   https://jax.readthedocs.io/en/latest/Custom_Operation_for_GPUs.html
#-------------------------------------------------

__all__ = ["pylefty_ll"]

# Register functions defined in pylefty as custom call target for CPUs
for _name, _value in Registrations().items():
        xla_client.register_custom_call_target(_name, _value, platform="cpu")

# This function exposes the primitive to user code and this is the only
# public-facing function in this module
def pylefty_ll(shat):
    return _pylefty_ll_prim.bind(shat)

_pylefty_ll_fwd_p = core.Primitive("pylefty_ll_fwd")
_pylefty_ll_fwd_p.multiple_results = False
_pylefty_ll_fwd_p.def_impl(partial(xla.apply_primitive, _pylefty_ll_fwd_p))

def pylefty_ll_fwd(shat):
    output, invvar = _pylefty_ll_prim.bind(shat)
    return output

# ctx -- mlir context
# shat -- JAX primitive argument
def _pylefty_ll_fwd_lowering(ctx, shat):

    shat_aval = ctx.avals_in[0] # only one argument here
    np_dtype = np.dtype(shat_aval.dtype)

    # Check the type is np.float64, since we're working only with that!
    assert np_dtype == np.float64

    shat_type = ir.RankedTensorType(shat.type)
    shat_shape = shat_type.shape

    layout = tuple(range(len(shat_shape)-1,-1,-1))

    out = custom_call(
        b"pylefty_ll_forward_f64",
        # Output of the XLACPU_EFTlikelihood call is just double
        out_types=[ir.RankedTensorType.get((), ir.F64Type.get())],
        # Inputs of the XLACPU_EFTlikelihood
        operands=[shat],
        # Layout specification
        operand_layouts=[layout],
        # Result is just a number!
        result_layouts=[()]
    )

    return (out,)

def _pylefty_ll_fwd_abstract(shat):
    shat_dtype = dtypes.canonicalize_dtype(shat.dtype)
    assert shat_dtype == jnp.dtype(np.float64)
    return ShapedArray((), jnp.dtype(np.float64))

_pylefty_ll_prim = core.Primitive("pylefty_ll")
_pylefty_ll_prim.multiple_results = False
_pylefty_ll_prim.def_impl(partial(xla.apply_primitive, _pylefty_ll_prim))
_pylefty_ll_prim.def_abstract_eval(_pylefty_ll_fwd_abstract)

mlir.register_lowering(
    _pylefty_ll_prim,
    _pylefty_ll_fwd_lowering,
    platform="cpu"
)

So I ended up used the RankedTensorType, since if I replace the line:
 out_types=[ir.RankedTensorType.get((), ir.F64Type.get())],

with
 out_types=[ir.F64Type.get())],

I get that mlir doesn't recognize the type, i.e. the error I obtain is
'stablehlo.custom_call' op result #0 must be tensor of f8E4M3FN type or f8E5M2 type or 16-bit float or 32-bit float or 64-bit float or bfloat16 type or pred (AKA boolean or 1-bit integer) or 4/8/16/32/64-bit signless integer or 4/8/16/32/64-bit unsigned integer or complex type with 32-bit float or 64-bit float elements or 4/8/16/32-bit uniform quantized signed integer or 4/8/16/32-bit uniform quantized unsigned integer values or token or nested tuple with any combination of tensor of f8E4M3FN type or f8E5M2 type or 16-bit float or 32-bit float or 64-bit float or bfloat16 type or pred (AKA boolean or 1-bit integer) or 4/8/16/32/64-bit signless integer or 4/8/16/32/64-bit unsigned integer or complex type with 32-bit float or 64-bit float elements or 4/8/16/32-bit uniform quantized signed integer or 4/8/16/32-bit uniform quantized unsigned integer values or token values, but got 'f64'

I don't understand why f64 is not accepted as a viable type?
What jax/jaxlib version are you using?
jax v0.4.8,  jaxlib v0.4.7
Which accelerator(s) are you using?
CPU
Additional system info
python3.9, x86_64 GNU/Linux
NVIDIA GPU info
No response

This is an stablehlo MLIR dialect issue, not a JAX issue, but I believe they simply only allow RankedTensor types as inputs or outputs to most operators. If you want a scalar, you need to wrap it a RankedTensor.

Thanks for answering!

This is an stablehlo MLIR dialect issue, not a JAX issue, but I believe they simply only allow RankedTensor types as inputs or outputs to most operators. If you want a scalar, you need to wrap it a RankedTensor.

Yes I guess it is more of a MLIR dialect issue than pure JAX issue, I hoped I could try to better understand what MLIR really wants through posting this issue. Where can I find more on exact objects defined within the mlir dialect and their attributes? I am not sure what is the correct material to read, so I usually play with the debugger and try to guess what objects are needed, so it would be nice to properly read up on what exactly is happening under the hood when doing the MLIR lowering.

authors: Cosmicstring hawkinsp


text:
Inaccurate output when converting bool array to bfloat16

Description
import jax
import numpy as np

np.random.seed(42)

x = (np.random.rand(2, 2048) * 1024).astype(np.int32)
x = jax.numpy.asarray(x)
print(x)

print(x > 100)
print(jnp.sum((x > 100).astype(jax.numpy.int32), -1, keepdims=True))
print(jnp.sum((x > 100).astype(jax.numpy.bfloat16), -1, keepdims=True))

Outputs:
[[383 973 749 ... 740  69 724]
 [556  83 469 ... 951 339 476]]
[[ True  True  True ...  True False  True]
 [ True False  True ...  True  True  True]]
[[1828]
 [1837]]
[[1824]
 [1840]]

Note the difference in the sum!
What jax/jaxlib version are you using?
No response
Which accelerator(s) are you using?
No response
Additional system info
No response
NVIDIA GPU info
No response

You closed this so you've probably figured it out, but in case others stumble across this: the reason for this is that bfloat16 is incapable of representing the correct output in this case. For example:
>>> from ml_dtypes import bfloat16, finfo
>>> bfloat16(1828)
1824

Using numpy.nextafter, we can see that the next representable bfloat16 value after 1824 is 1832:
>>> import numpy as np
>>> np.nextafter(bfloat16(1824), bfloat16(2000))
1832

You should always keep this in mind when working with bfloat16 values: they encode only an 8-bit significand, so computational results will only be accurate to about 1 part in 256. This is by design: bfloat16 was specifically created for situations where numerical accuracy can be discarded in favor of more efficient computation.

authors: bzhangGo jakevdp


text:
Update core.call_impl to use call_wrapped

This fixes core.call, which I think had just not been updated to a more recent wrapping api.

The test failure appears to be unrelated to this pr:
__________________________ tests/scipy_stats_test.py ___________________________
[gw0] linux2 -- Python 2.7.16 /home/travis/miniconda/bin/python
Slave 'gw0' crashed while running 'tests/scipy_stats_test.py::LaxBackedScipyStatsTests::testNormLogCdf_float32[4]_float32[3,4]_float64[2,1,4]'
============ 1 failed, 12118 passed, 153 skipped in 2450.42 seconds ============
The command "pytest -n 1 tests examples -W ignore" exited with 1.


text:
Combine GPU multiprocess tests

Single file multiprocess_gpu_test.py for all gpu distributed tests.
Use pytest --forked ... to launch each test in a separate subprocess
to workaround conflicting multiple jax.distributed.init within a single
file/process.

closing in favor of https://github.com/google/jax/pull/12062


text:
Fix build/test //... [phab:D1155]

Created by zarko at 2016-11-15 20:38:35:

zarko wrote at 2016-11-15 20:42:39:
There are still Darwin issues (possibly insurmountable ones with the current darwin_files approach). This at least fixes building/testing //... on Linux.

salguarnieri commented inline (context lost during migration) at 2016-11-15 20:55:35:
This makes sense, but why wouldn't bazel have to do this with their default rules with targets like their windows files?
https://github.com/bazelbuild/bazel/blob/master/tools/cpp/BUILD

shahms commented inline (context lost during migration) at 2016-11-15 21:04:51:
I suspect because those files actually exist?  I suspect this will just break bazel build/test //... on darwin.
The underlying issue is that this file is used both for real rules and used inside the auto-configured local_config_cc repository (where the wrapper scripts live).  The right solution is probably to differentiate between the two.

zarko wrote at 2016-11-22 18:44:26:
Addressed in #1522

zarko abandoned revision at 2016-11-22 18:44:26

repo: google/kythe


text:
Upgrade Go protobuf to commit c22ae3cf020a21ebb7ae566dccbe90fc8ea4f9ea [phab:D114]

Created by schroederc at 2015-03-03 02:16:37:
This includes grpc service stub support.

fromberger accepted this revision at 2015-03-03 20:28:41

schroederc closed via commit 23092e2b715a4f1899bc6adf19289734a132ba4e at 2015-03-03 20:31:56

commit 7bc20e9f42bab90cf97686cf446b8d279dd1b603


text:
Update doesn't work when using lf.op.and in where filter

Using version 2.1.6 (00b9acf) my update query works when I do:
.where(event_table.id.eq(lf.bind(3))

but now
.where(lf.op.and(event_table.id.eq(lf.bind(3)), site_table.id.eq(lf.bind(2))))

The code is the same in the examples in issue !136
The explainations I get for the latter are:
console.log(query.explain(query.bind(vals)));

update(Event)
-select(combined_pred_and)
--table_access(Event)

promises.push(query.bind(vals).exec().then(function() { console.debug(query.explain()); }));

48x update(Event)
-select(combined_pred_and)
--table_access(Event)

I've checked the values manually.  The result is that the two fields I'm trying to set (avgHeight and avgScore) are null.  As soon as lf.op.and is used the explanations don't really tell me anything.
But for instance, I print out the values before binding, I get:
[57.34657809779381, 0.8733333333333334, 15, 1048]
update(Event)
-select(combined_pred_and)
--table_access(Event)

and when I check my table, I have:
value: {"id": 1048, "siteId": 15, "date": 1454759446959, "snapshot": "39.jpg", "avgHeight": null, "avgScore": null}

so I know the id values are right.
But yeah, when I drop the lf.op.and and use simply one key (which my schema supports anyways), it works perfectly,and the explanations are good.
(for simplicity, all the relevant code)
// Update event hight/rating.  TODO define this more globally
var query = db.update(event_table)
	.set(event_table.avgHeight, lf.bind(0))
	.set(event_table.avgScore,  lf.bind(1))
	.where(lf.op.and(
		site_table.id.eq(lf.bind(2)),
		event_table.id.eq(lf.bind(3))
	))
	;

var promises = [];
updates.forEach(function(vals) {
	console.debug(vals);
	console.log(query.explain(query.bind(vals)));
	promises.push(query.bind(vals).exec().then(function() { console.debug(query.explain()); }));
});
return Promise.all(promises)
	.then(function() {
		console.debug('queries executed');
	});
})

Thanks

Thanks for the report. Will try to reproduce and update this thread with findings.

I am confused by your  example query
.where(lf.op.and(event_table.id.eq(lf.bind(3)), site_table.id.eq(lf.bind(2))))

are you using an UPDATE query that refers to two different tables, event_table and site_table? This is not allowed.

Ack!  I see the problem now.
The goal was
UPDATE table SET col=val WHERE event_id=x AND site_id=y

As soon as I read your comment, I saw my mistake.  The query should read
.where(lf.op.and(event_table.id.eq(lf.bind(3)), event_table.siteId.eq(lf.bind(2))))

This is really obvious, I think I just got tunnel vision while trying to debug it.  Sorry about that.

repo: google/lovefield


text:
NPM mediapipe library usage not clear in documentation, total built size huge

Description of issue (what needs changing)
It's awesome we have an npm package, but using the package distributed by npm is not straight forward, since the same npm readme docs say to download wasm files from cdn.
Clear description
The final built package size of mediapipe/tasks-vision from npm is 860kB because of wasm, but the documentation recommends importing from a cdn, but we still need the types from the package. The end result becomes of having the wasm file in the bundle size but downloading them from the CDN.
Correct links
No response
Parameters defined
No response
Returns defined
No response
Raises listed and defined
No response
Usage example
No response
Request visuals, if applicable
No response
Submit a pull request?
No response

Hello @schmidt-sebastian,
Could you please help out here. Thank you!

Our JS library consists of a couple of files. The 3 important ones are:

The Library JS file (e.g. vision_bundle.js)
The Wasm Loader script (e.g. vision_wasm_internal.js)
The Wasm code (e.g. vision_wasm_internal.wasm)

Only the library file needs to be included in your script. While the file size is over 800 kB, the code is modular and your should be able to tree-shake the build fairly substantially. On our end, we can minify the sources, which should reduce the size further, but that requires a new release.

Making this a feature request.

It would be awesome though to have a documentation on npm on how to use all 3 (js, loader & wasm) from npm, without using external cdn.
Inlcuding wasm files and not specifically describing how to properly use the library it's a bit weird.
Did I miss something?
Thanks again for your work, keep it up!

Hi @schmidt-sebastian I might have the same question as Perez here.
I'm building an application that will live locally, on a PC without connection to the internet. Where can i download the WASM file that I'm loading in the visionTasks? ("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm")
thanks in advance

Thanks @schmidt-sebastian found it :)

@vettorazi,
Could you please let us know if we can change the status to close if now no longer issue from your end. Thank you

We still need to address the build size issue (hence it is marked as a feature request)

This will be fixed in our next release, which should go out this week. The vision library is 160 kB with this build.

authors: Perezmarc kuaashish schmidt-sebastian vettorazi

repo: google/mediapipe


text:
Added iOS Text Embedder Result and Options

Added MPPEmbedding, MPPEmbeddingResult, MPPTextEmbedderResult
Added MPPTextEmbedderOptions

@khanhlvg @schmidt-sebastian Raised a PR for adding embedding containers and options


text:
Decorate stateclass with @dataclass_transform()

Is your feature request related to a problem? Please describe.
I have pretty strict type checking enabled in my project. This results in hitting Pyright's reportUninitializedInstanceVariable rule when defining a Mesop stateclass:
@me.stateclass
class State:
    first_name: str

That's the error:

Instance variable "first_name" is not initialized in the class body or __init__ method reportUninitializedInstanceVariable

Describe the solution you'd like
I wonder if it's possible to annotate stateclass with dataclass_transform(), to make the type checker okay with things that normally look sketchy to it?
I.e. go from this:
https://github.com/google/mesop/blob/85fac407747073d9a3ae71a2e755304070fce275/mesop/__init__.py#L258-L262
To this:
if sys.version_info >= (3, 10):
    from typing import dataclass_transform
else:
    from typing_extensions import dataclass_transform

...

@dataclass_transform()
def stateclass(cls: type[_T] | None, **kw_args: Any) -> type[_T]:
  """
  Similar as dataclass, but it also registers with Mesop runtime().
  """

Describe alternatives you've considered
Can't think of any.
Additional context
Note – I'm vaguely aware of dataclass transforms. I am not 100% sure what other things need to be considered when adding this annotation, i.e. if the runtime code must then implement specific parts of the dataclass spec.
But I can say that making that change fixed the static errors for me.

Looks like a reasonable change - feel free to open a PR

authors: kkom wwwillchen

repo: google/mesop


text:
How is formula (8) derived？

I can't derive Sigma in equ (8), could you please explain it a bit more?

Eagerly waiting for the answer

There's nothing happening in Equation 8 besides straightforward algebra and manipulating Gaussians. If you have a Gaussian defined along an axis (in this case, d) with a variance along the axis of sigma_t^2 and the variance perpendicular to the axis of sigma_r^2, and you want to construct a covariance matrix in 3D, then you should "inflate" that gaussian by sigma_t^2 along the space spanned by d (which is dd^T) and you should "inflate" it in the perpendicular direction (I - dd^T, the null space of d) by sigma_r^2.

@jonbarron Does setting diag = true (use d**2 instead of dd^T) in your code mean that you believe the r and t are irrelevant?

No, it doesn't. Setting diag=true makes no assumptions, it just takes advantage of some math to compute an identical quantity a faster way.

@jonbarron I think that the coefficients of the two terms(sigma_t^2 and sigma_r^2) in formula 8(2) represent the decomposition of the vector. In the second coefficient, the unit matrix represents the vector itself, and the one that is subtracted represents the projection from the conical frustum coordinate system to the world coordinate system in the direction of the axis, so the second term can only represent the variance perpendicular to the direction of the axis. If we follow the above way of understanding, why is there a formal inconsistency between the coefficients of the first term and the subtracted coefficients of the second term (they differ by ||d||_2^2 times)? I hope you can answer my confusion, thank you very much!

i have the same question.Hope someone can  solve the problem @jonbarron @KevinSONG729

If the direction is normalized, then ||d||=1.
But mipnerf used an unnormalized direction vector, which is confusing...

@jonbarron I think that the coefficients of the two terms(sigma_t^2 and sigma_r^2) in formula 8(2) represent the decomposition of the vector. In the second coefficient, the unit matrix represents the vector itself, and the one that is subtracted represents the projection from the conical frustum coordinate system to the world coordinate system in the direction of the axis, so the second term can only represent the variance perpendicular to the direction of the axis. If we follow the above way of understanding, why is there a formal inconsistency between the coefficients of the first term and the subtracted coefficients of the second term (they differ by ||d||_2^2 times)? I hope you can answer my confusion, thank you very much!

@jonbarron I think that the coefficients of the two terms(sigma_t^2 and sigma_r^2) in formula 8(2) represent the decomposition of the vector. In the second coefficient, the unit matrix represents the vector itself, and the one that is subtracted represents the projection from the conical frustum coordinate system to the world coordinate system in the direction of the axis, so the second term can only represent the variance perpendicular to the direction of the axis. If we follow the above way of understanding, why is there a formal inconsistency between the coefficients of the first term and the subtracted coefficients of the second term (they differ by ||d||_2^2 times)? I hope you can answer my confusion, thank you very much!

I think so.  The non-diagonal of the covariance matrix is 0, right?

authors: AlphaPlusTT KevinSONG729 LuoXin-s jonbarron qhdqhd wqx854987945

repo: google/mipnerf


text:
Addition of Connection ID parameter to main output log

I attempted to address issue #33 by adding the Connection ID value to entries in the main output log. I tested the change and the Connection ID should appear for all entries i.e. INFO, WARNING, ERROR and CRITICAL.
Please let me know if I missed anything.
PS. I wasn't sure how to assign the pull request directly to the issue.

Can you squash your commits into a single commit

Sorry Chad I'm still a newbie with Github. Is there a simple way to squash all changes into a single commit from the github web ui or a cloned fork in linux?

Sorry Chad. I tried squashing the commits into 1 commit - but it looks like I made a mess :( Is it best to start a new pull request?

You should be able to squash it and force push the branch and keep this pull request.
Try:
git checkout
git reset --hard  2ef8cc0
git merge --squash  cfe9ebc
git push --force github

Thanks Chad. I tried the commands on my local linux machine running git. I
could push the code back to my "dev" branch but had trouble squashing
multiple commits.
I'll keep trying - I'm fairly new to git.
On 20 March 2015 at 01:54, Chad Brubaker notifications@github.com wrote:

You should be able to squash it and force push the branch and keep this
pull request.
Try:
git checkout
git reset --hard 2ef8cc0
https://github.com/google/nogotofail/commit/2ef8cc039f8d85e4391c732a2683e65b458fee58
git merge --squash cfe9ebc
https://github.com/google/nogotofail/commit/cfe9ebc8cd359296066701cc4d0574b01380ca63
git push --force github
—
Reply to this email directly or view it on GitHub
https://github.com/google/nogotofail/pull/68#issuecomment-83693663.

If it helps you can start a new branch, pull all your logging changes into it as a single commit and upload a new pull request.

Chad I ended up staying with the same pull request. I squashed alot of the commits but still have 2 commits, I'd like to merge into one. I wasn't sure how to do this in git when the aren't consecutive.

I think I managed to squash the 2 commits into a single commit. Let me know if it didn't work.

I chose to close this pull request. I tidied up the commit history for the branch and it would be cleaner to start again.

authors: chadbrubaker yzninja

repo: google/nogotofail


text:
Build problem; make/cmake

Version: master and stable v8.0
Language: C++/C#
Windows 10
Visual Studio 2019 Community
I plan to use OrTool C++ source code referenced in my C# project so I can debug the source code instead of referencing the binaries.
Followed instruction in the link below.
_https://developers.google.com/optimization/install/dotnet/source_windows_

Downloaded the code from https://github.com/google/or-tools
Opened "x64 Native Tools Command Prompt for VS 2019" and navigated to the directory where I extracted the files
Entered "tools\make third_party"

D:\Google OR Tool\or-tools-master>tools\make third_party
makefiles/Makefile.python.mk:1009: warning: overriding recipe for target 'temp_python'
makefiles/Makefile.python.mk:840: warning: ignoring old recipe for target 'temp_python'
del Makefile.local
Could Not Find D:\Google OR Tool\or-tools-master\Makefile.local
.
.
.(a lot of lines between the start error and the end)
.
.
make: [makefiles/Makefile.third_party.win.mk:586: dependencies/sources/scip-7.0.1] Error 2 (ignored)
cd dependencies\sources\scip-7.0.1 && git apply --ignore-whitespace "D:\GoogleORTool\or-tools-stable\patches\scip-7.0.1.patch"
error: can't open patch 'D://GoogleORTool//or-tools-stable/patches/scip-7.0.1.patch': No such file or directory
make: *** [makefiles/Makefile.third_party.win.mk:587: dependencies/sources/scip-7.0.1] Error 128

Then the error below after executing "tools\make test_dotnet"

D:\Google OR Tool\or-tools-stable>tools\make test_dotnet
makefiles/Makefile.python.mk:1009: warning: overriding recipe for target 'temp_python'
makefiles/Makefile.python.mk:840: warning: ignoring old recipe for target 'temp_python'
D:/Google OR Tool/or-tools-stable/tools/make run SOURCE=ortools/algorithms/samples/Knapsack.cs
make[1]: Entering directory 'D:/Google OR Tool/or-tools-stable'
makefiles/Makefile.python.mk:1009: warning: overriding recipe for target 'temp_python'
makefiles/Makefile.python.mk:840: warning: ignoring old recipe for target 'temp_python'
makefiles/Makefile.third_party.win.mk:72: *** Third party GFlags files was not found! did you run 'make third_party' or set WINDOWS_GFLAGS_DIR ?.  Stop.
make[1]: Leaving directory 'D:/Google OR Tool/or-tools-stable'
make: *** [makefiles/Makefile.dotnet.mk:488: test_dotnet_algorithms_samples] Error 2

you have space in your path: "D:\Google OR Tool", this is not supported by the Make
ref: http://savannah.gnu.org/bugs/?712

Thanks .... that worked

authors: Mizux proofkhan

repo: google/or-tools


text:
PDPTW disjunction constraints seem wrong

Why is are these disjunction constraints added in the PDPTW example like this:
for all i in [1, n_nodes):
   disjunction([1, 2, ..., i], penalty)

As is done here:
https://github.com/google/or-tools/blob/master/examples/cpp/pdptw.cc#L276
Why, for example, is a disjunction added on nodes [1,2,3,4] ? Should the disjunction not be something like:
for all i in [1, n_nodes):
   disjunction([ i ], penalty)

For the former, the solution typically is [0, 1] and for the latter it's a solution containing most or all nodes depending on the constraints and penalty.

Not sure I understand. In the C++ code you mention, the disjunction is
expressed as:
for (RoutingModel::NodeIndex order(1); order < routing.nodes(); ++order) {
std::vectorRoutingModel::NodeIndex orders(1, order);
routing.AddDisjunction(orders, kPenalty);
}
which makes each order optional.
An equivalent C++11 code could be:
for (RoutingModel::NodeIndex order(1); order < routing.nodes(); ++order) {
routing.AddDisjunction({order}, kPenalty);
}
On Wed, Sep 7, 2016 at 1:39 AM, Herbert notifications@github.com wrote:

Why is are these disjunction constraints added in the PDPTW example like
this:
for all i in [1, n_nodes):
disjunction([1, 2, ..., i], penalty)
As is done here:
https://github.com/google/or-tools/blob/master/examples/cpp/pdptw.cc#L276
Why, for example, is a disjunction added on nodes [1,2,3,4] ? Should the
disjunction not be something like:
for all i in [1, n_nodes):
disjunction([ i ], penalty)
For the former, the solution typically is [0, 1] and for the latter it's a
solution containing most or all nodes depending on the constraints and
penalty.
—
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/246, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUmCraul9yYZd8k5ZXq0pm9eQDOQOks5qnqKEgaJpZM4J20z9
.

Good to know I misread the code, I was expecting the 4th constructor of this page was called:
http://en.cppreference.com/w/cpp/container/vector/vector

authors: furnon prinsherbert


text:
[CHERRYPICK] Listen on local interfaces only in SSH tunnel

Dimitry suggested to cherry pick that bug fix. Please push back if you think that it's too late for proper testing.
By default QTcpServer listens on all available interfaces. We should
only listen on the local interface avoiding any security complications
and also the firewall dialog popping up.
Tests: Manual test of Orbit

I  will merge this since #1156 is targeting 1.52 as well, so more testing is needed anyway.

repo: google/orbit


text:
[DRAFT] Connection target

Add ConnectToTargetDialog.
https://screenshot.googleplex.com/3jRQUvx5KitdTns

Just an unsolicited comment: The dialog looks pretty neat!

authors: beckerhe reichlfl


text:
Add README steps to upgrade Timesketch DB

This PR adds a section in the Timesketch charts readme file explaining how to perform Database upgrades for the kubernetes deployment when required by the new Timesketch release.

Failing test:
Deleting outdated charts
Linting chart "timesketch => (version: \"1.0.5\", path: \"charts/timesketch\")"
Checking chart "timesketch => (version: \"1.0.5\", path: \"charts/timesketch\")" for a version bump...
Old chart version: 1.0.5
Error: failed linting charts: failed processing charts
New chart version: 1.0.5

@wajihyassine Given I only updated documentation and not the charts, should this still be bumped?

Failing test:
Deleting outdated charts
Linting chart "timesketch => (version: \"1.0.5\", path: \"charts/timesketch\")"
Checking chart "timesketch => (version: \"1.0.5\", path: \"charts/timesketch\")" for a version bump...
Old chart version: 1.0.5
Error: failed linting charts: failed processing charts
New chart version: 1.0.5

@wajihyassine Given I only updated documentation and not the charts, should this still be bumped?

So I thought that was the case, but issue template needs to be updated it doesn't look like the chart-testing knows how to differentiate certain files while including it into the packaged chart still https://github.com/helm/chart-testing/issues/530. Need to look into either updating the issue template or finding a way to update exclude *.md files
For this case can you bump the version number and then run helm dependency update and then should be good to merge.

authors: jkppr wajihyassine

repo: google/osdfir-infrastructure


text:
onewire: refactor factory alike i2c and spi

onewire: Redo the factory to be like i2c
onewire: increase test coverage to 97%
onewiretest: Add Playback.Q()
onewiretest: increase test coverage to 100%

Codecov Report

Merging #121 into master will increase coverage by 3.56%.
The diff coverage is 99.09%.

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
+ Coverage   56.87%   60.44%   +3.56%
==========================================
  Files          43       43
  Lines        2931     2998      +67
==========================================
+ Hits         1667     1812     +145
+ Misses       1185     1111      -74
+ Partials       79       75       -4

Impacted Files
Coverage Δ

conn/onewire/search.go
82.85% <0%> (+82.85%)
:arrow_up:

conn/onewire/onewire.go
100% <100%> (+4.93%)
:arrow_up:

conn/onewire/onewiretest/onewiretest.go
100% <100%> (+57.89%)
:arrow_up:

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 5a68677...b69b89c. Read the comment docs.

I'll commit right away because there's increasing visitors on the project and this is a breaking change and I use the occasion to make it more coherent with the rest. Please still comment once you have time.

authors: codecov-io maruel

repo: google/periph


text:
Make Network Encoder Discovery enabled by default.

I'm thinking about this, and I can't see a negative to changing this.  Since a LOT of the sources out there are using network encoders these days, and any future development makes sense to be in network encoder form, I think discovery should probably be turned on by default.  Anyone see a problem with this?

At first I thought it'd be an issue...but then once I remembered that
SageTV's own encoding server is off by default; this should not show up as
any surprises to anyone (i.e. they'll start seeing encoders in setup they
didn't want to see).
On Sat, Jun 25, 2016 at 8:49 PM, Christopher Piper <notifications@github.com

wrote:

I'm thinking about this, and I can't see a negative to changing this.
Since a LOT of the sources out there are using network encoders these days,
and any future development makes sense to be in network encoder form, I
think discovery should probably be turned on by default. Anyone see a
problem with this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/sagetv/issues/150, or mute the thread
https://github.com/notifications/unsubscribe/ANEIDGPG4wNvBMSnOJGM8RuxWpngwg_Eks5qPfbOgaJpZM4I-etm
.

--
Jeffrey Kardatzke
jkardatzke@google.com
Google, Inc.

This change was done by Fuzzy.

For reference: This was changed in commit a79f78d74961615d8251cc77d8753a9e40dac5f0.

authors: CraziFuzzy Narflex jwittkoski

repo: google/sagetv


text:
Split RESTRICTIONS_CANNOT_BE_MET into two errors

We are seeing a high rate of RESTRICTIONS_CANNOT_BE_MET in our production application. We recently updated from 2.2.8 -> 2.3.3, but I haven't yet determined if that has had an impact on this error rate. At the moment my concern is that there isn't any information provided about the circumstances surrounding the error.
As far as I can tell, there are only two possible causes:

Restrictions imposed by the client (e.g min/max resolution, bandwidth, or language preferences)
Restrictions imposed by the CDM (key status of output-restricted or internal-error)

It would be helpful if we could differentiate between the two. In particular, if the CDM imposed some restriction, it would be nice to know what the key status was. Then I could follow up with our DRM people about what restrictions are imposed by the license.

Yes, it's those two cases.
I think we could split the RESTRICTIONS_CANNOT_BE_MET error into two to distinguish between application and key system restrictions.
Note: to be able to provide key status for the key system restrictions case we will have to propagate it all the way from parsing key ids in player.js where we set variant.allowedByKeySystem.
There is also the case when different variants failed different restrictions (some weren't allowed by an application, some - by key system possibly with different key statuses).
Alternatively we could log the reason when we see an unmet restriction for a variant. This would require minimal changes to the code, but won't be as effective in communicating the cause of the error to the developers.
@chrisfillmore would logging work for you?
@joeyparrish would you schedule this as you see fit?

Thanks @ismena. Logging would not help because I'm often working backwards from data which tells me that our users encounter this error in the wild, but we don't actually have a reproducible test case (yet).
I see the problem you're describing. Variants may be restricted for a variety of overlapping reasons. It could be that all variants are restricted, but for different reasons.
Perhaps restrictions need to be more formally defined in the player, and the collection of all restrictions can be passed along with the error. This is just a thought, and would need some fleshing out.

Having said that, splitting the error into two would, on its own, be extremely helpful. :)

In that case we could probably start by splitting the error to help you short term and discuss the possible refactoring to make more information about this available further down the road.
Let me be arrogant and schedule splitting the error for v2.5. If it gets pushed back you'll know I got in trouble with @joeyparrish ;)

@joeyparrish I am confirming with our product team but I believe we have two basic requirements:

Need to notify the user that they can't connect a non-HDCP-compliant external display
Need to notify the user that some variants (e.g. 4K) are restricted

I expect that this would require some non-trivial refactoring in Shaka. Do you think it is feasible for 2.5?

I am thinking that it will be too simplistic to throw a different error based on app vs key system restrictions.  There can be different variants that are restricted for different reasons and having different error codes would require us to pick which cases to favor and throw a not-so-accurate error message.
How about instead adding something to the data field of the error to indicate what the restrictions were?  So you could get error.data[0] and it might be something like:
{
  hasAppRestricted: false,    // App-applied restrictions
  hasMissingKeys: true,       // Don't have the required keys
  hasOutputRestricted: true,  // Key system output restriction
}

The above would indicate that some streams have output restricted and some don't have the required keys.  This would allow you to handle them separately and construct an accurate error message/response.

Here's what I think:

App-level restrictions which lead to no playable variants should result in a failed assertion with no error code. This is developer error IMO; clients should listen for the streaming event to set appropriate min/max bitrates and languages. Is there any reason this shouldn't work?
Missing keys and restricted output should have separate error codes. These error scenarios do not seem logically related to me. Missing keys is likely the result of misconfiguration at the headend, and restricted output is usually (I think) the result of user error (connecting to non-HDCP compliant display, for instance). These should not share an error code IMO.

If #1 is too onerous, then I actually think RESTRICTIONS_CANNOT_BE_MET should be split into three error codes.

authors: TheModMaker chrisfillmore ismena

repo: google/shaka-player