text:
CMake

Is anyone interested in CMake support? I have a WIP now, I can make a pull request if there is demand.
It comes with a drawback, though. I might have to rearrange the files in the /src folder, and possibly more. Existing Makefiles and VS projects will certainly break.

I am interested in cmake support.
.. greg
On Mon, Feb 20, 2017 at 7:25 PM Tan Li Boon notifications@github.com
wrote:

Is anyone interested in CMake support? I have a WIP now, I can make a pull
request if there is demand.
It comes with a drawback, though. I might have to rearrange the files in
the /src folder, and possibly more. Existing Makefiles and VS projects
will certainly break.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tbeu/matio/issues/53, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA2xDub9eRs0VJw8dI_UGoueKY50M7E7ks5reksBgaJpZM4MGzhx
.

Sorry, I am not a big supporter of CMake, especially not as replacement of VS project files. The autotools build scripts are pretty mature and were just recently updated to newer config templates. Thus, I do not see any added value to have CMake support.

Well Cmake doesn't just replace VS projects, it replaces all project files on all platforms.

Check what the OpenMEEG devs already have done https://github.com/openmeeg/openmeeg/blob/master/cmake/externals/projects_modules/matio.cmake

CMake is also convenient to support all the triplets required to create a vcpkg port of matio ( https://github.com/Microsoft/vcpkg/issues/621 ).
Furthermore, I don't think it is strictly necessary to rearrange the files in the /src directory, so there is not need to break existing build systems.

Thing is, that I was aware of the tedious and still ongoing CMake support for the exiv2 lib/tool. They stopped it after several months of effort. Do not expect that all targets work out of the box. Ever tried CMake for MinGW or VS? It is painful. Sorry, I just had too many bad experiences with CMake. And once it is merged in the repo, it will be me maintaining it, which I simply want to avoid.

I've only had good experiences with CMake. Chances are, you're using it wrongly.
I've had a few cross-platform projects that were much easier to maintain after I moved to CMake, because the configure.ac workflow was too much work to maintain and it was easier to have CMake generate the makefiles instead.
CMakeLists has been incredibly easy to maintain as well, since it is only a handful of lines at most for small projects like this one.

But well, if you still don't want CMake, I guess I can always maintain it on my fork and pull changes from this upstream.

On 02/21/2017 05:00 AM, Greg Sjaardema wrote:

I am interested in cmake support.
.. greg
On Mon, Feb 20, 2017 at 7:25 PM Tan Li Boon notifications@github.com
wrote:

Is anyone interested in CMake support? I have a WIP now, I can make a pull
request if there is demand.
It comes with a drawback, though. I might have to rearrange the files in
the /src folder, and possibly more. Existing Makefiles and VS projects
will certainly break.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tbeu/matio/issues/53, or mute the thread

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

I'm interested toif some support is integrated in matio directly. We are
using an alternate github repo with cmake support and as far as I
remember it was fully compatible with the existing automake/autoconf
solution, without much file rearragment.
https://github.com/openmeeg/matio-openmeeg
Best regards,

Theo.

@tbeu I think this is your decision, after all you create this excellent library. And I personally like
autotools a lot, so I concur with you there.
But just my two cents: I'd also be happy about cmake. For continuous integration on many platforms,
it makes things easier for me. I find it super hard to read Visual Studio project files, let alone change
settings in an automatic build system. I've done it (with perl), but it sucks. cmake takes away most of
this pain for me. Even if its not perfect, its much better than hardcoded Visual Studio project files for
me. But thats just me, I can pull the OpenMEEG cmake integration and live with that, no worries.

It's just a pity because the Cmake port just lags behind the master.... We are updating it regularly but we do not follow all the matio commits...
Integrating the two, would not disturb autotools (they continue to work as before) and would allow an easier way to maintain the cmake port...
And yes, I volunteer to maintain the port (I do it already in the OpenMEEG version, so it would not be too much of a trouble). And of course, others would be welcome...

@papadop I can give you push rights if you like to maintain the cmake port.
Once there is a new release published, I also push to the official sf repo.

Deal.... Le 16 nov. 2017 7:45 PM, tbeu notifications@github.com a écrit :@papadop I can give you push rights if you like to maintain the cmake port.
Once there is a new release published, I also push to the official sf repo.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

@papadop I would like to start with cmake support. Could you try to update to the latest sources so that we can start testing and discussion of the integration? I think its better to start a bit early (before there is the next official release) so that we have something ready when the release comes. I can help if you can give us a start?

Checkout this for a non invasive cmake build.

Is there any news on the possibility of using CMake with matio?

@emmenlau Are you working on CMake support right now?

:+1: on cmake support. I would be happy to help @papadop @JohanMabille and @massich if things come up with cmake.
This would be very helpful to package matio on conda-forge, especially on windows.
Also, we rely on cmake for the xtensor stack and it would make it simpler for us if matio could be built with cmake, especially on windows.

Thanks for considering to contribute. Last commitment I have was from @emmenlau who wanted to go ahead with CMake support.

@SylvainCorlay pick place and date, and I'll be there either IRL or remote.

I won't have time this week but I'm happy to test PRs. Feel free to move ahead.

Well, this issue is open exactly 2 years as of today. No need to rush this week.

Thanks for the interestiong discussion, I also come from the autotools world but slowly I discovered Cmake that helps me to manage in consistent way dependency also for very large system through the so call subuild pattern. At the end it is like moving from functional development to OO.  It was not always trivial but the capability to integrate different platform support with installation instruction and even packaging it is really powerful. Concerning the test I understand the reluctance towards ctest, altough it it possible to wrap its behaviour in almost transparent way. I manage to handle more than 50 different projects (with different tools for testing CppUTest, Google Catch and so on) under an unique ctest project and consequently an unique dashboard.

@MicheleBe Thanks for your comments. Feel free to test #107 (still lots of open issues to tacklebefore ready to merge).

authors: GiulioRomualdi MicheleBe SylvainCorlay emmenlau gsjaardema massich papadop tbeu traversaro undisputed-seraphim


text:
Update star_classes.cwt

stnh fix

Yeah but really?

Absolutely, yes.

Ok more to the point - why would one do that?

Well, STNH does it. Why else? Because you might want to place a planet or an entity defined as planet as the center of a system.
Anyhow, this question is merely theoretical - its possible to do in code, hence the tool should support it.

source: gharchive/pull-request

authors: CaligulaCaesar Goldziher

repo: tboby/cwtools-stellaris-config

license: MIT

license_type: permissive

license_source: github-api


text:
Structured headers don't seem to support

I tried using structured headers in https://github.com/tc30/proposal-explicit-resource-management and this was the result:

The source text is this:
    <emu-clause id="sec-environment-record-operations-adddisposableresource-env-v-hint" type="abstract operation">

        AddDisposableResource (
          _env_ : a declarative Environment Record,
          _V_ : an ECMAScript language value,
          _hint_ : either ~sync~ or ~async~,
        )

      <emu-alg>
        1. If _V_ is *null* or *undefined*, return NormalCompletion(~empty~).
        1. Let _resource_ be ? CreateDisposableResource(_V_, _hint_).
        1. Append _resource_ to _env_.[[ResourceStack]].
        1. Return NormalCompletion(~empty~).
      </emu-alg>
    </emu-clause>

Is there another way I am supposed to annotate insertions?

For what it’s worth, this is why the BigInt Math proposal spec currently uses  on whole sections, rather than just headings.

My workaround was to add an h1.ins class, though it highlights the whole section and doesn't show as an inserted section in the TOC.

Wrapping  around the algorithm name highlights only the name, but sets the aoid to ... and also adds an  to the generated paragraph.
Wrapping a parameter with  (to indicate a new parameter) makes the parameter disappear from the clause.

I tried using  around the section as @js-choi suggested, but it also causes the section entry in the TOC to no longer be marked as an insertion.

Ah, yes, unfortunately that is also true; no  appears in the table of contents.

Sorry about that! Fixed in v9.2.0, which I've just published. The thing you originally tried should now work, including marking it correctly in the TOC. Let me know if there's any place it does not behave as you expect.

source: gharchive/issue

authors: bakkot js-choi rbuckton


text:
Add a badge for specifying current stage

According to https://es.discourse.group/t/a-standard-badge-for-tc39/731, automatically generate a badge for specifying current stage of the proposal.

Such a badge would have to be hosted by tc39.


text:
Config loading broken in 3.9.2?

My config:
{
  "ignorePatterns": [
    {
      "pattern": "^https://pixabay.com"
    }
  ],
  "replacementPatterns": [
    {
      "pattern": "^/",
      "replacement": "{{BASEURL}}/"
    }
  ]
}

If package.json contains:
{
  "devDependencies": {
    "markdown-link-check": "=3.9.0",
    "markdownlint": "^0.25.1",
    "markdownlint-cli2": "^0.4.0",
    "spellchecker-cli": "^4.8.1"
  }
}

I delete node_modules and reinstall.
Then I get the following:
$ ./node_modules/.bin/markdown-link-check -c mdlcconfig.json testfile.md

FILE: testfile.md
  [/] https://pixabay.com/users/succo-96729
  [/] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.
$ ./node_modules/.bin/markdown-link-check -V
3.9.0

the globally installed version works:
$ markdown-link-check -c mdlcconfig.json testfile.md

FILE: testfile.md
  [/] https://pixabay.com/users/succo-96729
  [/] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.
$ markdown-link-check -V
3.9.0

the npx version works:
$ npx markdown-link-check@3.9.0 --config mdlcconfig.json testfile.md

FILE: testfile.md
  [/] https://pixabay.com/users/succo-96729
  [/] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.
$ npx markdown-link-check@3.9.0 -V
3.9.0

If I upgrade to 3.9.2 in package.json, wipe node_modules, and then run npm install, I then get different behaviour:
$ ./node_modules/.bin/markdown-link-check -c mdlcconfig.json testfile.md
FILE: testfile.md
  [✖] https://pixabay.com/users/succo-96729
  [✖] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.

  ERROR: 2 dead links found!
  [✖] https://pixabay.com/users/succo-96729 → Status: 403
  [✖] https://pixabay.com → Status: 403

The npx version fails too:
$ npx markdown-link-check@3.9.2 --config mdlcconfig.json testfile.md

FILE: testfile.md
  [✖] https://pixabay.com/users/succo-96729
  [✖] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.

  ERROR: 2 dead links found!
  [✖] https://pixabay.com/users/succo-96729 → Status: 403
  [✖] https://pixabay.com → Status: 403

$ npx markdown-link-check@3.9.2 -V
3.9.2

Then if I upgrade global version:
$ npm install --global markdown-link-check@3.9.2
$ markdown-link-check -V
3.9.2
$ markdown-link-check -c mdlcconfig.json testfile.md
FILE: testfile.md
  [✖] https://pixabay.com/users/succo-96729
  [✖] https://pixabay.com
  [✓] https://github.com/shearn89/puppet-toughen
  [✓] https://github.com/shearn89/puppet-helloworld

  4 links checked.

  ERROR: 2 dead links found!
  [✖] https://pixabay.com/users/succo-96729 → Status: 403
  [✖] https://pixabay.com → Status: 403

Downgrading fixes the issue.
Looks like it's also in 3.9.1 - I made a repo for testing here.

Hello guys, we are facing the same problem.
We are executing a Circle CI job that runs markdown-link-check with a config file, and it seems that it's ignoring the 'replacementPatterns' configuration set on the file, so it doesn't find the links and returns exit code 1

I think this should be solved by #184. Please try the latest release 3.9.3 and re-open the issue if it's still a problem.

Same problewm here. Scxript isa unable to fetch config file. Regardless its location / name......
https://imgur.com/a/IUUgCdN

authors: cronlabspl leoporoli shearn89 tcort

repo: tcort/markdown-link-check

license: isc

license_source: bigquery


text:
Set exact pixel output dimensions for rasterizers

See https://www.reddit.com/r/golang/comments/mwd1se/tdewolffcanvas_vector_graphics_in_go_mayor_update/gvlqog2?utm_source=share&utm_medium=web2x&context=3. Multiplying DPMM * canvas dimension isn't exact enough for image dimensions, there is a need to specify the exact width and height of rasterized images.

Actually, this is what you do when using a rasterizer, you pass an image.Image with a specific pixel dimension.

repo: tdewolff/canvas


text:
I'm going to buy myself a computer specifically for building your library

Sample computer resources:
Intel® Core™ i9-7980XE Extreme Edition, 64GB RAM
-j x parameter is of interest.

Can you recommend a better processor?
What are the recommended compilation settings for optimal assembly time?

I'm already in the store. Guys! Reply please...

Why wouldn't you use something like Amazon Web Services instead?

Good idea. But. I'll have to turn off the light, gas, water at home.
calculate amazon

Went away to think.
How fast will the first build be performed on this computer?

I built the whole library in less than an hour (Maybe two!), Core i5, 12 GB of RAM, Ubuntu 16.04
No magic config, just the default ones
Do you use multi-threaded build? Try using the following command:
cmake --build . -- -j 5
5 refers to the number of your CPU cores, plus one

https://github.com/tdlib/td/issues/6

Guys! I think tdlib can relieve the load on the brain vk.

repo: tdlib/td


text:
🛑 send.cyberjake.xyz is down

In c13434a, send.cyberjake.xyz (https://send.cyberjake.xyz) was down:

HTTP code: 502
Response time: 335 ms

Resolved: send.cyberjake.xyz is back up in 7d8c618 after 8 minutes.

repo: tdulcet/send-instances-status


text:
✨ Bump CAPI to v1.8.0-rc.1

What this PR does / why we need it:
Test PR for https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/3142
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/test help

Other PR is in merging


text:
eplabor 상담 필드(요청자 / 관리자 필드) / 교육신청 필드 - 초안

# eplabor 상담DB

# 상담 요청자 노출 필드

enquiry:
  - name: 이름(김아무개)
    email: 이메일(eamil@email.com)
    phone: 전화번호(010-000-0000)
    categories: 상담유형 (임금, 퇴직금, 근로시간, 휴일/휴가/휴직, 해고/징계/인사등, 근로계약/취업규칙등, 4대보험 직장내괴롭힘/성희롱/폭행등, 노조, 산업재해, 기타)
    context: 상담 및 문제 내용(long text)

labor-environment:
  - company_name: 사업장명 (255)
    company_owner: 대표자명 (255)
    company_contacts: 연락처 (255)
    company_region: 소재지(은평구, 기타, 무응답)
    company_size: 근로자수(무응답, 5인 미만, 5인이상 10인 미만, 10인 이상 30인 미만, 30인 이상 100인 미만, 100인 이상 )
    company_sectors: 부동산업 및 임대업(제조업, 건설업, 도매 및 소매업, 운수업 및 창고업, 숙박 및 음식점업, 출판.영상.방송통신 및 정보서비스, 금융 및 보험업, 전문.과학 및 기술 서비스업,  사업시설관리 및 사업지원서비스업,  공공행정.국방 및 사회보장 행정, 교육서비스업, 보건업 및 사회복지서비스업, 협회 및 단체.기타 개인 서비스업,  부동산업 및 임대업, 예술.스포츠 및 여가관련 서비스업, 무응답)
   company_years: 운영기간 (4년)
    contract: 근로계약서 작성여부 (작성, 미작성, 미교부, 무응답, 일부작성)
    social-insurance: 4대보험 가입여부 (가입, 미가입, 일부가입, 무응답)
    employment-rules: 취업규칙 작성여부 (작성, 미작성, 게시, 미게시, 무응답)

# 상담 관리자 노출 필드

prescription :
  - reply: 답변 및 관리자 메모
    status: 처리결과(상담종결, 재상담/지속상담, 조정/화해, 규정정비등 지원, 타기관연계 기타)

# eplabor 교육신청 DB

class_participant:
  - name: 이름(김아무개)
    email: 이메일(eamil@email.com)
    phone: 전화번호(010-000-0000)
    class-id: 교육프로그램 id(연결된 교육프로그램)

상담요청 관리 필드 :  http://admin.eplabor.org/admin/#/eplabor_admin/settings/collections/enquiry
교육신청 관리 필드 : http://admin.eplabor.org/admin/#/eplabor_admin/settings/collections/class_participant
라디오 버튼으로 선택하는 필드들은 multi-select 필드로 모두 변경했음.
센터 요청이 있으면 해당 필드들 업데이트하고, 이 이슈에 메모 남길께요. @sunparty @mozodev

repo: team-durumi/eplabor


text:
Make animations controllable

It would be nice we can control the animations

See documentation here:
https://www.chartjs.org/docs/2.9.4/configuration/animations.html

Implement the following properties:

duration
easing

Future code should look like this:
myChart.Animation.Duration = 500 mychart.Animation.Easing = easeOutQuart

Released with version 2.22.12

repo: team-moeller/better-access-charts


text:
Create ForageVaultWrapper

What
Add a 3rd VaultWrapper called the ForageVaultWrapper that will be used to accept PINs and interface with the Forage vault.
Why
More information can be found in the ticket.
Demo
ForageVaultWrapper

VGSVaultWrapper

BTVaultWrapper

@devinmorgan it seems to me that the onFocusChangeListener seems to be working correctly, but I recall we had to add some special handling for this case in the ForagePANEditText class. Do you think this is an issue here too?

@devinmorgan it seems to me that the onFocusChangeListener seems to be working correctly, but I recall we had to add some special handling for this case in the ForagePANEditText class. Do you think this is an issue here too?

@dleis612 - really thoughtful concern you bring up here!
You're right that we did some special handling in the past. I suspect that this will not be an issue in our case here because we're using a android.widget.EditText for as the PIN input. The problem in the past seems particular to com.google.android.material.textfield.TextInputEditText, which we were using in the ForagePANEditText.
👆 is just my best guess. In the worst case if we notice a similar problem, I think we can address it then. Lmk whether this is a productive response to your question though

repo: teamforage/forage-android-sdk


text:
Display issues - HTML to Markdown

[ ] Images
[ ] Subscripts/superscripts
[ ] ol and ul
[ ] Tables

Images
eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/previouschallenges.aspx Challenge 18
Subscripts/superscripts
For example, x squared would simply be displayed as x2
Unicode superscript characters:
⁰¹²³⁴⁵⁶⁷⁸⁹
Unicode subscript characters:
₀₁₂₃₄₅₆₇₈₉
https://en.wikipedia.org/wiki/Superscripts_and_Subscripts
https://www.fileformat.info/info/unicode/block/superscripts_and_subscripts/list.htm
(harder) could check to see if subscript/superscript character exists in Unicode, rather than manually checking for certain ones. This would allow characters like +⁺₊ to be added without manually filtering, useful for recursive relations or indices problems. Kings Maths School website seems to use <sup> and <sub> currently.
ol and ul
eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/challenges-81-100.aspx Challenge 81. Because the list elements are children, the code does not catch them. (since it uses .next_sibling and .contents)
Tables
eg. https://www.kcl.ac.uk/mathsschool/weekly-maths-challenge/previouschallenges.aspx Challenge 5

Could be fun to create a sub/superscript library? A general HTML -> Markdown solution would be helpful; these might be useful: https://github.com/kennethreitz/pyandoc https://github.com/Alir3z4/html2text https://github.com/gaojiuli/tomd

Images seem to be stored as relative links, not absolute links.

https://pypi.org/project/pypandoc/ Seems to be a good solution.

repo: teamshortcut/Discord-Maths-Bot


text:
Method SwitchFrame(frame string) should be implemented with a map[string]interface{}

This would allow specification 8.5 Switch to Frame to be properly implemented as a null id value is required to switch to the default content.

Pull request submitted and approved.
Passing a 0 length string argument to SwitchFrame(frame) is like calling a SwitchToParentFrame() method.

Thanks for keeping me tidy :)

authors: exjimsk tebeka

repo: tebeka/selenium

license: mit


text:
Is it possible to remap holding of right + left mouse buttons?

I have tried to accomplish it by using of SimultaneousKeyPresses
But in this case remapping works only if both buttons pressed at the same time. But what about if right button was pressed first and then after some time left button was pressed also?

Please use this autogens:
    <autogen>
      __KeyOverlaidModifier__
      PointingButton::RIGHT,
      KeyCode::VK_MODIFIER_BUTTON2,
      PointingButton::RIGHT,
    </autogen>
    <autogen>
      __KeyToKey__
      PointingButton::LEFT, ModifierFlag::BUTTON2,
      KeyCode::MISSION_CONTROL,
    </autogen>

authors: muhaos tekezo

repo: tekezo/Karabiner

license: unlicense


text:
Support for .NET 8.0

We're considering to migrate our app to .NET 8:
Does anybody know, if the merge of #62 Update to .NET 6.0 would be sufficient or does nClam require additional support for .NET 8.0?

the nuget package for v7 https://www.nuget.org/packages/nClam works just fine in .net8

Thanks for your information!

authors: Matthias-Heinz markvantilburg

repo: tekmaven/nClam


text:
Add description_file param

Adding description_file param to put step, and updating the documentation accordingly.

for some reason the tests are failing even though I have not change them.. any help with this? 🤔
task: Failed to run task "ci": exit status 1
The command "go get -u -v github.com/go-task/task/cmd/task && task ci" exited with 1.

oh.. that's strange. I think the CI build failures were related the fact that i indented with spaces instead of  tabs. Just glad it's working now 😁

Thanks so much!!

repo: telia-oss/github-pr-resource


text:
Releases 1.3.2

Few minor pom.xml fixes to enable successful release to Maven Central

If the new version number is an update done by the maven release plugin, it overwrites any setting including teh string ${project.version} with the given next version.
-DreleaseVersion=$VER -DdevelopmentVersion=$VER_NEXT -Dtag=$TAG
(I've never tried setting the -DdevelopmentVersion version string to the string ${project.version} which might work.)
The maven-release-plugin is usually two adjacent commits:
[maven-release-plugin] prepare for next development iteration
[maven-release-plugin] prepare release NAME VERSION

authors: afs rvesse

repo: telicent-oss/jena-fuseki-kafka


text:
is that possible to deploy Tell on Ethernet

Hi, I want to conduct some experiments. But I do not have a cluster equipped with RDMA. Is that possible to deploy Tell on Ethernet netowrk?

Currently, Tell does not support ethernet. In the long run, we would like to add Ethernet support to crossbow infinio (the network library Tell uses), but this will require some major refactoring.
One thing that should work is Soft RoCE: https://github.com/SoftRoCE which is a software implementation of Infiniband. SoftRoCE is AFAIK not feature complete, but it should support all features that Tell needs.

Thanks a lot! I will try right now.

repo: tellproject/tell


text:
[Bug] Sqlite pragmas are not applied correctly

What are you really trying to do?
I'm trying to start a dev-server with specific sqlite settings (pragma), for example to enable WAL journal
Describe the bug

The parameters set on the CLI are not applied to the sqlite database
Temporal CLI doesn't support all pragma statements supported by sqlite

Minimal Reproduction

temporal server start-dev --db-filename temporal.sqlite --sqlite-pragma journal_mode=WAL

this should create 3 files:

temporal.sqlite
temporal.sqlite-shm
temporal.sqlite-wal

but only 1 is created: temporal.sqlite - which means that the journal_mode=WAL pragma statement has not been applied to the sqlite DB
also, not all pragma statements supported by sqlite in https://www.sqlite.org/pragma.html are accepted by temporal CLI. the CLI only support 2 statements: journal_mode and synchronous.
Environment/Versions

Temporal CLI Version: v1.1.0

Additional context

this code: https://github.com/temporalio/cli/blob/v1.1.0/temporalcli/devserver/server.go#L324-L329 accepts only 2 statements, but it's not clear why. I don't see any reason to restrict only to these 2...
this line https://github.com/temporalio/cli/blob/v1.1.0/temporalcli/devserver/server.go#L330 adds an underscore _ to the pragma key, but the sqlite plugin doesn't remove it before building the DSN https://github.com/temporalio/temporal/blob/release/v1.23.x/common/persistence/sql/sqlplugin/sqlite/plugin.go#L205 so we end up with an sqlite URL similar to temporal.sqlite?_pragma=_journal_mode=WAL instead of temporal.sqlite?_pragma=journal_mode=WAL

Thanks! Looking at PR.

authors: cretz vbehar

repo: temporalio/cli


text:
[Feature Request] Add the ability to manipulate the schedule from the Rust SDK

Is your feature request related to a problem? Please describe.
It is not possible to change or initiate a schedule from the Rust SDK directly.
Describe the solution you'd like
See attached PR. Open to suggestions though on how to improve. I didn't know if creating direct structs vs using the proto messages was preferred but happy to change.
Additional context
While I tried to follow some of the Go examples, it looks like the Rust SDK is a bit different in terms of the logic.

So this is currently possible, just not with a higher-level API. You can either use the client from the protos crate directly, or you can call https://github.com/temporalio/sdk-core/blob/3d5342c37d6073aad9640942ebf6769411e2e028/client/src/raw.rs#L34 to obtain it from an existing client.
Then you can use the raw gRPC calls to get this done.
That said, it'd be good to have the higher-level interface as well.

authors: Sushisource bdbelevate

repo: temporalio/sdk-core


text:
Pass real WorkflowId and RunId for full replay exposed to users in Worker#replayWorkflowExecution

Actual Behavior
Currently during a full replay that is explicitly exposed to users using Worker#replayWorkflowExecution, JavaSDK supplies fake WorkflowId and RunID which can break determinism if workflow code depends on these values.
Expected Behavior
Actual values from the history should be taken and supplied to the Workflow in WorkflowInfo during replay.
Additional context
https://community.temporal.io/t/recommended-approach-to-testing-backwards-compatibility/5511

The workflow code must not depend on runId as reset operation changes it.

@mfateev Fair, good catch on runId. I will add this comment on WorkflowInfo#getRunId javadoc, because I don't think we state this unobvious fact anywhere.

We should consider putting run_id in unsafe (might be too late though), the only issue is that the current run_id isn't stored in history so we can't provide it to the replayer, we only have original_run_id in WorkflowExecutionStarted which is the closest thing.

There is originalRunId that is preserved on reset.

Addressed by #1497

authors: Spikhalskiy bergundy mfateev

repo: temporalio/sdk-java


text:
Fix Library Loading

Probably better to tell it where to look before looking. ;-)
cmake was bombing out because of this.

As stated, this compiles fine on Ubuntu 18.04 and 16.04. What OS were you on? What version of CMake?

Kali
CMake 3.13.4
On Mon, Feb 25, 2019 at 2:33 PM Jacob Baines notifications@github.com
wrote:

As stated, this compiles fine on Ubuntu 18.04 and 16.04. What OS were you
on? What version of CMake?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tenable/routeros/pull/12#issuecomment-467172046, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AViPgc9tEG06jsxWMuf3YQqYOFFL73Yvks5vREiMgaJpZM4bQuhP
.

I'm not exactly sure what you are doing, but I can't reproduce this.
I just downloaded and installed Kali 64 bit (2019-01-03). I used apt to install cmake (3.13.4) and libboost-all-dev (1.67). I cloned the routeros repo. I moved to poc/cve-2018-14847. Made a directory called build. Moved into build. Typed "cmake .." and everything ran as expected.
Unless you can give me specific instructions to reproduce, I'm not sure what you've done.

I did exactly that as well, and received this error:
CMake Error at /usr/share/cmake-3.13/Modules/FindBoost.cmake:1357 (file):
file STRINGS file "/usr/include/boost/version.hpp" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
CMake Error at /usr/share/cmake-3.13/Modules/FindBoost.cmake:2100 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: /usr/include
Could not find the following Boost libraries:
      boost_program_options
      boost_system
      boost_regex

No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to
the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also
"/root/routeros/poc/cve_2018_14847/build/CMakeFiles/CMakeOutput.log".
Environment variable "Boost_INCLUDE_DIR" was set to "/usr/include/boost/"
Perhaps the Boost include path was set correctly via .bashrc for you or
something that didn't happen for me, and it needed to be picked up via the
include_directories directive.
But that just moving the find_package directive below the includes fixed my
issue.
If you aren't able to reproduce, no biggie, was just trying to help the
next guy.
Cheers,
Nate Kettlewell
On Mon, Feb 25, 2019 at 3:32 PM Jacob Baines notifications@github.com
wrote:

I'm not exactly sure what you are doing, but I can't reproduce this.
I just downloaded and installed Kali 64 bit (2019-01-03). I used apt to
install cmake (3.13.4) and libboost-all-dev (1.67). I cloned the routeros
repo. I moved to poc/cve-2018-14847. Made a directory called build. Moved
into build. Typed "cmake .." and everything ran as expected.
Unless you can give me specific instructions to reproduce, I'm not sure
what you've done.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tenable/routeros/pull/12#issuecomment-467191885, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AViPgbqXxdFMrC6akGOTiHLyDhv3BEtuks5vRFZ1gaJpZM4bQuhP
.

Despite my shortness, I really do appreciate it.
And I agree, what you see does appear to be a failure to find boost. I just prefer to be able to recreate an issue before accepting a PR. I'm going to leave this open and maybe someone else will encounter the problem and set me straight.
The other thing, is that there are many other CMake scripts that should have the same issue. So if someone does confirm this is a problem, it should affect just about every PoC.

I expierienced this issueon a fresh installation, some libraries were not installed.
get install libboost-all-dev
fixed it
maybe overkill, but ican live with the bloat on this temp VM

I Think the Error is Because in the line 8, It's "boost" and not "Boost"
Changing it to "Boost" Solves The CMake Problem.

I'm getting similar errors, and have tried all sort of variations.
$ mkdir build && cd build && cmake ..
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 6.3.9600.
-- The C compiler identification is MSVC 19.16.27034.0
-- The CXX compiler identification is MSVC 19.16.27034.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1125 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1247 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1885 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:17 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1125 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1247 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1885 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:17 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1125 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1247 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:1885 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:17 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Boost (missing: program_options system regex) (found
  suitable version "1.71.0", minimum required is "1.66")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:2142 (find_package_handle_standard_args)
  CMakeLists.txt:17 (find_package)

-- Configuring incomplete, errors occurred!

Including changing stuff in the CMake file:
cmake_minimum_required(VERSION 3.2)

set(PROJECT_NAME btw)
project(${PROJECT_NAME})

# -Wno-dev
set(CMAKE_CXX_FLAGS "-g -std=c++17 -Wall -Wextra -Weffc++ -Wshadow -Wcast-align -Wcast-qual -Woverloaded-virtual -Wstrict-null-sentinel  ... TRUNCATED!

#cmake_policy(NEW)
cmake_policy(SET CMP0074 NEW)

set(Boost_INCLUDE_DIR "C:/Program Files/boost/boost_1_71_0")

include_directories(SYSTEM ${Boost_INCLUDE_DIR})
include_directories(../../common/)

find_package(Boost 1.66 COMPONENTS program_options system regex REQUIRED)

# compilation units
add_executable(${PROJECT_NAME}
                src/main.cpp
                ../../common/md5.cpp
                ../../common/session.cpp
                ../../common/winbox_session.cpp
                ../../common/winbox_message.cpp)

# linking comp / libs
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} -lpthread)

