text:
Make APIBinding readible in APIExport VirtualWorkspace

Is your feature request related to a problem? Please describe.
Consider that we have a service provider called "build". That service provider needs some things to be present in the user's workspace to fully function. Let's say that these resources are:

namespace
ConfigMap & Secret
NetworkPolicies, plus maybe something more

The first thought of how to meet this requirement is to use CWT and the initializer. Initializer creates the APIBinding for the service provider plus all needed resources. So far so good.
However, after some time the logic of the service provider is changed and it needs something more to be created or with different parameters. How should we meet such a requirement?
If we change the logic of the CWT initializer, then it applies the change only for the new workspaces, but not the existing ones.
Instead of using CWTs, we could move the creation of the resources into the service provider logic, but the "build" controller is watching a VirtualWorkspace of its APIExport (within the boundaries of the API that is defined in the APIExport), so it doesn't know when a new workspace is created.
Describe the solution you'd like
The VirtualWorkspace should include also all APIBindings of the particular APIExport automatically. In that way, the service provider could have a controller watching the APIBindings so it would be notified when a new one is created. Just to be clear, the controller wouldn't do anything with the APIBindings, it would only watch them.
Describe alternatives you've considered
The APIExport could technically claim the APIBindings, but it would get all of them. It would be great if the VirtualWorkspace logic could filter them out so it would get only the ones that were created for the particular APIExport.

+1 for this

This is already implemented. @mikenairn @fgiloux @MatousJobanek please confirm.

I've just tested it and the APIBinding is missing in the APIs of the VirtualWorkspace:
$ k api-resources --server https://kcp-stable.apps.kcp-internal-1.52p3.p1.openshiftapps.com:443/services/apiexport/root:redhat-appstudio/application-api/clusters/*
NAME                                     SHORTNAMES           APIVERSION                      NAMESPACED   KIND
configmaps                                                    v1                              true         ConfigMap
namespaces                                                    v1                              false        Namespace
secrets                                                       v1                              true         Secret
applicationpromotionruns                 apr,promotion        appstudio.redhat.com/v1alpha1   true         ApplicationPromotionRun
applications                             hasapp,ha,app        appstudio.redhat.com/v1alpha1   true         Application
applicationsnapshotenvironmentbindings   aseb,binding         appstudio.redhat.com/v1alpha1   true         ApplicationSnapshotEnvironmentBinding
applicationsnapshots                     as,snapshot          appstudio.redhat.com/v1alpha1   true         ApplicationSnapshot
componentdetectionqueries                hcdq,compdetection   appstudio.redhat.com/v1alpha1   true         ComponentDetectionQuery
components                               hascmp,hc,comp       appstudio.redhat.com/v1alpha1   true         Component
environments                             env                  appstudio.redhat.com/v1alpha1   true         Environment

so when I try to list them, then it fails:
$ k get apibindings.apis.kcp.dev --server https://kcp-stable.apps.kcp-internal-1.52p3.p1.openshiftapps.com:443/services/apiexport/root:redhat-appstudio/application-api/clusters/*
error: the server doesn't have a resource type "apibindings"

Am I missing something there?

Probably discovery is broken.
I would claim discovery is broken also for claims. cc @ncdc

Will look today

authors: MatousJobanek ncdc sttts

repo: kcp-dev/kcp


text:
resource controller: fix NPE

Summary
Fix NPE in resource controller. Also try to do as much work as possible in enqueueResourcesForNamespace
and return an aggregate of any errors encountered at the end, instead of stopping at the first lister error encountered.
Related issue(s)
Fixes #1879

/approve

source: gharchive/pull-request

license_type: permissive

license_source: github-api


text:
Update searchbar CSS

Více přiblížené grafice.
Text 11px. Line-height 14px a barva taková šedá. Ta se opakuje na více místech (třeba navigace nahoře) takže jsem z toho udělal variable a použiji to také v KBC-UI. To samé platí pro letter-spacing, také se tento opaakuje na hodně místech. Tak bude fajn to mít jako variable.

Potom by este bolo super poladit tie "active" stavy a tiez mozno malicko outline. Teraz je tam myslim default bootstrap. (ked tak dovysvetlim)

11px je ale dost malo, trosku mam problem to precitat.

No taky se mi to zdálo divný když jsme ve Figmě našel. Ale v reálnu mi to přišlo pak lepší, je pravda že nevím zda jsme jel na 100% zobrazení v Chrome

authors: natocTo ujovlado

repo: keboola/indigo-ui

license: MIT


text:
Add letter-spacing-narrower variable, update control-label font-weight

Super drobnost ale bude se to pak hodit. Už to máme v KBC asi na 5 místech.
A když máme tu wider tu tak asi i tata variable by měla být tu.

Nakonec sem přihodím ještě update pro formy.

Přihodil jsem defaul styl pro control-label.
Koukám že v KBC-UI máme nějaká labely přímo jako tag label s třídou control-label ale některé jiné jako div s control-label. A liší se pak vzhled.

V tom letter spacing je dost bordel. Bolo by fajn to prejst s Karim, ci to ma byt 100% ako vo Figme. Ja uz som to napr. vyhadzoval z tabulky, kde to robilo trosku bordel.


text:
authorization

Snazil bych se to co nejvic skrtit hned od zacatku, takze rekneme, ze potrebujeme dva "scopy":

jednu pro job-queue-daemon - aby smela vybirat joby a nastavovat jim result (crash) - toto musi byt trvale, protoze deamon bezi porad - toto bude super secret (SSM parametry)
jednu pro job-runner - aby smel vzit konkretni job, nastavit mu result, a usage - toto muze byt docasne jen pro jeden job - (toto nejde udelat uplne secret)

https://keboola.atlassian.net/browse/PS-1680

https://keboola.atlassian.net/browse/PS-1680

source: gharchive/issue


text:
Support HTTPScaledObject scoped timeout

Proposal
Currently, there is a timeout configuration for setting the request timeout.
Allowing HTTPScaledObjects to override the timeout for specific route can help to users who have some slow routes but they prefer to not increase the global timeout for all the routes just due to some of them
Use-Case
No response
Is this a feature you are interested in implementing yourself?
Maybe
Anything else?
No response

Hi, is this expected in future releases?
We're using shared k8s cluster so it would be easier to use scoped timeout than asking platform team to come with values that fit all teams sharing the cluster. Also what kinds of timeouts is this expected to support?

Hi, is this expected in future releases?

No, this has been closed automatically due to inactivity. Are you willing to contribute with it?

We're using shared k8s cluster so it would be easier to use scoped timeout than asking platform team to come with values that fit all teams sharing the cluster. Also what kinds of timeouts is this expected to support?

The original proposal was to override the "cold start timeout"

No, this has been closed automatically due to inactivity. Are you willing to contribute with it?

Sorry, I don't have any experience with go and this doesn't seem like easy task to start.

The original proposal was to override the "cold start timeout"

Ok, we got API that can take long to answer so I was looking for something to override the responseHeaderTimeout

I've checked and I guess that we could configure all the timeouts at same place from the HTTPScaledObject, so maybe could support all of them.
https://github.com/kedacore/http-add-on/blob/main/interceptor/proxy_handlers.go#L46-L86
@tomkerkhove ?

Having something like this would be great. We were trying to deploy LLMs this way on a cluster, having at most a few requests pending before adding new resources.
But the responses (at least non streamed ones) can take quite some time before they are ready and those are then killed by the 500ms response header timeout and updating this for individual endpoints/pods would be great.

I would be willing to have a closer look at this but I have literally no idea where to start (and no experience whatsoever with coding for keda). Any suggestion or example of a variable that has similar behaviors where I could have a look to start it ?

I found a way to change the default timeout of keda http addon, while installing http addon via the helm we can change the default value from values.yaml file.
interceptor:
responseHeaderTimeout: 300s
tcpConnectTimeout: 300s
keepAlive: 300s
resources:
limits:
memory: 1Gi
requests:
memory: 512Mi

authors: JorTurFer harsh-viradia oto-macenauer-absa tpfau

repo: kedacore/http-add-on


text:
Azure Pipelines: Space in pool name causes HTTP 400 errors

Report
When the pool name contains a space (e.g. "Pool Name"), warnings of type KEDAScalerFailed appear in the logs:
error parsing azure Pipelines metadata: the Azure DevOps REST API returned error. url: https://dev.azure.com/org-url/_apis/distributedtask/pools?poolName=Pool Name status: 400 response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">

Bad Request

HTTP Error 400. The request is badly formed.

This doesn't happen when there's no space in the name.
Expected Behavior
I expected the scaler to do whatever's necessary to properly query the given pool name - assuming it's valid. This would result in the scaler calling https://dev.azure.com/org-url/_apis/distributedtask/pools?poolName=Pool%20Name (which returns correctly).
Actual Behavior
The scaler calls https://dev.azure.com/org-url/_apis/distributedtask/pools?poolName=Pool Name and the DevOps API complains that the request is malformed.
Steps to Reproduce the Problem

Create a pool with a space in the name.
Create a self-hosted docker agent.
Run a pipeline that would utilise the self-hosted agent.
Observe the errors in the logs.

Logs from KEDA operator
No response
KEDA Version
2.10.0 (according to kedaConfiguration in the JSON view of the Container App Environment resource)
Kubernetes Version
Unknown, as it's running in Container Apps.
Platform
Microsoft Azure
Scaler Details
Azure Pipelines
Anything else?
This happened when running a self-hosted docker agent using the KEDA azure-pipelines scaler in Azure Container Apps. I don't know whose responsibility it is to add URL encoding to the pool name: KEDA, Azure Container Apps, or the user. The docs don't mention it either way.

Nice catch!
We aren't using URL format on poolName here: https://github.com/kedacore/keda/blob/main/pkg/scalers/azure_pipelines_scaler.go#L268
Are you willing to contribute with the fix?
In the meantime, as ACA has its own release flow, I'd suggest using poolID to mitigate the issue

authors: JorTurFer chunderbolt

repo: kedacore/keda


text:
Add info in kubectl get triggerauthentication

Add scaledobjetc/socaledjob info when kubectl get triggerauthentication/clustertriggerauthentication.
Here is more info: https://github.com/kedacore/keda/issues/796
Example:

Checklist

