Enable Kubernetes managers

Enable managers as grouped on this page[1]. The mintmaker image should have all the required dependencies to run these managers. Also, since they only analyze yaml/json, there shouldn't be any "hidden" dependencies either.
The new managers will use a new branch format, from renovate/<dep name> to konflux/mintmaker/<branch>/<dep name>. Branch name is included to resolve branch conflicts if multiple branches are onboarded onto Konflux. Mintmaker name is added so that end users can more easily understand where the PR/MR came from.
Refers to CWFHEALTH-3178
[1] https://docs.renovatebot.com/modules/manager/

This looks nice! But you need to add additionalBranchPrefix and branchPrefix to the already enabled managers too.

@staticf0x @gnaponie I'd like to get more comments on using 'konflux/mintmaker' as a branch prefix. Do you think 'konflux' alone is sufficient, or should we include 'mintmaker'?
@querti do you have an example repo can be used for testing one or more of these managers to verify the branch name can take affect as expected?

@qixiang the branch name can be seen in this PR: https://github.com/querti/renovate-tests/pull/9

@staticf0x @gnaponie I'd like to get more comments on using 'konflux/mintmaker' as a branch prefix. Do you think 'konflux' alone is sufficient, or should we include 'mintmaker'?
@querti do you have an example repo can be used for testing one or more of these managers to verify the branch name can take affect as expected?

maybe should we use konflux-mintmaker instead of konflux/mintmaker?

This looks nice! But you need to add additionalBranchPrefix and branchPrefix to the already enabled managers too.

When changing branch names, we need to be cautious. Existing open PRs with the old branch names can become stale and cause confusions if we use new branch names. If we're going to change branch name for existing managers we probably need to communicate this with Konflux team or users carefully.

maybe should we use konflux-mintmaker instead of konflux/mintmaker?

If we decide to include mintmaker in the prefix, I'd prefer konflux/mintmake to align with the style of existing Konflux PRs. Changing the branch name is a significant change in Renovate, and we need to consider it carefully.

This looks nice! But you need to add additionalBranchPrefix and branchPrefix to the already enabled managers too.

When changing branch names, we need to be cautious. Existing open PRs with the old branch names can become stale and cause confusions if we use new branch names. If we're going to change branch name for existing managers we probably need to communicate this with Konflux team or users carefully.

That's a fair point. But if we won't do that we won't resolve with this commit the conflict with multiple branches. We'd still need to find another solution for the already enabled managers.

That's a fair point. But if we won't do that we won't resolve with this commit the conflict with multiple branches. We'd still need to find another solution for the already enabled managers.

I understand your point. This PR is not intended to resolve the issue with enabled managers. Its purpose is to add new Kubernetes managers and prevent similar branch issues with these new managers, which would be difficult to change later. For enabled managers, they will be fixed in other PRs :)

I understand your point. This PR is not intended to resolve the issue with enabled managers. Its purpose is to add new Kubernetes managers and prevent similar branch issues with these new managers, which would be difficult to change later. For enabled managers, they will be fixed in other PRs :)

:+1:  let's do it then. I don't like that much that we have inconsistent behaviors across different managers. But perhaps that's "the lesser evil" in this situation :)

@gnaponie However, this reminds me that we have a new manager git-submodules, which hasn't been deployed to staging or production yet. We should change the branch now rather than waiting until after deployment.

Yes, @querti could you add this options for git-submodules too? Then we can merge this PR. Thank you.

Yes, @querti could you add this options for git-submodules too? Then we can merge this PR. Thank you.

Done.


Only support float or double type?

I think support int, long Tensor is fundamental

For a production ready environment I agree, that would be the case.
But for the moment I don't think you want to use a JVM based solution for deep learning or similar in production.
There just isn't a good enough numerical library for it.
And writing one is not something I have the time for.


design sketch for the Quick App tile

Note: this idea should be used to solve the issue make better use of GistRun in the context of Monterey. It is kept separate as it is a larger concept than GistRun use in Monterey)

I really like the quick setup needed to make a small sample app and run it using the GistRun app. This GistRun used to create the "live problem reports* is a good example of such situation.
Ideally, I would like us to have the "embedded" version of GistRun in Monterey at some point but at the moment, I think that we should get by with a collection of prebuilt gists  similar to the Aurelia KendoUI component - problem report.
Each of the gists from the above defined collection is called a Quick app skeleton and each of them is specifically built for a given application type. The type is an object that contains the application language (Javascript / Typescript), platform (node / asp.net) and loader (SystemJS, Webpack, RequireJS).
I will address the Quick App UX issues separately - at the moment just assume that at the time the user clicks on the Quick App tile, Monterey "knows" what type of the application wants to create. The following actions should take place:

Start the browser (the type of the browser is defined in user preferences) with the clone of a requested Quick app template

I think it's useful for us to check out the aurelia quick start guide since that references aurelia via a CDN. Is this something we can use?
Also, while monterey does know what your project look like, that may not be what you want to use in a gist. So we need a screen for this where monterey provides defaults.

Somehow, I have the feeling that my above post is not understood.
Quick App is meant to be a "RAD" like tool, which should be able to create and run a gist that contains almost any application type that Monterey supports now. It almost indicates the Quick App should be called Quick Monterey should be "parallel to" and not "part of" Monterey"
I would like to prototype this idea (as an Monterey branch) - but as I will be very slow doing this (Monterey is still a secret for me as far as the internals go), I would like to first finish the current testing and get this one out.

I would like to prototype this idea (as an Monterey branch) - but as I will be very slow doing this (Monterey is still a secret for me as far as the internals go)

Instead of prototyping a running version of this, perhaps it's quicker/easier to create mockups first (https://moqups.com/#!/)

That is what I will do, yes.

Let me start with the a lot more specific approach - beginning with the GistID which is presented to GitRun tool as https://gist.run/?id=809bf843b45efdf8589179f88fd1e507.
This gist is really a collection of files (screenshot below)

where app.html and app.js are "prebuilt" Aurelia Component that the user is expected to customize, and index.html and main.js have all needed information that this Aurelia Component needs to be "built and run" - with all the references to remote resources defined in index.html, including our own bundle
https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/1.0.0-beta.1.0.6/config2.js"

this gist is a complete definition of a mini Aurelia App consisting of a single, empty component

<template>

Loaded

</template>

and
/*  put your view model code here */
export class App {

}

As we know from the samples in KendoUI catalog app, these small applications could be quite impressive and all you need to do to make them alive is to push on the Run button:

This describes the specific case: writing and running a mini Aurelia-KendoUI bridge based application in a nice cozy environment - almost like writing Basic apps.
What defines the nice, cozy environment, we need to build?

What are Quick App types?
In a sense - sky is the limit. Starting from using this tool to create problem reports using Monterey to using using this feature as a beginning of a RAD IDE :smile: .
What defines the nice, cozy environment, we need to build?
In order to ensure that Monterey remains relatively lightweight we should continue hosting all run-time components at places where they live now, despite the obvious fact that Quick App would be a lot more responsive if the bundles were local. This perhaps calls for the preference where the bundles are downloaded once and kept local - in which case we need to ensure the support for keeping them current.
In summary - we need to provide as many different bundles as many Quick Apps we want to support (KendoUI based, Materialize based, etc)
It is also important to make a good judgment about the effort it would take to be able to "teach" Monterey to use any existing Quick App (read a given gist) and expand it further to become a "normal" app.
Open issues

I am not sure that I fully understand what does GistRun do when the user clicks on the Run button (see this)

Still missing
Quick App UX
...

While I like this idea, one problem has been mentioned very briefly, but needs to be addressed with more detail. Hopefully this will make Quick apps less limited and more powerful.
So we know that the biggest limitation of gist.run is the way packages are loaded. For the kendo bridge we have an external SystemJS bundle that we can reference from index.html. This bundle contains everything we might want to use in a gist.
But if we wanted to use MomentJS in this gist (which is not in the bundle), then we would have a problem. We would need to update the external bundle so that it includes MomentJS. But there is another, much easier way. We can edit the index.html and use a script tag to reference MomentJS from a CDN: . With this script tag in index.html we can use MomentJS in the gist.
Now comes the thought behind my comment:

I think it's useful for us to check out the aurelia quick start guide since that references aurelia via a CDN. Is this something we can use?

