text:
[BuycraftX] Could not fetch due players queue

>.... [16:11:36 ERROR]: [BuycraftX] Could not fetch due players queue
java.net.SocketTimeoutException: timeout
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:656) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:664) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.java:153) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:131) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[?:?]
at net.buycraft.plugin.BuyCraftAPI$1.intercept(BuyCraftAPI.java:59) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[?:?]
at net.buycraft.plugin.BuyCraftAPI$2.intercept(BuyCraftAPI.java:53) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254) ~[?:?]
at net.buycraft.plugin.internal.okhttp3.RealCall.execute(RealCall.java:92) ~[?:?]
at net.buycraft.plugin.internal.retrofit2.OkHttpCall.execute(OkHttpCall.java:186) ~[?:?]
at net.buycraft.plugin.execution.DuePlayerFetcher.run(DuePlayerFetcher.java:62) ~[?:?]
at net.buycraft.plugin.execution.DuePlayerFetcher.run(DuePlayerFetcher.java:38) ~[?:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Tuinity-"84d7587"]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.15.2.jar:git-Tuinity-"84d7587"]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.15.2.jar:git-Tuinity-"84d7587"]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

This is BuyCraftX being stupid and not only setting the verbose to true by default for all new users/customers, but also settings something to an ERROR level log that literally should never be an ERROR.

Understand! Verbose set to false.

Hi! I've got also the same problem, can someone help me with this? Thank you!
[17:07:47 ERROR]: [BuycraftX] Could not fetch due players queue
java.net.SocketTimeoutException: timeout
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:656) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:664) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.java:153) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:131) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[BuycraftX.jar:?]
at net.buycraft.plugin.BuyCraftAPI$1.intercept(BuyCraftAPI.java:59) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[BuycraftX.jar:?]
at net.buycraft.plugin.BuyCraftAPI$2.intercept(BuyCraftAPI.java:53) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.okhttp3.RealCall.execute(RealCall.java:92) ~[BuycraftX.jar:?]
at net.buycraft.plugin.internal.retrofit2.OkHttpCall.execute(OkHttpCall.java:186) ~[BuycraftX.jar:?]
at net.buycraft.plugin.execution.DuePlayerFetcher.run(DuePlayerFetcher.java:62) ~[BuycraftX.jar:?]
at net.buycraft.plugin.execution.DuePlayerFetcher.run(DuePlayerFetcher.java:38) ~[BuycraftX.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.jar:git-Paper-69]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.jar:git-Paper-69]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

authors: JustFerrix SrBedrock andrewkm

repo: tebexio/BuycraftX


text:
Git 换行符

Git 换行符

操作系统
换行符

Unix 和 OS X
\n ，0x0A（LF）

Windows
\r\n，0x0D0A（CRLF）

早期 Mac OS
\r，0x0D（CR）

在 Git 中可以使用 AutoCRLF 和 SafeCRLF 对换行符进行设置。
以下是我个人使用配置。
# 拒绝提交包含混合换行符的文件
git config --global core.safecrlf true

# 提交时转换为LF，检出时不转换
git config --global core.autocrlf input

在多人团队协作中，我们可以使用添加 .gitattributes 文件来限定换行符。这个文件通常放在项目的根目录，也就是有 .git 文件夹的那个目录。
.gitattributes 每一行格式如下
要匹配的文件模式 属性1 属性2 ...

因此我们用如下格式来限定换行符
# 对于任意文件，当该文件的格式为 text，即文本时，在提交的时候，行尾自动转换成 lf。
* text eol=lf

参考文档

https://git-scm.com/docs/gitattributes
https://github.com/cssmagic/blog/issues/22
http://kuanghy.github.io/2017/03/19/git-lf-or-crlf

另外也记录一下这个问题引申出来的其他有意思的问题。

https://www.zhihu.com/question/21245110

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Twitch link is broken

The Twitch button in the "Follow Us Online" section and in the footer goes to http://www.techlahoma.org/twitch.tv/techlahoma instead of https://www.twitch.tv/techlahoma

thanks for issue! it's fixed now :+1:

authors: amandaharlin kacollins

repo: techlahoma/techlahoma

license: mit

license_source: bigquery


text:
Hover Display Not Aligning with Mouse Position

Hello! Hopefully this will be an easy fix, but I can't seem to get the mouse to align with the bisect-x. Wondering if anyone else is having this issue?
Layerchart Version - 0.44.0
Svelte Version - 4.2.7
Tailwindcss Version - 3.4.9
Hover cursor over chart in this reproducible sample code shows your cursor to the right of the datapoints not allowing to overlap by about 16px. This makes it so I can't hover over the last datapoint.

Here's the Svelte REPL: https://svelte.dev/repl/bb4ac8dd5e0f48d9a37249392dcf01b3?version=4.2.19

What am I missing?
Thanks!
AskDavis

Hey @AskDavis 👋, thanks for checking out LayerChart.
I see you are using scaleBand() with bisect-x and time series (date) data.   Instead of scaleBand(), I would recommend scaleTime() or scaleUtc() and convert the date strings '2023-01-05' to Date instances, either by updating the data...
const investmentData = [
    { date: new Date('2023-01-05'), value: 5000 },
    { date: new Date('2023-01-06'), value: Math.floor(Math.random() * (8500 - 5000)) + 5000 },
    ...
  ];

processing the data...
const investmentData = [
    { date: '2023-01-05', value: 5000 },
    { date: '2023-01-06', value: Math.floor(Math.random() * (8500 - 5000)) + 5000 },
    ...
  ].map(d => ({ ...d, date: new Date(d.date) }));

or change the x accessor from
<Chart x="date" ...>

to
<Chart x={d => d.date} ...>

Note: in the upcoming Simplified Charts PR, LineChart will smartly switch between scaleLinear() and scaleTime() based on the data type of x.
Hope that gets you going.

that fixed it! amazing! thank you so much! I really love LayerChart!! amazing work and can't thank you enough :)

that fixed it! amazing! thank you so much! I really love LayerChart!! amazing work and can't thank you enough :)

You're very welcome, and glad you're enjoying it 😃.  The new simplified charts will help provider a better onboarding experience (and just generally simplifier)

authors: AskDavis techniq

repo: techniq/layerchart


text:
feat: improve handling of expired & invalid tokens

Invalid and expired tokens will now create a redirect to the login page instead of showing a broken page.
Most of the checks happen server-side inside the withApiClientAndPagination() wrapper function (its parameters also received some refactoring love to make them easier to consume on page level).

To see the specific tasks where the Asana app for GitHub is being used, see below:

https://app.asana.com/0/0/1205842661550424

Danke fürs Checken! Ja, es gibt hier und da sicher viele UX-Verbesserungen, die wir vornehmen können. Eine genaue Meldung, warum der User ausgeloggt wurde, hatte ich jetzt erstmal übersprungen und einen TODO-Kommentar dazu dagelassen.

source: gharchive/pull-request

repo: technologiestiftung/kulturdaten-webapp


text:
🛑 Tekhnee Cloud is down

In 4eac25a, Tekhnee Cloud ($CLOUD_BENCHMARK_LINK) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Tekhnee Cloud is back up in 33884d1.

repo: tekhnee/status


text:
Flake: examples/v1beta1/pipelineruns/alpha/isolated-workspaces times out