[N/A] When introducing a new scaler, I agree with the scaling governance policy
[x] I have verified that my change is according to the deprecations & breaking changes policy
[x] Tests have been added
[x] Changelog has been updated and is aligned with our changelog requirements
[N/A] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
[N/A] A PR is opened to update the documentation on (repo) (if applicable)
[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes https://github.com/kedacore/keda/issues/796

It seems like adding infrastructure test should provide a new PR? I will add a PR about the test after PR merging.  @tomkerkhove @zroubalik

It depends what you need. Our cluster is managed in another PR but you should be good for this PR.
For e2e tests we deploy resources to the cluster which is part of the e2e rest itself so we can do it in this PR.

Thanks, @tomkerkhove. I added a e2e test in the PR.

/run-e2e internal

/run-e2e internal

/run-e2e internal

LGTM, but I'll leave it up to @zroubalik

authors: SpiritZhou tomkerkhove zroubalik


text:
feat: Provide scaler for Amazon managed service for Prometheus

Provide a description of what has been changed
Checklist

[x] When introducing a new scaler, I agree with the scaling governance policy
[X ] I have verified that my change is according to the deprecations & breaking changes policy
[ X] Tests have been added
[ ] Changelog has been updated and is aligned with our changelog requirements
[ ] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
[ ] A PR is opened to update the documentation on (repo) (if applicable)
[ ] Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes https://github.com/kedacore/keda/issues/2214#issuecomment-1746489027

Relates to #

Can you add some e2e tests please

hi @tomkerkhove : Added e2e tests here https://github.com/sguruvar/keda/blob/main/tests/scalers/aws/aws_managed_prometheus/aws_managed_prometheus_test.go.. I believe this is part of the PR. Please let me know for any changes/issues. Thanks

Incorporated review comments.

/run-e2e aws_managed_prometheus

please, execute also:
go mod tidy
go mod vendor

and push the changes too.
We use vendor folder, so you need to update the deps as they look inconsistent

please, execute also:
go mod tidy
go mod vendor

and push the changes too. We use vendor folder, so you need to update the deps as they look inconsistent

Pushed

please, execute also:
go mod tidy
go mod vendor

and push the changes too. We use vendor folder, so you need to update the deps as they look inconsistent

Pusehd

Appreciate any updates on the merge.. thanks

Please rebase your PR. We've added a new authentication way. All the conflicts are related with deps (go.mod and go.sum + vendor).
There is also an small change to be done in the authentication part. We've updated this method that has to be used because it supports all the podIdentities out-of-the-box and also it manages credentials caching/sharing to reduce the amount of tokens for the same roleArn.

authors: JorTurFer sguruvar


text:
Jobs do not support activeDeadlineSeconds

Jobs do not support activeDeadlineSeconds in JobSpec or PodSpec, we need to fix that.
Blocked on #111

@containscafeine can you confirm is this is valid still ?
Since https://github.com/kedgeproject/kedge/pull/253 is merged I think this is right time to close this one?

Yes, #253 closes this.

authors: containscafeine surajssd

repo: kedgeproject/kedge

license_source: bigquery


text:
HowTo: disable drawing when no results from Keen.Query?

I succesfully get results from Keen.Query, but in some circumstances with a certain set of filters, there are no results from the database (which is correct), but how to prevent drawing (client.draw) in that case?
There is a textual message ('No results to visualize'), but how to alter that, or better, to prevent?

Hey, @lgrijsen - great question!  You could use client.run(query, callback) and build the viz manually if you like:
var chart = new Keen.Dataviz()
  .chartType("barchart")
  .height(400)
  .prepare(); // start spinner

client.run(query, function(err, res){
  if (err) {
    chart.error(err.message);
  }
  else if (!res.result.length) {
    chart.error("No results to visualize");
  }
  else {
    chart
      .parseRequest(this)
      .title("Visualizing " + res.result.length + " results");
      .render();
  }
});

authors: dustinlarimer lgrijsen

repo: keen/keen-js

license: mit


text:
[feat]: #48 store template data in postgres

[x] issue #48
[x] follows contribution guide
[ ] code change includes tests
[ ] breaking change

Postgresql tables have been changed:

add TemplateData table
add foreign key to TemplateData in Templates

Manual test have been done with the following curl calls:
curl --silent http://localhost:8080/add-template-img -X POST --form "image=@/tmp/art/file1.png"
curl --silent http://localhost:8080/add-template-img -X POST --form "image=@/tmp/art/file2.png"

I have check if DB have been updated using psql shell:
art-peace-db=# select * from templates;
 key | name | width | height | position | reward |                           reward_token                           | template_id
-----+------+-------+--------+----------+--------+------------------------------------------------------------------+-------------
   1 |      |    50 |     28 |        0 |      0 | RWRD                                                             |           1
(1 row)

art-peace-db=# select * from templates;
 key | name | width | height | position | reward |                           reward_token                           | template_id
-----+------+-------+--------+----------+--------+------------------------------------------------------------------+-------------
   1 |      |    50 |     28 |        0 |      0 | RWRD                                                             |           1
   2 |      |    50 |     31 |        0 |      0 | RWRD                                                             |           2
(2 rows)

Thank you for making those changes! Nice work.

authors: b-j-roberts ptisserand

repo: keep-starknet-strange/art-peace


text:
fix: fix two broken links

Pull Request type

Please check the type of change your PR introduces:

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[x] Documentation content changes
[ ] Testing
[ ] Other (please describe):

rebase plize

authors: Eikix LucasLvy

repo: keep-starknet-strange/madara


text:
Query API v2 for images modified within a range

Hello! I'm one of the maintainers of Openverse, a search engine for openly licensed media on the web. Phylopic is one of the sources of CC images we ingest regularly, and unfortunately our ingestion broke with the move to the API v2.
In our exploration regarding what it would take to migrate (issue here: https://github.com/WordPress/openverse-catalog/issues/998), it doesn't look like there's a way to query images which were modified within a certain date range. The previous URLs looked something like http://phylopic.org/api/a/image/list/modified/2023-02-12/2023-02-13 (and documentation to the method in question was here http://phylopic.org/api/#method-image-time-range, although that link no longer works after the v2 migration).
I may be misinterpreting what's possible with the new API, and forgive me if this is the wrong place to ask, but - is it possible using v2 to query images by modification date? It seems like that information might be captured on the Image model itself, but I wasn't able to find a field reference for it in the API (I'm also no TypeScript aficionado :sweat_smile:). We'd love to continue updating our index in this fashion if it's possible to do so!

The data has been fixed up for legacy images.
Here is a proposal for API changes to add new filters. Does this look like it would address the issue? https://github.com/keesey/phylopic/blob/feature/date-filters/apps/api-docs/public/v2/openapi.yaml

Thanks for getting back to us @keesey! The spec you outlined in #8 looks like exactly what we would ideally use 😄 Let us know if there's any way we can help or test out the new endpoints!

Cool, I'll let you know when it's done. (Might not be for a little while.)

I lied, I finished it already.
Documentation: http://api-docs.phylopic.org/v2/
Sample URL: https://api.phylopic.org/images?filter_modified_after=2023-01-01T00:00:00.000Z

authors: AetherUnbound keesey

repo: keesey/phylopic


text:
Can I use ld64.lld as iOS application linker?

Hi keith.
I try to replace ld64 with ld64.lld as iOS application linker. I set --ld-path=${path-to-lld} in build setting OTHER_LDFLAGS. But it failed to link with these error messages:
ld64.lld: error: could not load TAPI file at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork.tbd: malformed file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork.tbd:3:20: error: unknown platform
targets:         [ i386, x86_64, arm64, arm64e, arm64_32, armv7k ]
                   ^~~~

ld64.lld: error: could not load TAPI file at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd: malformed file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd:3:20: error: unknown platform
targets:         [ i386, x86_64, arm64, arm64e, arm64_32, armv7k ]

....

Is there any other settings should I set?

Yes you can, that's my primary use case as well. I haven't seen this one before. Are you using the latest release here? If so can you try the one or 2 before to see if this is a new issue?

With Xcode 14.1 on macOS 13.0 with your sample project the project links fine for me. Interestingly my file that you printed from the error above doesn't have the link referenced in the error message at all:
% grep targets `xcode-select -p`/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ x86_64-ios-simulator, arm64-ios-simulator ]
targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ x86_64-ios-simulator, arm64-ios-simulator ]
  - targets:         [ i386-ios-simulator, x86_64-ios-simulator, arm64-ios-simulator ]

could those files have been changed locally for you?

I see. I just debug WebKit source code recently. It has a python script called configure-xcode-for-embedded-development and it patches all tbd files in Xcode like this:
def patch_tbd_architecture(framework_path_str):
    framework_path = pathlib.Path(framework_path_str)
    for tbd_path in framework_path.glob("*.tbd"):
        with open(tbd_path, "r") as f:
            lines = f.readlines()

        modified_lines = []
        for line in lines:
            if re.match(".*(archs|targets): +\[.*\]", line) is not None:
                line = re.sub("\[.*\]", "[ i386, x86_64, arm64, arm64e, arm64_32, armv7k ]", line)
            modified_lines.append(line)

        with open(tbd_path, "w") as f:
            f.writelines(modified_lines)

I will revert my changes on Xcode and try lld again. Thank you so much.

wow nice find. that script is super scary!! https://github.com/WebKit/WebKit/blob/main/Tools/Scripts/configure-xcode-for-embedded-development#L338 I'm surprised they replace targets with just architecture triples. I guess apple's linker makes some assumptions there that lld does not. I think ideally lld would support that, but also ideally webkit would not modify parts of Xcode 😬

authors: blastmann keith


text:
Add SpeedBinbReader multisrc

SpeedBinb is a manga reader for various official Japanese manga sites. As it is only a reader, parsing of manga/chapter lists is left to the inherited class to implement.
Unsure if this should be a multisrc, suggestions on more appropriate places are welcome.
Closes #1173
Checklist:

[ ] Updated extVersionCode value in build.gradle for individual extensions
[x] Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
[x] Referenced all related issues in the PR body (e.g. "Closes #xyz")
[x] Added the isNsfw = true flag in build.gradle when appropriate
[x] Have not changed source names
[ ] Have explicitly kept the id if a source's name or language were changed
[x] Have tested the modifications by compiling and running the extension through Android Studio
[x] Have removed web_hi_res_512.png when adding a new extension

Maybe make it a regular lib and provide parseSpeedBinbReader method or similar.

Maybe make it a regular lib and provide parseSpeedBinbReader method or similar.

Maybe make it a regular lib and provide parseSpeedBinbReader method or similar.

Would need to pass in a few things from the source (client, headers, a Json instance) but it works either way.
Would also require remembering to add in the interceptor for descrambling.

repo: keiyoushi/extensions-source


text:
Fix Use Timer for 3PH inverters

Probably fixes #263

Without the patch. Button in HA goes off for a moment and then goes on again.
sunsynk-1  | 18:56:14 INFO    Writing sensor use_timer=OFF Registers:{146=0x0000} [Register 1-->0]
sunsynk-1  | 18:56:30 INFO    Queue update use_timer=OFF
sunsynk-1  | 18:56:31 INFO    Writing sensor use_timer=OFF Registers:{146=0x0000} [Register 1-->0]
sunsynk-1  | 18:56:43 INFO    Queue update use_timer=OFF
sunsynk-1  | 18:56:44 INFO    Writing sensor use_timer=OFF Registers:{146=0x0000} [Register 1-->0]

With the patch. Button moves how it should.
sunsynk-1  | 19:11:37 INFO    Queue update use_timer=OFF
sunsynk-1  | 19:11:38 INFO    Writing sensor use_timer=OFF Registers:{146=0x0000}
sunsynk-1  | 19:11:42 INFO    Queue update use_timer=ON
sunsynk-1  | 19:11:43 INFO    Writing sensor use_timer=ON Registers:{146=0x0001}
sunsynk-1  | 19:11:49 INFO    Queue update use_timer=OFF
sunsynk-1  | 19:11:50 INFO    Writing sensor use_timer=OFF Registers:{146=0x0000}
sunsynk-1  | 19:11:52 INFO    Queue update use_timer=ON
sunsynk-1  | 19:11:53 INFO    Writing sensor use_timer=ON Registers:{146=0x0001}

Thank you you are right the error no longer appears
I'm sending the current status:
I assume reconnect is the desired and desired state.

ERROR   Task was destroyed but it is pending!
task: <Task pending name='ConnKeeper'

OSError in read_ss: timeout reading 1 registers from 117 poll_need_to_read
Again, see attachment

authors: JanKraslice rixxxx

repo: kellerza/sunsynk


text:
[feature request] Use only window that "open" was invoked on

Hi,
This is a great plugin, I enjoy using it much more than vinegar/dirvish.
One thing I'd want though is the possibility for ranger taking only the space of the window it was invoked on.
So if I have a split with 2 files open and I invoke "open" on the left pane, only left pane is taken by ranger.
Ideally I would be able to use C-w C-l and C-w C-h to switch between the panes like I would normally do.

Hey @PiotrBosak,
Sure! This should be pretty straight forward to implement. I will probably leave how it is currently as the default behavior but add in a mode parameter to open so people can opt in to it.
I will leave this issue open so I can keep track and close it when I implement it.

authors: PiotrBosak kelly-lin


text:
Master

d

1

repo: kelvins-io/kelvins


text:
Calcite-Avatica

Docker for avatica server https://github.com/apache/calcite-avatica/blob/main/docker/src/main/docker/mysql/Dockerfile
Example client https://codetinkering.com/apache-calcite-tutorial/

Too hard to cope with at the moment

repo: kendarorg/HttpAnsweringMachine


text:
Request: Include 'httpbin' executable script after installing

I'm trying to port my urllib3 tests to use httpbin, and it would be extra convenient if when I did pip install httpbin, it installed an httpbin script into my virtualenv's bin dir for running it.
Kind of ironic that httpbin doesn't have a bin. ;)

You got it!

What runner will suit your needs? Leaning towards gevent.

Hmm. Now that I merged my embedded_dummyserver branch, this doesn't seem as important.
Could you make it runner-agnostic? That is, factor out the wsgi component and let it be runnable via SimpleHTTPServer or eventlet or gevent or gunicorn, etc.

You should be able to do that now :)