I only know that this quick start guide uses aurelia via a CDN. I do not know how this works, but if we can load aurelia via a script tag () then Aurelia can be loaded in the same way as MomentJS.
So if we can do that, then we can create a UI where the user can say "I want Aurelia, Kendo, and I want MomentJS". When Monterey creates the quick app (the app.html, app.js and index.html files), the index.html will be:

Take a look at https://cdnjs.com/. With CDNJS you can search for a library and copy the CDN URL into your app. Now, in the UI where users select the libraries to use for a quick app, we can use cdnjs as a datasource. You would be able to search for, and choose "MomentJS" but also any other library that is on cdnjs.
We're not done yet, as many aurelia plugins will not be hosting their plugins on a CDN (aurelia-kendoui-bridge included). So this is something we need to think about some more.

I think it's useful for us to check out the aurelia quick start guide since that references aurelia via a CDN. Is this something we can use?

Aurelia Quick Start does not expect any CDN-like hosted aurelia component. Instead the reader is asked to fetch this zip file which contains:

so all reeferences to aurelia framework are "project-local".
I did not find any CDN (including cdnjs, where there is one single month-old request for aurelia).
There are several OSS (free) CDN hosts.
I will discuss the Quick App tile idea with Ron (unless you disagree with that)

@JeroenVinke writes above

So we know that the biggest limitation of gist.run is the way packages are loaded. For the kendo bridge gist we have an external SystemJS bundle that we can reference from index.html. This bundle contains everything we use in our gists.

But if we wanted to use MomentJS in this gist (which is not in the bundle), then we would have a problem. We would need to update the external bundle so that it includes MomentJS. But there is another, much easier way. We can edit the index.html and use a script tag to reference MomentJS from a CDN: . With this script tag in index.html we can use MomentJS in the gist.

In order to provide the continuity of this discussion, I propose to do it here, regardless of the long thread. Once we have a conclusion, I will extract the relevant part and make a new condensed version of this document.


nvidia_x11_beta: nvidia_x11 -> 418.30

Motivation for this change
Built and tested on 4.20.5 patched with bcachefs support.
Where should libnvidia-opticalflow.so be put?
Added initial support for G-SYNC Compatible monitors. See the README for details.
Added support for stereo presentation in Vulkan.
Fixed a bug that could cause OpenGL applications to crash after repeated VT-switches.
Fixed a bug that could sometimes prevent PRIME displays from being selected in the display settings page of nvidia-settings.

NVIDIA Video Codec SDK 9.0

A new release of the Video Codec SDK will be available in Q1 2019.
For more information and early access sign-up, refer to https://developer.nvidia.com/nvidia-video-codec-sdk

The main features available in this release are listed below:
Support for Turing NVENC/NVDEC.
The NVDECODE API (also known as the NVCUVID API) has been updated to support YUV 4:4:4 decoding for HEVC on Turing GPUs.
NvEncodeAPI has been updated to support HEVC B-frames on Turing GPUs. NvEncodeAPI adds the capability to output the encoded bitstream, and motion vectors from motion estimation-only mode, to video memory. This avoids the overhead of copying the output from system to video memory for processing pipelines operating directly on video memory.
NvEncodeAPI now accepts CUarrays as input buffers. The SDK contains a sample application to demonstrate how to feed a Vulkan image to NVENC using the Vulkan-CUDA interop.

Added NVIDIA optical flow support.

A new library libnvidia-opticalflow.so is included in the driver package. The NVIDIA optical flow library can be used for hardware-accelerated computation of optical flow vectors and stereo disparity values. The API header files, sample applications and documentation will be available in a separate Optical Flow SDK package in Q1 2019.

For more information and early access sign-up, refer to https://developer.nvidia.com/opticalflow-sdk

Removed libnvidia-wfb.so from the driver package. This module was only used on X servers that did not provide their own implementation of libwfb, and all X.Org xserver versions now supported by the driver do so.
Updated the VDPAU driver to reject decoding to YUV 4:2:2 video surfaces. The NVIDIA VDPAU driver always produces YUV 4:2:0 content. Previously, the VDPAU driver implicitly converted a YUV 4:2:2 video surface to YUV 4:2:0 during decode. Now, the VDPAU driver will fail the decode request.
Optimized nvidia-installer to only run depmod(1) once when installing, rather than twice (once during the uninstall phase and again when installing new kernel modules).
Removed the NVreg_UseThreadedInterrupts kernel module parameter from nvidia.ko. This removes the ability to forcibly fall back to an older mechanism (tasklets) for running the bottom-half interrupt handler. Instead, threaded IRQs (the default since 367.44) are always used.

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

#56211.


[iOS] Inherit RCTEventEmitter and call sendEventWithName:body method will not work

Description
our app need to implement custom shake gesture. so, I inherit RCTEventEmitter and implement some method. I will call the function in js:
DeviceEventEmitter.addListener(NativeModules.ShakeModule.EVENT_END,  ()=> {             some code         });
but my ShakeModule's addListener method never be called。
the RCTEventEmitter's sendEventWithName is just like this:
- (void)sendEventWithName:(NSString *)eventName body:(id)body       {             if (RCT_DEBUG && ![[self supportedEvents] containsObject:eventName]) {                    RCTLogError();             }             if (_listenerCount > 0) {                      [_bridge enqueueJSCall:@"RCTDeviceEventEmitter"                                                 method:@"emit" args:body ? @[eventName, body] : @[eventName]                                           completion:NULL];             } else {                      RCTLogWarn(@"Sending%@ with no listeners registered.", eventName);            }        }
so, In my ShakeModule class call sendEventWithName method, that have no any effect.
And I found the DeviceEventEmitter's addListener method just like this:
        addListener(eventType: string, listener: Function, context: ?Object): EmitterSubscription           {                   const eventModule = this._nativeEventModule(eventType);                   return eventModule ? eventModule.addListener(eventType, listener, context)                        : super.addListener(eventType, listener, context);   }
And the debug status show eventModule always is null. so I think there are some bug.
Solution
In ShakeModule class, I direct call
  [self.bridge enqueueJSCall:@"RCTDeviceEventEmitter"                       method:@"emit"                         args:@[eventName]                   completion:NULL];
that would be work.

React Native version: 0.35
Platform:  iOS
Operating System: MacOS

We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.


pkg/importer/gphotos: staticcheck

Closing this, see my comment here:

https://github.com/perkeep/perkeep/pull/1405#issuecomment-894727096


pull request for e2e test at 12/20/2016 06:45:20

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


How to setup a rule for an application that has a dynamic title

I haven't always got the rule feature to work when assigning an application to a specific workspace. For example, I have nog ignore file explorer and it works when I open a fresh window. But if I open a specific folder using the command line or opening the download location from firefox the title bar of the file explorer is different and nog will manage it.
Any suggestions on how to get around this?

I don't think that is possible right now. What could be a possible solution is also matching on the process name.
You could then write "explorer.exe", because the process name almost never changes.

I now have the full executable name like this: C:\\Windows\\explorer.exe
I am not sure whether to create a seperate keyword process_rule that uses the process name instead of the window name to avoid false positives.
Also should we use the full path or just the executable? Using just the executable name could actually also cause false positives, if two applications have the same name, but if you move the executable the rule won't match anymore. What are your thoughts on this?

Is there any reason to not just allow both to be valid?

Does the using the executable name work in the current development build? If yes how would I list that in my config file I can't seem to be nog to working with executable name or full path.

I haven't pushed it yet, because I am still thinking about how to go about this.

Is there any reason to not just allow both to be valid?

No haha.
I am thinking about having the following api
process_rule "<process_name>" #{
  // additional path property to narrow down the rule
  // everything that rule has
};

Example
process_rule "explorer.exe" #{
  manage: false
};

or
process_rule "explorer.exe" #{
  path: "C:\\Windows",
  manage: false
};

or
ignore_process "explorer.exe";

I like this. In the second example would it be better to just remove the path option and make it something like this:
process_rule "C:\\Windows\\explorer.exe" #{
  manage: false
};

It would just simplify it a bit or does that add some additional complexities that I am missing?

Maybe it be even possible to check if the string contains a \\ to know when you want to just check the process name and when the full path.

So
process_rule "explorer.exe" #{
  manage: false
};

just checks the executable name and
process_rule "C:\\Windows\\explorer.exe" #{
  manage: false
};

checks the whole path

Yeah I think that would be the best imo