Logs: https://storage.googleapis.com/tekton-prow/pr-logs/pull/tektoncd_pipeline/6515/pull-tekton-pipeline-alpha-integration-tests/1655655271705350144/build-log.txt
The PipelineRun in this test times out after 1m. I'm not sure whether this is a problem with this integration test specifically, or whether examples tests are just failing due to overloaded integration test clusters.

Flaked again in https://prow.tekton.dev/view/gs/tekton-prow/pr-logs/pull/tektoncd_pipeline/7445/pull-tekton-pipeline-beta-integration-tests/1730303137908002816

authors: jerop lbernick

repo: tektoncd/pipeline


text:
Add timestaps in logs

Changes
The controller and webhook logs do not include timestamps, which
makes troubleshooting issues much harder.
Adding the timestamps into the default logging configuration.
Signed-off-by: Andrea Frittoli andrea.frittoli@uk.ibm.com
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[n/a] Includes tests (if functionality changed/added)
[n/a ] Includes docs (if user facing)
[x] Commit messages follow commit message best practices
[x] Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.
Double check this list of stuff that's easy to miss:

If you are adding a new binary/image to the cmd dir, please update
the release Task to build and release this image.

Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes
Add timestamp in the logs of the tekton pipelines controller and webhook

/kind feature
/cc @vdemeester @mattmoor

/test check-pr-has-kind-label

Uhm, test failed because of empty step name:
        apiVersion: tekton.dev/v1beta1
        kind: Task
        metadata:
          creationTimestamp: "2020-10-15T09:53:55Z"
          generation: 1
          name: pipeline-level-finally-one-d-a-g-task-failed-failure-zbmlcmbf
          namespace: arendelle-7drp7
          resourceVersion: "9211"
          selfLink: /apis/tekton.dev/v1beta1/namespaces/arendelle-7drp7/tasks/pipeline-level-finally-one-d-a-g-task-failed-failure-zbmlcmbf
          uid: b4968328-d0d9-4058-aac9-342a3ff65723
        spec:
          steps:
          - image: alpine
            name: ""
            resources: {}
            script: exit 1

Uhm, TestPipelineLevelFinally_OneDAGTaskFailed_Failure test failed because of invalid step name (too long, 78 characters):

I think the issue is in https://github.com/tektoncd/pipeline/blob/bd885f8c6d827d8114ff15718840fc8666f2b06c/pkg/reconciler/pipelinerun/resources/conditionresolution.go#L99 - we make a new name without checking if it's valid.

Interesting, the test passed now, error is still in the logs:
    TestPipelineLevelFinally_OneDAGTaskFailed_Failure: kubelogs.go:197: E 12:44:52.345 tekton-pipelines-controller-54d5fd6cfc-jnmk2 [pipelinerun/reconciler.go:294] [arendelle-dg2qf/pipeline-level-finally-one-d-a-g-task-failed-failure-eefspplc] Returned an error err=1 error occurred:
        	* error creating ConditionCheck container called pipeline-level-finally-one-d-a-g-task-failed-failure-eefs-ppszq for PipelineTask dagtask3 from PipelineRun pipeline-level-finally-one-d-a-g-task-failed-failure-eefspplc: admission webhook "validation.webhook.pipeline.tekton.dev" denied the request: validation failed: invalid value "condition-check-pipeline-level-finally-one-d-a-g-task-failed-failure-wyqwlurp": spec.taskspec.steps[0].name
        Task step name must be a valid DNS Label, For more info refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

I guess the Task was meant to fail anyways, only it fails because of an invalid name before it can fail because of a force false condition. I suppose the reason for failure in the previous run must have been a different one then.

https://github.com/tektoncd/pipeline/issues/3393

/lgtm

/approve

I've seen this kind of errors quite a few times in E2E logs:
   {"level":"error","ts":1602809909.5059779,"caller":"git/git.go:53","msg":"Error running git [fetch --recurse-submodules=yes --depth=1 origin --update-head-ok --force v0.32.0]: exit status 128\nfatal: unable to access 'https://github.com/GoogleContainerTools/skaffold/': Could not resolve host: github.com\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:53\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\tgithub.com/tektoncd/pipeline/pkg/git/git.go:144\nmain.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:52\nruntime.main\n\truntime/proc.go:203"}
        {"level":"fatal","ts":1602809909.506128,"caller":"git-init/main.go:53","msg":"Error fetching git repository: failed to fetch [v0.32.0]: exit status 128","stacktrace":"main.main\n\tgithub.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\truntime/proc.go:203"}

I think we might want to consider running a local git server on the k8s cluster where we run E2E tests.

/test pull-tekton-pipeline-integration-tests

/retest

authors: ImJasonH afrittoli sbwsg vdemeester


text:
2022-11-27 스터디 준비

satisfies 비슷한 함수(?)
배경 상황설명
const initialWidgets = {
  [BrandStoreWidgetType.GNB]: {
    ...initialWidgetProperty,
    gnbType: GnbType.SIMPLE,
    nameType: ShowType.LOGO,
    logo: null,
    expansionTypeLogo: null,
  },
  ...수많은 위젯들,
  [BrandStoreWidgetType.CLOVA_MD_BUY]: {
    ...initialWidgetProperty,
    visible: true,
    있으면_안되는_키: 있으면_안되는_벨류, 👈🏻
    exposureStoreHome: true,
    exposureProductDetail: true,
    productDetailExposurePosition: 'UPPER_RELATION_PRODUCT',
    storeHomeThumbnailType: ThumbnailShapeType.SQUARE,
  },
}

이런 코드에서 있으면 안되는 키, 벨류가 들어가지 않도록 하고싶었고, initialWidgets[BrandStoreWidgetType.CLOVA_MD_BUY]의 타입이 올바르게 (ClovaMdProductWidget 타입으로) 나오도록 하고 싶었음
const initialWidgets = {
  [BrandStoreWidgetType.GNB]: {
    ...initialWidgetProperty,
    gnbType: GnbType.SIMPLE,
    nameType: ShowType.LOGO,
    logo: null,
    expansionTypeLogo: null,
  },
  ...수많은 위젯들,
  [BrandStoreWidgetType.CLOVA_MD_BUY]: {
    ...initialWidgetProperty,
    visible: true,
    있으면_안되는_키: 있으면_안되는_벨류,
    exposureStoreHome: true,
    exposureProductDetail: true,
    productDetailExposurePosition: 'UPPER_RELATION_PRODUCT',
    storeHomeThumbnailType: ThumbnailShapeType.SQUARE,
  } as ClovaMdProductWidget, 👈🏻 👀
}

이렇게 as ClovaMdProductWidget로 타입 단언을 해버리면 타입은 잘 잡히는데 있으면_안되는_키를 못 걸러줌
const initialWidgets = {
  [BrandStoreWidgetType.GNB]: {
    ...initialWidgetProperty,
    gnbType: GnbType.SIMPLE,
    nameType: ShowType.LOGO,
    logo: null,
    expansionTypeLogo: null,
  },
  ...수많은 위젯들,
  [BrandStoreWidgetType.CLOVA_MD_BUY]: {
    ...initialWidgetProperty,
    visible: true,
    있으면_안되는_키: 있으면_안되는_벨류,
    exposureStoreHome: true,
    exposureProductDetail: true,
    productDetailExposurePosition: 'UPPER_RELATION_PRODUCT',
    storeHomeThumbnailType: ThumbnailShapeType.SQUARE,
  } satisfies ClovaMdProductWidget, 👈🏻 👀
}