This is done.

authors: kennethreitz shazow

repo: kennethreitz/httpbin

license: isc


text:
error with python 3 str

I am using python 3.5 to run the example code
>>> import pandoc
>>> doc = pandoc.Document()
>>> doc.markdown = '''
... # I am an H1 Tag
...
... * bullet point
... * more points
... * point with [link](http://google.com)
... '''
>>> print(doc.rst)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/haocan/Developer/Python/projectforum/venv/lib/python3.5/site-packages/pandoc/core.py", line 78, in <lambda>
    (lambda x, fmt=fmt: cls._output(x, fmt)), # fget
  File "/Users/haocan/Developer/Python/projectforum/venv/lib/python3.5/site-packages/pandoc/core.py", line 97, in _output
    return p.communicate(self._content)[0]
  File "/Users/haocan/anaconda/lib/python3.5/subprocess.py", line 801, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/Users/haocan/anaconda/lib/python3.5/subprocess.py", line 1431, in _communicate
    input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'

There is an error because it's expecting a bytes encoded string, most likely since this library has not been updated for years. To make it work you have to set doc.markdown to the string and then append .encode('utf-8') and finally print the result by appending .decode() to doc.rst, or whatever format you want to convert to.
Here's how the example code would look with those modifications in place:
doc = pandoc.Document()

doc.markdown = '''
# I am an H1 Tag

* bullet point
* more points
* point with [link](http://kennethreitz.com)!
'''.encode('utf-8')

print(doc.rst.decode())

However, I would recommend using a more recent pandoc library if you can.

authors: GNHua argarak

repo: kennethreitz/pyandoc


text:
grequest hangs after about 250,000 requests on windows 7

I was running grequests with 390,000 youtube video urls. But it hang there after about 250, 000 urls.
The error message:
Traceback (most recent call last):
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\gevent\greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\grequests.py", line 71, in send
self.url, **merged_kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 464, in request
resp = self.send(prep, **send_kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "D:\Users\189120\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\adapters.py", line 424, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='www.googleapis.com', port=443): Max retries exceeded with url: /youtube/v3/videos?part=snippet&id=nv85S4L0kTU&key=xxxxxx (Caused by ProxyError('Cannot connect to proxy.', error(10053, 'An established connection was aborted by the software in your host machine')))
<Greenlet at 0x35eecc0L: <bound method AsyncRequest.send of <grequests.AsyncRequest object at 0x0000000007434128>>(stream=False)> failed with ConnectionError

I'm afraid we need significantly more information to diagnose this. You say 'about' 250,000 URLs: is it consistently 250,000, or does the exact number vary? Do you have any logs from the run? Is there anything in stdout?

I just repeat the error. Ran the code last night and got it this morning. The youtube key is masked as xxxxxx.
I run the code behind the Proxy. It would be the proxy problem. But if we can add a connection rebuild (need discussion) function to grequests, that will be perfect.
BTW: python 3.4 got asyncio. Is it possible to use asyncio to replace gevent in this package?

So in that case the connection is being aborted by one of the other servers, probably the Proxy server.
How exactly are you using grequests here?

step 1:
def req_gen(urls):
proxies = {
"http": "http://qfwsg-prod.qantas.com.au:8080",
"https": "https://qfwsg-prod.qantas.com.au:8080"
}
url = 'https://www.googleapis.com/youtube/v3/videos'
for cur in urls:
    # because of yield, we need put payload inside the loop
    vid = os.path.basename(cur)
    payload = {'key': 'xxxxxxx',
           'part': 'snippet',
           'id': vid}
    #yield grequests.get(url, proxies=proxies, params=payload)
    yield grequests.AsyncRequest('GET', url, proxies=proxies, params=payload)

step 2:
loop each 1000 ulrs in about server hundreds thousand urls
reqs <- req_gen([1000  urls each time])
step 3:
for rs in grequests.map(reqs):
##....Transfer rs.json() to target data row

It's hard for me to provide useful advice here. I don't think this is a requests bug: sometimes proxies will refuse connections, and it should be possible to handle them appropriately.
I'm not sure exactly how grequests works here (I've never used it myself) but I suspect it should be possible to iterate manually over the map and retry anything that fails:
rqs = grequests.map(reqs)

while True:
    try:
        rs = next(rqs)
    except ConnectionError:
        # Do something to retry here, put it on a list or something
    else:
        # Transfer rs.json() to target row

This is less clean, but lets you handle the errors.

Thanks for your response.
This may be a solution.

authors: Lukasa fivejjs

repo: kennethreitz/requests


text:
Suppress the warning if verify=False

Setting verify to False differs from verify=None in being explicitly set,
and therefore the warning being undesirable.
See this for the a proposed alternative that involves importing
implementation details of Requests onto the application:
https://github.com/kennethreitz/requests/issues/2214#issuecomment-72941896
This fix avoids deep imports and pulling the knowledge of internals of
Requests into the application.
Fixes #2214

Some notes:

urllib3 is a separate project that we vendor in its entirety. This PR affects it, and so requires a separate change in that library.
'Explicit' is dependent on who you are. This is 'explicit' to the person who calls requests, but not to the person above them, if any. The warning is not just for the person writing against requests, but for anyone who uses an application that uses requests.

I'm -1 on this change.

CERT_EXPLICITLY_NONE means nothing and doesn't add much value here. Given that this is mostly in urllib3 and would rely on acceptance there, I'm closing this until progress has been made there.

Sorry, but the closing statement is false. CERT_EXPLICITLY_NONE means CERT_NONE set explicitly, and its value is making the distinction between such case and CERT_NONE set explicitly, purely by the lack of certificates.

@zaitcev The closing statement was: "Given that this is mostly in urllib3 and would rely on acceptance there, I'm closing this until progress has been made there."

@zaitcev CERT_NONE, CERT_REQUIRED and CERT_OPTIONAL are all defined on the ssl module and have a real meaning in the context of performing validation. CERT_EXPLICITLY_NONE means absolutely nothing in the same context.

authors: Lukasa sigmavirus24 zaitcev


text:
Fix TypeError when get json-encoded content of a response

self.content could be None, so len(self.content) may raise TypeError: object of type 'NoneType' has no len()

Huh. I feel like maybe we should just change Response.content to never be None. It's certainly surprising to me that it can be. @kennethreitz @sigmavirus24?

@Lukasa so we set it to None in the descriptor in error cases.
I don't think we can just change it to never be None before 3.0 but that's my hesitancy to break user-level code speaking.

@sigmavirus24 Yeah, that seems reasonable. In that case, clearly the json() code needs to handle it too.
That means I think this patch is fine. @messense are you interested in adding a test to validate that this works as expected?