Actually I no longer feel like having a new keyword is the right choice (the shortcut will still be introduced). This will introduce a lot of duplication.
I am thinking about just having a flag called process.
Example
rule "explorer.exe" #{
  process: true,
  manage: false
};

or
ignore_process "explorer.exe";

Just thinking about this wouldn't most peoples first thought to create a rule be to do it with a path or executable rather than regex? So maybe make executable/path the default assumption, with a flag to switch to regex.
Just an idea

The string is still a regex, but I think you mean to change the default from matching the window title to the process name?

I agree with you.

This is now pushed to development.
This is what my rules.nog now looks like
ignore "explorer.exe";
ignore "Taskmgr.exe";
ignore "SnippingTool.exe";

rule "firefox.exe" #{
    has_custom_titlebar: true,
    workspace_id: 2,
    firefox: true
};

rule "Discord.exe" #{
    has_custom_titlebar: true
};

rule "Spotify.exe" #{
    has_custom_titlebar: true
};

rule "chrome.exe" #{
    has_custom_titlebar: true,
    workspace_id: 2,
    chromium: true
};

rule "Code.exe" #{
    has_custom_titlebar: true
};

Nice I am liking this version a lot and make setting rules much simpler. One bug I noticed I can open another issue if you would like me to is with Task Manager. When I open task manager now it is unmanaged since I have Nog ignore it using ignore "Taskmgr.exe";, but for some reason a blank tile opens up in the workspace that is currently in focus. This didn't happen before when I had it set to ignore "Task Manager"; and switching it back to this no empty tile is opened. The remaining ignore commands work as expected.

Running Nog with admin privilege seems to fix this issue.

Also I think if Nog ignores an application the user should still be able to manually toggle floating mode. Currently if an application is listed to be ignore it is impossible to get Nog to manage it should they need to after the fact. Not sure if this is the expected behavior.

I can open another issue if you would like me to

👍

Also I think if Nog ignores an application the user should still be able to manually toggle floating mode. Currently if an application is listed to be ignore it is impossible to get Nog to manage it should they need to after the fact. Not sure if this is the expected behavior.

Please open a seperate issue for this and yes it should work like that.


