Dependabot enforcing engine-strict but with an old npm on Action Runners in last few days

Is there an existing issue for this?

[X] I have searched the existing issues

Package ecosystem
npm
Package manager version
9
Language version
22
Manifest location and content before the Dependabot update
package.json:
    "engines": {
        "node": ">=20",
        "npm": ">=9"
      },

with .npmrc:
engine-strict=true

see
https://github.com/broksonic21/dependabot-engine
dependabot.yml content
https://github.com/broksonic21/dependabot-engine/blob/main/.github/dependabot.yml
Updated dependency
No response
What you expected to see, versus what you actually saw
In the last day or so, this started happening from dependabot and fails to run at all - silently, unless you look at the dependabot UI.  Note: this only happens with dependabot on github action runners - i wasn't able to repro this if I turn off github action runners.
See: https://github.com/broksonic21/dependabot-engine/network/updates/920658676
Note: the error message says NPM 10.8.2.
But the logs say you are running npm 8.19.4
We required npm 9 and above -> and all of a sudden all our dependabot runs fail to run.
Can this get fixed up (both the messaging, and the fact that you are running on an old version)
Dependabot can't resolve your JavaScript dependency files
Dependabot failed to update your dependencies because there was an error resolving your JavaScript dependency files.

Dependabot encountered the following error:

Dependabot uses Node.js v20.18.0 and NPM 10.8.2. Due to the engine-strict setting, the update will not succeed.

Logs show:
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: PACKAGEOBFUSCATED
npm ERR! notsup Not compatible with your version of node/npm: PACKAGEOBFUSCATED
npm ERR! notsup Required: {"node":">=20","npm":">=9"}
npm ERR! notsup Actual:   {"npm":"8.19.4","node":"v20.18.1"}

Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
https://github.com/broksonic21/dependabot-engine/network/updates/920658676
Smallest manifest that reproduces the issue
No response

Looking at our logs
Was fine on

ghcr.io/dependabot/dependabot-updater-npm:4aba3e3be780a68c1d948d2daf365c2a71e69b2b

ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842

Failing on
ghcr.io/dependabot/dependabot-updater-npm:5c6c676dd9a1055774bc95c4a4d2f38513f1ac50.

ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842

I searched for the error in splunk and saw 52 events in the last hour. So it seems like a fairly common error.
I think it might be related to this change in Core https://github.com/dependabot/dependabot-core/pull/10944 so I asked that engineer to take a look

if that ticket is it, looks like it's behind a feature flag. as a customer, can we opt out of that flag in the meantime? or is there a corepack version file we need to have in our repo to avoid this?

Hi @broksonic21,
Could we request the customer to provide the value of the lockfileVersion field from their package-lock.json file? While we are working on a general solution, confirming this detail would help ensure that our fix addresses the specific issue they're encountering.
CC: @abdulapopoola , @carlincherry

Hi @broksonic21 and @carlincherry,
The change has been deployed. If the customer's lockfileVersion field in their package-lock.json is 3, the issue should now be resolved for them. Once we receive this information, we can confirm to the customer that the problem has been fixed. However, since we don’t yet have this detail, I cannot currently confirm if the issue is resolved on the customer's side.
CC: @abdulapopoola

.npmrc:
lockfile-version=3

in package-lock:
 "lockfileVersion": 3,

This made it way worse unfortunately @kbukum1
One repo is getting lock file v1 locks now, with update PRs for packages that are already up to date
other repos are just plain failing with no noticeable log on why, just say unknown error from dependabot.
I’m happy to hop on a repro call tomorrow if it helps, or even later this evening.

Thanks @broksonic21 ,
It will be great if we can have a call. I am available and I am working in PST time. Please let me know if we can have a call today.

Hi @broksonic21 ,
I am unable to view the log because of permission. Will it be possible if you can share logs with me?
URL: https://github.com/broksonic21/dependabot-engine/network/updates/920865298

Thanks for permission.

Example pr after this change:
https://github.com/broksonic21/repro-increase-dependabot-grouped/pull/5/files

Hi @broksonic21 ,
I checked the last error and see the following. Will it be possible to use rerun the process through Insight -> Dependency Graph -> Dependabot -> by clicking the button "Recent update jobs" for [package.json]?
updater | 2024/11/22 00:11:45 ERROR <job_920865298> Error during file fetching; aborting: /package.json not parseable

Hi @broksonic21,
It looks like the problem has been resolved. Please let me know if you encounter any further issues. If everything is working as expected, we’ll proceed to close this issue.

https://github.com/broksonic21/repro-increase-dependabot-grouped/pull/5/files

I see the problem here. Checking this one.

@kbukum1 I fixed that issue, but it is still broken.
see https://github.com/broksonic21/dependabot-engine/pull/17
it is reverting to lock file 1…
and repos that doesn’t work on are just failing
I can meet at 5:30 your time to show you if that works.

Hi @broksonic21,
The feature has been disabled, so it should now work as how it was working before. We are currently investigating the issue on our end to identify a solution. This behavior occurs when running npm 10 on your repository ( or some similar repositories), even though the lockfileVersion is set to 3.

https://github.com/kbukum1/repro-increase-dependabot-grouped/pull/1)](https://github.com/kbukum1/repro-increase-dependabot-grouped/pull/1

@kbukum1   Thanks - I can confirm that fixed our work repos and my test repos - both the ones creating wrong PRs/reverting to lockfile 1, and the ones that wouldn’t run at all (likely because they used a feature that whatever npm/lockfile 1 version was running didn’t support)
Thanks for diligence and quick follow up!
I’ll leave my test repos up and happy to test again if you have a potential fix.

@kbukum1 Thanks - I can confirm that fixed our work repos and my test repos - both the ones creating wrong PRs/reverting to lockfile 1, and the ones that wouldn’t run at all (likely because they used a feature that whatever npm/lockfile 1 version was running didn’t support)
Thanks for diligence and quick follow up!
I’ll leave my test repos up and happy to test again if you have a potential fix.