Any ideas how to resolve this?
I have also tried with a number of different env variables:
BOOST_LIBRARYDIR="C:\Program Files\boost\boost_1_71_0\libs"
BOOST_ROOT="C:\Program Files\boost\boost_1_71_0"

export Boost_INCLUDE_DIR="C:\Program Files\boost\boost_1_71_0"
export Boost_LIBRARIES="C:\Program Files\boost\boost_1_71_0\libs"
export Boost_ROOT="C:\Program Files\boost\boost_1_71_0"

still no success.

Hello. I'm on kali linux. Tried to follow install. instructions, to build CVE-2018-14847. after that, in build folder there is no cve_2018_14847_poc file (there is Makefile, cmake_install.cmake, CMakeCache.txt, and CMakeFiles folder.).

@E3V3A sorry, but you're on your own for compilation on Windows. I'd be shocked if I didn't do something Linux specific actually...
@kalimini I need more details than that. What commands did you run?

i`m new one to compilling stuff from github, so cloned routeros, then cmake from poc/bytheway/ and all was fine
PS: used ubuntu 18.04, boost 1.66, standard cmake in oracle virtualbox on windows

repo: tenable/routeros


text:
🛑 Beeldoverleg Website is down

In 26cdfd1, Beeldoverleg Website (https://beeldoverleg.nl) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Beeldoverleg Website is back up in 1c0631e after 13 minutes.

repo: tendsgn/upptime


text:
🛑 Beeldoverleg Website is down

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

HTTP code: 0
Response time: 0 ms

Resolved: Beeldoverleg Website is back up in a23ccc9 after 6 minutes.


text:
How do I load a GradientBoostedTreesModel to predict on new data?

Following the documentation, I save the model as follows:
model.save("deployed_models/regtree/model")

Then, when I tree to load it and predict on new data, I get
ValueError: Exception encountered when calling layer "gradient_boosted_trees_model" (type GradientBoostedTreesModel).

Could not find matching concrete function to call loaded from the SavedModel. Got:

for the few different things I've tried. Here is the relevant part of the training pipeline:
    all_features = ["bw_khz", "qos_rsrp", "qos_rsrq", "qos_rssnr"]
    train_and_val, test_data = train_test_split(all_data, test_size=1-TRAIN_DEV_SPLIT)
    ## create tensors
    # first make smaller dfs with only features and output
    tf_dataset = train_and_val[all_features + ["PrubPct"]]
    tf_test = test_data[all_features + ["PrubPct"]]

    # training tensor
    tf_dataset = tfdf.keras.pd_dataframe_to_tf_dataset(
        tf_dataset,
        label="PrubPct",
        task=tf_core.Task.REGRESSION,
        in_place=False
    )
    # test tensor
    tf_test = tfdf.keras.pd_dataframe_to_tf_dataset(
        tf_test,
        label="PrubPct",
        task=tf_core.Task.REGRESSION,
        in_place=False
    )

    ### model stuff
    # model features
    tf_features = list(map(
        lambda x: tfdf.keras.FeatureUsage(x, semantic=tf_core.Semantic.NUMERICAL, discretized=False),
        NUMERICAL_FEATURES
    ))

    # instantiate the model
    model = tfdf.keras.GradientBoostedTreesModel(
        features=tf_features,
        task=tf_core.Task.REGRESSION,
        exclude_non_specified_features=True,
        max_depth=int((1-DEV_SPLIT)*train_and_val.shape[0] - 1),
        validation_ratio=DEV_SPLIT,#default
        loss='SQUARED_ERROR',
        growing_strategy='BEST_FIRST_GLOBAL',
        max_num_nodes=10**6, # best, seemingly
        verbose=2
    )

    # do the training!
    model.fit(x=tf_dataset, callbacks=[tfa.callbacks.TQDMProgressBar()])

    ### done training
    print(model.summary())

    ## print metrics
    # train/dev
    model.compile(metrics=['mse', 'mae'])
    loss, mse, mae = model.evaluate(tf_dataset)
    print(f"train\nloss={loss}, rmse={math.sqrt(mse)}, mae={mae}")
    # test
    loss, mse, mae = model.evaluate(tf_test)
    print(f"unseen data\nloss={loss}, rmse={math.sqrt(mse)}, mae={mae}")

    # predict on unseen test data
    pd.options.mode.chained_assignment = None
    test_data['predicted_prbu'] = model.predict(tf_test)
    test_data['bias'] = test_data['predicted_prbu'] - test_data['PrubPct']
    pd.options.mode.chained_assignment = 'warn'

The documentation seems to imply I can use numpy for predictions, but that doesn't work.
import tensorflow_decision_forests as tfdf
import tensorflow as tf

test_model = tf.keras.models.load_model('deployed_models/regtree/model')
test_model.predict(test_data[all_features].to_numpy())

Could not find matching concrete function to call loaded from the SavedModel. Got:
      Positional arguments (2 total):
        * Tensor("inputs:0", shape=(32, 4), dtype=float32)
        * False
      Keyword arguments: {}

     Expected these arguments to match one of the following 4 option(s):

    Option 1:
      Positional arguments (2 total):
        * {'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs/bw_khz'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rssnr'), 'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrp'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrq')}
        * False
      Keyword arguments: {}

    Option 2:
      Positional arguments (2 total):
        * {'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rssnr'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs/bw_khz'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrq'), 'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrp')}
        * True
      Keyword arguments: {}

    Option 3:
      Positional arguments (2 total):
        * {'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrq'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rssnr'), 'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrp'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='bw_khz')}
        * False
      Keyword arguments: {}

    Option 4:
      Positional arguments (2 total):
        * {'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrp'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrq'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='bw_khz'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rssnr')}
        * True
      Keyword arguments: {}

    Call arguments received:
      • args=('tf.Tensor(shape=(32, 4), dtype=float32)',)
      • kwargs={'training': 'False'}

I tried converting to Tensor, to list of numpy, list of Tensor, etc. and can't find one that works. What am I getting wrong?

The error (starting with "Could not find matching concrete function to call loaded from the SavedModel. Got:...") indicates that the examples passed to predict are not structured like the examples given during training.
During training: A dictionary of tensors.
During predict: A single tensor. Tensor("inputs:0", shape=(32, 4), dtype=float32)
You need to make sure to pass the same "things".
You have a couple of options:

Call "predict" on a TensorFlow dataset. In your example, this is test_model.predict(tf_test).
Note: The function pd_dataframe_to_tf_dataset can be used to convert from a Pandas dataframe to a TF Dataset.

Use "predict_on_batch". This function can consume dictionaries of tensor directly (no need to create a TF Dataset). However, this only work for small datasets.

Train your model on a numpy array. This way, you can also call "predict" on a numpy array.

You have a couple of options:

Call "predict" on a TensorFlow dataset. In your example, this is test_model.predict(tf_test).
Note: The function pd_dataframe_to_tf_dataset can be used to convert from a Pandas dataframe to a TF Dataset.

Thanks for the quick reply and the help. I tried doing this but I think I'm still missing something:
tf_newdata = tfdf.keras.pd_dataframe_to_tf_dataset(test_data[all_features], task=tf_core.Task.REGRESSION, in_place=False)
test_model.predict(tf_newdata)

ValueError: Exception encountered when calling layer "gradient_boosted_trees_model" (type GradientBoostedTreesModel).

    Could not find matching concrete function to call loaded from the SavedModel. Got:
      Positional arguments (2 total):
        * {'bw_khz': <tf.Tensor 'inputs:0' shape=(None,) dtype=float32>, 'qos_rsrp': <tf.Tensor 'inputs_1:0' shape=(None,) dtype=int64>, 'qos_rsrq': <tf.Tensor 'inputs_2:0' shape=(None,) dtype=int64>, 'qos_rssnr': <tf.Tensor 'inputs_3:0' shape=(None,) dtype=float32>}
        * False
      Keyword arguments: {}

     Expected these arguments to match one of the following 4 option(s):

    Option 1:
      Positional arguments (2 total):
        * {'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrp'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrq'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rssnr'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs/bw_khz')}
        * False
      Keyword arguments: {}

    Option 2:
      Positional arguments (2 total):
        * {'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrp'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rssnr'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs/bw_khz'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='inputs/qos_rsrq')}
        * True
      Keyword arguments: {}

    Option 3:
      Positional arguments (2 total):
        * {'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrp'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='bw_khz'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rssnr'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrq')}
        * False
      Keyword arguments: {}

    Option 4:
      Positional arguments (2 total):
        * {'qos_rsrp': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrp'), 'qos_rsrq': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rsrq'), 'bw_khz': TensorSpec(shape=(None,), dtype=tf.float32, name='bw_khz'), 'qos_rssnr': TensorSpec(shape=(None,), dtype=tf.int64, name='qos_rssnr')}
        * True
      Keyword arguments: {}

    Call arguments received:
      • args=({'bw_khz': 'tf.Tensor(shape=(None,), dtype=float32)', 'qos_rsrp': 'tf.Tensor(shape=(None,), dtype=int64)', 'qos_rsrq': 'tf.Tensor(shape=(None,), dtype=int64)', 'qos_rssnr': 'tf.Tensor(shape=(None,), dtype=float32)'},)
      • kwargs={'training': 'False'}

I ran into the same error, after loading model, even running on the same dataset, the error showed up. In my case, I am building a model using the builder way, the sample code of my workflow is as below:
inspector = model.make_inspector()

sample_tree = inspector.extract_tree(tree_idx=0)

# Create some alias
Tree = tfdf.py_tree.tree.Tree
SimpleColumnSpec = tfdf.py_tree.dataspec.SimpleColumnSpec
ColumnType = tfdf.py_tree.dataspec.ColumnType
# Nodes
NonLeafNode = tfdf.py_tree.node.NonLeafNode
LeafNode = tfdf.py_tree.node.LeafNode
# Conditions
NumericalHigherThanCondition = tfdf.py_tree.condition.NumericalHigherThanCondition
CategoricalIsInCondition = tfdf.py_tree.condition.CategoricalIsInCondition
# Leaf values
ProbabilityValue = tfdf.py_tree.value.ProbabilityValue

sample_tree = inspector.extract_tree(tree_idx=0)
print(sample_tree)

# Build a model
model_trial_idx = 1

# Create the model builder

model_trial_idx += 1
model_path = f"/tmp/manual_model/{model_trial_idx}"

builder = tfdf.builder.CARTBuilder(
    path=model_path,
    objective=tfdf.py_tree.objective.ClassificationObjective(
        label="species", classes=["Adelie", "Gentoo", "Chinstrap"])
    )

builder.add_tree(sample_tree)
builder.close()

manual_model = tf.keras.models.load_model(model_path)
manual_model.predict(dataset_tf)

The error is as below:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-47-d9c72aa7e6da>](https://localhost:8080/#) in <cell line: 1>()
----> 1 manual_model.predict(dataset_tf)

1 frames
[/usr/local/lib/python3.10/dist-packages/keras/engine/training.py](https://localhost:8080/#) in tf__predict_function(iterator)
     13                 try:
     14                     do_return = True
---> 15                     retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
     16                 except:
     17                     do_return = False

ValueError: in user code:

    File "/usr/local/lib/python3.10/dist-packages/keras/engine/training.py", line 2169, in predict_function  *
        return step_function(self, iterator)
    File "/usr/local/lib/python3.10/dist-packages/keras/engine/training.py", line 2155, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.10/dist-packages/keras/engine/training.py", line 2143, in run_step  **
        outputs = model.predict_step(data)
    File "/usr/local/lib/python3.10/dist-packages/keras/engine/training.py", line 2111, in predict_step
        return self(x, training=False)
    File "/usr/local/lib/python3.10/dist-packages/keras/utils/traceback_utils.py", line 70, in error_handler
        raise e.with_traceback(filtered_tb) from None

    ValueError: Could not find matching concrete function to call loaded from the SavedModel. Got:
      Positional arguments (2 total):
        * {'bill_depth_mm': <tf.Tensor 'inputs_2:0' shape=(None,) dtype=float32>,
     'bill_length_mm': <tf.Tensor 'inputs_1:0' shape=(None,) dtype=float32>,
     'body_mass_g': <tf.Tensor 'inputs_4:0' shape=(None,) dtype=float32>,
     'flipper_length_mm': <tf.Tensor 'inputs_3:0' shape=(None,) dtype=float32>,
     'island': <tf.Tensor 'inputs:0' shape=(None,) dtype=string>,
     'sex': <tf.Tensor 'inputs_5:0' shape=(None,) dtype=string>,
     'year': <tf.Tensor 'inputs_6:0' shape=(None,) dtype=int64>}
        * False
      Keyword arguments: {}

     Expected these arguments to match one of the following 4 option(s):

    Option 1:
      Positional arguments (2 total):
        * {'bill_depth_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='bill_depth_mm'),
     'bill_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='bill_length_mm'),
     'flipper_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='flipper_length_mm'),
     'island': TensorSpec(shape=(None,), dtype=tf.string, name='island')}
        * True
      Keyword arguments: {}

    Option 2:
      Positional arguments (2 total):
        * {'bill_depth_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='bill_depth_mm'),
     'bill_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='bill_length_mm'),
     'flipper_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='flipper_length_mm'),
     'island': TensorSpec(shape=(None,), dtype=tf.string, name='island')}
        * False
      Keyword arguments: {}

    Option 3:
      Positional arguments (2 total):
        * {'bill_depth_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_bill_depth_mm'),
     'bill_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_bill_length_mm'),
     'flipper_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_flipper_length_mm'),
     'island': TensorSpec(shape=(None,), dtype=tf.string, name='inputs_island')}
        * True
      Keyword arguments: {}

    Option 4:
      Positional arguments (2 total):
        * {'bill_depth_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_bill_depth_mm'),
     'bill_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_bill_length_mm'),
     'flipper_length_mm': TensorSpec(shape=(None,), dtype=tf.float32, name='inputs_flipper_length_mm'),
     'island': TensorSpec(shape=(None,), dtype=tf.string, name='inputs_island')}
        * False
      Keyword arguments: {}

Appendix

Build a model by hand: https://www.tensorflow.org/decision_forests/tutorials/advanced_colab#setup

@piotrlaczkowski @Realvincentyuan I apologize for not updating sooner.  I have not worked on this project for quite some time. However, @achoum 's solution #(3) did in fact work. I tried both training and predicting on numpy arrays and had no more issues. See sample code below:
"""
train_dataset and test_dataset are both Pandas DataFrames,
all_features is a list of strings, OUTPUT_COL is a string,
and `TREE_DIR`"/model" is where I saved the model after training.
"""
model.fit(
    x=train_dataset[all_features].to_numpy(), y=train_dataset[OUTPUT_COL].to_numpy(),
    callbacks=[tfa.callbacks.TQDMProgressBar()]
)

...
trees_model = tf.keras.models.load_model(os.path.join(TREE_DIR, "model"))
tfdf_features = test_dataset[all_features].to_numpy()
predictions = trees_model.predict(tfdf_features)

Hey @rstz ,
Thank you for your swift response and your interest in the problem. I think we are talking about the serialization/deserialization problem (and not necessarily about data format itself).
I've put together a simple Collab: https://colab.research.google.com/drive/19sepbkGXwM8lI6fZuovvYRAVSiYCNiKl?usp=sharing
so that you may have more details and play around. I've tested all this with all versions (as mentioned in my previous comment, with various systems as well) -> can't figure out what is wrong. I hope this will give much more feedback and we will be able to quickly solve the problem (if there is any).
Thank you !!

Thank you for the repro. This does indeed look like a problem. I can't quite put my finger on it yet, so I'll open a new (more specific) issue for this.

Thank you !
Let me know if I can help.
P.
On Fri 28 Jul 2023 at 10:34, Richard Stotz @.***> wrote:

Thank you for the repro. This does indeed look like a problem. I can't
quite put my finger on it yet, so I'll open a new (more specific) issue for
this.
—
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/decision-forests/issues/136#issuecomment-1655277163,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAP6ASE4BCLGPVD5LSOCVQLXSN2TFANCNFSM6AAAAAAQ3WDZ6E
.
You are receiving this because you were mentioned.Message ID:
@.***>

A loaded model is more restrictive on the data it can consume. https://github.com/tensorflow/decision-forests/issues/187 shows how to update the loading model input to make inference possible.

authors: Realvincentyuan achoum dempsey-ryan piotrlaczkowski rstz

repo: tensorflow/decision-forests


text:
Metadata populated DeepLabV3 (MobileNetV2 and Xception65) models for segmentation

@maringeo this is similar to the previous two PRs of mine.

Hi @sayakpaul , the v2 versions are live at: https://tfhub.dev/sayakpaul/lite-model/deeplabv3-mobilenetv2-ade20k/1/default/2 and https://tfhub.dev/sayakpaul/lite-model/deeplabv3-xception65-ade20k/1/default/2.
This PR has been merged in fd23cd9a407619fbc066f8e01cb203ce512152c2

authors: maringeo sayakpaul

repo: tensorflow/hub


text:
restrcit policy 不能裁剪 FTRL optimizer 对应的slot变量

使用 de variable 的 restrcit policy 时，发现在裁剪variable的时候不能同时裁剪  FTRL optimizer 对应的slot变量，对应的adam的slot变量是可以被裁剪的。
表现为，去checkpoint里取值，返现裁剪1000w的变量，对应的FTRL slot变量有40亿cross_features_LR_task1_zembedding_newsid_user_long_tag_new_Ftrl_linear_mht_9of20-values [179301305, 1]
变量本身则是正常的 zembedding_newsid_user_long_tag_new/cross_features_LR_task1_zembedding_newsid_user_long_tag_new_mht_3of20-values [2500000, 1]
def _get_train_op_wide_deep(loss, global_step, optimizer='radam'):
    with tf.control_dependencies(tf.compat.v1.get_collection(tf.compat.v1.GraphKeys.UPDATE_OPS)):
        trainable_variables = tf.compat.v1.trainable_variables()
        grads = tf.gradients(loss, trainable_variables, name='all_gradients')
        grads_and_vars = zip(grads, trainable_variables)
        wide_variables = tf.compat.v1.get_collection('wide')
        wide_grads_and_vars = list()
        deep_grads_and_vars = list()
        for x in grads_and_vars:
                wide_grads_and_vars.append(x)
            else:
                deep_grads_and_vars.append(x)

        with tf.compat.v1.variable_scope('wide_train_op'):
            ftrl_optimizer = tf.compat.v1.train.FtrlOptimizer(learning_rate=1.0,
                                                              l1_regularization_strength=0.001,
                                                              l2_regularization_strength=0.0,
                                                              name='Ftrl')

            ftrl_optimizer = tfra.dynamic_embedding.DynamicEmbeddingOptimizer(ftrl_optimizer)
            ftrl_optimizer_train_op = ftrl_optimizer.apply_gradients(wide_grads_and_vars,
                                                                                name='apply_wide_gradients')
        with tf.compat.v1.variable_scope('deep_train_op'):
            adam_optimizer = tf.compat.v1.train.AdamOptimizer(learning_rate=0.001, name="Adam")
            adam_optimizer = tfra.dynamic_embedding.DynamicEmbeddingOptimizer(adam_optimizer)
            adam_optimizer_train_op = adam_optimizer.apply_gradients(deep_grads_and_vars,
                                                                     global_step=global_step,
                                                                     name='apply_deep_gradients')
        train_op = tf.group([ftrl_optimizer_train_op, adam_optimizer_train_op])
        return train_op

sloved

repo: tensorflow/recommenders-addons


text:
Error in table.lookup from tf.contrib.lookup when using dataset api

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): All platforms
TensorFlow installed from (source or binary):binary
TensorFlow version (use command below):1.2.1
Python version: 3.6, 2.7

I try the following code:
vocab =tf.contrib.lookup.index_table_from_file('./vocab.txt', num_oov_buckets=1)
dataset = tf.contrib.data.Dataset.from_tensor_slices(tf.constant(['./test1.txt']))
dataset = dataset.flat_map(lambda filename: tf.contrib.data.TextLineDataset(filename))
dataset = dataset.map(lambda line: tf.string_split([line]).values)
dataset = dataset.map(lambda words: table.lookup(words))

gives me the following errors. This is different from the stack overflow issue:
https://stackoverflow.com/questions/44519045/new-dataset-map-transformation-and-lookup-table-incompatible-string-type and appears before referencing the iterator
----> 1 dataset.map(lambda x: table.lookup(x))

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/contrib/lookup/lookup_ops.pyc in lookup(self, keys, name)
    803             name="hash_bucket")
    804         if self._table:
--> 805           ids = self._table.lookup(values)
    806           buckets = math_ops.add(buckets, self._table.size())
    807           is_id_non_default = math_ops.not_equal(ids, self._table.default_value)

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/contrib/lookup/lookup_ops.pyc in lookup(self, keys, name)
    184       # pylint: disable=protected-access
    185       values = gen_lookup_ops._lookup_table_find(
--> 186           self._table_ref, key_tensor, self._default_value, name=scope)
    187       # pylint: enable=protected-access
    188

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/gen_lookup_ops.pyc in _lookup_table_find(table_handle, keys, default_value, name)
    286   result = _op_def_lib.apply_op("LookupTableFind", table_handle=table_handle,
    287                                 keys=keys, default_value=default_value,
--> 288                                 name=name)
    289   return result
    290

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.pyc in apply_op(self, op_type_name, name, **keywords)
    765         op = g.create_op(op_type_name, inputs, output_types, name=scope,
    766                          input_types=input_types, attrs=attr_protos,
--> 767                          op_def=op_def)
    768         if output_structure:
    769           outputs = op.outputs

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/contrib/data/python/framework/function.pyc in create_op(self, op_type, inputs, data_types, **kwargs)
     79           self.extra_args.append(ph)
     80     return super(_ExperimentalFuncGraph, self).create_op(op_type, inputs,
---> 81                                                          data_types, **kwargs)
     82
     83   def _add_tensor_and_parents(self, tensor):

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/function.pyc in create_op(self, op_type, inputs, data_types, **kwargs)
    359           self.extra_args.append(ph)
    360     return super(_FuncGraph, self).create_op(op_type, inputs, data_types,
--> 361                                              **kwargs)
    362
    363

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in create_op(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_shapes, compute_device)
   2504     ret = Operation(node_def, self, inputs=inputs, output_types=dtypes,
   2505                     control_inputs=control_inputs, input_types=input_types,
-> 2506                     original_op=self._default_original_op, op_def=op_def)
   2507     if compute_shapes:
   2508       set_shapes_for_outputs(ret)

/Users/xxx/anaconda/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in __init__(self, node_def, g, inputs, output_types, control_inputs, input_types, original_op, op_def)
   1248                             self.node_def.name,
   1249                             [i.dtype for i in self._inputs],
-> 1250                             input_types))
   1251     self._input_types = input_types
   1252

TypeError: In op 'string_to_index_Lookup/hash_table_Lookup',
input types ([tf.string, tf.string, tf.int64]) are not compatible with expected types
 ([tf.string_ref, tf.string, tf.int64])

However if I use the following referencing python_lookup_ops as outline in NMT, there is no issue..
Why is this?
from tensorflow.python.ops import lookup_ops
table = lookup_ops.index_table_from_file('./vocab.txt', num_oov_buckets=1)

Can you try this again with a nightly build? I believe @ysuematsu fixed this problem in 55f987692a25645a9db06e915c3fa248c3e5193c.

This issue is automatically closed due to lack of activity. Please re-open if this is still an issue for you. Thanks!

authors: Arvinds-ds mrry tensorflowbutler

repo: tensorflow/tensorflow


text:
Lots of C++ compile-time warnings

I noticed a large number of compile-time warnings while compiling TensorFlow on Ubuntu 15.04.
I am building without GPU support using Bazel 0.1.1 (to work around bazelbuild/bazel#586) with the following command: bazel build //tensorflow/cc:tutorials_example_trainer
Many of the errors look like the following:
INFO: From Compiling tensorflow/cc/ops/nn_grad.cc:                                                                                [142/18386]
In file included from ./tensorflow/core/framework/op.h:10:0,
                 from ./tensorflow/core/framework/function.h:10,
                 from tensorflow/cc/ops/nn_grad.cc:1:
./tensorflow/core/lib/strings/str_util.h: In instantiation of 'std::vector<std::basic_string<char> > tensorflow::str_util::Split(tensorflow::StringPiece, char, Predicate) [with Predicate = tensorflow::str_util::AllowEmpty]':
./tensorflow/core/lib/strings/str_util.h:125:41:   required from here
./tensorflow/core/lib/strings/str_util.h:133:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < text.size() + 1; i++) {
                       ^
./tensorflow/core/lib/strings/str_util.h:134:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if ((i == text.size()) || (text[i] == delim)) {
              ^
INFO: From Compiling tensorflow/cc/ops/const_op.cc:
In file included from ./tensorflow/core/framework/op.h:10:0,
                 from ./tensorflow/core/graph/graph_def_builder.h:6,
                 from ./tensorflow/cc/ops/const_op.h:5,
                 from tensorflow/cc/ops/const_op.cc:1:
./tensorflow/core/lib/strings/str_util.h: In instantiation of 'std::vector<std::basic_string<char> > tensorflow::str_util::Split(tensorflow::StringPiece, char, Predicate) [with Predicate = tensorflow::str_util::AllowEmpty]':
./tensorflow/core/lib/strings/str_util.h:125:41:   required from here
./tensorflow/core/lib/strings/str_util.h:133:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < text.size() + 1; i++) {
                       ^
./tensorflow/core/lib/strings/str_util.h:134:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if ((i == text.size()) || (text[i] == delim)) {
              ^
In file included from ./tensorflow/core/framework/attr_value_util.h:7:0,
                 from ./tensorflow/core/framework/node_def_builder.h:5,
                 from ./tensorflow/core/graph/node_builder.h:5,
                 from ./tensorflow/core/graph/graph_def_builder.h:8,
                 from ./tensorflow/cc/ops/const_op.h:5,
                 from tensorflow/cc/ops/const_op.cc:1:
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = float; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<float, 1ul, 1, lon
g int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = float; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<float, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:63:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int d = 0; d < NDIMS; d++) {
                     ^
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = double; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<double, 1ul, 1, l
ong int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = double; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<double, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:64:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = int; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<int, 1ul, 1, long in
t>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = int; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<int, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:65:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = unsigned char; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<unsigned c
har, 1ul, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = unsigned char; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<unsigned char, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:66:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = short int; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<short int, 1ul
, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = short int; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<short int, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:67:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = signed char; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<signed char,
 1ul, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = signed char; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<signed char, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:68:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = long long int; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<long long
int, 1ul, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = long long int; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<long long int, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:69:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = bool; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<bool, 1ul, 1, long
int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = bool; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<bool, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:70:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = std::complex<float>; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<std:
:complex<float>, 1ul, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = std::complex<float>; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:72:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
./tensorflow/core/public/tensor.h: In instantiation of 'typename tensorflow::TTypes<T, NDIMS>::Tensor tensorflow::Tensor::shaped(tensorflow::gtl::ArraySlice<long long int>) [with T = std::basic_string<char>; long unsigned int NDIMS = 1ul; typename tensorflow::TTypes<T, NDIMS>::Tensor = Eigen::TensorMap<Eigen::Tensor<
std::basic_string<char>, 1ul, 1, long int>, 1>]':
./tensorflow/core/public/tensor.h:190:40:   required from 'typename tensorflow::TTypes<T>::Flat tensorflow::Tensor::flat() [with T = std::basic_string<char>; typename tensorflow::TTypes<T>::Flat = Eigen::TensorMap<Eigen::Tensor<std::basic_string<char>, 1ul, 1, long int>, 1>]'
tensorflow/cc/ops/const_op.cc:88:1:   required from here
./tensorflow/core/public/tensor.h:411:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

There are unfortunately a lot more when compiling with --config=cuda -- we'll use this bug to track eliminating most of these warnings.

We've eliminated most of these warnings.  signed/unsigned comparisons are always annoying and will likely creep up, but we'll address them individually as needed.

authors: davidzchen vrv


text:
Array mul  lacking min/max data

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): Linux Ubuntu 16.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:N/A
TensorFlow installed from (source or binary):source
TensorFlow version (use command below):1.10.1
Python version:2.7.3
Bazel version (if compiling from source):0.12.0
GCC/Compiler version (if compiling from source):c++11
CUDA/cuDNN version:7.5.18
GPU model and memory:TITAN,12GB
Exact command to reproduce:
./bazel-bin/tensorflow/contrib/lite/python/tflite_convert --output_file=~/foo.cc   --graph_def_file!/frozen_inference_graph.pb   --inference_type=QUANTIZED_UINT8   --input_arrays=Imageholder --output_arrays=ResizeBilinear_2   --mean_values=127.5   --std_dev_values=127.5

Describe the problem
I modified deeplabv3+(mobilenetv2) model, and train/eval a quantized model with "tf.contrib.quantize.create_training_graph(quant_delay=0)
tf.contrib.quantize.create_eval_graph". The graph show as below:
Placeholder->mul->sub->mobilenetv2
When I convert this frozen model to tflite quantized model, I use input_node = Placeholer. There are error occurred. Does any one know how to solve this problem?
Source code / logs
2018-09-07 10:59:40.172018: F tensorflow/contrib/lite/toco/tooling_util.cc:1635] Array mul, which is an input to the Sub operator producing the output array sub, is lacking min/max data, which is necessary for quantization. If accuracy matters, either target a non-quantized output format, or run quantized training with your model from a floating point checkpoint to change the input graph to contain min/max information. If you don't care about accuracy, you can pass --default_ranges_min= and --default_ranges_max= for easy experimentation.
tf.estimator package not installed.
Aborted (core dumped)

Over to Suharsh to advise.

The issue is that the contrib/quantize rewriter is not very robust to any arbitrary model yet. In particular the Mul and Sub at the start of your network need quantization information for TOCO. This can be resolved by either manually adding a FakeQuantWithMinMaxVars node after mul and sub, see how the rewriter does it: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/quantize/python/quantize.py#L475
That being said this can be complicated, if you goal is to just get a smaller and faster model, I recommend trying the --post_training_quantize flag to tflite_convert. With that you keep the inference_type=FLOAT and pass a floating point version of your model (no need to call the contrib/quantize tool). That may provide sufficient speedup for your use case.

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

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

In feature_extractor.py, there is a function named '_preprocess_zero_mean_unit_range'. 'return (2.0 / 255.0) * tf.to_float(inputs) - 1.0' here will cause this problem. Make this function do nothing, just return the input and declare the input as  'input_image = tf.placeholder(tf.float32, [1, None, None, 3], name=_INPUT_NAME)' will help

@suharshs I'm facing the similar problem due to a layer consistent with several basic tensorflow ops (like Add, Mul, Sigmoid, etc.) Is there any update on the contrib/quantize tool? Or we still have to manually add FakeQuantWithMinMaxVars?
Thanks!

The issue is that the contrib/quantize rewriter is not very robust to any arbitrary model yet. In particular the Mul and Sub at the start of your network need quantization information for TOCO. This can be resolved by either manually adding a FakeQuantWithMinMaxVars node after mul and sub, see how the rewriter does it: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/quantize/python/quantize.py#L475
That being said this can be complicated, if you goal is to just get a smaller and faster model, I recommend trying the --post_training_quantize flag to tflite_convert. With that you keep the inference_type=FLOAT and pass a floating point version of your model (no need to call the contrib/quantize tool). That may provide sufficient speedup for your use case.

I'm wondering how to manually adding a FakeQuantWithMinMaxVars node. I've looked into the link you provided and still cannot find that code .

authors: 406747925 NEU-Gou hufenghufeng jdduke raninbowlalala suharshs tensorflowbutler tofulawrence


text:
Tensorboard is not showing the last checkpoint's evaluation result

I trained some object detection models with custom data for 4K steps using TensorFlow Object Detection API, and evaluated them during the training. Evaluation is done for all checkpoints, I watched the results on the console.
However, I can't see the last two checkpoints' evaluation results on Tensorboard for some raeson. It shows the evaluation result of 3K steps, and nothing after that. I can see that evaluation is completed on the console, and also in the folder.
There are no error messages on the console when I start Tensorboard. I can see that training results are uploaded completely to Tensorboard, the only missing thing is the last evaluation results.
I tried evaluating the latest checkpoints again, but nothing changed. At the end of the evaluation I receive a message saying that metrics are recorded to summary...
The training checkpoints are saved in every 10 minutes, and evaluation takes 12 minutes. But even in this case, I expect the latest checkpoint's evaluation results to be there.
When I try to download the csv file from Tensorboard I also can't see the last two checkpoints' evaluations.
What could be the reason?
I0311 16:57:21.281645 MainThread program.py:165] Not bringing up TensorBoard, but inspecting event files.
I0311 16:57:21.281645 140028330256128 program.py:165] Not bringing up TensorBoard, but inspecting event files.
======================================================================
Processing event files... (this can take a few minutes)
======================================================================

Found event files in:
./CN_flow1_95/eval
./CN_flow1_95/train

These tags are in ./CN_flow1_95/eval:
audio -
histograms -
images
   image-0
   image-1
   image-2
   image-3
   image-4
   image-5
   image-6
   image-7
   image-8
   image-9
scalars
   Losses/Loss/BoxClassifierLoss/classification_loss
   Losses/Loss/BoxClassifierLoss/localization_loss
   Losses/Loss/RPNLoss/localization_loss
   Losses/Loss/RPNLoss/objectness_loss
   PascalBoxes_PerformanceByCategory/AP@0.5IOU/b'cyclist'
   PascalBoxes_PerformanceByCategory/AP@0.5IOU/b'motorcyclist'
   PascalBoxes_PerformanceByCategory/AP@0.5IOU/b'pedestrian'
   PascalBoxes_Precision/mAP@0.5IOU
tensor -
======================================================================

Event statistics for ./CN_flow1_95/eval:
audio -
graph
   first_step           0
   last_step            0
   max_step             0
   min_step             0
   num_steps            1
   outoforder_steps     []
histograms -
images
   first_step           0
   last_step            4112
   max_step             4112
   min_step             0
   num_steps            7
   outoforder_steps     []
scalars
   first_step           0
   last_step            4112
   max_step             4112
   min_step             0
   num_steps            7
   outoforder_steps     []
sessionlog:checkpoint -
sessionlog:start -
sessionlog:stop -
tensor -
======================================================================

These tags are in ./CN_flow1_95/train:
audio -
histograms
   ModelVars/...
images -
scalars
   Losses/TotalLoss
   Losses/clone_0/Loss/BoxClassifierLoss/classification_loss
   Losses/clone_0/Loss/BoxClassifierLoss/localization_loss
   Losses/clone_0/Loss/RPNLoss/localization_loss
   Losses/clone_0/Loss/RPNLoss/objectness_loss
   Losses/clone_1/Loss/BoxClassifierLoss/classification_loss
   Losses/clone_1/Loss/BoxClassifierLoss/localization_loss
   Losses/clone_1/Loss/RPNLoss/localization_loss
   Losses/clone_1/Loss/RPNLoss/objectness_loss
   Losses/clone_2/Loss/BoxClassifierLoss/classification_loss
   Losses/clone_2/Loss/BoxClassifierLoss/localization_loss
   Losses/clone_2/Loss/RPNLoss/localization_loss
   Losses/clone_2/Loss/RPNLoss/objectness_loss
   batch/fraction_of_150_full
   clone_0/Losses/clone_0//clone_loss
   global_step/sec
   queue/prefetch_queue/fraction_of_5_full
tensor -
======================================================================

Event statistics for ./CN_flow1_95/train:
audio -
graph
   first_step           0
   last_step            0
   max_step             0
   min_step             0
   num_steps            1
   outoforder_steps     []
histograms
   first_step           0
   last_step            4110
   max_step             4110
   min_step             0
   num_steps            28
   outoforder_steps     []
images -
scalars
   first_step           0
   last_step            4110
   max_step             4110
   min_step             0
   num_steps            54
   outoforder_steps     []
sessionlog:checkpoint
   first_step           1
   last_step            4111
   max_step             4111
   min_step             1
   num_steps            7
   outoforder_steps     []
sessionlog:start
   outoforder_steps     []
   steps                [0, 4110]
sessionlog:stop
   outoforder_steps     []
   steps                [0, 0]
tensor -
======================================================================

This issue is more suitable on tensorboard repo. The folks maintaining tensorboard repo can address your query better. Please post this issue on tensorboard repo. Thanks!

authors: bibererik ymodak


text:
Failed to load the native TensorFlow runtime

System information

OS Platform: Windows10
TensorFlow installed from (source or binary): binary
TensorFlow version: 1.13.1
Python version: Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Installed using virtualenv? pip? conda?: virtualenv
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: Cuda V10.0.130/ cuDNN: cudnn-10.0-windows10-x64-v7.5.0.56
GPU model and memory: RTX 2070 8G
NVIDIA Driver: NVIDIA-SMI 416.34       Driver Version: 416.34       CUDA Version: 10.0

Packages
Package              Version

absl-py              0.7.1
astor                0.8.0
gast                 0.2.2
grpcio               1.21.1
h5py                 2.9.0
Keras-Applications   1.0.8
Keras-Preprocessing  1.1.0
Markdown             3.1.1
mock                 3.0.5
numpy                1.16.4
pip                  19.1.1
protobuf             3.8.0
setuptools           41.0.1
six                  1.12.0
tensorboard          1.13.1
tensorflow-estimator 1.13.0
tensorflow-gpu       1.13.1
termcolor            1.1.0
virtualenv           16.6.0
Werkzeug             0.15.4
wheel                0.33.4
Description
I have tried every possible combination of CUDA/cuDNN and I still cannot make it work (last 3 days fighting, I need help). I even installed 3.7 (tried already with python 3.6.6 and 3.68)
Stack-trace
(venv) F:\workspace\ml>python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
Traceback (most recent call last):
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\workspace\ml\venv\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "F:\workspace\ml\venv\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "F:\workspace\ml\venv\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python_init_.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\workspace\ml\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\workspace\ml\venv\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "F:\workspace\ml\venv\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
Paths
C:\WINDOWS
C:\WINDOWS\system32
C:\WINDOWS\System32\Wbem
F:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin
F:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\CUPTI\libx64
F:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include
F:\Program Files\NVIDIA GPU Computing Toolkit\TensorRT\TensorRT-5.0.4.3\lib
F:\Program Files\NVIDIA GPU Computing Toolkit\cuDNN\cudnn-10.0-windows10-x64-v7.5.0.56\bin
F:\Program Files\NVIDIA GPU Computing Toolkit\cuDNN\cudnn-10.0-windows10-x64-v7.5.0.56\include
C:\Users\JIAM\AppData\Local\Programs\Python\Python37-32
C:\Users\JIAM\AppData\Local\Programs\Python\Python37-32\Scripts
C:\Program Files\NVIDIA Corporation\NVSMI
...
(In this order)

Installing tensorflow-gpu with pip proved to be one of the most frustrating experiences.
I still do not know what it was missing, after a while looked and installed using conda.
If I ever find out what was the problem I will post, I almost certain it is the way the package is compiled; I used dependency walker and the only thing I noticed is an error related to windows API references which I am not even sure why were even there to begging with unless the package was compiled using a Windows 8 machine.

Just to verify did you try to follow instructions from TensorFlow website for installing TF binary. Also we need to install proper Microsoft Visual c++ version. Please have a look or let us know if you have already tried the steps. Thanks!

Just to verify did you try to follow instructions from TensorFlow website for installing TF binary. Also we need to install proper Microsoft Visual c++ version. Please have a look or let us know if you have already tried the steps. Thanks!

I followed  the instructions.
As a note: Using dependency walker I found issues with API-MS-WIN-XXXXX.DLL and EXT-MS-WIN-XXX.

Please have a look on this issue and let us know if that helps to resolve the problem. 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!

Instructions that I followed
Without CUDA: https://www.pugetsystems.com/labs/hpc/How-to-Install-TensorFlow-with-GPU-Support-on-Windows-10-Without-Installing-CUDA-UPDATED-1419/
With CUDA: https://towardsdatascience.com/installing-tensorflow-with-cuda-cudnn-and-gpu-support-on-windows-10-60693e46e781
Also useful for future reference: https://medium.com/@mainakdutta76/gpu-configuration-for-deep-learning-f35a8bf0f5e1

authors: GateraGael achandraa el-cucu


text:
model.fit_generator(verbose=0/2) prints multiple lines per epoch during validation.

Custom code: Yes (included below)
OS Platform: Debian GNU/Linux 9.8 (stretch) (GNU/Linux 4.9.0-8-amd64 x86_64)
TensorFlow installed from: conda install -c anaconda tensorflow-gpu
TensorFlow version: 1.13.1
Python version: 3.7.1
CUDA/cuDNN version: 10.0
GPU model and memory: Tesla P4 7611MiB
Describe the current behavior
When verbose=0, it should be silent, but it prints out multiple lines during validation. It's same for verbose=2.
Describe the expected behavior
It should be "0 = silent, 1 = progress bar, 2 = one line per epoch."
Code to reproduce the issue
``
import numpy as np
from tensorflow.keras.datasets import mnist
from tensorflow.keras.layers import Input, Dense, Flatten
from tensorflow.keras.models import Model
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.callbacks import Callback
from tensorflow.keras.utils import Sequence
class CustomCallback(Callback):
def init(self, patience=10, restore_best=True, dir="weights"):
super().init()
self.best_score = 0.0
self.best_epoch = 0
self.best_weights = None
self.patience = patience
self.restore_best = restore_best
def on_epoch_end(self, epoch, logs={}):
	score = logs["val_acc"]
	if score>self.best_score:
		self.best_score = score
		self.best_epoch = epoch
		self.best_weights = self.model.get_weights()
		print(f"\nBest Score: {self.best_score*100:.2f}")
	else: print(f"\nBest Epoch: {self.best_epoch+1}, Best Score: {self.best_score*100:.2f}")

	if self.patience>0 and epoch-self.best_epoch >= self.patience:
		print(f"\nStopping... Best Epoch: {self.best_epoch+1}, Best Score: {self.best_score*100:.2f}")
		self.stopped_epoch = epoch
		self.model.stop_training = True
		if self.restore_best: 		self.model.set_weights(self.best_weights)

class DataGenerator(Sequence):
def init(self,x, y, batch_size=32):
self.x = x
self.y = y
self.batch_size = batch_size
self.on_epoch_end()
def __len__(self):
	return int(np.ceil(len(self.x) / float(self.batch_size)))

def on_epoch_end(self):
	self.indexes = np.arange(len(self.x))
	np.random.shuffle(self.indexes)

def __getitem__(self, index):
	indexes = self.indexes[index*self.batch_size:(index+1)*self.batch_size]
	x_batch = self.x[indexes]
	y_batch = self.y[indexes]
	return x_batch, y_batch

def dense_model(input_shape, output_shape):
inputs = Input(input_shape)
x = Flatten()(inputs)
x = Dense(300, activation='relu')(x)
x = Dense(100, activation="relu")(x)
outputs = Dense(output_shape, activation='softmax')(x)
model = Model(inputs=inputs, outputs=outputs)
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
return model
(x_train, y_train), (x_test, y_test) = mnist.load_data()
height, width = 28, 28
input_shape = (height, width)
output_shape = 10
x_train = x_train/255
x_test = x_test/255
y_train = to_categorical(y_train, output_shape)
y_test = to_categorical(y_test, output_shape)
model = dense_model(input_shape, output_shape)
history = model.fit_generator(DataGenerator(x_train, y_train), epochs=12, validation_data=DataGenerator(x_test, y_test), verbose=0)
``
Other info / logs
Epoch 1/12 1/313 [..............................] - ETA: 17s - loss: 0.1513 - acc: 0.9688 25/313 [=>............................] - ETA: 1s - loss: 0.1436 - acc: 0.9525 48/313 [===>..........................] - ETA: 0s - loss: 0.1517 - acc: 0.9479 ...

@jsl303 Please provide minimal code snippet to reproduce the issue. Thanks!

Yes, I provided the code.

@jsl303 I tried reproducing the issue on colab with Tf-gpu 1.13.1 but I am unable to reproduce it. Can you help me to reproduce the reported issue. Thanks!

It's strange. In Notebook environment, nothing gets printed as expected.
However, if I run as a script, it prints out the validation.
I also tried on colab, nothing gets printed.
I tried on Kaggle as a python script as well as my local machine, then
validation result gets printed.
Maybe Jupyter suppresses the output?
Could you try on your local machine with just command line? It's a very
simple, so it shouldn't take long at all.
Thanks!

@jsl303 I tried running in Spyder IDE, Jupyter and google colab and I don't see those lines of output. It may be due to some logging settings.
Sorry, I'm going to close this issue because I don't think it's feasible for us to fix anything in Tensorflow to resolve. Feel free to open a new feature request or re-open if you feel strongly about that. Thanks!

authors: gadagashwini jsl303 jvishnuvardhan


text:
GPU Support for Poisson Random Noise Generator in TensorFlow

I am interested in using Generative Adversarial Network (GAN) to generate synthetic images for algorithm training. Poisson-distributed noise is an important source of noise in images. However, it does not appear that the TensorFlow Poisson noise generator has GPU support. The following code fails to execute:
import tensorflow as tf

with tf.Session() as sess:
    with tf.device("/gpu:0"):
        test = sess.run(tf.random.poisson(1.0, [], dtype=tf.float32))
print(test)

with the error message
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation random_poisson/RandomPoissonV2: node random_poisson/RandomPoissonV2 (defined at /home/kjmiller/anaconda3/envs/tf_clone/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1748)  was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device.
	 [[random_poisson/RandomPoissonV2]]

When training my model (the code is too much to place here), I get
LookupError: No gradient defined for operation 'Generator/RandomPoissonV2' (op type: RandomPoissonV2)

I have tried overriding the gradient in the hopes that is the issue, but that did not work. I am pretty should that the second error also has to do with GPU support, as the lam argument input to tf.random.poisson is a tensor that lives in GPU memory.
It would be a tremendous help if TensorFlow had GPU support for Poisson-distributed noise, as this is a fundamental noise source for any image taken with a camera.

@kjmiller944, Which Tensorflow version are you using.
I tried with Tf 2.0, i didn't receive error message.Please take a look at gist here. Thanks!

@gadagashwini thank you. I just realize now that I did not correctly install my TensorFlow 2.0 GPU version. I am still getting the second error message regarding the ValueError but I want to try something and get back to you. Thank you for your quick reply.

@kjmiller944, Any update!