Skip support (see issue #4)

Pull Request Test Coverage Report for Build 19

25 of 25 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 17:
0.0%

Covered Lines:
86

Relevant Lines:
86

💛  - Coveralls


Update OpenShift AI deployment

Red Hat OpenShift AI need service mesh for an propper installation.

We disabled the component at OpenShift AI:
    modelmeshserving:
      managementState: Removed

We should disable:
spec:
  components:
    kserve:
      managementState: Removed
      serving:
        ingressGateway:
          certificate:
            type: SelfSigned
        managementState: Managed
        name: knative-serving
    modelmeshserving:
      managementState: Removed

OpenShift AI downgraded to 2.5.


Support ledger devices

[x] #15
[x] Add support to the CLI for signing transactions with a ledger device
[x] Add support for verifying transactions signed with a ledger device. This means supporting verifying transactions with the "textual" signing mode

Close as completed.


Check for the MediaSourceApi support

still very early stages
http://updates.html5rocks.com/2011/11/Stream-video-using-the-MediaSource-API
maybe as an experimental or 'bonus' test?

Matas this is not part of HTML5 Audio.


🧾 Please read this. Addressing the recent exposure of Wireflow

Hello there, this is Taher. A developer from @vanila-io and a co-founder of @automatio-co.
Recently we got a surge of visits, mentions, emails, stars and pull requests from a lot of people and realized someone shared us in hacker news. You have our heartfelt gratitude of showing interest in wireflow.

This is a side project where we did not invest much time into.
The initial idea was created by @shtefcs many years ago and several developer put their time on this as a side project. That version got hunted before in producthunt while we were busy with other projects and we had to step in because a lot of problems started to appear with the exposure. Then we decided to make it open source.
Then on this version, @shtefcs put some time in the new landing page in hurry (hence those typing mistakes) and the new frontend was developed by @arifulbgt4 in short time (hence the structure problems).
I can confirm and am sorry that this version is incomplete, without any API and realtime collaboration. However this one is also started to getting a lot of exposure due to the value and potential it brings.
Currently we are busy with Automatio, a no-code web automation/scraping tool to help you extract data from web pages or create bots to replace manual repetitive work. So extra hands are what we need to move forward.

Moving forward:
We are looking forward to allocate a core team and maintainer for wireflow to further develop it according to the plan and idea, since we got our hands full right now with lots of work.
We are again thankful for the contribution, comments, ideas, stars and the discussion on the current version and it greatly motivates us to do something impactful.

@entrptaher
Can I maintain Meteor-based wireflow, package it for Sandstorm and merge pull requests? I do have repo access already.

We are going to move away from meteor version, and will create another version with vanila js (maybe next.js), prisma/hasura as database entry. I will ping you about the roadmap and planning for the backend soon.

Great tool and i would love to help out in development, are you going to share everything on GH or do you use other tools to communicate like slack etc .. ?

We will create and invite over the slack and few other community platforms, please wait. :D

This is a great opportunity to do some open source collaboration for Hacktoberfest.

@entrptaher who do I speak to about Automatio? In light of where the system is, go to market strategy and raising grants / investment for it.
My Linkedin profile: https://www.linkedin.com/in/raynoppe/

@raynoppe please ping<EMAIL_ADDRESS>

Thanks

Please use this link to join the slack (the link will expire in 30 days).
Private slack channel invite link

Interested if the new Wireflow team need any design assistance?

Interested if the new Wireflow team need any design assistance?

Interested if the new Wireflow team needs any design assistance?

@NoWorries Glad, you asked. Wireflow is an open source side project, and it definitely needs some attention. If you have time and will to improve certain points of the app, then it's more than welcome. There is a lot of space for improvements.
Let me know if you have any questions!

Interested if the new Wireflow team needs any design assistance?

@NoWorries Glad, you asked. Wireflow is an open source side project, and it definitely needs some attention. If you have time and will to improve certain points of the app, then it's more than welcome. There is a lot of space for improvements.
Let me know if you have any questions!

Great, yeah could I join the slack channel?

Great, yeah could I join the slack channel?

Hey Josh, sorry for delayed response.
Our Wireflow Slack is not active at all, but we have it. The reason for
that is we have 2 Slacks for our other project Automatio.co. But anyway,
here is the link you can join the Slack and have direct chat with us.
https://join.slack.com/t/wireflow/shared_invite/zt-lls92kr9-E_KijlZHv8I_xTaeoLiyrA.
Btw its expire after 30 days.

Stefan Smiljkovic
Co-Founder & CEO
Vanila.io, Automatio.co
(e<EMAIL_ADDRESS>(p): +381 62 973 4218
On Thu, Jan 28, 2021 at 8:57 PM Josh Harwood<EMAIL_ADDRESS>wrote:

Great, yeah could I join the slack channel?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vanila-io/wireflow/issues/52#issuecomment-769339796,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPETDMINQ6ZZN6ORDGBXPLS4G6RFANCNFSM4R57HTXA
.

Hey Josh, sorry for delayed response.
Our Wireflow Slack is not active at all, but we have it. The reason for
that is we have 2 Slacks for our other project Automatio.co. But anyway,
here is the link you can join the Slack and have direct chat with us.
https://join.slack.com/t/wireflow/shared_invite/zt-lls92kr9-E_KijlZHv8I_xTaeoLiyrA.
Btw its expire after 30 days.

Stefan Smiljkovic
Co-Founder & CEO
Vanila.io, Automatio.co
(e<EMAIL_ADDRESS>(p): +381 62 973 4218
On Thu, Jan 28, 2021 at 8:57 PM Josh Harwood<EMAIL_ADDRESS>wrote:

Great, yeah could I join the slack channel?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vanila-io/wireflow/issues/52#issuecomment-769339796,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPETDMINQ6ZZN6ORDGBXPLS4G6RFANCNFSM4R57HTXA
.


Resources to get started

It would be useful to list out some resources that might help with contribution to this bot. These might include relevant documentation linking the GitHub API and Probot.

The README already includes links to almost everything that exists in terms of documentation for GitHub Probot. This is fairly new technology, so there isn’t a lot of documentation yet, but I think that what does exist is great.
Namely, the README includes links to the GitHub documentation for GitHub Probot, and to a blog post on building a Probot that isn’t limited to responding to GitHub events (like Roboose, which responds to forms on www.jhu-oose.com). The GitHub documentation about Probot will take you to Octokit (the library for the GitHub API), which will take you to do the documentation for the GitHub API itself.
So I’m closing this issue for now, but if you want to add more information to the README, including links to other documentation you find online, please send a pull request.


Very different sequence lengths in the same minibatch make LSTM inefficient

I'm attempting to recreate this model in TensorFlow but I can not seem to get anywhere close to the speed of the original code. On average the TensorFlow implementation is taking 60 ms per document on a GPU, while the pycnn is taking 12 ms per document on a CPU.
What appears to be the issue is that _rnn_step will call the LSTM cell on every time step regardless of whether the input at that position is padding or not and then simply fill those values with zeros after the fact using sequence_length. This seems like a lot of unnecessary calculations.
Processing the tokens sequentially in multiple session.run calls with one token per batch in a similar performance to the original code but the embeddings do not update as the flow is broken.
Current working (but slow) code is below.
def char_encoding(config, graph, doc_len):
	"""Create graph nodes for character encoding"""

	c2i = config["c2i"]
	max_tokens = config["max_tokens"]

	with graph.as_default():

		# Character Embedding
		word_lengths = tf.placeholder(tf.int64, [None], name="word_lengths")
		word_lengths = tf.gather(word_lengths, tf.range(tf.to_int32(doc_len)))
		char_inputs = tf.placeholder(tf.int32, [None, max_tokens], name="char_inputs")
		cembed_matrix = tf.Variable(tf.random_uniform([len(c2i.keys()), config["ce_dim"]], -0.25, 0.25), name="cembeds")

		char_inputs = tf.transpose(char_inputs, perm=[1,0])
		cembeds = tf.nn.embedding_lookup(cembed_matrix, char_inputs, name="ce_lookup")
		cembeds = tf.gather(cembeds, tf.range(tf.to_int32(doc_len)))
		cembeds = tf.transpose(cembeds, perm=[1,0,2])

		# Create LSTM for Character Encoding
		fw_lstm = tf.nn.rnn_cell.BasicLSTMCell(config["ce_dim"], state_is_tuple=True)
		bw_lstm = tf.nn.rnn_cell.BasicLSTMCell(config["ce_dim"], state_is_tuple=True)

		# Encode Characters with LSTM
		options = {
			"dtype": tf.float32,
			"sequence_length": word_lengths,
			"time_major": True
		}

		(output_fw, output_bw), output_states = tf.nn.bidirectional_dynamic_rnn(fw_lstm, bw_lstm, cembeds, **options)
		output_fw = tf.transpose(output_fw, perm=[1,0,2])
		output_bw = tf.transpose(output_bw, perm=[1,0,2])

		return output_fw, output_bw, word_lengths

An alternate approach where I loop through the tokens in the graph itself seems like it should be faster but is throwing an odd error:
Code:
def char_encoding(config, graph, doc_len):
	"""Create graph nodes for character encoding"""

	c2i = config["c2i"]
	max_tokens = config["max_tokens"]

	with graph.as_default():

		# Character Embedding
		word_lengths = tf.placeholder(tf.int64, [None], name="word_lengths")
		word_lengths = tf.gather(word_lengths, tf.range(tf.to_int32(doc_len)))
		char_inputs = tf.placeholder(tf.int32, [None, max_tokens], name="char_inputs")
		char_inputs = tf.transpose(char_inputs, perm=[1, 0])
		cembed_matrix = tf.Variable(tf.random_uniform([len(c2i.keys()), config["ce_dim"]], -0.25, 0.25), name="cembeds")

		# Create LSTM for Character Encoding
		fw_lstm = tf.nn.rnn_cell.BasicLSTMCell(config["ce_dim"], state_is_tuple=True)
		bw_lstm = tf.nn.rnn_cell.BasicLSTMCell(config["ce_dim"], state_is_tuple=True)

		def one_pass(i, o_fw, o_bw):

			int_i = tf.to_int32(i)

			options = {
				"dtype": tf.float32,
				"sequence_length": tf.expand_dims(tf.gather(word_lengths, int_i), 0),
				"time_major": True
			}

			cembeds_invert = tf.nn.embedding_lookup(cembed_matrix, tf.gather(char_inputs, int_i))
			cembeds_invert = tf.transpose(tf.expand_dims(cembeds_invert, 0), perm=[1,0,2])

			(output_fw, output_bw), output_states = tf.nn.bidirectional_dynamic_rnn(fw_lstm, bw_lstm, cembeds_invert, **options)

			# Get Last Relevant
			output_fw = tf.gather(output_fw, tf.gather(word_lengths, int_i) - 1)
			output_bw = tf.gather(output_bw, tf.gather(word_lengths, int_i) - 1)

			# Append to Previous Token Encodings
			o_fw = o_fw.write(int_i, tf.squeeze(output_fw))
			o_bw = o_bw.write(int_i, tf.squeeze(output_bw))

			return tf.add(i, 1), o_fw, o_bw

		# Build Loop in Graph
		i = tf.constant(0.0)
		float_doc_len = tf.to_float(doc_len)
		o_fw = tensor_array_ops.TensorArray(dtype=tf.float32, size=tf.to_int32(doc_len))
		o_bw = tensor_array_ops.TensorArray(dtype=tf.float32, size=tf.to_int32(doc_len))
		cond = lambda i, *_: tf.less(i, float_doc_len)
		i, char_embeds, rev_char_embeds = tf.while_loop(cond, one_pass, [i, o_fw, o_bw])

		return char_embeds.pack(), rev_char_embeds.pack()

Error:
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 445, in <module>
    run_from_command_line()
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 441, in run_from_command_line
    graph, saver = build_graph(config)
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 311, in build_graph
    optimizer = tf.train.GradientDescentOptimizer(config["learning_rate"]).minimize(loss, name="optimizer")
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 196, in minimize
    grad_loss=grad_loss)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 253, in compute_gradients
    colocate_gradients_with_ops=colocate_gradients_with_ops)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/gradients.py", line 478, in gradients
    in_grads = _AsList(grad_fn(op, *out_grads))
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_grad.py", line 202, in _EnterGrad
    result = grad_ctxt.AddBackPropAccumulator(op, grad)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 1646, in AddBackPropAccumulator
    forward_ctxt = self.grad_state.forward_ctxt
AttributeError: 'GradLoopState' object has no attribute 'forward_ctxt'

Let me know if seeing the full graph will help at all. Right now that higher level LSTM isn't causing issues because I can just run one document at a time.

This seems related but it doesn't seem it was ever resolved:
https://github.com/tensorflow/tensorflow/issues/511

Whats most frustrating is that if one token is 50 characters long and 10 other tokens in that batch are 3 characters long it essentially takes the same time to process as if every token was 50 characters long. There must be a better way to approach this.

Yes, the RNN code always runs up to the maximum length.  This is usually solved at a higher level by bucketing by input size.

@girving
I don't think bucketing by input size works in this case. A sub-LSTM is encoding each token in the each sentence. There's only a limited number of tokens in each document. At each step a LSTM encoding of each token is concatenated with work a word embedding before fed into a higher level LSTM for tagging.
I've attempted to not call the cell at ever step like this
flat_state = nest.flatten(state)
	flat_zero_output = nest.flatten(zero_output)

	def select_relevant_state(state, mask):
		c = tf.boolean_mask(state[0], mask)
		h = tf.boolean_mask(state[1], mask)
		return (c, h)

	# Function to Perform at Each Time Step
	def time_step(time, output_ta, state):

		mask = (time < sequence_length)
		indices = tf.squeeze(tf.to_int32(tf.where(mask)))
		invert_indices = tf.squeeze(tf.to_int32(tf.where(invert_mask)))
		invert_indices = tf.to_int32(tf.where(invert_mask))
		input_t = tuple(ta.read(time) for ta in input_ta)

		# Restore Shape Information
		for input_, shape in zip(input_t, inputs_got_shape):
			input_.set_shape(shape[1:])

		input_t = nest.pack_sequence_as(structure=inputs, flat_sequence=input_t)

		# Select Only Relevant at This Time Step
		input_t = tf.boolean_mask(input_t, mask)
		state = select_relevant_state(state, mask)
		call_cell = lambda: cell(input_t, state)

		# Call Cell
		(output, new_state) = call_cell()

		# Fill Unprocessed Steps
		filler_output = tf.boolean_mask(zero_output, invert_mask)
		filler_state = select_relevant_state(state, invert_mask)

		output = tf.dynamic_stitch([indices, invert_indices], [output, filler_output])
		new_state_c = tf.dynamic_stitch([indices, invert_indices], [new_state[0], filler_state[0]])
		new_state_h = tf.dynamic_stitch([indices, invert_indices], [new_state[1], filler_state[1]])
		new_state = tf.pack([new_state_c, new_state_h], axis=0)

		# Pack State if Using State Tuples
		output = nest.flatten(output)

		output_ta = tuple(ta.write(time, out) for ta, out in zip(output_ta, output))

		return (time + 1, output_ta, new_state)

But this seems to make no difference. It appears that the majority of time is being taken up by back propagation. Is there a means to intervene at this level?
Is there no way to use the same approach as pycnn and get the same performance? The difference is huge.

You mention that pycnn does something better.  Can you describe the approach?

Pycnn isn't documented as well, but the original code at https://github.com/bplank/bilstm-aux simply iterates through each token and then concats the output to the word embeddings.
class RNNSequencePredictor(SequencePredictor):
	def __init__(self, rnn_builder):
		"""
		rnn_builder: a LSTMBuilder or SimpleRNNBuilder object.
		"""
		self.builder = rnn_builder

	def predict_sequence(self, inputs):
		s_init = self.builder.initial_state()
		return [x.output() for x in s_init.add_inputs(inputs)] #quicker version

for chars_of_token in char_indices:
            # use last state as word representation
            last_state = self.char_rnn.predict_sequence([self.cembeds[c] for c in chars_of_token])[-1]
            rev_last_state = self.char_rnn.predict_sequence([self.cembeds[c] for c in reversed(chars_of_token)])[-1]
            char_emb.append(last_state)
            rev_char_emb.append(rev_last_state)

        wfeatures = [self.wembeds[w] for w in word_indices]
        features = [pycnn.concatenate([w,c,rev_c]) for w,c,rev_c in zip(wfeatures,char_emb,reversed(rev_char_emb))]

I posted a similar approach in TensorFlow above but got the following error:
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 445, in <module>
    run_from_command_line()
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 441, in run_from_command_line
    graph, saver = build_graph(config)
  File "/home/ubuntu/git/Meerkat/meerkat/longtail/bilstm_tagger.py", line 311, in build_graph
    optimizer = tf.train.GradientDescentOptimizer(config["learning_rate"]).minimize(loss, name="optimizer")
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 196, in minimize
    grad_loss=grad_loss)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 253, in compute_gradients
    colocate_gradients_with_ops=colocate_gradients_with_ops)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/gradients.py", line 478, in gradients
    in_grads = _AsList(grad_fn(op, *out_grads))
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_grad.py", line 202, in _EnterGrad
    result = grad_ctxt.AddBackPropAccumulator(op, grad)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 1646, in AddBackPropAccumulator
    forward_ctxt = self.grad_state.forward_ctxt