Thank @broksonic21 for reporting that quickly and providing information.

@broksonic21 ,
The change is complete and enabled for your test repositories.

https://github.com/broksonic21/dependabot-engine
https://github.com/broksonic21/repro-increase-dependabot-grouped

Is it possible if you can check everything is ok? If everything is ok we plan to rollout the feature.

@kbukum1 that looks right on my both my test repositories. Let me know after you rollout and we can confirm the work ones too. Else @carlincherry has my contact info if you want to reach out and test their first

Thank you for quick check.
I am going to rollout soon. I will let you know when the rollout is done.

@broksonic21 ,
The rollout is done. Please let me know if you see any issue in your repositories.

@kbukum1 work repositories are all working like I'd expect. I think you are good here, I'll let you know if anything changes

@broksonic21 ,
Thanks for the support.


cant activate the theme

it breaks wordpress when I activate the theme from the backend

it breaks because when we select the theme, it stores impress/theme instead of impress in the database table wp_options, entry template and entry stylesheet.

it was resolved, due to the absence of Timber Plugin


[BUG] Deployment kuberhealthy has too much RBAC permission which may leads the whole cluster being hijacked

Hi community! Our team just found a possible security issue when reading the code. We would like to discuss whether it is a real vulnerability.
Description
The bug is that the Deployment kuberhealthy in the charts has too much RBAC permission than it needs, which may cause some security problems, and the worse one leads cluster being hijacked. The problem is that the kuberhealthy is bound to one clusterrole (clusterrole.yaml#L5) with the following sensitive permissions:

create/patch/update verb of the daemonsets resource (ClusterRole)

After reading the source code of kuberhealthy, I didn't find any Kubernetes API usages using these permissions. However, these unused permissions may have potential risk:

create/patch/update verb of the daemonsets resource (ClusterRole)

A malicious user can create a privileged container with a malicious container image capable of container escape. This would allow him/she gaining ROOT privilege of the worker node the created container deployed. Since the malicious user can control the pod scheduling parameters (e.g., replicas number, node affinity, …), he/she should be able to deploy the malicious container to every (or almost every) worker node. This means the malicious user will be able to control every (or almost every) worker node in the cluster.

The malicious users only need to get the service account token to perform the above attacks. There are several ways have already been reported in the real world to achieve this:

Supply chain attacks: Like the xz backdoor in the recent. The attacker only needs to read /var/run/secrets/kubernetes.io/serviceaccount/token.
RCE vulnerability in the APP: Any remote-code-execution vulnerability that can read local files can achieve this.

Mitigation Suggestion

Create a separate service account and remove all the unnecessary permissions
Write Kyverno or OPA/Gatekeeper policy to:

Limit the container image, entrypoint and commands of newly created pods. This would effectively avoid the creation of malicious containers.
Restrict the securityContext of newly created pods, especially enforcing the securityContext.privileged and securityContext.allowPrivilegeEscalation to false. This would prevent the attacker from escaping the malicious container. In old Kubernetes versions, PodSecurityPolicy can also be used to achive this (it is deprecated in v1.21).

Few Questions

Are these permissions really unused for kuberhealthy?
Would these mitigation suggestions be applicable for the kuberhealthy?
Our team have also found other unneccessary permissions (which is not that sensitive as above, but could also cause some security issues). Please tell us if you are interested in it. We’ll be happy to share it or PR a fix.

References
Several CVEs had already been assigned in other projects for similar issues:

2023-30512
2023-30617
2023-26484
2023-30840

Hi community:
I noticed that this issue hasn't been answered yet, please feel free to let me know if you need more information. Our team is happy to cooperate and do what we can to resolve this issue.

Kuberhealthy does have code that needs the daemonset create verb: https://github.com/kuberhealthy/kuberhealthy/blob/master/cmd/daemonset-check/kube_api.go#L47
How did you check the code? Was that done automatically?

Kuberhealthy does have code that needs the daemonset create verb: https://github.com/kuberhealthy/kuberhealthy/blob/master/cmd/daemonset-check/kube_api.go#L47

Thank you for reminding us of this! We have found that the daemonset create verb is used here during our check. However, after a detailed inspection, we found that this function is only called by cmd/daemonset-check/main.go, but not by cmd/deployment-check/main.go and cmd/kuberhealthy/main.go. Therefore, we only reported the issue with Deployment kuberhealthy.

How did you check the code? Was that done automatically?

We wrote a tool to match the APIs for all resource operations on controller-runtime and client-go SDK, and then checked if it was being used by a workload. We had manually checked each permission we reported.


Add possibility to add http header to image requests in Detail and Image.ImageLike components

Description
Detail component is a great way to show markdown including images.
It get problematic when the image import request needs to e.g. be authenticated (see #5096 ) because there is no way right now to add the http header to the request and the Loading indicator is there forever.
It would be great to be able to add (maybe also modify) the http-header of the request to be able to make auth. requests.
Proposal
const handleBeforeRequest = (req: Request) => {
   req.headers["X-Auth"] = "mytoken";
}
<Detail md="My Text" onBeforeRequest={handleBeforeRequest}/>

Who will benefit from this feature?
Any extension developer who needs to access images which needs authentication/authorization.
Anything else?
This would be awesome for an Image.ImageLike too because they have the same issue.
Proposal

const handleBeforeRequest = (req: Request) => {
   req.headers["X-Auth"] = "mytoken";
}

<List.Item icon={{source:"https://any.source.com/myimage", onBeforeRequest=handleBeforeRequest }} title="Image behind auth test" / />

Can't you specify the authentication as part of the URL? Usually<EMAIL_ADDRESS>work
The reason I'm asking this is because the request for an image is done on the native side, there is no Request object in node. Furthermore, what if you have 2 images that needs 2 different headers?

Another solution would be to fetch the images in the extension, store them in the support folder and then reference those instead.
A bit more work but at least you have more control over the requests

Hey @mathieudutour ,
thanks for the answers.

Can't you specify the authentication as part of the URL? Usually<EMAIL_ADDRESS>work

In the GitLab case it is possible to add an private_token= argument to the url. Not quite sure if any API provide the mechanism. Providing it before the host can work for many, but in the GitLab case it didn't work.

The reason I'm asking this is because the request for an image is done on the native side, there is no Request object in node. Furthermore, what if you have 2 images that needs 2 different headers?

I assumed that this is the case. When having 2 images I could use the callback to provide correct headers because this is the same cases as the "before hostname" approach in some regards.

Another solution would be to fetch the images in the extension, store them in the support folder and then reference those instead.

This is what I already do sometimes, but this is way harder to make and maintain.
For me bother of your answers are valid to implement so I leave it up to you if you wanna close the issue or not.
Greetings
Michael


How to derive the extension trait from other trait?

How to derive the extension trait from other trait, is it supported?
If not, it would be very useful to add..

@Boscop Sorry for the late reply!
IIUC, where Self: Trait behaves like super-trait : Trait: playground
pub trait A where
    Self: Default,
{
    fn b(&self) {}
}
impl A for () {}

pub fn c<T: A>() -> T {
    T::default()
}

So, you could write as follows:
#[easy_ext::ext(A)]
impl<T> T
where
    Self: Default,
{
    fn b(&self) {}
}

@taiki-e Ok, and how to make the trait pub? :)

how to make the trait pub? :)