satisfies ClovaMdProductWidget 이렇게 하면 있으면_안되는_키 를 걸러줄 수 있는데, 타입스크립트 버전을 올릴 수는 없는 상황
아무튼, 이렇게 함수를 만들어서 사용함
export namespace TypeUtils {
/**
   * ts 4.9에 추가된 satisfies 와 유사하게 동작하는 함수
   *
   * as Type 으로 단언하는것보다 안전하게 타입을 처리할 수 있게 해준다 \
   * const c = 10 as 1 | 2 | 3 은 안전하지 않지만 \
   * const c = TypeUtils.satisfies<1 | 2 | 3>(10) 은 안전게 타입검사가 된다
   *
   * const c = 1 satisfies 1 | 2 | 3 이라면 c 타입이 1 일테지만, satisfies함수는 subtype 추론까지는 안된다. \
   * 구현하려고 시도해봤는데 안되네요.....
   *
   * @example
   * ```ts
   * const c = TypeUtils.satisfies<1 | 2 | 3>(10) <= 10에서 빨간줄 발생
   * ```
   *
   * @example
   * ```ts
   * const c = TypeUtils.satisfies<1 | 2 | 3>(1)
   *       ^~~ c: 1 | 2 | 3 로 타입이 잡히고 타입검사는 통과됨
   * ```
   */
  export const satisfies = <T = any, Q extends T = T>(t: Q): Q => t
}

{
  [BrandStoreWidgetType.CLOVA_MD_BUY]: TypeUtils.satisfies<ClovaMdProductWidget>({
    ...initialWidgetProperty,
    visible: true,
    // 있으면_안되는_키 가 있으면 빨간줄로 잡아줌 ❗
    exposureStoreHome: true,
    exposureProductDetail: true,
    productDetailExposurePosition: 'UPPER_RELATION_PRODUCT',
    storeHomeThumbnailType: ThumbnailShapeType.SQUARE,
  }),
}

Build your own react 하면서 공부하는중
크롱이 캠프때 잠깐 말했던 Fiber가 뭔지 알게됨
https://github.com/gomjellie/build-your-own-react/blob/main/src/main.tsx#L8-L17
type Fiber = {
  type: TAG_NAMES | 'TEXT_ELEMENT';
  props: PropsType;
  dom: Text | HTMLElement | null;
  parent: Fiber | null;
  child: Fiber | null;
  sibling: Fiber | null;
  alternate: Fiber | null;
  effectTag: 'UPDATE' | 'PLACEMENT' | 'DELETION' | 'UNKNOWN';
};

이렇게 생긴건데 Suspense가 도입되면서 렌더링 스케쥴링을 위해 필요해진듯(?)

https://simsimjae.tistory.com/473

React Fiber가 등장하면서 스택을 재 구현 했다. 하나의 Fiber는 하나의 가상 스택 프레임을 차지하는 작업의 단위이다. 기존의 엔진에 구현된 스택에서는 스택 프레임에 있는 실행 컨텍스트를 멈췄다가 다시 재개하고 이런 작업을 할 수 없었다. 위 문제를 해결하려면 스택을 재 구현해야 했던것이다.
재귀는 멈출수없기에 Fiber는 재귀 대신 연결리스트를 사용한다. 작업이 끝나면 그 다음 작업을 링크를 타고 가서 하면 되는것이다.
React의 Element와 React Fiber Node는 1:1로 대응된다. 하나의 엘리먼트를 렌더링하는것을 하나의 작은 단위인 Fiber로 맵핑시킨것이다.

https://github.com/allegro/typescript-strict-plugin
단계적 strict 적용

Render -> Reconciliation -> Commit

authors: Seogeurim gomjellie

repo: telbby/WIL


text:
integrate the current state of the new antelope library with no effects

Fixes #202
Description
This work is the continuation of this PR which incorporates the Antelope library we are creating based on the Pinia store implementation and changes some of the current components to show new functionalities from the library. However, this PR removes all changes made to those components and only incorporates a functioning but still not a complete library, ready to keep growing to incorporate more functionalities to support EVM requirements.
Test scenarios
Nothing should change for a user
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented on my code, particularly in hard-to-understand areas
[x] I have cleaned up the code in the areas my change touches
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules
[x] I have checked my code and corrected any misspellings
[x] I have removed any unnecessary console messages
[x] I have included all English text to the translation file
[x] I have created a new issue with the required translations for the currently supported languages
[x] I have added appropriate test coverage

maybe for the  TODOs you can make a single issue for each store or each file which has remaining TODOs, instead of making a ton of smaller tickets.

authors: EJSG Viterbo

repo: telosnetwork/telos-wallet


text:
Remove ES+Zookeeper dependencies as of 1.7.0

As of Temporal 1.7.0 Kafka and zookeeper are no longer needed.
This PR removed those dependencies in the docker-compose files.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Juan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@underkin, can you sign CLA? I will merge this PR then.

authors: CLAassistant alexshtin underkin

repo: temporalio/docker-compose


text:
Dark mode select combobox menu checkbox

Description & motivation 💭

Update dark mode styles for Menu (Menu Button and Menu Item), Select, Combobox, and Checkbox
Remove "theme" props for these components, they will respect whatever mode the UI is using
Checkbox is tricky cause it can display on a dark background (i.e. a table header) in light mode. May need to revisit later.
Also clean up Button styles a little by making re-usable shadow classes.

Screenshots (if applicable) 📸
checkbox

light mode
dark mode

menu

light mode
dark mode

primary

secondary

ghost

menu items

combobox

light mode
dark mode

select

light mode
dark mode

Note minor checkbox change in table header

before
after

Design Considerations 🎨
Testing 🧪
How was this tested 👻

[ ] Manual testing
[ ] E2E tests added
[ ] Unit tests added

Steps for others to test: 🚶🏽♂🚶🏽♀
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?

Any chance you can explain to me why we should get rid of the primary, secondary, danger and success colors? Will we just not be using them, or is it bad naming convention?

We will be using them still, the reason has more to do with just having consistent naming conventions. That big color object ends up being included in our tailwind theme, so that when we do bg-blue for example, we get our blue, not tailwind's blue. I'm of the opinion that those colors should be named like actual colors, blue, green, red, etc. Then the mapping of those colors to semantic names, i.e. primary, secondary, danger, etc. should happen at one level higher of abstraction, like the variable names and class helpers. So roughly something like:
const colors = {
  indigo: {
    // ...
    600: '#444CE7',
    // ...
  }
}

const variables = {
  '--color-primary': rgb(getColor('indigo', 600)),
}

repo: temporalio/ui


text:
Changing Hostname of tenants

I was changing hostname for tenants which changes perfectly save() method on Hostname Model.
The record of the hostname table changes but the tenant is not accessible by the new fqdn.
The hostname of the site comes up to be null in the following code, after record update:
$hostname  = app(\Hyn\Tenancy\Environment::class)->hostname();
Please guide what way can the hostname be changed properly so that Tenancy is not affected.

I checked out the package's event listener. Turns out that the hostname gets marked at "Dirty" i.e it has been tempered/changed.
How do I mark a hostname as "Clean"? Is there a safe way to change hostname without marking it dirty? Or else alter the status to mark it clean after changing the hostname?

Turns out that after change in the hostname, we had to attach the hostname to the website again. Makes it a bit complicated, but got the solution in some time.