AttributeError: 'GradLoopState' object has no attribute 'forward_ctxt'

I've solved on how to run the RNN while only calling the cell on the relevant characters (can post code if necessary) but the issue persists so it seems the fundamental issue is the time that back propagation takes rather than the time it takes to do the forward pass.

Are there any details on how back prop flows through tensorArrays?

@yuanbyu He's trying to do a two dimensional while loop, and the code looks reasonable to me at first glance.  Could you take a look?

@msevrens I somewhat doubt we have good documentation for while loop differentiation, but @yuanbyu can correct me if we have it.

Same issue here. I've implemented 2d RNN using tf.while but got only AttributeError: 'GradLoopState' object has no attribute 'forward_ctxt' error. 😞

This seems relevant: https://github.com/tensorflow/tensorflow/issues/593

@msevrens I forgot to verify: what version of TensorFlow are you using?

@girving
0.9.0

Could you provide a complete running program that can reproduce the problem?

@girving: I've confirmed that the issue still exists on 0.10.0rc0
@yuanbyu: I've attached a stripped down version that isolates the issue.
bilstm_tagger.txt

I think GradLoopState error is occured by this commit by @yuanbyu . This code makes no sense - because i think this code has a lot of syntax error (ex: forward_ctxt is nowhere (did you meant forward_context?), grad_state and outer_grad_state is not defined.)
Can you confirm it?

@therne
Perhaps you could provide @yuanbyu another sample of code that results in this error such that it's easier for him to debug?

@msevrens Unfortunately I can't share my code because it has too many local dependency 😢 Instead, i'm trying to reproduce the error using simpler code.

@girving Please keep in mind, if your max sequence_length is less than the total number of inputs to rnn, then the calculation is exited early (however, anything past the max sequence length must be filled with zeros because TensorFlow requires all outputs to be filled by something).
If your minibatch sizes vary from iteration to iteration, you could try using tf.nn.dynamic_rnn, and make sure that for your LSTM inputs (now tensors of shape batch_size, max_time_per_batch, depth) have a max_time_per_batch which is exactly equal to the maximum number of frames for that minibatch (and no larger).

(when i say minibatch sizes, i mean minibatch maximum time step counts)

@ebrevdo I think maybe you should take a little more time reading through the previous posts

@ebrevdo
In reality if you look at _dynamic_rnn_loop all values at each time step are passed to the LSTM cell. The forward pass is then applied to everything regardless of the sequence_length provided.
input_t = tuple(ta.read(time) for ta in input_ta)
call_cell = lambda: cell(input_t, state)

Therefore, a max_time_step of 100 with all documents having 100 length with take the same amount of time as a max_time_step of 100 with all documents having a length of 20. The only thing sequence_length is used for is to copy in filler zeros AFTER calculation has already occurred.
Seeing as pycnn does the same task on the CPU five times faster than TF does on the GPU shows there's definitely room from improvement here. And I would imagine actually having the "computation exit early" would be the first step. Though as I showed above, simply not calling the cell at every step during the forward pass does little to help. The gradient calculation and application is still a bit spaghetti to me so I can't comment on that yet.

@girving @yuanbyu
So I've discovered that training on the CPU only and clocked at 70ms per training step versus 180ms per training step.
Is this expected behavior? Are LSTMs inherently faster on a CPU?
Note that the GradLoopState is still an issue and this is still half the speed that pycnn trains the same model.

Matt: how large are your hidden states and inputs and batch sizes?  The
larger each of these parameters is, the faster that GPU training will be
relative to CPU training.
Are you using the sequence_lengths input parameter?  How fast does training
become if you don't use it?
On Wed, Aug 17, 2016 at 2:23 PM, Matt Sevrens<EMAIL_ADDRESS>wrote:

@girving https://github.com/girving @yuanbyu
https://github.com/yuanbyu
So I've discovered that training on the CPU only and clocked at 70ms per
training step versus 180ms per training step.
Is this expected behavior? Are LSTMs inherently faster on a CPU?
Note that the GradLoopState is still an issue and this is still half the
speed that pycnn trains the same model.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/3738#issuecomment-240552898,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim08QhHEDV4jviZly9jnBxscqyclOks5qg3u1gaJpZM4Jhn6r
.

@ebrevdo Those comments are helpful, but someone should also investigate why his attempt to make it faster throws an obscure error.

@ebrevdo
The primary speed drain is the inner LSTM which does character encoding. Both the batch size and the max_sequence_length of this inner LSTM are variable. This helps speed it up quite a bit.
Outer LSTM doesn't use batching, same as original paper.
Removing sequence lengths throws an error. Hidden dims are 100. Running on CPU is fine though as long as long as it matches the speed of pycnn code. As of now on CPU it's about half the speed.
I'm mainly interested now in the nested loop issue as this would seem to solve the fundamental problem of unnecessary calculation. In pycnn time scales relative to number of characters in the sentence. In TensorFlow time scales to max_token_length * num_tokens. As token length can be extremely variable in my dataset, until that issue is solved everything seems negligible.
@girving
I'm working on a more stripped down bare bones version of the issue to help debugging.

With a batch size of 1 and 100 dims, you generally don't get enough data
going through to saturate the GPU's matmul powers; and copying data to/from
the GPU becomes the bottleneck.
dynamic_rnn accepts a tensor with a shape of max_time_for_this_minibatch
and does not perform early stopping for two reasons:

you can provide an inputs tensor where max_time_for_this_minibatch is
truly the maximum time for this minibatch
having a bunch of cond ops (which must run on CPU) will add additional
slowdown to the computation, especially if most of the computation is on a
GPU.  and because of #1 it's unnecessary since the length of the
computation can be variable and is determined by the input tensor
dimensions.  if you are using placeholders, simply use
placeholder(shape=(batch_size, None, input_depth), dtype=...) and feed in
properly sized inputs.

In contrast, with tf.nn.rnn, you always have a fixed graph and using cond()
to reduce the number of calls to the LSTM cell (especially the matmuls) is
extremely important.  In this case, sequence_lengths is used to replace
this computation past max(sequence_lengths) with just symbolically copying
some zero values through (this is essentially free).
On Wed, Aug 17, 2016 at 4:24 PM, Matt Sevrens<EMAIL_ADDRESS>wrote:

@ebrevdo https://github.com/ebrevdo
The primary speed drain is the inner LSTM which does character encoding.
Both the batch size and the max_sequence_length of this inner LSTM are
variable. This helps speed it up quite a bit.
Outer LSTM doesn't use batching, same as original paper.
Removing sequence lengths throws an error. Hidden dims are 100. Running on
CPU is fine though as long as long as it matches the speed of pycnn code.
As of now on CPU it's about half the speed.
I'm mainly interested now in the nested loop issue as this would seem to
solve the fundamental problem of unnecessary calculation. In pycnn time
scales relative to number of characters in the sentence. In TensorFlow time
scales to max_token_length * num_tokens. As token length can be extremely
variable in my dataset, until that issue is solved everything seems
negligible.
@girving https://github.com/girving
I'm working on a more stripped down bare bones version of the issue to
help debugging.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/3738#issuecomment-240579474,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtimzvOS5_V9atNeVWXVHP-pKl9Y5rMks5qg5gcgaJpZM4Jhn6r
.

@ebrevdo
I don't think this really solves my fundamental issue. If one token in the batch to the inner LSTM has a length of 100 and the rest have a length of 3 there will always be a huge performance deficit if they are batched. Either the tokens are batched together, or they're looped over. The output of this is fed into a higher LSTM which only has a batch size of 1.
The batching approach is unreasonably slow when one token is far longer than the rest, the nested loop approach is throwing an obscure error.

@ebrevdo, regarding #1, would it make sense to include convenience functionality in dynamic_rnn that trims the input tensor to the max_time_for_this_minibatch based on sequence_length? I think this is easy to do, no?

@alquraishi since this is equivalent to doing a simple slice or gather, and would bloat the already bloated interface of dynamic_rnn, i'd prefer not to do it there.

@msevrens now you are really at the fundamental core of how to deal with RNNs and minibatches.  unfortunately this is out of the hands of e.g. dynamic_rnn and has to be handled by the preprocessing technique.
there are two ways to solve this problem.  one is called truncated back propagation through time, and works on models where you have a loss at every time step (e.g. cross entropy loss).  for this we just added a contrib method called tf.contrib.training.batch_sequence_with_states.  You will have to look at truncated BPTT literature and the documentation for that algorithm in depth to understand what it's doing.
The other approach is called bucketing, and the idea there is, when you read your examples in, group them according to similar lengths and put them in the appropriate queue.  The training step reads off the next available queue and processes the minibatch accordingly.  Each minibatch will contain sequences of approximately the same length.  I plan to make something like this available in contrib very soon.  Keep in mind this approach breaks the independent part of i.i.d. when training SGD minibatches; but in practice it works pretty well!

My understanding of this bug is that you are running into several issues; one of which is that your batch sizes are too small to effectively take advantage of GPU; and when they do grow large you have too large a variance in the sequence lengths to properly avoid unnecessary unrolls.  I've proposed two solutions above to do this (one already in, one called bucketing which is coming soon).  I'll keep this issue open until bucketing is available in contrib.

I'm also renaming the issue to better reflect the true problem.

@ebrevdo The new title ignores the while-loop related obscure error, though I suppose the other one does to.  I think @msevrens understands the issues involved, and believes he has a fix except for the obscure error.  It might be better to rename the issue to reflect that error, and then debug it.

@ebrevdo
The original paper is not using truncated back propagation through time. The final outputs from the forward and backward passes of the inner LSTM on each token are concatenated to a word embedding and fed into the higher level LSTM. There is no loss at every step as the loss comes from the higher level LSTM.
We also discussed bucketing above and that will not work either as the mini batch itself is the sentence input. Both the inner and outer LSTM are optimized together using the loss from the higher level LSTM. So the batch for the inner LSTM will always be the tokens from the sentence being tagged.
This architecture seems pretty tied to what is causing the performance issue. At this point, barring a major change to how LSTM's are handled by TensorFlow I believe the best solution is this while loop approach.
@girving
I agree, I'm going to change the title

One way to handle this might be to combine multiple shorter examples into a
single long example, with state reset indicators in between, and minibatch
these longer examples. This kind of bookkeeping is not impossible in a Tf
graph, but it's also not easy. I've never seen it done.
On Aug 19, 2016 2:03 PM, "Matt Sevrens"<EMAIL_ADDRESS>wrote:

@ebrevdo https://github.com/ebrevdo
The original paper is not using truncated back propagation through time.
The final outputs from the forward and backward passes of the inner LSTM on
each token are concatenated to a word embedding and fed into the higher
level LSTM. There is no loss at every step as the loss comes from the
higher level LSTM.
We also discussed bucketing above and that will not work either as the
mini batch itself is the sentence input. Both the inner and outer LSTM are
optimized together using the loss from the higher level LSTM. So the batch
for the inner LSTM will always be the tokens from the sentence being
tagged.
This architecture seems pretty tied to what is causing the performance
issue. At this point, barring a major change to how LSTM's are handled by
TensorFlow I believe the best solution is this while loop approach.
@girving https://github.com/girving
I agree, I'm going to change the title
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/3738#issuecomment-241134499,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim_O2pakgJmEw5xRYHpoCb5ToCe_dks5qhhomgaJpZM4Jhn6r
.

@ebrevdo That's a wonderful idea!  It would reduce the slowdown to at most a factor of 2 (or maybe 3?).  If some tricky bookkeeping is required, maybe an organizational C++ op is worth it?

@girving @ebrevdo @yuanbyu
I've put together a much shorter and simpler code sample that replicates the bug. Hopefully this will be helpful in debugging:
import tensorflow as tf
import numpy as np

from tensorflow.python.ops import tensor_array_ops

# Prepare Input

tokens = ["the", "fox", "jumps", "over", "the", "erroneous", "dog"]
tags = ["other", "noun", "other", "other", "other", "other", "noun"]

tag_map = {
	"noun": 0,
	"other": 1
}

tags = np.array([int(tag_map[tag]) for tag in tags])
encoded_tags = (np.arange(len(tag_map)) == tags[:, None]).astype(np.float32)

alphabet = "abcdefghijklmnopqrstuvwxyz0"
c2i = {a : i for i, a in enumerate(alphabet)}

char_inputs = []
token_lengths = [len(t) for t in tokens]
max_token_length = max(token_lengths)
num_tokens = len(tokens)

for token in tokens:
	char_ind = [c2i[token[c]] if c < len(token) else c2i["0"] for c in range(max_token_length)]
	char_inputs.append(char_ind)

# Build Graph

graph = tf.Graph()