Just make the all methods pub.
#[easy_ext::ext(A)]
impl<T> T
{
    pub fn b(&self) {}
//  ^^^
}

https://docs.rs/easy-ext/0.1.7/easy_ext/attr.ext.html#visibility

Also, once #15 merged, the following code's <I: IntoIterator> will be converted to where Self: IntoIterator.
#[ext(IterExt)]
 impl<I: IntoIterator> I {
     fn _next(self) -> Option<I::Item> {
         self.into_iter().next()
     }
 }

generated:
trait IterExt
where Self: IntoIterator
{
     fn _next(self) -> Option<Self::Item>;
}
impl<I: IntoIterator> IterExt for I {
     fn _next(self) -> Option<I::Item> {
         self.into_iter().next()
     }
 }


[DNM] Update package versions

Updates packages to their latest release
xref https://github.com/coiled/coiled-runtime/issues/139

This is more of a general question but I wonder how do we decide to bump versions of packages that are not dask or distirbuted?
Should we be testing against the latest release or upstream of every package and if things look good, we will update them on the next coiled-runtime release?

Note that the latest build here has become flaky, in part, due to https://github.com/dask/distributed/issues/6494. I'm off tomorrow, but plan to work on this on Monday

Btw, the latest commit here confirmed that @gjoseph92's fix for https://github.com/dask/distributed/issues/6494 gets CI passing here (when running against distributeds main branch). Thanks @gjoseph92!

@jrbourbeau Looks like we are running into some AWS cpu limits problem. @ntabris Do you know what could be happening here?
https://github.com/coiled/coiled-runtime/runs/6870670549?check_suite_focus=true#step:6:575
E               coiled.errors.ClusterCreationError: Cluster status is error (reason: Scheduler Stopped -> Instance failed: AWS failed to create requested instance.
E               VcpuLimitExceeded - You have requested more vCPU capacity than your current vCPU limit of 1144 allows for the instance bucket that the specified instance type belongs to. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.) (cluster_id: 34203)
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/coiled/_beta/cluster.py:370: ClusterCreationError

Do you know what could be happening here?

Lots of instances/clusters were running in the oss account.
They're all stopped now but I think there were about 84 clusters recently running, here are some...
dask-engineering-parquet-c2689dda-scheduler
dask-engineering-test_shuffle-e2ea8225-scheduler
dask-engineering-test_h2o_benchmarks-1687c9ef-scheduler
dask-engineering-test_shuffle-7a5c2331-scheduler
dask-engineering-test_shuffle-8d1995bf-scheduler
dask-engineering-test_array-bc24f403-scheduler
dask-engineering-test_array-ff59d0be-scheduler
dask-engineering-test_shuffle-582c65d4-scheduler
dask-engineering-test_h2o_benchmarks-f26b8d61-scheduler
dask-engineering-test_shuffle-d61eb058-scheduler
dask-engineering-test_array-2a49e35b-scheduler
dask-engineering-test_array-0e24864a-scheduler
dask-engineering-test_deadlock-d375df44dd6742fe9a3b14c478b38e17-scheduler
dask-engineering-parquet-d651edc5-scheduler
dask-engineering-test_shuffle-07dac254-scheduler
dask-engineering-test_shuffle-8b03547c-scheduler
dask-engineering-test_array-44d1a078-scheduler
dask-engineering-test_deadlock-6c6c29e53fa749109483a756b29fabb5-scheduler
dask-engineering-test_shuffle-9d595e67-scheduler
dask-engineering-test_deadlock-09f2017187e84e7d80bbf4f59d3b792f-scheduler
dask-engineering-test_deadlock-586d7d9fed864feda66937aef1d75861-scheduler
dask-engineering-test_array-3ca64e86-scheduler
dask-engineering-test_default_cluster_spinup_time-1de549e7-scheduler
dask-engineering-test_array-e98803cf-scheduler
dask-engineering-parquet-3334d672-scheduler
dask-engineering-test_deadlock-bb913227c4624d5b89901b28d0c67fca-scheduler
dask-engineering-test_array-db170c4a-scheduler
dask-engineering-test_array-a8c31253-scheduler
dask-engineering-test_shuffle-e06fb1f6-scheduler
dask-engineering-parquet-ed04e657-scheduler
dask-engineering-test_shuffle-34426a0f-scheduler
dask-engineering-test_shuffle-cc531f4d-scheduler
dask-engineering-test_shuffle-3c62acb6-scheduler
dask-engineering-test_array-5a5972ae-scheduler
dask-engineering-test_deadlock-90eafcc0a3c04785b83f59588fe2300a-scheduler
dask-engineering-test_array-dfefe888-scheduler
dask-engineering-test_h2o_benchmarks-b25f2698-scheduler
dask-engineering-parquet-4a499e8e-scheduler
dask-engineering-test_deadlock-c50f38b5b0f74efca26fb22c843e7e00-scheduler
dask-engineering-test_array-84e58dbc-scheduler
dask-engineering-test_h2o_benchmarks-9f2af024-scheduler
dask-engineering-test_default_cluster_spinup_time-58ac6220-scheduler
dask-engineering-test_shuffle-46795aad-scheduler
dask-engineering-test_array-f6805845-scheduler
dask-engineering-test_shuffle-a19b1eaa-scheduler
dask-engineering-test_coiled-f2042517-scheduler
dask-engineering-test_default_cluster_spinup_time-2a4539c8-scheduler
dask-engineering-test_array-04b63da8-scheduler
dask-engineering-test_array-33d711ef-scheduler
dask-engineering-test_coiled-cf592eb0-scheduler
Is that unexpected?