repo: tenancy/multi-tenant


text:
🛑 Beeldoverleg Website is down

In 0c5435e, Beeldoverleg Website (https://beeldoverleg.nl) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Beeldoverleg Website is back up in 3f5c27c after 13 minutes.

repo: tendsgn/upptime


text:
vite设置base后script类型为module的@vite/client资源未进行编译

这里未匹配成功
module2DynamicImport($, $('script[src=/@vite/client]').get(0))

1.0.15 修复了这个问题

repo: tengmaoqing/vite-plugin-qiankun


text:
REFACTOR(datafusion): simplify the wrap_datetime_fn macro

@jinmingjian @pandaplusplus
After #173, the macros in clickhouse.rs in A-DF shows to become too complicated. So I simplified the wrapping macro to contain only a array downcast process.

@whjpji this PR reduces boilerplate, and KISS, I really like this!

I think other two macros def_datetime_fn and wrap_string_fn can be simplified in a similar way, to wrap only the inner layer, instead of the whole function's definition.
I will continue to do this work and may add more commits.

I couldn't agree more. We need a simple and clear macro template that can be modeled later.

@whjpji we put too many additions in this PR. If tests passed, I will merge this PR firstly.

@jinmingjian I have moved chickhouse::str_to_u16 to base and named parse_to_days.
BTW, After the refactory, Only LargeUtf8 is allowed to begin with a length on its bytes representation, because the toDate function is only called by us in purpose of keeping compatibility with CH.

@whjpji nice refactoring!

authors: jinmingjian pandaplusplus whjpji

repo: tensorbase/tensorbase


text:
Removed run_in_graph_and_eager_mode in gelu_test.py

cc @gabrieldemarmiesse

@aakashkumarnain
You are owner of some files modified in this pull request.
Would you kindly review the changes whenever you have the time to?
Thank you very much.

authors: autoih bot-of-gabrieldemarmiesse

repo: tensorflow/addons


text:
Support batch input for median_filter2d

Addresses #230. Also meets the interface of mean_filter2d.
A general random test case is down below. Maybe there are some ways to speed up. It's now much more slower than scipy's implementation even for the input of shape [1, h, w, 1].
https://colab.research.google.com/drive/1UkNXxjTMHifKmHB2N5ojOHFojtXrOUIG

@Mainak431 Hi, would you mind taking a look?

@WindQAQ Thanks for the excellent contribution. Everything looks pretty fine.
Can you please add a small training example using this layer with a conv2d layer and dropout layer in tensorflow with maybe mnist dataset? So, that it can be directly used in the network itself?

@Mainak431 Here is the example colab notebook. I will include this in addon's example in maybe the next PR.

Nice contribution.
On Sun 16 Jun, 2019, 10:20 PM Tzu-Wei Sung, notifications@github.com
wrote:

@Mainak431 https://github.com/Mainak431 Here is the example colab
notebook
https://colab.research.google.com/drive/1ZOAFTRdxKYDBpG75ZITukIr8MjUR2qDA.
I will include this in addon's example in maybe the next PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/addons/pull/288?email_source=notifications&email_token=AIRDMQVU3QCXZFC6XXLN4STP2ZVPDA5CNFSM4HYLJF6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZQ3MI#issuecomment-502468017,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIRDMQT2RQ7ED3MIX6IELALP2ZVPDANCNFSM4HYLJF6A
.

@WindQAQ Thanks for the contribution.

authors: Mainak431 Squadrick WindQAQ facaiy


text:
Training models on small datasets

I made a dataset with a few midi files, just smash mouth all star, darude sandstorm, flintstones theme, and a few others.  When trying to make the dataset for the different models they would all show up as 0 bytes when done, except melody_rnn which would make a 1mb file training_melodies.tfrecord file, and 0 bytes evaluation file.
Is there a min requirement for the size of the dataset?  Or do I need to format the midi files a certain way for the other models?  How do I get past this rule and trick it into learning from 5 songs?
I want to properly generate these sequence examples so I can then train the different models on different datasets for different amounts of time.  I need to get past this problem of having training sets of 0 bytes, and sometimes the training set has a size but the evaluation set is 0 bytes.
Also to Magenta team I apologize for posting my questions here, not sure where else to post them.  Once I learn stuff I will then know and not need to ask though so I appreciate any help. Thanks.

first you should read readme.md file seriously,  you should turn this midi file to .tfrecord file. and then generated notesequence from .tfrecord file. the notesequence  is the training set to build your model.

all the tutorials are in README.md in each directory

@mbs6176966 that's exactly what I did what did I write make you assume I was too stupid to do that?

Can you include the output of the commands you used to generate the datasets? They should include some debugging information about what was included and why. Exactly how the dataset is generated varies for each model.

Forgive me bad English~ :),  i faced your problem before,  the tutorial have writen how to generated trianing set and the evaluation set like that:"melody_rnn_create_dataset
--config=<one of 'basic_rnn', 'lookback_rnn', or 'attention_rnn'>
--input=/tmp/notesequences.tfrecord
--output_dir=/tmp/melody_rnn/sequence_examples
--eval_ratio=0.10"
focus on the last param  "--eval_ration"  it means training set :  evaluation set = 9 : 1,so you should have 10 midi file in your floder at least.  this is my personal view.

I have encountered the same problem (using it with docker). My eval_melodies.tfrecord and training_melodies.tfrecord files are empty:
-rw-r--r-- 1 root root 0 Feb 26 12:10 eval_melodies.tfrecord
-rw-r--r-- 1 root root 0 Feb 26 12:10 training_melodies.tfrecord
I did run the following command to create note sequences first:
convert_dir_to_note_sequences \
--input_dir=$INPUT_DIRECTORY \
--output_file=$SEQUENCES_TFRECORD \
--recursive

which gives me the following output (I used 40 midi files downloaded from the web):
INFO:tensorflow:Converting files in '/midi-files/'.
INFO:tensorflow:0 files converted.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus90_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bor_ps1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se8_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus22_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bor_ps2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/appass_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus10_3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_hammerklavier_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_hammerklavier_4_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus90_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_les_adieux_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/appass_3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp6_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus22_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/appass_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus22_3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bor_ps6_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus22_4_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_hammerklavier_3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_les_adieux_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bach_846_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se5_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus10_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_opus10_1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp5_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bach_847_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bor_ps3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_hammerklavier_2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se4_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp4_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se7_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_esp2_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se1_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/beethoven_les_adieux_3_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/alb_se6_format0.mid.
INFO:tensorflow:Converted MIDI file /midi-files/bach_850_format0.mid.

The generated notesequences.tfrecord file is not empty:
-rw-r--r-- 1 root root 3706900 Feb 26 12:09 notesequences.tfrecord
Than I did run the command to create the sequence examples:
melody_rnn_create_dataset \
--config=lookback_rnn \
--input=/tmp/notesequences.tfrecord \
--output_dir=/tmp/melody_rnn/sequence_examples \
--eval_ratio=0.10

Which gives me the following output:
INFO:tensorflow:

Completed.

INFO:tensorflow:Processed 40 inputs total. Produced 0 outputs.
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melodies_discarded_too_few_pitches: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melodies_discarded_too_long: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melodies_discarded_too_short: 180
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melodies_truncated: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melody_lengths_in_bars:

INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_polyphonic_tracks_discarded: 297
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melodies_discarded_too_few_pitches: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melodies_discarded_too_long: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melodies_discarded_too_short: 10638
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melodies_truncated: 0
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melody_lengths_in_bars:

INFO:tensorflow:DAGPipeline_MelodyExtractor_training_polyphonic_tracks_discarded: 18665
INFO:tensorflow:DAGPipeline_RandomPartition_eval_melodies_count: 1
INFO:tensorflow:DAGPipeline_RandomPartition_training_melodies_count: 39

I see, that it produced 0 outputs. But what is the problem here? Are 40 midi files not enough? Or did i miss something else?
Thanks for your help.

@timoisik the problem is that all of the sequences were discarded for various reasons. The output has some diagnostic info about that. Here are the relevant lines:
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_melodies_discarded_too_short: 180
INFO:tensorflow:DAGPipeline_MelodyExtractor_eval_polyphonic_tracks_discarded: 297
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_melodies_discarded_too_short: 10638
INFO:tensorflow:DAGPipeline_MelodyExtractor_training_polyphonic_tracks_discarded: 18665

For training the melody model, I don't think the tracks you're using will work. They look like polyphonic piano words. You'll want something that has tracks with monophonic lines.

authors: cghawthorne jasondesante mbs6176966 timoisik

repo: tensorflow/magenta


text:
Add example argument to gradient calculation

Some models need access to the original example to get gradients, so adding this backwards-compatible change to support those models.

I ran the tcav_test after updating the test to ensure it still passes. Have not run a full TCAV with this change but it should have no effect on existing TCAV uses.

repo: tensorflow/tcav


text:
Documentation Error in TenserFlow website

On website page:
https://www.tensorflow.org/get_started/get_started#a_custom_model
There is a missing line in the sample code provide for Custom Model:
After this line
input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_train}, y_train, 4, num_epochs=1000).
in sample code there should be one more line for variable eval_input_fn  which is missing right now in the docs.
single line of code to be added in sample code is
eval_input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_eval}, y_eval,4, num_epochs=1000)

Thanks for pointing this out, this line seems to be there now.

i came here to report this same issue.
for the version of the site that i see the line is not there.
please note that in the section above it, the line is there.

repo: tensorflow/tensorflow


text:
Link for iOS doc doesn't work

https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/ios_examples/

Thanks for the report. Could you point to where the source of the bad link was?

Sure: https://www.tensorflow.org/mobile/

Thanks!

We are deprecating/updating that page soon, but I've fixed the link for you for now.

Thank you very much. I'm happy to use whatever is the current reference. This is the page I was led to by tensorflow.org. Thanks


text:
Code size with XLA AOT

I currently research about xla using AOT compilation and use Cifar10 as benchmark
After using AOT compilation, I got a binary file that size is 5.3MB, but the original tensorflow graph's size is about 4.2MB. Does it means a using AOT compilation can't promise always reduce code size efficiently?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

The AOT generated binary contains machine code for the CPU you're targeting (for instance x86) whereas the TF graph is a serialized representation of the TensorFlow graph (very different from machine code).  Everything else remaining equal, you can expect that a larger TF graph will generate a larger binary; but other than that there is no correlation between these two things.

@sanjoy  Thanks for your help.
So if I want to test whether AOT reduce code size, how should I test?
Does it means I should take final binary file's  size which generate from AOT compare with original TF graph + runtime size?

@sanjoy Thanks for your help very much.
According to speech at TensorFlow Dev Summit 2017(https://youtu.be/kAOanJczHA0?t=2831),
Code size can be evaluated by Original(Runtime + Graph) compare with Compiled(Code+Weigh).
As I know, Graph = TF graph, what does the rumtime means? Does it mean all libraries that graph need to use?
And does Code+Weight mean the binary file which compiled by AOT?

what does the rumtime means? Does it mean all libraries that graph need to use?

Yes, it is everything that you need to actually execute the graph.

And does Code+Weight mean the binary file which compiled by AOT?

It depends on the context, but most likely yes.

It probably makes sense to move any further discussion on this topic to stackoverflow, since it isn't a bug report or feature request. Thanks!

authors: michaelisard sanjoy tensorflowbutler xcv9685


text:
Large multinomial sampling on GPU causes OOM

Sampling m samples from tf.multinomial with support n allocates an unnecessarily large n x m tensor when running on a GPU. For large n and m, this causes out of memory errors. It should be possible to sample from a multinomial distribution without allocating such a large tensor (output tensor is only b x m, where b is the batch size).
Example and traceback:
sample_indices = tf.multinomial(tf.ones([1, 1e6]), 10000, output_dtype=tf.int32)  # sample_indices has shape [1 x 1e4]
with tf.Session() as sess:
    output = sess.run([sample_indices])

Traceback:

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[1,10000,1000000] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[Node: multinomial/Multinomial = Multinomial[T=DT_FLOAT, output_dtype=DT_INT32, seed=0, seed2=0,
_device="/job:localhost/replica:0/task:0/device:GPU:0"](ones, multinomial/Multinomial/num_samples)]]

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):  Springdale LInux 7.4 (Redhat)
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): 1.6.0
Python version: 2.7.5
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: CUDA 9.0, cuDNN 7.0.5
GPU model and memory: TITAN X (Pascal) 12GB
Exact command to reproduce: (see above)

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Bazel version

Nagging Assignee @cy89: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 30 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 46 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 61 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 76 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@mbarnes1 sorry for the slow reply. Just to check, m and n are 1e6 and 1e4 in your example?
@ebrevdo is this memory behavior intended for tf.multinomial?

I believe this is a performance optimization for GPU.  Certain noise is calculated all at once and then combined to generate the multinomial samples.  On the CPU the generator is executed sequentially.  I'm not sure the best way to trade off performance vs. size here.

@ekelsen thoughts?  our implementation isn't the most memory efficient.

Nagging Assignee @cy89: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 29 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@zheng-xq can you comment about whether the efficiency of GPU multinomial is on your radar? If not, should we mark this "contributions welcome"?

This is also a big issue for me.
I have:
batch size=1
number of samples=75520
number of classes=358287
In this context, allocating a tensor of shape (batch size, number of samples, number of classes) is crazy. If there is a trade-off with speed, an alternate function would be welcome, so that the user can choose what he needs.

Nagging Assignee @cy89: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 29 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 44 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 59 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @cy89: It has been 74 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Hi @mbarnes1 ! 1.x are not supported any more. Can we move this issue to closed status as it is not replicating in 2.8 version?

authors: cy89 ebrevdo godefv mbarnes1 mohantym tensorflowbutler


text:
_pywrap_tensorflow_internal.so gdb load very slow!

I build a _pywrap_tensorflow_internal.so have 2.7G big.  so that gdb load very slow ，mybe takes one hour. please help me !
I try many way , such as strip symbols from .so and so on.
I want to ask is there way to use -g in the single tensorflow module by bazel  build ?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 29 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 15 days with no activity and the awaiting response label was assigned. Is this still an issue?

We are closing this issue for now due to lack of activity. Please comment if this is still an issue for you. Thanks!

I am also watching this problem, the debug version of tensorflow v1.13.1 comes to 4.7G.
Any idea now?


text:
Can't quantize nodes In while