with graph.as_default():

	# Character Embeddings
	character_indices = tf.placeholder(tf.int32, [len(tokens), max_token_length])
	word_lengths = tf.placeholder(tf.int32, [None])

	cembed_matrix = tf.Variable(tf.random_uniform([len(c2i), 100]))
	inner_lstm = tf.nn.rnn_cell.BasicLSTMCell(100, state_is_tuple=True)

	# Outer Loop Body
	def outer_body(i, s_out):

		token_input = tf.nn.embedding_lookup(cembed_matrix, tf.gather(character_indices, i))
		token_input = tf.expand_dims(token_input, 0)
		token_input = tf.transpose(token_input, perm=[1,0,2])

		options = {
            "dtype": tf.float32,
			"sequence_length": tf.expand_dims(tf.gather(word_lengths, i), 0),
			"time_major": True,
			"scope": "inner"
        }

		output, state = tf.nn.dynamic_rnn(inner_lstm, token_input, **options)
		last_output = tf.gather(output, tf.gather(word_lengths - 1, i))
		s_out = s_out.write(i, tf.squeeze(last_output))

		return tf.add(i, 1), s_out

	# Build Loop in Graph
	i = tf.constant(0)
	sentence_output = tensor_array_ops.TensorArray(dtype=tf.float32, size=num_tokens)
	outer_cond = lambda i, *_: tf.less(i, num_tokens)
	_, encoded_chars = tf.while_loop(outer_cond, outer_body, [i, sentence_output])
	encoded_chars = encoded_chars.pack()

	# Outer LSTM
	outer_lstm = tf.nn.rnn_cell.BasicLSTMCell(100, state_is_tuple=True)
	weight = tf.Variable(tf.random_uniform([100, len(tag_map)]))
	batched_input = tf.expand_dims(encoded_chars, 0)

	options = {
		"dtype": tf.float32,
		"sequence_length": tf.expand_dims(num_tokens, 0),
		"scope": "outer"
	}

	output, state = tf.nn.dynamic_rnn(outer_lstm, batched_input, **options)
	prediction = tf.log(tf.nn.softmax(tf.matmul(tf.gather(output, num_tokens), weight)))

	# Calculate Loss and Optimize
	labels = tf.placeholder(tf.float32, shape=[None, len(tag_map)])
	loss = tf.neg(tf.reduce_sum(prediction * labels))
	optimizer = tf.train.GradientDescentOptimizer(0.1).minimize(loss)

# Run Session

with tf.Session(graph=graph) as sess:

	tf.initialize_all_variables().run()

	feed_dict = {
		character_indices : char_inputs,
		word_lengths : token_lengths,
		labels: encoded_tags
	}

	sess.run(optimizer, feed_dict=feed_dict)

@ebrevdo
That's a pretty good idea. I'll take a shot at it.
In the meantime can you take a look at the code I posted at https://github.com/tensorflow/tensorflow/issues/3738#issuecomment-241531134 and let me know if can see any issue with this looping approach?
I'm really interested in debugging this error, but at this point the TensorFlow internals are still a bit confusing to me.

@yuanbyu
I got the most recent version of tensorFlow with your fix to a related nested looping issue here: https://github.com/tensorflow/tensorflow/commit/096069687c52e16eaa18c1db6e7bbf2737639257  however the GradLoopState issue persists. Any thoughts?

@girving @yuanbyu @ebrevdo
Is this dead? Is there any progress on this? Do I just need to give up on nested looping? I still would like to see this fixed.

It was fixed on our side, and should be in HEAD very soon.

@yuanbyu
Awesome, looking forward to testing it out.

@yuanbyu
The current code in github actually does fix the simpler nested loop example I provided above. Unfortunately, the same error appears when I run the more complex version of the nested loop I'm using for the tagger. I'm not sure what the key difference is.
Example here:
nested_loop.txt
I'm not sure whether the full fix is in git yet or if what's in currently is a partial fix.

Running your code gave the following error:
File "/usr/local/google/_blaze_yuanbyu/4e574b920d97309ebaf8003010ddff1b/execroot/google3/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/bin/experimental/users/yuanbyu/python/dynamic_rnn1.runfiles/google3/experimental/users/yuanbyu/python/dynamic_rnn1.py", line 284, in train_model
optimizer_out, loss = sess.run([get_op(graph, "optimizer"), get_tensor(graph, "loss:0")], feed_dict=feed_dict)
File "/usr/local/google/_blaze_yuanbyu/4e574b920d97309ebaf8003010ddff1b/execroot/google3/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/bin/experimental/users/yuanbyu/python/dynamic_rnn1.runfiles/google3/experimental/users/yuanbyu/python/dynamic_rnn1.py", line 54, in get_op
return graph.get_operation_by_name(name)
File "/usr/local/google/_blaze_yuanbyu/4e574b920d97309ebaf8003010ddff1b/execroot/google3/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/bin/experimental/users/yuanbyu/python/dynamic_rnn1.runfiles/google3/third_party/tensorflow/python/framework/ops.py", line 2579, in get_operation_by_name
return self.as_graph_element(name, allow_tensor=False, allow_operation=True)
File "/usr/local/google/_blaze_yuanbyu/4e574b920d97309ebaf8003010ddff1b/execroot/google3/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/bin/experimental/users/yuanbyu/python/dynamic_rnn1.runfiles/google3/third_party/tensorflow/python/framework/ops.py", line 2451, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/google/_blaze_yuanbyu/4e574b920d97309ebaf8003010ddff1b/execroot/google3/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/bin/experimental/users/yuanbyu/python/dynamic_rnn1.runfiles/google3/third_party/tensorflow/python/framework/ops.py", line 2511, in _as_graph_element_locked
"graph." % repr(name))
KeyError: "The name 'optimizer' refers to an Operation not in the graph."

By the way, if you got exactly the same error as before:
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_grad.py", line 202, in _EnterGrad
    result = grad_ctxt.AddBackPropAccumulator(op, grad)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 1646, in AddBackPropAccumulator
    forward_ctxt = self.grad_state.forward_ctxt
AttributeError: 'GradLoopState' object has no attribute 'forward_ctxt'

It is very likely that you were using an older version that doesn't include the fix.

The GradLoopState error should occur before the error you're seeing so it appears to be solved on your system.
Unfortunately I no longer seem to be able to build from scratch using the most recent code so I'll need to debug that before I can confirm.

@yuanbyu
So I got TF to build and it appears the issue with nested looping is solved. Thanks for your effort on this.
Unfortunately the looping approach I was attempting did not speed up the training or execution of the model I'm working with but as far as this issue goes it can be closed.


"Create Physical Skeleton" skips final bone in chain

Godot version
3.4.2.stable.arch_linux
System information
Linux 5.16.0-arch1-1
Issue description
When generating a physical skeleton, godot seems to skip bones at the end of a chain:

Note that Head and Lower{Leg,Arm}.{L,R} are missing in Godot.
If I add a "Foot" bone at the end of each Leg, now LowerLeg.{R,L} are generated, but the feet are not.
Steps to reproduce

Create a skeleton in blender
Export to godot
Open scene
Select the Skeleton node
Click "Create Physical Skeleton"
Note that "leaf" bones are missing

Minimal reproduction project
example.zip

Duplicate of #32393. It is not Godot's bug.

Can't we modify Godot to display leaf bones (perhaps in a different color)? I feel this adds a lot of confusion.

If the leaf bone information is missing in the glTF, I think it is impossible.

Dupe of https://github.com/godotengine/godot/issues/32393#issuecomment-1018908835


Leverage esbuild for local dev

Run esbuild for local dev - as its significantly faster than babel (its written in go vs js, among other optimisations) and seems to work well out of the box.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


More information on property cmakeExecutable needed

I am currently attempting to set a custom (from Kitware) setup with CMake 3.21 using Visual Studio 2017 since the CMake shipped with the IDE is too old and lacks features that I need. Setting the value of the property cmakeExectuable (in my case C:\Program Files\CMake\bin\cmake.exe) results no change in the behaviour of the IDE, which continues to use its own version of the tool.
I have not tested the property on later versions of Visual Studio since I don't have access to those.
Please provide more information on how to use the property or (if the information is deemed sufficient) verify it actually works. I have posted detailed information (including an example) on stackoverflow.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 4417dbbb-58ad-4417-3a96-c1cb40516ca2
Version Independent ID: cb5427c7-ee24-c972-bc44-ff890621cbf9
Content: CMakeSettings.json schema reference
Content Source: docs/build/cmakesettings-reference.md
Product: visual-cpp
Technology: cpp-tools
GitHub Login: @corob-msft
Microsoft Alias: corob

@aleksandaratanasov
I'm sorry you're having trouble. CMake integration was new in Visual Studio 2017, and wasn't as capable as it is in the most recent versions. That said, I'm told what you're doing with cmakeExecutable should work, though you may need to make some other changes to get the cache generation to work, too, according to the updated note in #3300, which should be published Monday. There's a note in the docs that says the version of CMake in cmakeExecutable has to have an approved version, but as far as I can tell, that means > 3.12.
Since this is the docs issues board, and not a support channel, I recommend asking about your issue on Developer Community. You're more likely to get knowledgeable help there. I'm going to close this, but if you learn something that would be useful in documentation, please add a comment here. We will reopen the issue.