This came up yesterday in a work context.  The content of a response CAN BE None, and that would be correct, in the case of a 204 response code.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
I agree it would be better if response.json() handled that gracefully rather than dying of a JSON parsing error.

I just realized that fix this will make it raise ValueError: No JSON object could be decoded instead because of json.loads('')

Hurrah, this looks great to me! I'd argue the previous behaviour was a bug so we have no API compatibility concerns to worry about here, but I want @sigmavirus24 to ACK that before merging.

This looks fine to me :)

authors: Lukasa messense pcurry sigmavirus24


text:
Error with tutorial examples

Hi, I'm using the 4-gram.arpa from kenlm,  when I run
import kenlm

from pyctcdecode import build_ctcdecoder
kenlm_model = kenlm.Model("./4-gram.arpa")
labels = [
    " ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
    "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
]
decoder = build_ctcdecoder(
    labels,
    kenlm_model,
    alpha=0.5,  # tuned on a val set
    beta=1.0,  # tuned on a val set
)

I get the following error with build_ctcdecoder
TypeError: Cannot convert <class 'kenlm.Model'> to string
How do I resolve this?

build_ctcdecoder takes a model path, not a model I believe

Had the same problem, fixed it with #62

The PR is merged now, so I'm going to close this. Thanks!

authors: DanBmh gkucsko lopez86 pkadambi

repo: kensho-technologies/pyctcdecode


text:
Close #5 - Fix positioning when editor is scrolled

this is a proposed 3.0.0 version
simplify toolbar and use Parchment Attributors
use css float to align images
add demo
allow deleting an image
update display when alignment changes
allow referring to modules by name
add .editorconfig
fix lint errors
update README
avoid including all of lodash

@gbenson-wikia, will you review this PR and see what you think? This is my proposal for v3. See included demo or the README's plunker

Sorry for the slow response - I was out on vacation.
LGTM!  I'm happy to see this moving along so quickly.  :D

@gbenson-wikia Thanks for reviewing. This version is now published to npm as v3.0.0. If you find any shortcomings, feel free to open an PR or just let me know.

authors: gbenson-wikia kensnyder

repo: kensnyder/quill-image-resize-module


text:
set initial slide index

Is there anyway to set initial slide to show without triggering the animation?

So basically what I'm seeing in the real world and what I think I'm reading here is just that "initialSlide" doesn't work at ALL; correct?

To paraphrase Yzma from "Emperor's New Groove":
Why do we even HAVE that option?!
Workaround above works like a charm.

@centerlinescores its tricky. Say you have 6 slides. slidesToScroll is 3. That makes the only navigable indexes 0 and 3. So if you put initialSlide: 2, it wont work. Do you have a particular use case that isn't working for you?

authors: centerlinescores kenwheeler linkit87

repo: kenwheeler/slick


text:
Feature request: Cards feature for dataview task queries

Extend the excellent cssClasses: Cards feature to dataview task queries in addition to dataview table queries.

Can you provide more insight into the use case and how you would envision it to work?

Hi Kepano.  Apologies in advance for the long answer!  My use-case relates to displaying a compact (i.e. cards) view of my top 3 tasks for each week (MITs or Big Rocks) on a quarterly dashboard.   I can achieve this at the moment by using a dvfield instead of tasks.   The output of my task query looks like the the box on the left.  And I would like to display it like the box on the right.

The query I am using is below.  This uses the dvfield instead of the task object.  This lets me format using the cards class.
TABLE
outcome
FROM "Weeks"
where theYear = 2022
and theQuarter = this.theQuarter
and outcome != null
sort file.name desc

I would like to get the same "cards" format using the native task object, with a query like:
Task
FROM "Weeks"
where contains(this.weeks, file.link) and
meta(section).subpath = "Weekly Outcomes"

authors: kepano unspokendeed

repo: kepano/obsidian-minimal


text:
Better Error Logging for Dynatrace API 4xx errors when queries metrics api v2

Right now when the Dynatrace Metrics APIv2 returns e.g.: "HTTP 403 - Insufficient priviliges for the API Token" there is no log output in the dynatrace sli service that would indicate this issue. The only logoutput we see is a "Dynatrace Metrics API returned an error: No valid response from metrics api for query"
When calling the API - especially the MetricsV2 API - we should better handle and parse NON HTTP 200 responses
Here is an example response for the MetricsV2 API:
{
  "error": {
    "code": 403,
    "message": "Token is missing required scope. Use one of: metrics.read (Read metrics)"
  }
}

The problem is easily fixed in the following locations by fixing the if to only error out if there is a "" response:
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L611
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L657
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L697
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L732
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L765
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L809
https://github.com/keptn-contrib/dynatrace-sli-service/blob/release-0.7.2/pkg/lib/dynatrace/dynatrace.go#L838
Also great opportunity for some code refactoring as all this is duplicated code that can be done by a helper function

Implemented with https://github.com/keptn-contrib/dynatrace-sli-service/releases/tag/0.7.3

repo: keptn-contrib/dynatrace-sli-service


text:
Can't install keptn in openshift cluster.

Your issue may already be reported! Please search on the issue tracker before creating a new one.
Environment

Client OS (e.g., Linux, macOS, Windows):  Linux
Keptn Version (keptn version): 0.11.2
Kubernetes Cloud Provider (e.g., GKE, AKS): Openshift Selfhosted
Kubernetes version (kubectl version):
Client Version: 4.8.3
Server Version: 4.8.12
Kubernetes Version: v1.21.1+d8043e1

*Helm Version: version.BuildInfo{Version:"v3.2.3+4.el8", GitCommit:"2160a65177049990d1b76efc67cb1a9fd21909b1", GitTreeState:"clean", GoVersion:"go1.13.4"}
Affected Component

[ ] Approval
[ ] Bridge
[ ] CLI
[ ] Datastore
[ ] Docs
[ ] Distributor / Event Broker
[ ] Helm
[ ] Istio
[ ] Jmeter
[ ] Kubernetes Integration
[x] Openshift Integration
[ ] REST API
[ ] Webhook

Describe the bug

**To Reproduce**

Steps to reproduce the behavior:

Install Helm
Follow the guide line describe here - https://keptn.sh/docs/0.11.x/operate/advanced_install_options/
Execute in command line "helm install keptn https://github.com/keptn/keptn/releases/download/0.11.2/keptn-0.11.2.tgz -n keptn --create-namespace --wait --set=continuous-delivery.enabled=true,continuous-delivery.openshift.enabled=true"

Expected behavior

Installed keptn in openshift cluster
Current behavior

Error
Error: template: keptn/charts/continuous-delivery/charts/openshift/templates/route-service-openshift.yaml:113:14: executing "keptn/charts/continuous-delivery/charts/openshift/templates/route-service-openshift.yaml" at <include "control-plane.dist.common.env.vars" .>: error calling include: template: keptn/charts/control-plane/templates/_helpers.tpl:101:14: executing "control-plane.dist.common.env.vars" at <.Values.distributor.metadata.namespace>: nil pointer evaluating interface {}.namespace
Screenshots

Additional context

Triage results:

control-plane.dist.common.env.vars was introduced by @warber in #4276 : https://github.com/keptn/keptn/blame/master/installer/manifests/keptn/charts/continuous-delivery/charts/openshift/templates/route-service-openshift.yaml#L113 (Keptn 0.8.4)
The variable was present in installer/manifests/keptn/charts/control-plane/templates/_helpers.tpl. The variables are still declared there. I check the conditional declarations, and it should be included by default
The variable reference is still present in other places: https://github.com/keptn/keptn/search?q=control-plane+dist+common+env+vars

I do not see why the variable does not get picked up in this case. Will try running the Helm chart generator locally to see whether there is any issue with templating

Hi, I just investigated this issue and it is very likely that we will not need the openshift-route-service anymore in the future. So for now you can also already omit the continuous-delivery.openshift.enabled=true option - this should make the installation work.
Some background information: The openshift-route-service has been used for setting up the configuration needed for enabling Istio injection in a namespace within an openshift cluster, as described here: https://istio.io/latest/docs/setup/platform-setup/openshift/
So if you plan to use Keptn for deploying services using Istio, those instructions would need to be followed.

Hi, I just investigated this issue and it is very likely that we will not need the openshift-route-service anymore in the future. So for now you can also already omit the continuous-delivery.openshift.enabled=true option - this should make the installation work. Some background information: The openshift-route-service has been used for setting up the configuration needed for enabling Istio injection in a namespace within an openshift cluster, as described here: https://istio.io/latest/docs/setup/platform-setup/openshift/
So if you plan to use Keptn for deploying services using Istio, those instructions would need to be followed.

Hi. Unfortunately without "continuous-delivery.openshift.enabled=true" option installation doesn't work.
When I try to execute:
helm install keptn https://github.com/keptn/keptn/releases/download/0.11.2/keptn-0.11.2.tgz -n keptn --wait --set=continuous-delivery.enabled=true
I've got error:
Error: timed out waiting for the condition
And none of all needed deployments doesn't work:
NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/api-gateway-nginx       0/1     0            0           5m24s
deployment.apps/api-service             0/1     0            0           5m24s
deployment.apps/approval-service        0/1     0            0           5m24s
deployment.apps/bridge                  0/1     0            0           5m24s
deployment.apps/configuration-service   0/1     0            0           5m24s
deployment.apps/keptn-mongo             0/1     0            0           5m24s
deployment.apps/lighthouse-service      0/1     0            0           5m24s
deployment.apps/mongodb-datastore       0/1     0            0           5m24s
deployment.apps/remediation-service     0/1     0            0           5m24s
deployment.apps/secret-service          0/1     0            0           5m24s
deployment.apps/shipyard-controller     0/1     0            0           5m24s
deployment.apps/statistics-service      0/1     0            0           5m24s
deployment.apps/webhook-service         0/1     0            0           5m24s

And some debug information from replicaset controller logs:
Warning  FailedCreate  87s (x19 over 12m)  replicaset-controller  Error creating: pods "api-gateway-nginx-796446f658-" is forbidden: unable to validate against any security context constraint
From my point of view we are missing  roles, cluster roles, scc and so on.

authors: bacherfl fedextm oleg-nenashev

repo: keptn/keptn


text:
#2804 Added shipyardVersion property to GET /project response

Closes #2804
Signed-off-by: Florian Bacher florian.bacher@dynatrace.com

Codecov Report