I have similar errors with #7162 when quantize_nodes for Tensor2Tensor Transformer model.
It's no problem after freeze_graph, it's also no problem with quantize_weights. But when I qutize_nodes, it will:
tensorflow.python.framework.errors_impl.InvalidArgumentError: The node 'transformer/while/body/parallel_0/body/decoder/layer_prepostprocess/layer_norm/add_1/eightbit' has inputs from different frames. The input 'transformer/while/body/parallel_0/body/decoder/layer_prepostprocess/layer_norm/add_1_eightbit/transformer/while/body/parallel_0/body/decoder/layer_prepostprocess/layer_norm/add_1/Enter/quantize' is in frame 'transformer/while/while_context'. The input 'transformer/while/body/parallel_0/body/decoder/layer_prepostprocess/layer_norm/mul_1/eightbit/requantize' is in frame ''.

I have tried TF1.4 and TF1.7, and the error is the same.
Can anyone help me?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

It has been 16 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

authors: efeiefei tensorflowbutler


text:
Performance drop for CPU graph calculation after upgrading from 1.3 to newer versions

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS 7
TensorFlow installed from (source or binary): binary (pip)
TensorFlow version (use command below): 1.4 and newer for CPU
Python version: 2.7.5 3.5.4
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A
Exact command to reproduce: python test1.py

Describe the problem
Initially I found training using CPU in TensorFlow 1.8 is slow and it appeared only one thread was used. I can confirm multi-threading for individual operations works well (like multiplying two large matrices). But it seems only one operation can be done at the same time. Specifying inter_op_parallelism_threads doesn't help. For version 1.8 and 1.9rc2 and the following test code I wrote, the CPU usage was almost consistently 100% (1 core) according to "top". For version 1.3 and 1.0, it was obvious that the following code used multiple cores and ran significantly faster. I reproduced most results with both Python versions. Here are my test results:

Version time printed
1.0, 1.3: 20s
1.4, 1.5: 50s
1.6: 60s
1.7, 1.8: 80s
1.9 rc2: 130s

The above results were based on a 64GB, 20-core (2x E5 without hyperthreading) machine. I also tried on an AWS t2.2xlarge instance (32GB, 8-core) with Ubuntu 16.04, Python 3.5.2, TensorFlow 1.3 and 1.9 and got similar results.
Source code / logs
import tensorflow as tf
import time
A=[None]*100000
B=[None]*100000
for i in range(0,2):
	A[i]=tf.Variable(tf.random_normal([100,100]))
	B[i]=tf.Variable(tf.random_normal([100,100]))
for i in range(2,100000):
	A[i]=tf.matmul(A[i-1],A[i-2])
	B[i]=tf.matmul(B[i-1],B[i-2])
c=tf.matmul(A[-1],B[-1])
print('graph created')
#the config doesn't help
config=tf.ConfigProto()
config.intra_op_parallelism_threads = 4
config.inter_op_parallelism_threads = 10
t=time.time()
s=tf.Session(config=config)
s.run(tf.global_variables_initializer())
s.run(c)
print(tf.__version__)
print(time.time()-t)

Appended:
I just tried to collect the timeline in 1.3, 1.8 and 1.9rc. They all look similar and reported 5-10 seconds with good parallelism. Maybe the issue is caused by overhead from other parts like scheduling?
Timeline:

Timeline enlarged:

This seems like a reasonable plot. Have you tried the tf.while_loop construct? I'm not sure what the realistic scenario you're trying to handle.

Nagging Assignee @drpngx: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

It has been 29 days with no activity and the awaiting response label was assigned. Is this still an issue?

It has been 44 days with no activity and the awaiting response label was assigned. Is this still an issue?

authors: TianyiChen drpngx tensorflowbutler


text:
Controlling Scheduling of Unrelated Ops

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

TensorFlow version (you are using): 1.11
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
tf.control_dependencies can be used to order the operations on same variables in TensorFlow. What's the alternative of control_dependencies if I want to force relative scheduling of completely unrelated operations i.e. operations that don't share input or output variables? A similar discussion:
https://groups.google.com/a/tensorflow.org/forum/#!topic/discuss/XFnL2WlnWd8
Will this change the current api? How?
Not Sure
Who will benefit with this feature?
Anyone who wants to schedule operations to optimize performance when multiple GPUs are being used.
Any Other info.
Specifically, if you look at this gist, there are two matrix multiplications, mul1 and mul2, is there a way to force TensorFlow to always compute mul1 before computing mul2 if they are placed on the same device ? In case there is no way, how can I go about adding this functionality ? Any hints ?

Hi @alextp ,
Thanks a lot for looking into this.  I am not sure how to add control dependencies among low-level graph operations when created using high-level (contrib level) APIs. For example, I am working with neural network for language model using PTB dataset In this code, at line 180 cudnn_rnn.CudnnLSTM was created. This line will introduce multiple low level compute operations in the tensorflow graph which will have some dependencies. Similarly, at line 144 seq2seq.sequence_loss API is used to create another set of low-level interdependent compute nodes in the TF graph. How can I introduce control_dependencies among the low-level operations created as a result of single high-level API call as well as across low-level operations created as a result of multiple high-level APIs? Also, I want to do this for multiple models/code examples. Incase, there is no easy way out, I was thinking of modifying default TensorFlow scheduler or writing my own scheduler to execute the operations in the sequence I want.
Please let me know whats the best way to go about doing this.
Thanks a bunch for looking into this!

You can always do
with tf.control_dependencies(...):
seq2seq.some_call_gere()
On Mon, Feb 4, 2019 at 2:29 PM xilenteyex notifications@github.com wrote:

@alextp https://github.com/alextp,
Also, I am not seeing an option to re-open the issue, not sure why is this
so.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-460437931,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxbuJOm1XOr4Ou0lqlC1qPAN8nBfXks5vKLREgaJpZM4ZiMtm
.

--

Alex

To do so you need to refactor your code in seq2seq to expose the building
of the operations whose dependencies you want to control.
On Tue, Feb 5, 2019 at 8:34 AM xilenteyex notifications@github.com wrote:

I am not sure, how will this enable me to add control dependencies among
the multiple low level compute operations that were part of
seq2seq.some_call_here(). Can you please elaborate ? For example, let's
say seq2seq.some_call_here() has 3 low-level operations i.e. a, b and
c and c depends on both a and b and there is no dependency
between a and b. How can I make sure that a is always executed
before b ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-460704878,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxY8eg-VpTfmYA3i77LjK0TWJjZGWks5vKbKUgaJpZM4ZiMtm
.

--

Alex

Can I also do this by modifying the TensorFlow scheduler ? I ask this because there are a lot of contrib level calls that I am using and in this way, I have to modify all of those. But, If I can control this by modifying the scheduler that will work for my case as well and I don't need to modify any of the contrib code.

The scheduler should be generic, not specific.
On Tue, Feb 5, 2019 at 9:00 AM xilenteyex notifications@github.com wrote:

Can I also do this by modifying the TensorFlow scheduler ? I ask this
because there are a lot of contrib level calls that I am using and in this
way, I have to modify all of those. But, If I can control this by modifying
the scheduler that will work for my case as well and I don't need to modify
any of the contrib code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-460715708,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxQPbBsyLLObOLyzv4g0FBzuWw-hSks5vKbiogaJpZM4ZiMtm
.

--

Alex

Can I do something like I give an input to the scheduler specific to the current model and if no input is given, it will just do simple topological sorting and execute the graph ? If you think its doable, can you guide me how can I get started on this ?
Thanks!