I posted this and on multiple other location because I am not sure if it's a bug (in the integration itself) or inaccuracy in the documentation (hence submitting this issue). I know that CMake integration was new in 2017 (and in many aspects still feels new in Visual Studio even today) but "should work" is not a very accurate term. I will keep looking for a solution. Right now I am slowly moving away from VS in order to speed up my workflow but if I find something related to the documentation and this issue, I will create a new issue with the respective data.


Prepare "Add JoinMarket settings to settings screen"

In preparation of #72.
This is not intended to be merged. Code is messy.

Closing this as it was just a proof of concept. Never intended to be merged in the first place.


Details about New MeetingRecordingExpirationDays

It appears parameter MeetingRecordingExpirationDays has been replaced with It appears Set-CsTeamsMeetingPolicy has a new parameter NewMeetingRecordingExpirationDays

And it keeps the changes:

@dariomws @get-itips @tseward

Checking...

@YuriySamorodov I can see that both parameters appear in the code in the latest version (2.6.0). My apologies but I cannot provide more information.

the image shows an error when you try to run MeetingRecordingExpirationDays, it says the parameter is not there.

@salarson Ok, thanks for clarifying.
@YuriySamorodov Can you add that note? thanks

Docs Build status updates of commit 06ae307:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Set-CsTeamsMeetingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

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

@YuriySamorodov you can do it in the same PR. Just click the following button and edit the file:

Thanks @dariomws. This is completed. Formatted the note in plain text to be readable in the terminal.

Docs Build status updates of commit e1f277b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Set-CsTeamsMeetingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

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

Docs Build status updates of commit d3523f5:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Set-CsTeamsMeetingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

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

Docs Build status updates of commit abc2d6d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Set-CsTeamsMeetingPolicy.md
:white_check_mark:Succeeded
View (skype-ps)

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


Default stories for Page header do not link correctly.

Description
When visiting the React docs for Page header at: https://primer.style/design/components/page-header/react

The storybook stories do not link correctly. (the default story is incorrect)
We should make sure that the docs for this component include the correct storybook paths.
Add stories to PageHeader.docs.json so that they appear correctly on the docs site.

Steps to reproduce

Go to https://primer.style/design/components/page-header/react.
Check the default storybook stories.

Version
v35.28.0
Browser
Chrome

closing this issue since the default stories is working fine as expected in v35.31.0.
cc: @broccolinisoup


Prevent AlertDialogAction button from closing the alert dialog

Hey, I was questioning how I can prevent the AlertDialogAction button from closing the alert dialog when clicked. Thank you for the help in advance

any solution?

any solution?

Yes, I found a solution. Basically you have to make the AlertDialogAction element hidden and give it an id. Then, you make a normal button with an onClick event, in that onClick you validate whether you want to close the dialog, if yes emit a click to the AlertDialogAction button using the id.

I think this works fine as well. This is a react example but i think it's pretty readable
<AlertDialogAction asChild>
    <Button
        onClick={(e) => {
            e.preventDefault();
            // your function
            cancelRef.current.click();
        }}
        >
            {actionText}
    </Button>
</AlertDialogAction>


Python Components now implement the ComponentBatchLike interface

What
New blueprint APIs focus on overriding components rather than requiring that things be Archetypes.
However, using mono components directly was somewhat inconvenient. This lets you now pass in a component instance anywhere you would expect to pass in a ComponentBatchLike.
This component knows it's own batch type and uses it to construct the correct wrapper for a mono batch type.
This had the side effect that you can also do things now like:
rr.log("points", rr.Points3D(positions))
rr.log("points", [rr.components.Color([255, 0, 0])])

Checklist

[x] I have read and agree to Contributor Guide and the Code of Conduct
[x] I've included a screenshot or gif (if applicable)
[x] I have tested the web demo (if applicable):

Using examples from latest main build: rerun.io/viewer
Using full set of examples from nightly build: rerun.io/viewer

[x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
[x] If applicable, add a new check to the release checklist!

PR Build Summary
Recent benchmark results
Wasm size tracking

To run all checks from main, comment on the PR with @rerun-bot full-check.

@rerun-bot full-check

Fixes

https://github.com/rerun-io/rerun/issues/6445


Sedin

About the PR
Added a new chemical, Sedin! It restores the seeds of a plant without them 10% of the time, at the cost of it's health (and potency, by an extreme amount).

Being able to restore them, even if it means having more work, is a great way to make Botany a lot nicer to play. Instead of spending 2 hours trying to get a plant without the seedless mutation, you can just remove it later and save a lot of struggling with the dice. (You'll still have to re-increase the potency though)
Technical details
Added new code for handling Sedin (specifically by doing a 10% RNG check and if it passes readding the seeds of a plant), and also added the YML for the chemical. I have tested this ingame.
Media

[-] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
I will add media ASAP, but I didn't have time to do it right now. I'll have it ready by tomorrow!!

Breaking changes
none? that I know of.
Changelog
:cl:

add: NanoTrasen has discovered a new chemical that can sometimes restore the seeds of a plant without them!

 I personally think it needs a few more nerfs before this can be on upstream, but I do think it would be a good thing in general. Anything to lightly remove the RNG grind from Botany. If I did anything wrong, tell me! I'd love to hear advice on how to improve.

cl shouldnt be rp and doesnt even name the chemical

fair, I'll change it.

cl shouldnt be rp and doesnt even name the chemical

new one good?

can someone explain the buildfail, it has something to do with the flavorprototype I set (enigmatic), IDK how to fix it :/

cl shouldnt be rp and doesnt even name the chemical

new one good?

yes

I don't see any severe pushback (or any at all for that matter). Ready for review.

Laptop is broken right now but I will add docs and make fixes ASAP.(the hinge broke off the back of the display)On Apr 24, 2024, at 7:43 AM, Just-a-Unity-Dev @.***> wrote:
@Just-a-Unity-Dev commented on this pull request.
eris asked me on discord to give their PR a quick review
In Resources/Locale/en-US/botany/sedin.ftl:

@@ -0,0 +1 @@
+botany-plant-seedsrestored = "You can hear the faint sound of shuffling leaves."

this might include the quotation marks
In Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantSedin.cs:

@@ -0,0 +1,49 @@
+using Content.Server.Botany.Components;
+using Content.Server.Botany.Systems;
+using Content.Shared.Chemistry.Reagent;
+using JetBrains.Annotations;
+using Content.Server.Popups;
+using Robust.Shared.Prototypes;
+using Robust.Shared.Random;

+namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
+{

[UsedImplicitly]
[DataDefinition]
public sealed partial class PlantSedin : ReagentEffect

documentation
In Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantSedin.cs:

+{

[UsedImplicitly]
[DataDefinition]
public sealed partial class PlantSedin : ReagentEffect
{

   [Dependency] private readonly PopupSystem _popupSystem = default!;

   [DataField]

   public float SeedRestorationChance = 0.1f;

   [DataField]

   public int PotencyDropAmount = 7; // Nerf as neccesary

   public override void Effect(ReagentEffectArgs args)

documentation & comments
In Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantSedin.cs:

+namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
+{

use namespace ...; not namespace ... {
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Oops. I’ll fix it when I get access to GitHub since I’m not logged in right now.

ready for review/merge, everything's working

Closed due to feature freeze May 10th-June 14th. Comment to have it reopen after this.

am I the only person who works on PRs during the freeze

open please

Give me a minute to make the guidebook changes, have to reinstall VSCodium and set up my environment again. (Laptop went schizo and stopped responding to any/all input so I did a soft Windows reset)

sorry it took me so long to fix conflicts (I was busy with side projects)
migrating this to an EntitySystem and then ready for merge

The guidebook entry looks a little weird with the 1.00 seed availibilty change. I would suggest not using an amount for the restoring strength, but make two different effects, one for restoring and one for removing seeds.

I didnt know how to do that. I'll try to figure it out.

This is probably the last review from my side, we are almost there :)
The only other thing I can think of are the missing [UsedImplicitly] and [DataDefinition] attributes. Other effects have them, but I am not sure what they are needed for. Someone else will have to answer that.

That's a JetBrains thing I think

Should be pretty much ready for merge unless anyone else has any issues I (or the reviewer slarticodefast) missed

The only other thing I can think of are the missing [UsedImplicitly] and [DataDefinition] attributes.

Ok, I just got informed in the howtocode channel on discord that these two are added automatically since we inherit [ImplicitDataDefinitionForInheritors] from EntityEffect. So this should be good as it is :)