Merging #2900 (77f36ff) into master (15a8368) will decrease coverage by 4.76%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##           master    #2900      +/-   ##
==========================================
- Coverage   36.34%   31.57%   -4.77%
==========================================
  Files         104        6      -98
  Lines        6472      627    -5845
  Branches      197        0     -197
==========================================
- Hits         2352      198    -2154
+ Misses       3812      408    -3404
+ Partials      308       21     -287

Flag
Coverage Δ

moduleA
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ation-service/common/projects_materialized_view.go
71.30% <45.45%> (-2.43%)
:arrow_down:

bridge/client/app/_models/approval-states.ts

distributor/cmd/main.go

...ouse-service/event_handler/evaluate_sli_handler.go

shipyard-controller/common/secret_store.go

...uation-details/ktb-evaluation-details.component.ts

lighthouse-service/event_handler/common.go

jmeter-service/common.go

...notification-bar/ktb-notification-bar.component.ts

helm-service/controller/handler_base.go

... and 89 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #2900 (77f36ff) into master (15a8368) will decrease coverage by 4.76%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##           master    #2900      +/-   ##
==========================================
- Coverage   36.34%   31.57%   -4.77%
==========================================
  Files         104        6      -98
  Lines        6472      627    -5845
  Branches      197        0     -197
==========================================
- Hits         2352      198    -2154
+ Misses       3812      408    -3404
+ Partials      308       21     -287

Flag
Coverage Δ

moduleA
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ation-service/common/projects_materialized_view.go
71.30% <45.45%> (-2.43%)
:arrow_down:

bridge/client/app/_models/approval-states.ts

distributor/cmd/main.go

...ouse-service/event_handler/evaluate_sli_handler.go

shipyard-controller/common/secret_store.go

...uation-details/ktb-evaluation-details.component.ts

lighthouse-service/event_handler/common.go

jmeter-service/common.go

...notification-bar/ktb-notification-bar.component.ts

helm-service/controller/handler_base.go

... and 89 more

Continue to review full report at Codecov.

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

authors: bacherfl codecov-io


text:
feat: customize helm chart image pull registry & pull secrets

This PR
allow user to provide values that customize image pull registry & pull secrets
Related Issues
closes #4933
Notes
follows bitnami example
refactoring repetitive code into a library chart may be warranted

Hello @lmmarsano,
many thanks for your contribution. Before starting a review, could you please sign your commits. Please see here for more details: https://github.com/keptn/keptn/pull/4984/checks?check_run_id=3392183399

authors: johannes-b lmmarsano


text:
manifest is out of date on install page

This page still shows a manifest of 0.6.0 but, at the time of writing, KLT is at 0.8.1

That's on purpose, we still support manifest installation for supporting users but from 0.7.0 onwards (as reported in the Helm Chart subsection), we only officially support installation via Helm Charts :)

Closing as "as intended"

authors: agardnerIT thisthat

repo: keptn/lifecycle-toolkit


text:
Job pending due to certificate error on webhook (x509: certificate signed by unknown authority)

I try to deploy an app, and jobs are pending due to certificate error on webhook
❯ kubectl get keptntasks.lifecycle.keptn.sh -n poc
NAME                                         APPNAME        APPVERSION   WORKLOADNAME   WORKLOADVERSION   JOB NAME                              STATUS
pre-pre-log-podtato-head-93276               podtato-head   0.0.0                                         klc-pre-pre-log-podtato-head--87547   Progressing
pre-check-entry-service-podtato-head-75657   podtato-head   0.0.0                                         klc-pre-check-entry-service-p-43086   Progressing

❯ kubectl -n poc get job
NAME                                  COMPLETIONS   DURATION   AGE
klc-pre-pre-log-podtato-head--87547   0/1           34m        34m
klc-pre-check-entry-service-p-43086   0/1           34m        34m

❯ kubectl -n poc describe job klc-pre-pre-log-podtato-head--87547
Name:             klc-pre-pre-log-podtato-head--87547
Namespace:        poc
Selector:         controller-uid=a799a1eb-fbf2-4b8c-9264-6768193dd2e8
Labels:           keptn.sh/app=podtato-head
                  keptn.sh/task-name=pre-pre-log-podtato-head-93276
                  keptn.sh/version=0.0.0
Annotations:      batch.kubernetes.io/job-tracking:
Controlled By:    KeptnTask/pre-pre-log-podtato-head-93276
Parallelism:      1
Completions:      1
Completion Mode:  NonIndexed
Start Time:       Tue, 22 Nov 2022 14:07:25 +0100
Pods Statuses:    0 Active (0 Ready) / 0 Succeeded / 0 Failed
Pod Template:
  Labels:  controller-uid=a799a1eb-fbf2-4b8c-9264-6768193dd2e8
           job-name=klc-pre-pre-log-podtato-head--87547
  Containers:
   keptn-function-runner:
    Image:      ghcr.io/keptn/functions-runtime:v0.4.0
    Port:       <none>
    Host Port:  <none>
    Environment:
      CONTEXT:  {"workloadName":"","appName":"podtato-head","appVersion":"0.0.0","workloadVersion":"","taskType":"","objectType":"Application"}
      SCRIPT:   /var/data/function.ts
    Mounts:
      /var/data/function.ts from function-mount (ro,path="code")
  Volumes:
   function-mount:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      keptnfn-pre-log-podtato-head
    Optional:  false
Events:
  Type     Reason        Age                From            Message
  ----     ------        ----               ----            -------
  Warning  FailedCreate  1s (x12 over 34m)  job-controller  Error creating: Internal error occurred: failed calling webhook "mpod.keptn.sh": failed to call webhook: Post "https://klc-webhook-service.keptn-lifecycle-toolkit-system.svc:443/m
utate-v1-pod?timeout=10s": x509: certificate signed by unknown authority

❯ kubectl -n keptn-lifecycle-toolkit-system get certificate
NAME               READY   SECRET                AGE
klc-serving-cert   True    webhook-server-cert   4h54m

❯ kubectl get mutatingwebhookconfigurations.admissionregistration.k8s.io
NAME                                                    WEBHOOKS   AGE
cert-manager-webhook                                    1          17d
opentelemetry-operator-mutating-webhook-configuration   3          17d
klc-mutating-webhook-configuration                      1          35m

Hello @nlamirault did you install the cert manager according to our tutorial?
The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. The certificate creation is handled automatically by cert-manager. To install cert-manager, execute the following command:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
When cert-manager is installed, you can run
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.4.0/manifest.yaml

yes @RealAnna . cert-manager is installed

@nlamirault thank you for your answer! What I wanted to verify is if your cert-manager installation follows our default setup or if it may differ. Eg. a similar error like yours could happen if the cert manager does not enable the cainjector as explained here
Let me know if this helps, otherwise maybe you can share more info on how you installed everything?

❯ kubectl -n cert-manager get pod
NAME                                      READY   STATUS    RESTARTS       AGE
cert-manager-856bc99764-65hhk             1/1     Running   3 (16d ago)    19d
cert-manager-webhook-6d4d9d87f5-wh97x     1/1     Running   3 (14d ago)    19d
cert-manager-cainjector-6778b6bdc-mm5jf   1/1     Running   95 (14d ago)   19d

and :
❯ kubectl get MutatingWebhookConfiguration cert-manager-webhook -o yaml
E1211 12:12:50.942578 1070402 memcache.go:255] couldn't get resource list for external.metrics.k8s.io/v1beta1: Got empty response for: external.metrics.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  annotations:
    cert-manager.io/inject-ca-from-secret: cert-manager/cert-manager-webhook-ca
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"admissionregistration.k8s.io/v1","kind":"MutatingWebhookConfiguration","metadata":{"annotations":{"cert-manager.io/inject-ca-from-secret":"cert-manager/cert-manager-webhook-ca"},"labels":{"app":"webhook","app.kubernete
s.io/component":"webhook","app.kubernetes.io/instance":"cert-manager","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"webhook","app.kubernetes.io/version":"v1.10.0","argocd.argoproj.io/instance":"cert-manager","helm.sh/char
t":"cert-manager-v1.10.0","portefaix.xyz/version":"v0.43.0"},"name":"cert-manager-webhook"},"webhooks":[{"admissionReviewVersions":["v1"],"clientConfig":{"service":{"name":"cert-manager-webhook","namespace":"cert-manager","path":"/mutate"}
},"failurePolicy":"Fail","matchPolicy":"Equivalent","name":"webhook.cert-manager.io","rules":[{"apiGroups":["cert-manager.io","acme.cert-manager.io"],"apiVersions":["v1"],"operations":["CREATE","UPDATE"],"resources":["*/*"]}],"sideEffects"
:"None","timeoutSeconds":10}]}
  creationTimestamp: "2022-11-04T15:57:27Z"
  generation: 2
  labels:
    app: webhook
    app.kubernetes.io/component: webhook
    app.kubernetes.io/instance: cert-manager
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: webhook
    app.kubernetes.io/version: v1.10.0
    argocd.argoproj.io/instance: cert-manager
    helm.sh/chart: cert-manager-v1.10.0
    portefaix.xyz/version: v0.43.0
  name: cert-manager-webhook
  resourceVersion: "4026985"
  uid: 64dcd7de-34b9-4117-b142-393e6abe96df
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ3RENDQVVlZ0F3SUJBZ0lRUlFqSFdJb0p6MHpqbEViZFl5NUVjREFLQmdncWhrak9QUVFEQXpBaU1TQXcKSGdZRFZRUURFeGRqWlhKMExXMWhibUZuWlhJdGQyVmlhRzl2YXkxallUQWVGdzB5TWpFeE1EUXhOVFUzTXpoYQpGdzB5TXpFeE1EU
XhOVFUzTXpoYU1DSXhJREFlQmdOVkJBTVRGMk5sY25RdGJXRnVZV2RsY2kxM1pXSm9iMjlyCkxXTmhNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWo5VjNlbzh6QkV1czRUMWNnOGRRdzE5ZDNyYVUKUGpBa01kOW9kWklMOTV4WEFVWW14TUdNVHpPSlBmb0RKdEt1NnJESWdzdU9SSy9PVW1tVWhyVm5JTURX
T0VwRQp5UmwreTBzUjlqL25wNTRsanpGdGhyaExpWVNVN1krUHBYa2tvMEl3UURBT0JnTlZIUThCQWY4RUJBTUNBcVF3CkR3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVTd0dmNRRm40L1B1WjljMDc3MUZvcHpYRVFPRXcKQ2dZSUtvWkl6ajBFQXdNRFp3QXdaQUl3S3lySHNrN0h6TFZGcFE2TUVRT2E
zcUM4eUViWnZBWGV5WjZzSXVxYgpaQy9QM1FWZ05vREE1UXQxckFCVzlSMGpBakJkdlVQaDgwM0RCcEtqdjdCZzZML3ZHa3RwVXJNQXUxWEoxS1hKCnN3RVRQM3RJdUZFSnlCQ01uUzIxTFVZN1JRZz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    service:
      name: cert-manager-webhook
      namespace: cert-manager
      path: /mutate
      port: 443
  failurePolicy: Fail
  matchPolicy: Equivalent
  name: webhook.cert-manager.io
  namespaceSelector: {}
  objectSelector: {}
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - cert-manager.io
    - acme.cert-manager.io
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - '*/*'
    scope: '*'
  sideEffects: None
  timeoutSeconds: 10