Can you point me to the code-files that I should look into to understand scheduler implementation and see for myself if I can modify it to my use-case ? I found another GitHub issue very similar to what I am trying to achieve

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/executor.cc
On Tue, Feb 5, 2019 at 10:54 AM xilenteyex notifications@github.com wrote:

Can you point me to the code-files that I should look into to understand
scheduler implementation and see for myself if I can modify it to my
use-case ? I found another GitHub issue
https://github.com/tensorflow/tensorflow/issues/13763 very similar to
what I am trying to achieve
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-460756698,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxXrsSnRlP6YqgHJsgDdv5T2XJEWmks5vKdNfgaJpZM4ZiMtm
.

--

Alex

Hi @alextp , thanks for the link.  I looked through https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/executor.cc I and am kind of stuck at issues similar to reported in https://github.com/tensorflow/tensorflow/issues/13763#issuecomment-337113301. It will be great if you can have a look and advise how should I proceed.
Thanks!

As I told you, I believe what you want to do is infeasible.
On Wed, Feb 6, 2019 at 9:53 AM xilenteyex notifications@github.com wrote:

Hi @alextp https://github.com/alextp , thanks for the link. I looked
through
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/executor.cc
I and am kind of stuck at issues similar to reported in #13763 (comment)
https://github.com/tensorflow/tensorflow/issues/13763#issuecomment-337113301.
It will be great if you can have a look and advise how should I proceed.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-461118406,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxeLkTIO-H506fN_5-ew8Dr42kfv0ks5vKxZ7gaJpZM4ZiMtm
.

--

Alex

Oh okay. Then I am thinking of doing something like add control_flow dependencies after creating the graph. Save this new graph in a file. Reload the new graph into another TF session and execute this new graph with desired control-flow dependencies. Do you think this will work ? Or the control flow dependencies added after node creation will again be ignored in this case as well ?

They won't be ignored, but you do risk generating invalid graphs.
On Wed, Feb 6, 2019 at 10:50 AM xilenteyex notifications@github.com wrote:

Oh okay. Then I am thinking of doing something like add control_flow
dependencies after creating the graph. Save this new graph in a file.
Reload the new graph into another TF session and execute this new graph
with desired control-flow dependencies. Do you think this will work ? Or
the control flow dependencies added after node creation will again be
ignored in this case as well ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-461139844,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxRpW14DMhjBr2cC_nAHlNbIlFMolks5vKyPzgaJpZM4ZiMtm
.

--

Alex

Hi @alextp ,
I tried adding control dependencies after creating the graph, but the graph is not updating. Specifically, I tried modifying the control_inputs field of the ops, but looks like its not mutable. here is the link of the code that i tried. Goal is to modify the graph by adding control dependencies and load this new graph into a new TF program. Do you know what is the right way to do this ?
Also, I tried adding the control_dependencies using the with control_dependencies([control_inputs]) decorator. If dependencies are added using this decorator, they are respected while execution, but the control_inputs field of the operations still stay empty. Am I doing something wrong here ?

I told you this is not supported. You keep insisting on it, don't. Refactor
the code and add the dependencies at creation time. Anything else is
unlikely to work in a reliable way.
On Fri, Feb 8, 2019 at 2:00 PM xilenteyex notifications@github.com wrote:

Hi @alextp https://github.com/alextp ,
I tried adding control dependencies after creating the graph, but the
graph is not updating. Specifically, I tried modifying the control_inputs
field of the ops, but looks like its not mutable. here is the link of the
code that i tried
https://gist.github.com/xilenteyex/bb6b63bafc0691102920b4b6b6f1ad2b.
Goal is to modify the graph by adding control dependencies and load this
new graph into a new TF program. Do you know what is the right way to do
this ?
Also, I tried adding the control_dependencies using the with control_dependencies([control_inputs])
decorator. If dependencies are added using this decorator, they are
respected while execution, but the control_inputs field of the operations
still stay empty. Am I doing something wrong here ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/24587#issuecomment-461960690,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxRT0ttB0KMVBIeIAkRU1Csa6RT3Pks5vLfNzgaJpZM4ZiMtm
.

--

Alex

I don't know how to add dependencies to each low level operation created individually when I create an LSTM cell for a neural network in my model.

After exploring the meta_graph proto buf, I was able to get it to work. Now I can save a graph after modifying the control dependencies and then reload this new graph into another TF session and run it. this way, I am able to add control dependencies after the complete graph is created. For me, this is useful in improving the performance when doing training on multiple GPUs using model parallelism.
I am adding the code for the toy example incase someone else wants to achieve what I did and closing the issue.
toy_mamtul_save.py modifies the TF graph and adds dependencies in the graph of a simple toy matrix multiplication example while toy_matmul_restore_run.py uses the modified graph saved  and executes it and logs the timeline for the execution as well so that one can see that control dependencies added after the graph creation in toy_mamtul_save.py are respected when running toy_matmul_restore_run.py
@alextp  Thanks a lot for your help!

authors: alextp xilenteyex


text:
Improve interface for warmstarting non-TRAINABLE variables in warm_starting_util

System information

TensorFlow version (you are using): 1.13.1
Are you willing to contribute it (Yes/No): Yes (if need be)