Ah, I see. That's because I temporarily increased the number of jobs we were running on this PR by a factor of 5 to see if we could trigger a flaky test that showed up (xref https://github.com/coiled/coiled-runtime/issues/166). Since then we've been able to confirm the test is flaky, so I've just revert the extra stress testing here.

All green, so going to merge this in


Fb unknown link

Related to https://github.com/SokoMishaLov/skraper/pull/43

@SokoMishaLov created new PR since there was a lot of code that needed to be merged from master.
Ended up with the code you can see, extractPostMediaItems ended up tad eh, but had no clue how to deal with fact that unknown link needs unfiltered element.

Closed due the lack of feedback


YAML format discussion

At the hackathon we were discussing if YAML is the format we want to go with.
@uschmidt83 had issues installing the python PyYAML. Also, the autogenerated YAML file looks weird.
There might be better options and if you are interested in discussing this, do it here :)

One can preserve key order if Python dicts are ordered and sort_keys=False:
import yaml
print(yaml.dump({"c": 3, "z": 2, "a": 1}, default_flow_style=False, sort_keys=False))

c: 3
z: 2
a: 1

import yaml
print(yaml.dump({"c": 3, "z": 2, "a": 1}, default_flow_style=False, sort_keys=True))

a: 1
c: 3
z: 2

PyYAML version is 5.2.

What alternatives do you have in mind?
I think we decided on yaml because it's pretty common in the python space and more readable than xml (and xml parsing in python is a bit unconvenient). From my experience pyyaml is fairly easy to install, but I almost always do it via conda.

Using yaml in the config doesn't necessarily mean we have to use PyYAML. There's also ruamel.yaml.
https://pypi.org/project/ruamel.yaml/
https://yaml.readthedocs.io/en/latest/pyyaml.html#differences-with-pyyaml

This snippet show how to control list representation in pyyaml
import yaml

class FlowStyleList(list):
    pass

def flow_representer(dumper, data):
    return dumper.represent_sequence("tag:yaml.org,2002:seq", data, flow_style=True)

yaml.add_representer(FlowStyleList, flow_representer)
print(yaml.dump({
    "a": FlowStyleList(["a", "b", "c"]),
    "b": ["a", "b", "c"],
}))

Results in following yaml:
a: [a, b, c]
b:
  - a
  - b
  - c

I suppose it's YAML for now, feel free to reopen and restart the discussion


Move azure.search to azure.search.documents + nspkg [WIP]

cc @lmazuel @johanste @scbedd @brjohnstmsft

Can one of the admins verify this patch?

@johanste what is the correct UA string now? It is currently:

azsdk-python-search/1.0.0b2

@scbedd @lmazuel adding the version specifier in dev_requirements caused passing test to fail, I am reverting and just adding it unconditionally (matches key vault)


Update wiki

Remove all Base references, replace withGrid with asGrid

Update docs on how to use show and the options that allow for the object format

This is now complete, closing


[BUG]: sql-indent does not work in sql SRC_BLOCKS in org-mode

What did you expect to happen?
Pressing TAB, = or invoking indent-region while selecting the source block:
#+BEGIN_SRC sql
SELECT
  id,
  name
  FROM articles
 WHERE id > 1000
   AND published
 ORDER BY id DESC;
#+END_SRC

What actually happened?
Pressing TAB, = or invoking indent-region while selecting the source block:
#+BEGIN_SRC sql
SELECT
id,
name
FROM articles
WHERE id > 1000
AND published
ORDER BY id DESC;
#+END_SRC

Additional details:

Investigated the issue pretty thoroughly and found the cause
Used instructions from https://github.com/alex-hhh/emacs-sql-indent/issues/96 to load emacs without any doom config and loaded sql-indent: worked fine.
Tried using the latest org-mode: worked fine.
Enable the org-mode module: BROKEN
Found culprit
https://github.com/hlissner/doom-emacs/blob/2c25ffab54bd350074f22dba9649c55c2133800e/modules/lang/org/config.el#L222-L235
Caused by advice to prevent triggering any major-mode hooks which prevented sqlind-minor-mode from firing.