@nlamirault  Is there some error in the cainjector pod? (eg. about secret or secret controller) What version of k8s are you using?

I'll close this issue since the long inactivity and we have our cert-manager built in :)
Feel free to re-open the issue @nlamirault if you still have problems with the latest release

authors: RealAnna nlamirault thisthat


text:
Code Example on Denoising Diffusion Probabilistic Models

Hello,
I would like to make a code example on Denoising Diffusion probabilistic models.
Do you think it is needed on keras.io ?
Here is what it would like on kaggle: https://www.kaggle.com/code/folefac/denoising-diffusion-models-with-tensorflow

Hello,
Saw your implementation on Kaggle. Could you please share the notebook(Jupyter or Colab) here. The implementation is for Denoising Diffusion Probabilistic Models only right? I was in long search of it din't find any proper impelemtation. Please respond that help me a lot. Thanks in adavance.

Hello, you can check the colab here:
https://colab.research.google.com/drive/1T_08sIQi2QgujjBdwsViNYj-dkf6wfa0
Le ven. 28 oct. 2022 à 14:01, arohi2bujji @.***> a
écrit :

Hello,
Saw your implementation on Kaggle. Could you please share the
notebook(Jupyter or Colab) here. The implementation is for Denoising
Diffusion Probabilistic Models only right? I was in long search of it din't
find any proper impelemtation. Please respond that help me a lot. Thanks in
adavance.
—
Reply to this email directly, view it on GitHub
https://github.com/keras-team/keras-io/issues/971#issuecomment-1294972697,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALHTANRV4SGCLYNAG57KIGDWFPFCBANCNFSM523APREA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi @FOLEFAC, thanks for getting in touch. Please take a look at our call for examples, and if you think your example would be a good fit, go ahead and create a PR. Thanks!

authors: FOLEFAC arohi2bujji pcoet

repo: keras-team/keras-io


text:
Updated direct link for Custom Objects

Updated direct link to access Custom Objects definition by changing #custom-objects to #custom_objects in the given link.

@RenuPatelGoogle any update on the below?

Can you please also update the corresponding .md and .ipynb files?

@RenuPatelGoogle any update on the below?

Can you please also update the corresponding .md and .ipynb files?
@fchollet, Sorry for delay. I have updated .md and .ipynb files.

authors: RenuPatelGoogle fchollet


text:
Network quantization

Hi guys,
Right now I'm working on LSTM (specifically language model application)
My project is to implement Incremental Network Quantization(INQ as an abbreviation in literature)
Here, it is how it works:
1- Network is fully trained in floating-point format.
2- Then a group of weight(for example 10 percent in each layer) is chosen based on their magnitude (or maybe cost function gradient according to the weight)
3- The selected weights are quantized based on the format given (e.g. Q1.4 )
4- The network is trained while the selected weights are freezed to the quantized values (non_selected weights are updating to compensate for the error of quantization)
5- This process continues until the remaining weights are quantized.
Based on the given material, this is what I need:
At the end of each epoch, for each layer, a group of weights is selected by using Keras callBack  argument in fit function
Or maybe it is better to implement it by using weight constrain  argument in layer function
I don't know how to implement it in Keras

@Jvafaei Please refer to this documentation where its clearly mentioned how to implement your own neural network using Keras. Also please go though the source code if necessary.
Also please note that we only accept issues related to bug/enhancement/feature request.
To ask questions, please see the following resources :
StackOverflow
Keras Slack channel
Keras.io support
Gitter
Thanks!
If you think we made a mistake, please open another issue explaining your request in detail

authors: Jvafaei gowtham-kp

repo: keras-team/keras


text:
Incompatible shapes issue when prediction output and actual output dimensions differ

I am trying to create a multi-class classification model with Keras and it appears that when I try to fit the model, the shapes in the output are different that target. Although, I am not explicitly defining the shape in the code though.
#######################################
### -------- Load libraries ------- ###
#Load Huggingface transformers
from transformers import TFBertModel,  BertConfig, BertTokenizerFast
#Then what you need from tensorflow.keras
from tensorflow.keras.layers import Input, Dropout, Dense
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.initializers import TruncatedNormal
from tensorflow.keras.losses import CategoricalCrossentropy
from tensorflow.keras.metrics import CategoricalAccuracy
from tensorflow.keras.utils import to_categorical
import pandas as pd
from sklearn.model_selection import train_test_split

#Import data from csv
data = pd.read_csv('local_folder/datasets/training.csv')

#Remove a row if any of the three remaining columns are missing
data = data[['id', 'code1', 'code2', 'code3', 'code4', 'text']].dropna()

#Remove rows, where the label is present only ones (can't be split)
data = data.groupby('code1').filter(lambda x : len(x) > 1)
data = data.groupby('code2').filter(lambda x : len(x) > 1)
data = data.groupby('code3').filter(lambda x : len(x) > 1)
data = data.groupby('code4').filter(lambda x : len(x) > 1)

#Set your model output as categorical and save in new label col
data['code1'] = pd.Categorical(data['code1'])
data['code2'] = pd.Categorical(data['code2'])
data['code3'] = pd.Categorical(data['code3'])
data['code4'] = pd.Categorical(data['code4'])

# Transform your output to numeric
data['code1_label'] = data['code1'].cat.codes
data['code2_label'] = data['code2'].cat.codes
data['code3_label'] = data['code3'].cat.codes
data['code4_label'] = data['code4'].cat.codes

#Only consider records which have multiple values
data = data[data['code1'].map(data['code1'].value_counts()) > 5]
data = data[data['code2'].map(data['code2'].value_counts()) > 5]
data = data[data['code3'].map(data['code3'].value_counts()) > 5]
data = data[data['code4'].map(data['code4'].value_counts()) > 5]

# Split into train and test - stratify over label
data, data_test = train_test_split(data, test_size = 0.2, stratify = data[['code1_label']])

#######################################
### --------- Setup BERT ---------- ###

#Name of the BERT model to use
model_name = 'bert-base-uncased'

#Max length of tokens
max_length = 100

#Load transformers config and set output_hidden_states to False
config = BertConfig.from_pretrained(model_name)
config.output_hidden_states = False

#Load BERT tokenizer
#tokenizer = BertTokenizerFast.from_pretrained(pretrained_model_name_or_path = model_name, config = config)
tokenizer = BertTokenizerFast.from_pretrained(pretrained_model_name_or_path = model_name)
tokenizer.save_pretrained("./BERT-Topic_Trained_Model/models/tokenizer/")

#Load the Transformers BERT model
transformer_model = TFBertModel.from_pretrained(model_name, config = config)

#######################################
### ------- Build the model ------- ###

#TF Keras documentation: https://www.tensorflow.org/api_docs/python/tf/keras/Model

#Load the MainLayer
bert = transformer_model.layers[0]

#Build your model input
input_ids = Input(shape=(max_length,), name='input_ids', dtype='int32')
attention_mask = Input(shape=(max_length,), name='attention_mask', dtype='int32')
inputs = {'input_ids': input_ids, 'attention_mask': attention_mask}
#inputs = {'input_ids': input_ids}

#Load the Transformers BERT model as a layer in a Keras model
bert_model = bert(inputs)[1]
dropout = Dropout(config.hidden_dropout_prob, name='pooled_output')
pooled_output = dropout(bert_model, training=False)

#Then build your model output
code1 = Dense(units=len(data.code1.value_counts()), kernel_initializer=TruncatedNormal(stddev=config.initializer_range), name='code1')(pooled_output)
code2 = Dense(units=len(data.code2.value_counts()), kernel_initializer=TruncatedNormal(stddev=config.initializer_range), name='code2')(pooled_output)
code3 = Dense(units=len(data.code3.value_counts()), kernel_initializer=TruncatedNormal(stddev=config.initializer_range), name='code3')(pooled_output)
code4 = Dense(units=len(data.code4.value_counts()), kernel_initializer=TruncatedNormal(stddev=config.initializer_range), name='code4')(pooled_output)
outputs = {'code1': code1, 'code2': code2, 'code3': code3, 'code4': code4}

#And combine it all in a model object
model = Model(inputs=inputs, outputs=outputs, name='BERT_MultiLabel_MultiClass')

#Take a look at the model
model.summary()

This is how the output looks like -
Model built in 1.570626974105835 seconds
Model: "BERT_MultiLabel_MultiClass"
__________________________________________________________________________________________________
 Layer (type)                   Output Shape         Param #     Connected to
==================================================================================================
 attention_mask (InputLayer)    [(None, 100)]        0           []

 input_ids (InputLayer)         [(None, 100)]        0           []

 bert (TFBertMainLayer)         TFBaseModelOutputWi  109482240   ['attention_mask[0][0]',
                                thPoolingAndCrossAt               'input_ids[0][0]']
                                tentions(last_hidde
                                n_state=(None, 100,
                                 768),
                                 pooler_output=(Non
                                e, 768),
                                 past_key_values=No
                                ne, hidden_states=N
                                one, attentions=Non
                                e, cross_attentions
                                =None)

 pooled_output (Dropout)        (None, 768)          0           ['bert[0][1]']

 code1 (Dense)                   (None, 57)           43833       ['pooled_output[0][0]']

 code2 (Dense)                   (None, 100)          76900       ['pooled_output[0][0]']

 code3 (Dense)                   (None, 149)          114581      ['pooled_output[0][0]']

 code4 (Dense)                   (None, 265)          203785      ['pooled_output[0][0]']