Describe the feature and the current behavior/state.
When warmstarting a pre-trained estimator, a common workflow is to warmstart a small number of non-TRAINABLE variables in addition to the TRAINABLE_VARIABLES. In particular, when warmstarting a Keras estimator with BatchNorm layers, it's necessary to manually warmstart the moving_mean and moving_variance variables, since these are non-trainable (see https://github.com/tensorflow/tensorflow/issues/19903, https://github.com/tensorflow/tensorflow/issues/17950, https://github.com/keras-team/keras/pull/9965). Failure to properly restore these variables can break warmstarting for pre-trained Keras models like InceptionV3 (see https://github.com/keras-team/keras/issues/9214).
The current solution is to create tf.estimator.WarmStartSettings() object with vars_to_warm_start=['.*']. As per the TF WarmStartSettings docs , passing in a list will warmstart all variables (including non-TRAINABLE), which allows users to warmstart vars from GLOBAL_VARIABLES. However, as noted by some users, this solution is undesirable because it will warmstart all GLOBAL_VARIABLES (including global_step, accumulators, and other state that we generally don't want to restore).
Ideally, the warmstart API should allow users to cherry-pick additional non-TRAINABLE variables to warmstart alongside TRAINABLE variables. Unfortunately, it's generally not possible to use the regex mechanism in vars_to_warm_start for this purpose, since there's no distinction between trainable and non-trainable variables in the default TF variable naming scheme. Furthermore, in most cases, the WarmStartSettings object is defined before graph creation, so it's not possible for the user to access TRAINABLE_VARIABLES or GLOBAL_VARIABLES at Estimator creation time.
Proposed solution
Extend the tf.train.warm_start() / tf.estimator.WarmStartSettings() API to allow the user to separately define TRAINABLE and non-TRAINABLE variables to warmstart. I can see a couple ways to accomplish this:

Create separate arguments trainable_vars_to_warmstart and nontrainable_vars_to_warmstart, where non-TRAINABLE variables are defined as set(GLOBAL_VARIABLES) - set(TRAINABLE_VARIABLES).
Extend the vars_to_warmstart arg to accept a dict of {"trainable": ".*", "nontrainable": "\moving_\"}, which in this case would warmstart all TRAINABLE_VARIABLES plus the BatchNorm moving mean and variance.

Will this change the current api? How?
Depending on the solution, the args for tf.train.warm_start() / tf.estimator.WarmStartSettings() may change. Something like Option 2 above would probably be able to preserve backwards compatibility reasonably well.
Who will benefit with this feature?
Users who want to warmstart a pre-trained Keras model that contains BatchNormalization layers or other stateful model components not found in TRAINABLE_VARIABLES.
Any Other info.
This blog post gives useful background on partially-overlapping issues related to BatchNorm in Keras.

/cc @eddie-zhou @bhack Any thoughts? It'd be super useful for us to have this in TF 1.15 (if that is in fact a thing). Otherwise, do you have any suggestions for how to deal with this issue? Our current solution involves manually adding the batch_norm moving mean and variance variables to the TRAINABLE_VARIABLES collection prior to creating the Estimator, which is very hacky and comes with its own issues.

Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.

@gabegrand,
Sorry for the delayed response. The documentation of Estimators state:

Warning: Estimators are not recommended for new code. Estimators run v1.Session-style code which is more difficult to write correctly, and can behave unexpectedly, especially when combined with TF 2 code. Estimators do fall under our compatibility guarantees, but will receive no fixes other than security vulnerabilities. See the migration guide for details.

Can you please let us know if this Feature is still relevant? Thanks!

Thanks for following up @rmothukuru. That’s right, this feature is no longer relevant, unless you have a time machine that goes back to pre-pandemic times. (If only I’d know I’d have bigger things to worry about than warmstarting APIs for TF…)

authors: gabegrand rmothukuru tensorflowbutler


text:
[Documentation][TF 1.14] Missing documentation for batch_dims in tf.gather

URL(s) with the issue:
https://www.tensorflow.org/api_docs/python/tf/gather
Description of issue (what needs changing):
In TF 1.14, tf.batch_gather is marked as deprecated, and the keyword batch_dims has been added to tf.gather to handle the batch version. Though, the documentation of tf.gather has only been updated with the type of batch_dims, but not how to use it neither what it does.
The old tf.batch_gather function was documented in TF 1.13. Though, tf.gather is a bit more complex than the old tf.batch_gather, so maybe the documentation of the underlying _batch_gather function could be used.
These two existing documentations could be used to complete the existing documentation of tf.gather.
Correct links
Yes.
Parameters defined
Yes
Returns defined
Yes
Raises listed and defined
Yes
Usage example
Not for using batch_dims.
Submit a pull request?
No.

I would like to make a contribution for this request.

Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.

https://www.tensorflow.org/api_docs/python/tf/gather?version=nightly
tf.gather docs have been greatly expanded. I think this is covered.

authors: MarkDaoust MartinusR agupta4 tensorflowbutler


text:
tf.feature_column.indicator_column OOM

Describe the current behavior
i'm building a CTR model， use tf.feature_column.indicator_column  and tf.feature_column.categorical_column_with_hash_bucket  to make my  categorical feature turn into a multi-hot feature  .  But OOM happens , the error show that API indicator_column generate many one-hot feature , this cause the OOM.
it seems produce many one-hot [batch_size ,categorical list len, bucket_size] then reduce_sum to multi-hot ,this will cost many memory ,how can i solve this problem?

Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary?
Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!


text:
TypeError when using boolean_mask to evaluate hessian matrix

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes (see code snippet below)
OS Platform and Distribution: both on win10 and Linux Ubuntu 18.04
TensorFlow installed from: binary (via pip install tensorflow)
TensorFlow version (use command below): 2.0.0
Python version: 3.7.3
CUDA/cuDNN version: not applicable
GPU model and memory: not applicable

minimum code to reproduce the issue
import numpy as np
import tensorflow as tf
hfe = lambda x,y: np.max(np.abs(x-y)/(np.abs(x)+np.abs(y)+1e-3))
N0 = 3
np0 = np.random.randn(N0)
np2 = np.sum(np0**3)
hessian_np0 = np.diag(6*np0) #the correct hessian via numpy
tf0 = tf.constant(np0)
with tf.GradientTape() as tape0:
    tape0.watch(tf0)
    with tf.GradientTape() as tape1:
        tape1.watch(tf0)
        # tf1 = tf0 # @label-0 pass
        # tf1 = tf.gather(tf0*1, tf.range(N0)) # @label-1 pass
        tf1 = tf.boolean_mask(tf0, tf.ones(N0, dtype=tf.bool)) # @label-2 fail TypeError
        tf2 = tf.math.reduce_sum(tf1**3)
    grad_tf0 = tape1.gradient(tf2, tf0)
hessian_tf0 = tape0.jacobian(grad_tf0, tf0) #the hessian via tensorflow
print('relative error:: np vs tf', hfe(hessian_np0, hessian_tf0.numpy()))

current behavior: both @label-0 @label-1 @label-2 (see comments in the code snippet) could give the correct tf1 (just identical with tf0), but only @label-0 @label-1 could give the correct hessian matrix as hessian_np0 (second order derivative), @label-2 will raise TypeError (see attached traceback.log)
expected behavior: @label-0 @label-1 @label-2 should give the same hessian matrix

@husisy ,
When tried running the code in TF-nightly issue seemed to be fixed, kindly refer the gist of colab.Thanks!

@husisy ,
When tried running the code in TF-nightly issue seemed to be fixed, kindly refer the gist of colab.Thanks!

many thanks.

authors: husisy oanush


text:
REDUCE_MAX operator support for int8 tflite

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS Catalina 10.15.4
TensorFlow installed from (source or binary): tf-nightly (2.2.0-dev20200405)

Any other info / logs
I am using tf-nightly that integrates the new converter and trying to export a fully quantized int8 model using post-training quantization with calibration.
The output model holds int8 operators including int8 input and output nodes. However, there is a specific node REDUCE_MAX that seems not to have support in tflite, therefore, there are quantization and dequantization operations around it, ending-up having a "hybrid" model with reference fp32 implementations as is shown below.

Are there any plans for this OP to be supported in tflite and in TFLu in the future? Is it possible that this operator is already supported but the properties of the operator won't allow full quantization?
Thanks!

@kmonachopoulos,
In order to expedite the trouble-shooting process, could you please provide the complete code to reproduce the issue reported here. Thanks!

Do you want me to provide the whole source code that I used to train the model, the code to export it, and the code for inference? I think that the description of this issue is pretty straight forward above..

@kmonachopoulos,
Could you please provide the code to generate the model and to convert it, so that we can take a look the nodes in it. Thanks!

The code is integrated into a larger framework called DeePavlov that is commonly used for NLP tasks. I can link the repo but I don't think that this is sufficient. Actually, I think that the issue raised here is pretty straight forward ->  REDUCE_MAX is not supported in int8...

I believe we have a kernel that supports this, so we may need to look into the conversion. @suharshs can assist.

I believe we have a kernel that supports this, so we may need to look into the conversion. @suharshs can assist.

Yes, it appears this op is not listed in GetOperatorProperty.

I would also like use reduce_max in an 8 bit quantized model. Is it planned to be added in the near future?
@kmonachopoulos were you able to find a workaround?

Ah bummer. Thanks for letting me know, @kmonachopoulos ! I did see this PR (https://github.com/tensorflow/tensorflow/pull/39946) adding reduce_max for TFLite micro. Maybe it can be ported back to TFLite?

authors: akarmi amahendrakar jdduke kevinyamauchi kmonachopoulos