Temporary solution:
(after! org
  (advice-remove #'org-src--edit-element #'+org-inhibit-mode-hooks-a))

I understand why the hooks are disabled but it's creating this unexpected behavior so I'm not sure what a better long-term solution would be. What would you recommend?

Steps to reproduce:

Install sql-indent (package! sql-indent) in your packages.el
Run doom sync then reload or restart doom
Create a new org-mode buffer
Create a SQL src-block:

#+BEGIN_SRC sql
SELECT
id,
name
FROM articles
WHERE id > 1000
AND published
ORDER BY id DESC;
#+END_SRC

Select the SQL code within the source block
Invoke indent-region. Either from M-x indent-region, TAB, or = in evil normal state

System information:

((emacs
  (version . "28.0.50")
  (features . "JPEG TIFF GIF PNG RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS XWIDGETS JSON PDUMPER LCMS2 GMP")
  (build . "Jun 09, 2020")
  (buildopts "--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp<EMAIL_ADDRESS><EMAIL_ADDRESS>--with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-json --with-modules --with-rsvg --without-pop --with-xwidgets --with-ns --disable-ns-self-contained")
  (windowsys . batch)
  (daemonp . server-running))
 (doom
  (version . "2.0.9")
  (build . "grafted, HEAD -> develop, origin/develop, origin/HEAD ed264dc 2020-08-19 16:39:04 -0400")
  (dir . "~/dotfiles/client/doom.d/"))
 (system
  (type . darwin)
  (config . "x86_64-apple-darwin18.7.0")
  (shell . "/usr/local/bin/fish")
  (uname . "Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 18 20:50:10 PDT 2020; root:xnu-4903.278.43~1/RELEASE_X86_64 x86_64")
  (path "~/.luarocks/bin" "/usr/local/bin" "~/.emacs.d/bin" "~/.npm-global/bin" "~/bin" "~/.yarn/bin" "~/.config/yarn/global/node_modules/.bin" "/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/usr/local/share/dotnet" "~/.dotnet/tools" "/usr/local/MacGPG2/bin" "/Library/TeX/texbin" "~/.luarocks/bin" "~/.emacs.d/bin" "~/.npm-global/bin" "~/bin" "~/.yarn/bin" "~/.config/yarn/global/node_modules/.bin" "~/.emacs.d/bin/" "/usr/local/Cellar/emacs-plus@28/28.0.50/libexec/emacs/28.0.50/x86_64-apple-darwin18.7.0"))
 (config
  (envfile . envvar-file)
  (elc-files . 173)
  (modules :completion (company +childframe) (ivy +childframe) :ui doom doom-dashboard doom-quit fill-column hl-todo hydra indent-guides modeline ophints (popup +defaults) tabs treemacs vc-gutter vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold lispy multiple-cursors snippets :emacs dired electric undo vc :term vterm :checkers (syntax +childframe) :tools direnv docker editorconfig (eval +overlay) gist lookup lsp macos magit rgb tmux :lang clojure emacs-lisp fennel json (javascript +lsp) markdown (org +journal) (python +lsp) racket sh (web +lsp) yaml :email (wanderlust +gmail) :config (default +bindings +smartparens))
  (packages (anakondo) (evil-lisp-state) (fish-mode) (inf-clojure) (sql-indent))
  (unpin "n/a")
  (elpa "n/a")))

I understand why the hooks are disabled but it's creating this unexpected behavior so I'm not sure what a better long-term solution would be. What would you recommend?

Hmm, that's tricky. Perhaps if I modified +org-inhibit-mode-hooks-a to trigger a special hook, e.g. MAJOR-MODE-org-src-hook, then you could do:
(add-hook 'sql-mode-org-src-hook #'sql-indent-mode)

Edited version of the advise:
(defadvice! +org-inhibit-mode-hooks-a (orig-fn datum name &optional initialize &rest args)
  "Prevent potentially expensive mode hooks in `org-babel-do-in-edit-buffer' ops."
  :around #'org-src--edit-element
  (apply orig-fn datum name
         (if (and (eq org-src-window-setup 'switch-invisibly)
                  (functionp initialize))
             ;; org-babel-do-in-edit-buffer is used to execute quick, one-off
             ;; logic in the context of another major mode. Initializing this
             ;; major mode can be terribly expensive (particular its mode
             ;; hooks), so we inhibit them.
             (lambda ()
               (prog1 (quiet! (delay-mode-hooks (funcall initialize)))
                 (unless (eq major-mode 'fundamental-mode)
                   (run-hooks (intern-soft (format "%s-org-src-hook" major-mode))))))
           initialize)
         args))

Wow that's a pretty good idea! I'll try that tomorrow and confirm it.
Unfortunately it's an atypical case because the maintainer of the official
sql-mode does not like the sql-indent indentation and so will not merge it
upstream. Thus it will have to remain a separate package for the
foreseeable future.
This solution seems solid though and would be flexible for other issues
like this should they arise. I can't think of any major drawbacks other
than requiring additional configuration... but then again the advice-remove
call is also additional configuration with a bigger performance penalty.
On Thu, Aug 20, 2020 at 1:34 AM Henrik Lissner<EMAIL_ADDRESS>wrote:

I understand why the hooks are disabled but it's creating this unexpected
behavior so I'm not sure what a better long-term solution would be. What
would you recommend?
Hmm, that's tricky. Perhaps if I modified +org-inhibit-mode-hooks-a to
trigger a special hook, e.g. MAJOR-MODE-org-src-hook, then you could do:
(add-hook 'sql-mode-org-src-hook #'sql-indent-mode)
Edited version of the advise:
(defadvice! +org-inhibit-mode-hooks-a (orig-fn datum name &optional initialize &rest args)
"Prevent potentially expensive mode hooks in `org-babel-do-in-edit-buffer' ops."
:around #'org-src--edit-element
(apply orig-fn datum name
     (if (and (eq org-src-window-setup 'switch-invisibly)

              (functionp initialize))

         ;; org-babel-do-in-edit-buffer is used to execute quick, one-off

         ;; logic in the context of another major mode. Initializing this

         ;; major mode can be terribly expensive (particular its mode

         ;; hooks), so we inhibit them.

         (lambda ()

           (prog1 (quiet! (delay-mode-hooks (funcall initialize)))

             (unless (eq major-mode 'fundamental-mode)

               (run-hooks (intern-soft (format "%s-org-src-hook" major-mode))))))

       initialize)

     args))

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hlissner/doom-emacs/issues/3787#issuecomment-677154215,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEQDWI4SP4HALHHTV57RDLSBSYYBANCNFSM4QFUOQBA
.

I've decided to go with a slightly different approach:
The advice will now only inhibit MAJOR-MODE-local-vars-hook functions. This is a Doom-specific hook that runs after MAJOR-MODE-hook, and is where Doom conventionally places all a mode's most expensive functions. This should solve the original problem the advice was meant to solve (#3660) and your issue as well.
Let me know if that isn't the case and I'll reopen this. Thanks for bringing it to my attention!


Unsupported JSON "$schema" value

Search terms
tsdoc, eslint-plugin-tsdoc, eslint
Expected Behavior
We should be able to use the tsdoc.json defined by typedoc for linting with eslint-pluign-tsdoc.
Actual Behavior
We get following error when using this tsdoc.json
  1:2  warning  Error loading TSDoc config file:
Error encountered for node_modules/typedoc/tsdoc.json:
  Unsupported JSON "$schema" value; expecting "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json"
  tsdoc/syntax

Steps to reproduce the bug
Use following tsdoc.json in your project root.
{
  "extends": ["typedoc/tsdoc.json"]
}

Environment

Typedoc version: 0.23.9
TypeScript version: 4.7.4
Node.js version: 16.x
OS: Mac
Eslint: 8.20.0
eslint-plugin-tsdoc: 0.2.16

Oh that's fun, I didn't notice the schema redirected when visited to the en-us url.


Support for d3 version 4.x?

Last summer the D3 maintainers released a breaking API change, upgrading from 3.x to 4.x. While a lot of things between the new and old version are the same, many individualized APIs have changed.
Is there any plan to support D3 4.x? I'm using D3 for a project right now, and I'd love to be able to use PureScript for it. Right now the alternative is just to add the foreign functions for each new API that I call. Of course, the obvious downsides are

the work would be isolated, and not abstracted into a library
wouldn't cover the full range of the API like it might be if done in the context of purescript-d3 proper.

Hi @jez, I've had my hands full with non-PureScript projects lately, and I can't say when I'll have time to work on this. Rather than adding a few isolated foreign functions within your own project, what about submitting a PR to migrate this library to 4.x?

Looks like a lot of work 😝  I'll consider it.
Makes total sense to be busy; honestly, I'm impressed you responded as quickly as you did!
I'll see if I feel motivated enough to port things over; maybe as I look at it they'll all have a similar form. My biggest concern though is that I won't be using most of the functions, and as such many would go untested.

If either of you want to borrow from work i did here on (at first porting, then re-writing) this repo you're very welcome. That's the work i talked thru on purescript-unscripted.
Currently i'm trying a whole new approach which is in this repo.

Wow, I didn't know about purescript-d3v4, looks nice!

Thanks! I thought so too (was feeling pretty good about it) - and then i rather belatedly watched Phil Freeman's excellent talk on "finally tagless" parsers and realized that there's a much much better way to do this so that's what i'm working on now.
btw existence of and ease use/examples in your original lib (this repo) was what encouraged me to get into purescript so many thanks for that!

You're very welcome. The finally tagless stuff sounds interesting, thanks for the links!


AttributeError: 'Sequential' object has no attribute 'get_output_at' while using fast_base detection model.

Bug description
While trying to load an ocr_predictor with fast_base as the detector, I'm running into the following chain of warnings followed by an error:

Warnings:

[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/convolutional/base_conv.py:107](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/convolutional/base_conv.py:107): UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
  super().__init__(activity_regularizer=activity_regularizer, **kwargs)
2024-06-08 10:58:37.832929: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-06-08 10:58:37.833240: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2251] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_1' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_1', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_2' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_2', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_3' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_3', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_4' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_4', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_5' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_5', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_6' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_6', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_7' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_7', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_8' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_8', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_9' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_9', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_10' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_10', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_11' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_11', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_12' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_12', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_13' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_13', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_14' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_14', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_15' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_15', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_16' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_16', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_17' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_17', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_18' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_18', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_19' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_19', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_20' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_20', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_21' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_21', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_22' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_22', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_23' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:361): UserWarning: `build()` was called on layer 'fast_conv_layer_23', however the layer does not have a `build()` method implemented and it looks like it has unbuilt state. This will cause the layer to be marked as built, despite not being actually built, which may cause failures down the line. Make sure to implement a proper `build()` method.
  warnings.warn(
[/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295](https://file+.vscode-resource.vscode-cdn.net/home/arian/.local/lib/python3.12/site-packages/keras/src/layers/layer.py:1295): UserWarning: Layer 'fast_conv_layer_24' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).
Exception encountered: ''got an unexpected keyword argument 'kwargs'''
... [REST IS OMITTED FOR BREVITY]
  warnings.warn(

Code snippet to reproduce the bug
This is the exact script I'm using to detect text from my images which is failing.
import torch
import gc
from doctr.models import ocr_predictor
from itertools import product
from doctr.io import DocumentFile
from glob import glob
from pprint import pformat
import os

# Latest detectors taken from: https://mindee.github.io/doctr/latest/modules/models.html#doctr-models-detection
detectors = ["fast_base", "db_mobilenet_v3_large"]
# Latest recognizers taken from: https://mindee.github.io/doctr/latest//modules/models.html#doctr-models-recognition
recognizers = ["vitstr_base", "parseq"]

os.makedirs(SAVE_DIR, exist_ok=True)

for detector, recognizer in product(detectors, recognizers):
    model = ocr_predictor(
        det_arch=detector,
        reco_arch=recognizer,
        pretrained=True,
        assume_straight_pages=False,
        straighten_pages=True,
    )
    save_path = os.path.join(SAVE_DIR, f"{detector}-{recognizer}")
    os.makedirs(save_path, exist_ok=True)
    for im_path in glob(f"{DOCS_DIR}/*.{EXTENSION}"):
        with open(
            os.path.join(save_path, im_path.split("/")[-1] + ".txt"), mode="w"
        ) as file:
            doc = DocumentFile.from_images(im_path)
            file.write(pformat(model(doc).export()))
    gc.collect()
    torch.cuda.empty_cache()

Error traceback
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], [line 18](vscode-notebook-cell:?execution_count=2&line=18)
     [15](vscode-notebook-cell:?execution_count=2&line=15) os.makedirs(SAVE_DIR, exist_ok=True)
     [17](vscode-notebook-cell:?execution_count=2&line=17) for detector, recognizer in product(detectors, recognizers):
---> [18](vscode-notebook-cell:?execution_count=2&line=18)     model = ocr_predictor(
     [19](vscode-notebook-cell:?execution_count=2&line=19)         det_arch=detector,
     [20](vscode-notebook-cell:?execution_count=2&line=20)         reco_arch=recognizer,
     [21](vscode-notebook-cell:?execution_count=2&line=21)         pretrained=True,
     [22](vscode-notebook-cell:?execution_count=2&line=22)         assume_straight_pages=False,
     [23](vscode-notebook-cell:?execution_count=2&line=23)         straighten_pages=True,
     [24](vscode-notebook-cell:?execution_count=2&line=24)     )
     [25](vscode-notebook-cell:?execution_count=2&line=25)     save_path = os.path.join(SAVE_DIR, f"{detector}-{recognizer}")
     [26](vscode-notebook-cell:?execution_count=2&line=26)     os.makedirs(save_path, exist_ok=True)

File [~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:114](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:114), in ocr_predictor(det_arch, reco_arch, pretrained, pretrained_backbone, assume_straight_pages, preserve_aspect_ratio, symmetric_pad, export_as_straight_boxes, detect_orientation, straighten_pages, detect_language, **kwargs)
     [63](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:63) def ocr_predictor(
     [64](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:64)     det_arch: Any = "db_resnet50",
     [65](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:65)     reco_arch: Any = "crnn_vgg16_bn",
   (...)
     [75](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:75)     **kwargs: Any,
     [76](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:76) ) -> OCRPredictor:
     [77](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:77)     """End-to-end OCR architecture using one model for localization, and another for text recognition.
     [78](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:78)
     [79](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:79)     >>> import numpy as np
   (...)
    [112](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:112)         OCR predictor
    [113](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:113)     """
--> [114](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:114)     return _predictor(
    [115](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:115)         det_arch,
    [116](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:116)         reco_arch,
    [117](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:117)         pretrained,
    [118](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:118)         pretrained_backbone=pretrained_backbone,
    [119](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:119)         assume_straight_pages=assume_straight_pages,
    [120](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:120)         preserve_aspect_ratio=preserve_aspect_ratio,
    [121](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:121)         symmetric_pad=symmetric_pad,
    [122](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:122)         export_as_straight_boxes=export_as_straight_boxes,
    [123](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:123)         detect_orientation=detect_orientation,
    [124](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:124)         straighten_pages=straighten_pages,
    [125](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:125)         detect_language=detect_language,
    [126](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:126)         **kwargs,
    [127](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:127)     )

File [~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:32](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:32), in _predictor(det_arch, reco_arch, pretrained, pretrained_backbone, assume_straight_pages, preserve_aspect_ratio, symmetric_pad, det_bs, reco_bs, detect_orientation, straighten_pages, detect_language, **kwargs)
     [16](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:16) def _predictor(
     [17](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:17)     det_arch: Any,
     [18](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:18)     reco_arch: Any,
   (...)
     [30](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:30) ) -> OCRPredictor:
     [31](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:31)     # Detection
---> [32](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:32)     det_predictor = detection_predictor(
     [33](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:33)         det_arch,
     [34](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:34)         pretrained=pretrained,
     [35](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:35)         pretrained_backbone=pretrained_backbone,
     [36](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:36)         batch_size=det_bs,
     [37](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:37)         assume_straight_pages=assume_straight_pages,
     [38](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:38)         preserve_aspect_ratio=preserve_aspect_ratio,
     [39](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:39)         symmetric_pad=symmetric_pad,
     [40](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:40)     )
     [42](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:42)     # Recognition
     [43](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:43)     reco_predictor = recognition_predictor(
     [44](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:44)         reco_arch,
     [45](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:45)         pretrained=pretrained,
     [46](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:46)         pretrained_backbone=pretrained_backbone,
     [47](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:47)         batch_size=reco_bs,
     [48](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/zoo.py:48)     )

File [~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:98](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:98), in detection_predictor(arch, pretrained, assume_straight_pages, **kwargs)
     [73](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:73) def detection_predictor(
     [74](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:74)     arch: Any = "db_resnet50",
     [75](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:75)     pretrained: bool = False,
     [76](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:76)     assume_straight_pages: bool = True,
     [77](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:77)     **kwargs: Any,
     [78](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:78) ) -> DetectionPredictor:
     [79](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:79)     """Text detection architecture.
     [80](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:80)
     [81](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:81)     >>> import numpy as np
   (...)
     [96](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:96)         Detection predictor
     [97](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:97)     """
---> [98](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:98)     return _predictor(arch, pretrained, assume_straight_pages, **kwargs)

File [~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:49](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:49), in _predictor(arch, pretrained, assume_straight_pages, **kwargs)
     [46](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:46)     if arch not in ARCHS:
     [47](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:47)         raise ValueError(f"unknown architecture '{arch}'")
---> [49](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:49)     _model = detection.__dict__[arch](
     [50](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:50)         pretrained=pretrained,
     [51](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:51)         pretrained_backbone=kwargs.get("pretrained_backbone", True),
     [52](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:52)         assume_straight_pages=assume_straight_pages,
     [53](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:53)     )
     [54](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:54) else:
     [55](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/zoo.py:55)     if not isinstance(arch, (detection.DBNet, detection.LinkNet, detection.FAST)):

File [~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:422](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:422), in fast_base(pretrained, **kwargs)
    [403](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:403) def fast_base(pretrained: bool = False, **kwargs: Any) -> FAST:
    [404](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:404)     """FAST as described in `"FAST: Faster Arbitrarily-Shaped Text Detector with Minimalist Kernel Representation"
    [405](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:405)     <[https://arxiv.org/pdf/2111.02394.pdf>`_](https://arxiv.org/pdf/2111.02394.pdf%3E%60_), using a base TextNet backbone.
    [406](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:406)
   (...)
    [420](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:420)         text detection architecture
    [421](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:421)     """
--> [422](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:422)     return _fast(
    [423](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:423)         "fast_base",
    [424](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:424)         pretrained,
    [425](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:425)         textnet_base,
    [426](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:426)         ["stage_0", "stage_1", "stage_2", "stage_3"],
    [427](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:427)         **kwargs,
    [428](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:428)     )

File [~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:326](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:326), in _fast(arch, pretrained, backbone_fn, feat_layers, pretrained_backbone, input_shape, **kwargs)
    [323](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:323)     kwargs["class_names"] = sorted(kwargs["class_names"])
    [325](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:325) # Feature extractor
--> [326](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:326) feat_extractor = IntermediateLayerGetter(
    [327](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:327)     backbone_fn(
    [328](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:328)         input_shape=_cfg["input_shape"],
    [329](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:329)         include_top=False,
    [330](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:330)         pretrained=pretrained_backbone,
    [331](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:331)     ),
    [332](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:332)     feat_layers,
    [333](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:333) )
    [335](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:335) # Build the model
    [336](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/detection/fast/tensorflow.py:336) model = FAST(feat_extractor, cfg=_cfg, **kwargs)

File [~/.local/lib/python3.12/site-packages/doctr/models/utils/tensorflow.py:134](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/utils/tensorflow.py:134), in IntermediateLayerGetter.__init__(self, model, layer_names)
    [133](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/utils/tensorflow.py:133) def __init__(self, model: Model, layer_names: List[str]) -> None:
--> [134](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/utils/tensorflow.py:134)     intermediate_fmaps = [model.get_layer(layer_name).get_output_at(0) for layer_name in layer_names]
    [135](https://file+.vscode-resource.vscode-cdn.net/home/arian/kara-ocr/tests/~/.local/lib/python3.12/site-packages/doctr/models/utils/tensorflow.py:135)     super().__init__(model.input, outputs=intermediate_fmaps)

AttributeError: 'Sequential' object has no attribute 'get_output_at'

Environment
Collecting environment information...

DocTR version: v0.8.1
TensorFlow version: 2.16.1
PyTorch version: 2.3.0+cu121 (torchvision 0.18.0+cu121)
OpenCV version: 4.10.0
OS: Ubuntu 24.04 LTS
Python version: 3.12.3
Is CUDA available (TensorFlow): Yes
Is CUDA available (PyTorch): Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 535.171.04
cuDNN version: Could not collect

Deep Learning backend
>>> from doctr.file_utils import is_tf_available, is_torch_available

2024-06-08 11:11:38.156856: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-08 11:11:38.186320: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-08 11:11:38.746476: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
>>>
>>> print(f"is_tf_available: {is_tf_available()}")
is_tf_available: True
>>> print(f"is_torch_available: {is_torch_available()}")
is_torch_available: True
>>>

Setting USE_TORCH=1 to force PyTorch seems to alleviate the issue which means the error stems from the TF backend. I'm going to close this as my issue is resolved but the error still exists on TF.


build-service update

Included PRs:

https://github.com/redhat-appstudio/build-service/pull/100

pairing with https://github.com/redhat-appstudio/e2e-tests/pull/302 to test the bug fix in build-service

No cluster claim...
/retest


Fixed build by bumping Kotlin minor version to 11

ran into
java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.compiler.plugin.repl.GenericReplCompiler
when running for the first time, bumping the minor version down to 11 fixed this.

Hey @freester1,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: 8baafd90-0ce3-11ea-9489-798921b627f8

Going to 1.3.30 and 1.3.31 results in
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar

1.3.40 and up
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.repl.GenericReplCompiler

1.3.21 works


[TFLM] Added support for optimized CONV2D for CEVA-DSP BX1 and SP500 platforms

As described in https://github.com/tensorflow/tensorflow/issues/45607

With TFLM moving to its own GitHub repository, we are not going to be merging any TFLM specific pull requests in the TensorFlow repository starting today.
I am closing the current PR but please feel free to open a new PR in https://github.com/tensorflow/tflite-micro/.
https://groups.google.com/a/tensorflow.org/g/micro/c/W4DACgjPmOE


Pin tiledb version in processing image

tiledb arrays are not backward compatible. So if a cxg object is written by tiledb version x it may not be readable by version y if x > y.
The version of tiledb in hosted cellxgene is pinned in single-cell-infra (currently 0.7.4). The version that's run in the processing image is whatever's specified in cellxgene's requirements.txt. That pretty much specifies the latest, which is now 0.7.5.
So right now, a new cxg created by the processing image cannot be read by hosted cellxgene. You get a 400.
We should pin the version in the processing image so we can make sure versions don't get incremented only in the processing image.

@mckinsel how do we QA this in staging? Thank you!

For future reference, it's in this Makefile: https://github.com/chanzuckerberg/corpora-data-portal/blob/main/backend/processing_image/Makefile
You set your DEPLOYMENT_STAGE and then make build, make push, make promote