==================================================================================================
Total params: 109,921,339
Trainable params: 109,921,339
Non-trainable params: 0
__________________________________________________________________________________________________

Now as you can see the output shape for code4 labels is (None, 265)
#######################################
### ------- Train the model ------- ###

#Set an optimizer
optimizer = Adam(
    learning_rate=5e-05,
    epsilon=1e-08,
    decay=0.01,
    clipnorm=1.0)

#Set loss and metrics
loss = {'code1': CategoricalCrossentropy(from_logits = True),
       'code2': CategoricalCrossentropy(from_logits = True),
       'code3': CategoricalCrossentropy(from_logits = True),
       'code4': CategoricalCrossentropy(from_logits = True)}
metric = {'code1': CategoricalAccuracy('accuracy'),
         'code2': CategoricalAccuracy('accuracy'),
         'code3': CategoricalAccuracy('accuracy'),
         'code4': CategoricalAccuracy('accuracy')}

# Compile the model
model.compile(
    optimizer = optimizer,
    loss = loss,
    metrics = metric)

# Ready output data for the model
y_code1 = to_categorical(data['code1_label'])
y_code2 = to_categorical(data['code2_label'])
y_code3 = to_categorical(data['code3_label'])
y_code4 = to_categorical(data['code4_label'])

# Tokenize the input (takes some time)
x = tokenizer(
    text=data['text'].to_list(),
    add_special_tokens=True,
    max_length=max_length,
    truncation=True,
    padding=True,
    return_tensors='tf',
    return_token_type_ids = False,
    return_attention_mask = True,
    verbose = True)

# Fit the model
history = model.fit(
    x={'input_ids': x['input_ids'], 'attention_mask': x['attention_mask']},
    #x={'input_ids': x['input_ids']},
    y={'code1': y_code1, 'code2': y_code2, 'code3': y_code3, 'code4': y_code4},
    validation_split=0.2,
    batch_size=128,
    epochs=5)

Error Message:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [23], in <cell line: 48>()
48 history = model.fit(
49    x={'input_ids': x['input_ids'], 'attention_mask': x['attention_mask']},
50    #x={'input_ids': x['input_ids']},
51    y={'code1': y_code1, 'code2': y_code2, 'code3': y_code3, 'code4': y_code4},
52    validation_split=0.2,
53    batch_size=128,
54    epochs=5)

File /opt/conda/lib/python3.8/site-packages/keras/utils/traceback_utils.py:67, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     65 except Exception as e:  # pylint: disable=broad-except
     66   filtered_tb = _process_traceback_frames(e.__traceback__)
---> 67   raise e.with_traceback(filtered_tb) from None
     68 finally:
     69   del filtered_tb

File /tmp/__autograph_generated_filekacvt2lr.py:15, in outer_factory.<locals>.inner_factory.<locals>.tf__train_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 "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 1051, in train_function  *
        return step_function(self, iterator)
    File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 1040, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 1030, in run_step  **
        outputs = model.train_step(data)
    File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 890, in train_step
        loss = self.compute_loss(x, y, y_pred, sample_weight)
    File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 948, in compute_loss
        return self.compiled_loss(
    File "/opt/conda/lib/python3.8/site-packages/keras/engine/compile_utils.py", line 201, in __call__
        loss_value = loss_obj(y_t, y_p, sample_weight=sw)
    File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 139, in __call__
        losses = call_fn(y_true, y_pred)
    File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 243, in call  **
        return ag_fn(y_true, y_pred, **self._fn_kwargs)
    File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 1787, in categorical_crossentropy
        return backend.categorical_crossentropy(
    File "/opt/conda/lib/python3.8/site-packages/keras/backend.py", line 5119, in categorical_crossentropy
        target.shape.assert_is_compatible_with(output.shape)

    ValueError: Shapes (None, 263) and (None, 265) are incompatible

Although this error is specific towards code4 from the spare perspective, I believe that this would happen with each of the 4 labels. So, is there a way to clean code this since I am trying to avoid hardcoding the shape (if that is even possible), since the test dataset size would differ over time.

@kkadu
In order to expedite the trouble-shooting process, please provide the dataset to reproduce the issue reported here. Thank you!

authors: kkadu sushreebarsa


text:
Request for multi backend support for timeseries data loading

Hi,
I wonder is it possible for you to implement keras.utils.timeseries_dataset_from_array() method by other backends (e.g. JAX)?
it would be nice to not have to add TF dependency just because of this module.
https://github.com/keras-team/keras/blob/v3.7.0/keras/src/utils/timeseries_dataset_utils.py#L7

tf.data.Dataset will work with Keras models using any backend. If using fit(), it works out of the box. If writing your own training loops, it's just a Python iterable.

Thank you for your response. I'm aware of the nature of tf.data.Dataset as a Python iterable and have used it on many occasions. For some reason, I used my custom data streaming pipeline and JAX as the backend. However, for a specific project, I tried timeseries_dataset_from_array() and noticed that it requires TensorFlow because it's implemented using TF. As I switched from Keras 2.0 to Keras 3.0, I assumed this module was implemented with other backends. I was curious if you have plans to implement this module using JAX, but from your answer, it seems that's not the case.

authors: fchollet linomi


text:
new keras model to tf Estimator error

Hi there,
start a new keras model and try to convert to tf Estimator
get error  valueerror: expected model argument to be a model instance, got xxxxxxxxxxxxxxx
any suggestion? thanks
here is simple example
# set model
model =  Sequential()
model.add(Dense(8, input_dim=4))
model.add(Activation('relu'))
model.add(Dense(3, input_dim=8))
model.add(Activation('softmax'))
model.compile(optimizer='SGD', loss='categorical_crossentropy', metrics=['accuracy'])
model_dir = os.path.join(os.getcwd(), "models//123").replace("//", "\\")
estimator_model = tf.keras.estimator.model_to_estimator(keras_model=model,model_dir=model_dir)

I used the Keras Functional API and I encountered the same issue.

The to_estimator does a type check on the Model object. Unfortunately, the tensorflow version of the Model object comes from deep within the bowls of TF in the version I am using (1.4.0). So a default keras Model object, or even a tensorflow.keras object will be rejected.
I changed my model import to the following:
from tensorflow.python.keras._impl.keras.models import Model
That fixed my issue.

Hi @x831617 @dheepanr
thanks
yes, not use keras. Using everything from tf  such as tf.keras.layers, tf.keras.layers.Conv1D ,..
model = tf.keras.models.Model(inp,out_final). to define your model should be fine.
so many tricks. Cost much time... but solved finally. thanks all.

I had the same issue when using an Inception-V3 net I modified, with code similar to the example (Keras 2.1.4, TF 1.5.0 on CPU):
    # Instantiate a Keras inception v3 model.
    inception_v3_net = inception.InceptionV3(
            input_shape=input_shape,
            classes=y_classes,
            )
    # Compile model with the optimizer, loss, and metrics you'd like to train with.
    inception_v3_net.compile(
            optimizer=tf.train.AdamOptimizer(),
            loss='categorical_crossentropy',
            metric='accuracy')
    # Create an Estimator from the compiled Keras model. Note the initial model
    # state of the keras model is preserved in the created Estimator.
    estimator = tf.keras.estimator.model_to_estimator(
            keras_model=inception_v3_net,
            model_dir=None)

Traceback (most recent call last):
  File "load_test.py", line 79, in <module>
    tf.app.run(main=run_network)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 124, in run
    _sys.exit(main(argv))
  File "load_test.py", line 73, in run_network
    model_dir=None)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/estimator.py", line 292, in model_to_estimator
    _save_first_checkpoint(keras_model, est, custom_objects, keras_weights)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/estimator.py", line 218, in _save_first_checkpoint
    custom_objects)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/estimator.py", line 102, in _clone_and_build_model
    model = models.clone_model(keras_model, input_tensors=input_tensors)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/models.py", line 1557, in clone_model
    return _clone_functional_model(model, input_tensors=input_tensors)
  File "/home/purohit/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/models.py", line 1361, in _clone_functional_model
    'to be a `Model` instance, got ', model)
ValueError: ('Expected `model` argument to be a `Model` instance, got ', <keras.engine.training.Model object at 0x7f76223f6d68>)

Try importing the tensorflow implementation of Keras instead of the standard?
from tensorflow.python.keras._impl import keras
Then, keras.models.Model will in fact be the same class that the instanceof check is looking for.

That makes sense. What is the plan for this -- is that recommended practice now if we want to use Keras with TensorFlow?

Hello calpeyser,
Using tensorflow's implementation of keras did not completely solve the problem, because I use a model with custom layers. I observed that tensorflow's keras version does not call the compute_output_shape function of my custom layers, even though this is crucial for my unpooling layer.
For me, it worked to simply cast the keras model to the tensorflow one:
myKerasModel = build_keras_model(...) # put your keras model here
tfCompatibleMod = tf.keras.models.Model(myKerasModel) # cast to type tensorflow expect
tfCompatibleMod.compile(...) # compile
estimator = tf.keras.estimator.model_to_estimator(keras_model=tfCompatibleMod)

I hope to help anyone who finds it here.

@schulz0r Thanks for the casting tip. In TF 1.8, the module is now tf.keras.Model However, as observed at your end, casting the keras model as a tf.keras.Model is then resulting in AttributeError: 'Model' object has no attribute '_output_tensor_cache', with the traceback:
Traceback (most recent call last):
  File "mnist_lenet_keras.py", line 44, in <module>
    main()
  File "mnist_lenet_keras.py", line 40, in main
    keras_estimator.run(model, X, Y_oh, nb_epochs=5)
  File "/home/pratyush/workspace/DL/dl_utils/tf/estimators/keras_estimator.py", line 43, in run
    model_est.train(input_fn=train_input_fn, steps=nb_batches)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 363, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 843, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 856, in _train_model_default
    features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 831, in _call_model_fn
    model_fn_results = self._model_fn(features=features, **kwargs)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/estimator.py", line 330, in model_fn
    labels)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/estimator.py", line 291, in _clone_and_build_model
    model._set_inputs(input_tensors)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/training.py", line 873, in _set_inputs
    self._symbolic_set_inputs(inputs, training=training)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/training.py", line 992, in _symbolic_set_inputs
    outputs = self.call(self.inputs[0], training=training)
  File "/home/pratyush/workspace/virtualenv/tf/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/network.py", line 628, in call
    if cache_key in self._output_tensor_cache:
AttributeError: 'Model' object has no attribute '_output_tensor_cache'

Using Tensorflow backend and keras is the appropriate way to allow converting the keras model to an Estimator. If you find a model implemented in keras , it's easy to make some ajustements and build the blocks using tf.keras.

@schulz0r Hi I'm trying to prune some layers of a custom model too (YOLOv3). May I know if you solved the issue?

@zmlim No, I simply stopped using Keras.

@zmlim No, I simply stopped using Keras.

I'm curious, what do you use now?

I used TF estimators.

authors: KhalilGorsan aspratyush calpeyser dheepanr handongfeng mayowaosibodu purohit schulz0r x831617 zmlim


text:
[FR-1] Implement C++ Methods Calling from Python using pybind11

Feature Request
We need to implement a mechanism that allows Python code to access and call C++ methods via pybind11. This would involve creating appropriate bindings and ensuring that the necessary data types are handled correctly.
Acceptance Criteria

[ ] Create callable C++ methods for basic graphics handling.
[ ] Implement bindings to expose these methods to Python.
[ ] Test calling these C++ methods from Python with various input parameters

Requirements
This feature requires Python 3.11
Expected Behavior:
Once implemented, developers should be able to seamlessly call C++ methods from Python.

I have done some changes on the branch

added basic build script
configured CMake to run the build script with
added minimal working example to main.cpp
added CLion configuration for building and running the app

Changes are in this commit - bec3c082fbcbbc295d1d3ffb2f724baf21508dd7

repo: kerfuffin/spg-opengl


text:
Only use DelegateReporter if it's been explicitly asked for.

This will mean that the reporters are only overridden if Minitest::Reporters.use! has been called.
The respond_to? check is for cases where the plugin is on your GEM_PATH but you haven't actually required the gem.

interesting idea, but, perhaps, we should have empty plugin_minitest_reporter_init and rely on use!.  What do you think?

Either suggestion will address my concerns documented in #247. This is really needed as minitest-reporters breaks other plugins.

I personally believe that there is no good way to avoid the breakage and provide a convenient behavior for users.  All this plugin idea doesn't work because some reporters naturally fight for the same medium to show the report (e.g. minitest itself enable a report which reports to a console and it means no other reporters can report to it :( )
So, I'm closing the PR and will think what is the best way to avoid such problem.

authors: os97673 pnomolos zenspider

repo: kern/minitest-reporters


text:
feat: keeping velocity after panGesture finish

Using withDecay makes pan gesture more smoothing.
https://github.com/kesha-antonov/react-native-zoom-reanimated/assets/34602628/43ccd24e-a428-4d11-bfdc-6ff0cfd5776e

Hi
Thanks
Missed your PR, I'll check locally before/after your changes

authors: jfmoe kesha-antonov


text:
Update contextProps with shallowDiff on componentWillReceiveProps

What
Need to perform a shallow diff in Field. componentWillReceiveProps.
Why
This way we know which props we received "from outside", and update those in contextProps as well.
How
The approach overall is discussable. Maybe there's no need for any diff at all. Maybe the way we treat direct props is not acceptable.

Partially covered under #102.
It is still confusing which props change is considered a reason to update context. For example, props like style shouldn't even be in the context, as they don't contribute to the Form mechanics.

This issue is going to be fixed by the reactive props introduction in #24.
Basically, with the subscription system it will be possible to subscribe to the change of certain props of certain fields, allowing to synchronize the field's record with the field's props changes. I'm locking the discussion of this issue right now and putting possibly obsolete label to prevent from any investigation on this issue.

What is interesting, is that it seems only props to be synced with the field record is name and (?) type. Even the latter is not necessary to be kept in the record, however.
I've implemented a sync between the props and field's record using reactive programming and it works great. Now the question is whether this sync is needed, and to which extent.

No more manual props patching! Solved by introducing the Reactive props.
Merged and published under 0.20.0. Closing.

repo: kettanaito/react-advanced-form


text:
expose rpc item

I needed to expose the rpc item so I can create lower level objects e.g. Transaction and TransactionInstruction. This makes it easier to combine anchorpy calls with other Solana calls in the same Solana TX.

Is there a reason you need this instead of program.instruction and program.transaction?

my bad, don't know how I didn't see that

authors: SpaceMonkeyForever kevinheavey

repo: kevinheavey/anchorpy


text:
Protected Routes

Protected routes in middleware.ts will fail to identify the protected route if the protected route has a trailing "/" such as "/dashboard/"
In short:
if (protectedRoutes.includes(url.pathname))  will return true for "/dashboard" , but false for "/dashboard/", thus allowing access to the protected route.
You can either add both "/dashboard" and "/dashboard/" to your protected routes array, or add some code to remove all "/" from url.pathname, and then just put "dashboard" in your protected routes array.
This would work with the requested path being either /dashboard or /dashboard/
// remove the slash in the protected route array
const protectedRoutes = ["dashboard"];
// add .split  with the .join to the url.pathname to remove all slashes from the url.pathname
if (protectedRoutes.includes(url.pathname.split('/').join("")))

Thanks for raising an issue, I didn't want to pollute the example with many packages. Perhaps I could include some glob matching pattern library given that they are very common when working with middleware.

Fixed in 9e65f75cf8a2b2f899b7346b7915f9f3b6e1be63 💜

repo: kevinzunigacuellar/astro-supabase


text:
🛑 FX corretor (kty) is down

In cd7131c, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in e4d320e after 9 minutes.

repo: keviocastro/upptime


text:
🛑 FX corretor (kty) is down

In b7ba006, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 2eaf084 after 35 minutes.


text:
🛑 FX blog (kty) is down

In c36eb7b, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 5bb5f24 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In bf8b7dd, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 006460a after 8 minutes.


text:
🛑 FX corretor (kty) is down

In c636bab, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 74df8a5 after 8 minutes.


text:
🛑 FX blog (kty) is down

In 5b7295a, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in d83f42b after 9 minutes.


text:
🛑 FX corretor (kty) is down

In c24036c, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 305bb03 after 11 minutes.


text:
🛑 FX corretor (kty) is down

In 0f0b2d5, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in b88ce95 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In 2a633dc, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 2ec0bc3 after 11 minutes.


text:
🛑 FX corretor (kty) is down

In dc2b653, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 70d125b after 11 minutes.


text:
🛑 FX blog (kty) is down

In 0c1cf57, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in d319586 after 30 minutes.


text:
🛑 FX corretor (kty) is down

In 92cfede, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 85e39e7 after 10 minutes.


text:
🛑 FX corretor (kty) is down

In 6fe8e2c, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in 0baebd9 after 25 minutes.


text:
🛑 FX corretor (kty) is down

In 085cd22, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in f3a637b after 6 minutes.


text:
🛑 FX blog (kty) is down

In 45b2d0e, FX blog (kty) (https://foxter-blogeditor.konecty.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX blog (kty) is back up in 755189d after 17 minutes.


text:
🛑 FX corretor (kty) is down

In c1db11a, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in feee899 after 6 minutes.


text:
🛑 FX corretor (kty) is down

In 540d601, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in a7beb99 after 44 minutes.


text:
🛑 elagi-cl konecty (kty) is down

In 5778266, elagi-cl konecty (kty) (https://egalite-cl.konecty.com) was down:

HTTP code: 404
Response time: 173 ms

Resolved: elagi-cl konecty (kty) is back up in a7ff040 after 6 hours, 58 minutes.


text:
🛑 GIPI financial is down

In 7d05c66, GIPI financial (https://financial.app.gipisistemas.com.br/public/check/health) was down:

HTTP code: 503
Response time: 184 ms

Resolved: GIPI financial is back up in 8915456 after 6 minutes.


text:
⚠ AVS (kty) has degraded performance

In 547dedd, AVS (kty) (https://avus.com.br) experienced degraded performance:

HTTP code: 200
Response time: 9562 ms

Resolved: AVS (kty) performance has improved in 607da9b.


text:
🛑 FX corretor (kty) is down

In 71e76d5, FX corretor (kty) (https://corretores.foxterciaimobiliaria.com.br) was down:

HTTP code: 0
Response time: 0 ms

Resolved: FX corretor (kty) is back up in a0ec7cf after 5 minutes.


text:
Remove UM content sub 20 kb

Closes #973.
removes the following domains:
https://xslendi.xyz/
https://bvnf.space/
https://www.blmayer.dev/ (Broken SSL)
https://masysma.net/
https://camaro96.neocities.org/
https://dendiz.github.io

Hey sorry for the delay, agree that they are all UM.

authors: garritfra kmutahar


text:
Issue_136474

(https://github.com/microsoft/vscode/issues/136474)
Change to line 795 in viewModelLines.ts that replaces "lineIndex" to "deltaLineNumber". This fully underlines all of a wrapped line containing an opening bracket when the bracket is highlighted.
This is an incomplete fix to issue #1367474. Further review and work required.
This PR fixes #136474

This fix is not the intended solution for the bug, as the first line of the wrapped line should not be highlighted at all, not completely.
Also, it fails the unit tests found in ./scripts/test.sh, you might want to check them out.

authors: kevyli nataliemckee

repo: kevyli/vscode


text:
incorrect instructions to use cat in shell

the instructions to import a PGP file (a file that I generated) my Windows client are as follows:

this is the result from the shell:
C:\Users\moi\AppData\Local\Keybase> cat ..\_PGP_public_key_ | keybase pgp import 'cat' is not recognized as an internal or external command, operable program or batch file.

The Windows equivalent is type., which we will change it to on Windows.
Thank you for letting us know.
Tracked internally with DESKTOP-4383

hmm.. isn't that example a UUoC?
You could use shell redirection instead of cat in a  pipeline.  I believe redirecting stdin would make the same command work on Windows as well as most Unix shells.
so instead of:
cat privkey.asc | keybase pgp import
do this:
keybase pgp import < privkey.asc
There are several examples using cat in: https://keybase.io/docs/command_line
I can submit a PR to change them to shell redirection if that is helpful.
(apologies if I am mistaken about redirection vs. pipes)

I fought with this issue for a while and it would not import my key because of the password. To get it to work I had to do this:
gpg --export-secret-keys <mykeyid> | keybase pgp import

authors: bradmurray cgoldberg diegueno zanderz

repo: keybase/client


text:
better printing of error details

@keybase/react-hackers the old flow sent error down the error.toString() route which just prints the message but not the stack

see 53d87a6e8e9d4b794d94841c and grep 'nojima crash'

@akalin flow fix