Timegraph: implement tree view

Works fine for tree part but chart is not updating with visible rows
Signed-off-by: Lea Carlier<EMAIL_ADDRESS>

@delislesim is there a way to update timegraph chart rows?

@delislesim is there a way to update timegraph chart rows?

I did not check the entire PR, but I don't think you should create a new chartLayer each time.
To answer your question I think it might need a few changes in the timeline-chart library, right now only the change in time range is causing an update to the chartLayer. Maybe the TimeGraphRowController should be responsible to keep track of what is visible and have the appropriate method to update the rows. Maybe look at: https://github.com/theia-ide/timeline-chart/blob/a005d9b9b36ba72671222fa629344a874bcc53ba/timeline-chart/src/layer/time-graph-chart.ts#L125 this is how the unitController is "updating" the chart layer.
Out of curiosity if zoom or time range is changed do you see if the row are updated as well?

Thank you very for the updates. I will be great addition to the time graphs and I'm looking forward having it integrated. I have some initial comments though.
I run the change and I noticed that the tree label wrap to new lines if the the text is too long. The wrapping will cause the the alignment of tree entries and time graph states to be off.  (see picture below)
When collapsing a tree node then the time graph on the right is not updated.
Additionally, from code point of view, the tree component is called XYTree and this name is not fitting to the usage in the time graph. I suggest to refactor the tree implementation and have a independent name.

It would seem that the state rows don't match the entries on the left. See screenshot below. The states part is exactly the same. In green is the original entries, while in red, it's the same state configuration, but associated with the wrong entries.
The list to tree conversion probably changes the order of the ids that are sent to fetch the rows and this order is important when drawing the results?

@bhufmann did you pull latest commit ? Collapse behaviour should be disabled and no line wrapping

@bhufmann did you pull latest commit ? Collapse behaviour should be disabled and no line wrapping

Yes, you are right. I checked-out an older commit.
When using the correct commit, however, the tree and timegraph is not populating anymore. Left and right side are empty.  Hmm, I need to trouble-shoot a bit more to find out what is going on.

By the way, I also had the problem of an empty view, but it got populated when I zoomed in. Is it related to this patch or was it there all along, I just opened more views now, I don't know. But can be investigated later, as far as I'm concerned

By the way, I also had the problem of an empty view, but it got populated when I zoomed in. Is it related to this patch or was it there all along, I just opened more views now, I don't know. But can be investigated later, as far as I'm concerned

The populating of the tree works now and the latest version fixed that. It's a nice UX improvement. However, the timegraph on the right side is not populated unless I open another view or zoom. It seems that a refresh is missing or fails. This didn't happen before this patch and it's seems to be related. I think we should fix it before merging this PR.

This PR has been replaced with Soukaina's PR


Bug: typo in 3.6.6 docs

In section “JSON Response Content” of the 3.6.6 readthedocs, the example code imports requests rather than niquests.  Seems to be a typo as the code calls niquests.get in the example.

OK. After taking a look, there was several place where a similar typo was present.
Fixed in latest release.


Is there anything to know to implement this for an Encoder-Decoder architecture ?

Hi,
Whether for T5 or any seq2seq NMT model, does quantization work the same way for the encoder ?
Thanks.

It works the same way but the current model definition is not super flexible, so it may not be easy to adapt to models that do not look like a decoder. This is something that I have looked into and want to improve in order to support encoders.

thx. If I want to implement it for OpenNMT-py (which can support in its own model definition most seq2seq and LLM variations) where would you advise me to start (from which template).

We only support Huggingface models, so you probably cannot directly quantize an OpenNMT model.

of course I get it, I just want to know where is the best place to start transposing what's being done for HF models to our architecture.

of course I get it, I just want to know where is the best place to start transposing what's being done for HF models to our architecture.

One of the most critical parts is to get the layers for every model. With Huggingface models, we can directly reference the modules and return them back to the quantizer.
https://github.com/casper-hansen/AutoAWQ/blob/main/awq/models/llama.py#L30

ok thanks. maybe I'll start with a decoder only in our architecture to mimic this.
Out of curiosity, in the case of encoder-decoder, do we need "two" get_layers_for_scaling() or can we set module at the upper level ie: model which has both encoder and decoder.

I'm back. I successfully quantized a OpenNMT-py Decoder-only model, inference is fine. By the way, it works both by not scaling and scaling weights.
I am now trying to do an Encoder-Decoder.
My first attempt is ok to quantize directly both Encoder and Decoder but inference does not work.
So maybe my next step is to try to scale weights for both parts.
My question is on this part: https://github.com/casper-hansen/AutoAWQ/blob/main/awq/quantize/quantizer.py#L310-L328
Should I do this in two steps ?
Because the Encoder has an input, so we can replicate this mechanism
But the Decoder has two inputs, Encoder out, and another input.
Is this how it is supposed to work ?

BTW, it is slower with a base transformer (NMT original paper):
first is AWQ quantized model, second is FP16, with batch_size 32
(pt2.1.0) vincent@vince-ryzen:~/nlp/OpenNMT-py$ bash tools/score.sh
[2023-11-11 15:25:01,939 INFO] Loading checkpoint from /media/vincent/Crucial X6/dataAI/en-de/wmt14-regression/modelwmt14-spm-vanilla_awq.pt
[2023-11-11 15:25:02,045 INFO] llm_awq compression of layer ['w_1', 'w_2', 'w_3', 'linear_values', 'linear_query', 'linear_keys', 'final_linear']
[2023-11-11 15:25:02,054 INFO] Loading data into the model
[2023-11-11 15:25:18,746 INFO] PRED SCORE: -12.6290, PRED PPL: 305269.96 NB SENTENCES: 3003
[2023-11-11 15:25:18,746 INFO] Total translation time (s): 16.5
[2023-11-11 15:25:18,746 INFO] Average translation time (ms): 5.5
[2023-11-11 15:25:18,746 INFO] Tokens per second: 5259.4
Time w/o python interpreter load/terminate:  16.82210350036621

real	0m18,360s
user	0m18,593s
sys	0m1,695s
******** scores without quote fix *********\n
BLEU+case.mixed+lang.en-de+numrefs.1+smooth.exp+tok.13a+version.1.5.0 = 26.0 57.2/31.6/19.7/12.8 (BP = 1.000 ratio = 1.032 hyp_len = 64725 ref_len = 62688)
(pt2.1.0) vincent@vince-ryzen:~/nlp/OpenNMT-py$ bash tools/score.sh
[2023-11-11 15:25:40,625 INFO] Loading checkpoint from /media/vincent/Crucial X6/dataAI/en-de/wmt14-regression/modelwmt14-spm-vanilla_release.pt
[2023-11-11 15:25:40,734 INFO] Loading data into the model
[2023-11-11 15:25:55,837 INFO] PRED SCORE: -12.3443, PRED PPL: 229645.28 NB SENTENCES: 3003
[2023-11-11 15:25:55,837 INFO] Total translation time (s): 14.9
[2023-11-11 15:25:55,837 INFO] Average translation time (ms): 5.0
[2023-11-11 15:25:55,837 INFO] Tokens per second: 5816.7
Time w/o python interpreter load/terminate:  15.225671768188477

real	0m16,776s
user	0m16,763s
sys	0m1,869s
******** scores without quote fix *********\n
BLEU+case.mixed+lang.en-de+numrefs.1+smooth.exp+tok.13a+version.1.5.0 = 26.3 57.4/32.0/20.1/13.0 (BP = 1.000 ratio = 1.033 hyp_len = 64783 ref_len = 62688)

You should be able to quantize both encoder and decoder. They run sequentially based on the nodes you specify.
As for inference speed, quantized models are not faster at large batch sizes. However, they are faster when you can fuse linear layers and use smaller batch sizes.

Thanks for your clear help.
https://forum.opennmt.net/t/awq-quantization-support-new-generic-converter-for-all-hf-llama-like-models/5569


Add prettier

This PR aligns the code formatting to the other projects to make it easier to work with the code.

I am trying to figure out what to do about Node 14: https://matrix.to/#/!bEWtlqtDwCLFIAKAcv:matrix.org/$5Xdul9sib5y7FWTxJXoQhQ3wWt9YMiscF56oOGjnzYk?via=matrix.org&via=element.io&via=envs.net

I added eslint-plugin-unicorn because eslint complained that it wasn't installed.

Yep. It is a peer dependency of eslint-plugin-matrix-org . Depending on the configuration it has to be installed.

I rebased the branch (the formatting changes made it hard to update it) and also upgraded the pipeline to use matrix builds for node 18 & latest. If you prefer, I can also move the pipeline part to a separate PR.

The workflows are still failing. @dhenneke can you use the same as in https://github.com/matrix-org/matrix-react-sdk/blob/develop/.github/workflows/static_analysis.yaml#L70 etc.?

Yes I will update the actions later 👍

@weeman1337 will you merge this?

@weeman1337 will you merge this?

I've just learned, that „You’re not authorized to merge this pull request.“ @richvdh can you merge it?


Buf Contributor License Agreement link is broken

The link at .github/CONTRIBUTING.md titled Buf's Contributor License Agreement is broken.
Currently, it is linking to the following URL: https://cla-assistant.io/connectrpc/connect-query-es
Which displays the following error:

Thanks for catching that. In fact, this CLA needs to be replaced with our CNCF setup.

I'll make the changes once I have the necessary repo permissions.

Fixes across all connect repos:
https://github.com/connectrpc/authn-go/pull/15
https://github.com/connectrpc/conformance/pull/900
https://github.com/connectrpc/connect-dart/pull/6
https://github.com/connectrpc/connect-es/pull/1136
https://github.com/connectrpc/connect-go/pull/765
https://github.com/connectrpc/connect-kotlin/pull/298
https://github.com/connectrpc/connect-playwright-es/pull/146
https://github.com/connectrpc/connect-query-es/pull/388
https://github.com/connectrpc/connect-swift/pull/279
https://github.com/connectrpc/connectrpc.com/pull/184
https://github.com/connectrpc/envoy-demo/pull/20
https://github.com/connectrpc/examples-es/pull/1707
https://github.com/connectrpc/examples-go/pull/180
https://github.com/connectrpc/grpchealth-go/pull/70
https://github.com/connectrpc/grpcreflect-go/pull/76
https://github.com/connectrpc/otelconnect-go/pull/178
https://github.com/connectrpc/validate-go/pull/22
https://github.com/connectrpc/vanguard-go/pull/129


[RFC] Precommit proposal

In reference to the discussion in #351, here is a simple, quick-and-dirty proposal for adding precommits to the retirement stage, which allows to stall the retirement stage (e.g. because the instruction needs to perform a side effect to be committed). I imagine that this could be useful for LSU and CSR. This is not the only possible implementation, ~another way would be to call the precommit method once (here, it returns a stall flag), and have the commit method locked until side effects are performed~ edit: locking commit method is a bad idea, as this would basically lock instructions from other FUs as well.
A discussion is welcome.
Edit: slipped a ~metaclass~ __init_subclass__ to UnifierKey to make the subclass declarations look less noisy, sorry. I can move it to another PR later if nobody objects.
Edit: @piotro888 made me realize the implementation here is not what I wanted, ~I'll prepare a modified one later~ I made necessary modifications.

I think you might want to consider __init_subclass__ to cut down on metaclass magic.

This looks good. If I correctly understand there will be also required changes in LSUDummy to change get_results method. There should be a check if instruction cause side effects, if yes we first should get execute of precommit for that instruction, else we execute load as soon as we get instruction.

This looks good. If I correctly understand there will be also required changes in LSUDummy to change get_results method. There should be a check if instruction cause side effects, if yes we first should get execute of precommit for that instruction, else we execute load as soon as we get instruction.

Yes, we need to add memory regions in the future. For now, it's safe to assume every load/store is a side effect.

As surprisingly little objections were raised, I'm now marking this ready for review, in the interest of getting interrupts out of the current impasse faster.


Add a primitive integer_pow() for values raised to a fixed integer scalar.

Use integer_pow() in the RHS JVP of div(). Also use it in square() and reciprocal().
Fixes #3136
In [1]: from jax import grad, make_jaxpr
In [2]: def inv(x): return 1/x
In [3]: print(grad(grad(grad(grad(grad(grad(inv))))))(4.))
0.043945312

In [4]: make_jaxpr(grad(grad(grad(grad(grad(grad(inv)))))))(4.)
Out[4]:
{ lambda  ; a.
  let b = integer_pow[ y=-7 ] a
      c = mul -6.0 b
      d = mul -120.0 c
  in (d,) }

In [5]:

Note in particular I'm not really sure how jet rules are defined mathematically so I settled for making the tests pass without thinking too hard about whether there's something smarter we could do.


onHorizontalDrag* always wins over onTap, even if there is no drag between the pointer down and pointer up

I want a parent widget to respond to taps and its child widget to respond to horizontal drags. The parent is wrapped in a GestureDetector with an onTap and the child is wrapped in another GestureDetector with an onHorizontalDrag[Start/Update/End]. No matter how I set the hit behaviors on the two GestureDetectors, I never get the parent to trigger on taps. It seems that the child's onHorizontalDrag* callback will always win over a tap event, even if there is no drag between the pointer down and pointer up.
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        print('parent onTap');
      },
      child: Container(
        alignment: Alignment.center,
        width: 400.0,
        height: 400.0,
        color: const Color(0xFF0000FF),
        child: GestureDetector(
          onHorizontalDragEnd: (details) {
            print('child onHorizontalDragEnd $details');
          },
          child: Container(
            width: 200.0,
            height: 200.0,
            color: const Color(0xFFFF0000),
          ),
        ),
      ),
    );
  }

When tapping on the child, the code above will print

flutter: child onHorizontalDragEnd DragEndDetails(Velocity(0.0, 0.0))

If I change onHorizontalDragEnd with onHorizontalDragUpdate, when tapping on the child, the code will not print anything  (as if the child consumed the event even though the callback is not called).

Please add the output of flutter doctor -v.

@zoechi This is a google internal issue. They are always at the bleeding edge of Flutter (lagging HEAD by 2-3 days).

They are always at the bleeding edge of Flutter

👍  good to know.
I think its always a good idea to add the output though.
If the issue isn't fixed within a few weeks, it's probably cumbersome to figure out what versions (Flutter, SDKs) were in use when the issue happened. It's often also about OS, connected device, ...
Just my 2c.
I don't want to get in the way of Google internal stuff.
I'll note the username when I learn it's a Googler that is not a [Member] and skip the request for flutter doctor output.

@mehmetf, I am triaging our bug database, and notice this old bug from 2018. I just want to follow up to see if this has been resolved, or if we plan to take any action. Can we close it now?

I believe this can be closed yes. I have failed to find an internal bug tracking this.


[EOS-5172] Capsule error 500 with more than one replica

Tested with two replicas and works fine.


Update build-first-app-overview.md

Add a new line before the image so it will show up in a new line instead of in-line with the preceding sentence.

Docs Build status updates of commit 2de2573:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/build-your-first-app/build-first-app-overview.md
:white_check_mark:Succeeded
View

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


Stop storing automatic_target_info in processed_target

Should have been removed with 1cf5e8c897e7c7774a7bfeb418de618f653fe28c.

Needs #2136 to land first.


concurrent api request to accelerate evaluation

Is there any plan on extending the current api-based evaluation to handle more requests concurrently for acceleration?

Yes, we'd like to do so but are bandwidth constrained--if you are interested in working on this it'd be very helpful!
#1460 provides concurrency for OpenAI models, and I need to review it--if you would also like to review it feel free to!

#2008 should substantially improve things here for the moment, please let us know if things are too slow and we can look into improving them further!


playground: changing abaplint.json has no effect

(tested with chrome and edge)

thanks
though it worked, but I've probably broken it again, started setting up some scaffolding for automatic testing last week 😄


Creating TagHelpers is surprisingly expensive

This page has a lot of use of UrlResolutionTagHelper https://github.com/rynowak/mvc-sandbox/blob/master/workloads/LargeStaticView/Views/TagHelpers/Index.cshtml

17% of the execution time of the page is spend just new-ing these up.

Notes for future us: one option to consider is pooling the tag helpers somehow some way somewhere.

Or just make them cheaper by optimizing current code paths.

Some more data here, from BasicViews:

Activating TagHelpers is 12% of the View's execution time.

Moving to 1.0.0.

Let's collect some new data on this using Music Store and see if there's still a major trouble spot here. Then we'll see if there's any work to do.

Updated Data from BasicViews 5/23

This is roughly 10% of view execution time for the (simple) app.

Moving this to 1.0.1 - I have some ideas here, but this isn't high priority compared to some of the other issues we have.

Nothing happening here in 2.0.0

Closing this as this is not a priority for now.


Article covering your repository

Great project! I just wanted to share that I've written a article that includes your great work. I integrated the readings into the Home Assistant Energy dashboard. It works really well and looks amazing.
You can find the article here:
https://www.pieterbrinkman.com/2022/02/01/make-your-city-heating-stadsverwarming-smart-and-connect-it-home-assistant-energy-dashboard/
Nogmaals bedankt, heel mooi project!

Hi Pieter,
Great article! Glad that it helped you out. Having those numbers really helped me becoming more aware of my energy consumption. Especially nowadays with the increased energy prices.
Ps: it's MattHijs ;)

Thanks MattHijs :) I've updated your name in the article.


perf!: consolidated updates to address performance issues

This fixes #866 and closes #867.
cc @fecet

Seems don't improve the startuptime too much for openning this file: https://github.com/STMicroelectronics/STM32CubeF4/blob/bb621289be5dd54f02e3198e1147b35aed4f7195/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h
Before:

After:

I also haven't observed any performance improvement, and I don't use scrollview and neoscroll. The performance issue should be unrelated to them.

Sorry, I can't see the improvement of the scroll velocity when open this file.

Hmmm I somehow cannot reproduce this:

The current startup time on my side is close to the that of nvim --clean 🤔
Perhaps explaining some background may be helpful? What this PR hopes to address is:

The startup time wrt opening files of normal sizes - by deferring LSP setup to prevent them from interfering with startup of those UI components;
Open big files when load_big_files_faster is true - Stop loading most plugins to simulate the behavior of native nvim.

If the startup time of any of the above situations is still slow, it may be because:

(For 1) The server itself caused performance degradation, indirectly affecting UI rendering (similar to #721)
(For 2) The parsers for treesitter are still being called... Hmm I'll look into this later. You can verify it this way:

:lua vim.treesitter.get_parser():parse()

This command should take a long time to complete.

Now it ok for me after Lazy sync 👍

cc @fecet

I think it's good to go. Currently waiting for @fecet's response as he reported very limited performance improvements.

Still don't find performance improvement unless set
https://github.com/ayamir/nvimdots/blob/1c02372f087c4b176564a83d8fc9eb7c375c5395/lua/modules/configs/editor/rainbow_delims.lua#L12
this to global.

@fecet So u're using treesitter on large files? We don't make any gurantee regarding treesitter-related components under big files, as using strategy["global"] only reduces the number of times LanguageTree:parse() gets called, but each call could still leads to significant performance degradation. To verify this execute the following command urself:
:lua vim.treesitter.get_parser():parse()

This can only be resolved by updating the related parser(s), we cannot do anything. But yes we can use simpler processing methods on relatively larger files, a.k.a, strategy["global"]. Will push a fix for this.

The file I tested is dwm.cpp , it's not so large I guess? I don't really understand how ts works so cannot give further comment.

Thanks for the sample! Will do some testings there.

Still don't find performance improvement

I should have identified the problem. Now rainbow-delimiters will select an appropriate subtree when the cursor moves, but due to the issue with cpp parser, the generated AST becomes too tall, making one iteration too expensive.

@fecet https://github.com/ayamir/nvimdots/pull/868/commits/ec24fef5485c1e0b19d463119dccf5b68ede15e4 should fix ur issue 👍

OK, it's good for me now


Add OpenBLAS 0.3.1

I've tested this package remotely and have excluded all broken builds.
Here is the links to the Travis/AppVeyor with status "All passed":

https://ci.appveyor.com/project/xsacha/hunter-h4uji/build/1.0.14
https://travis-ci.org/xsacha/hunter/builds/399387839

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.4152
https://travis-ci.org/ingenue/hunter/builds/399454761?utm_source=github_status&utm_medium=notification

Released: https://github.com/ruslo/hunter/releases/tag/v0.22.20


Prevent zero stars

When selecting stars, it's possible to select 0 stars. Is it possible to disable this? Meaning that you'll need to select at least 1 star.

same issue


OCPCLOUD-2428: Rebase k8s to 1.29 and update dependencies

This PR updates k8s dependencies to k8s 1.29 and other dependencies to latest versions to align with the OpenShift 4.16 release.

/jira refresh

/retest

/retest

/retitle OCPCLOUD-2428,OCPBUGS-29828: Rebase k8s to 1.29 and update dependencies


EmrEtlRunner: only attempt S3DistCp of shredded JSONs if there is a non-zero count of them

Depends on #1440

We will do #1481 instead


[Bug]: opensearch-dashboards-1.1.0 build broken

Describe the bug
Either a script that we forgot to backport or maybe something OSX-specific. Didn't debug.
+ echo 'BUILD RELEASE ZIP FOR alertingDashboards'
BUILD RELEASE ZIP FOR alertingDashboards
+ cd ../OpenSearch-Dashboards/plugins/alertingDashboards
/Users/dblock/source/opensearch-project/opensearch-build/dblock/scripts/default/opensearch-dashboards/build.sh: line 72: cd: ../OpenSearch-Dashboards/plugins/alertingDashboards: No such file or directory

cc: @kavilla
To reproduce
./build.sh manifests/1.1.0/opensearch-dashboards-1.1.0.yml

Expected behavior
No response
Screenshots
If applicable, add screenshots to help explain your problem.
Host / Environment
No response
Additional context
No response
Relevant log output
No response

@kavilla could you take a look at this issue and see if we need to fix the dashboard build on mac?

@kavilla Do you have any updates?

I think we can close this. I know we have an issue for Mac support.


Support expanding :find command argument using 'findexpr'

When the 'findexpr' option is set, use that to expand the argument to the ':find' command.

thanks!

It seems like v:fname is always prefixed with a ^. For example, if I type :find foo and press TAB, v:fname will be set to ^foo.

There is also another problem:

When cmdline is a*b, v:fname is set to ^a.*b
When cmdline is a.*b, v:fname is set to ^a\..*b

Yet another problem: https://github.com/vim/vim/pull/15934#issuecomment-2434169039

Hi,
On Wed, Oct 23, 2024 at 1:58 PM bfrg @.***> wrote:

It seems like v:fname is always prefixed with a ^. For example, if I type :find
foo and press TAB, v:fname will be set to ^foo.

Yes.  When expanding file names, Vim internally adds wildcards to the
search string.
It will be simpler to use in a Vim regular expression comparison if this is
converted to
a regular expression pattern.  So when the 'findexpr' expression is
evaluated for
command line argument completion, the string is converted to a regular
expression.
I should have updated the document to reflect this.

Yegappan

On Wed, Oct 23, 2024 at 7:42 PM zeertzjq @.***> wrote:

There is also another problem:

When cmdline is a*b, v:fname is set to ^a.*b
When cmdline is a.*b, v:fname is set to ^a..*b

Yes.  Before evaluating 'findexpr' for command line argument expansion,
the command
argument is converted from a glob pattern to a regular expression pattern.
That is why
you see this behavior.

Regards,
Yegappan


Existing pods cannot be added to the ambient mesh network

Bug Description
Uninstall ambient, then reinstall ambient, the previous pod cannot be added to the mesh network.
Because when the ambient is uninstalled, the pod annotations[ambient.istio.io/redirection] has not been changed, it is still enabled. This led to an error in the logic of the judgment in this place, and it was skipped directly.

If this is a bug, can you assign this issue to me and I'll try to fix it.
Version
master ambient mode

Additional Information
No response
Affected product area

[X] Ambient
[ ] Docs
[ ] Installation
[X] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
[ ] Upgrade
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Control Plane Revisions

Is this the right place to submit this?

[X] This is not a security vulnerability
[X] This is not a question about how to use Istio

I think https://github.com/istio/istio/pull/44276 handles this

I have the same problem, and I do it temporarily.
kubectl annotate notsleep-6d6c8669b5-rkjhp ambient.istio.io/redirection-


Adding copyright headers to required files and enforcing requirement in build pipelines

cs/cpp/h/idl/xaml files all need copyright headers.  This change adds the required copyright information and adds a script VerifyCopyrightHeaders.ps1.  This script is run at the beginning of builds to verify all checked in files are marked correctly.  The script can also be ran locally to update any needed files to make it easier for users adding new files via "VerifyCopyrightHeaders.ps1 -Fix"

cs/cpp/h/idl/xaml files all need copyright headers

What about ps1 and psm1?
What about cmd? "@REM Copyright..."
What about props, targets, csproj, vcxproj, sln? ""

cs/cpp/h/idl/xaml files all need copyright headers

What about ps1 and psm1?
What about cmd? @REM Copyright...
What about props, targets, csproj, vcxproj*, sln, xml, xsd? <!-- Copyright... -->

That's a very good question.  I asked PM about it, but got a "I don't know".  So far I'm just following the task: https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/36782279  It does specifically say we don't need it for proj files.

/azp run

/azp run


YouTube Video Upload | My code mostly works but I don't think it's right...

 So this is just a proof of concept, but I have a web page with a form and the user uploads their video to my server in chunks with FineUploader (but that's not important), but instead of storing those chunks and then assembling them, with the script below I pass them straight on to YouTube.
This is working most of the time (occasionally the code thinks the uploaded has succeeded but when you go to your YouTube Video Manager it say's "upload failed" or "processing failed" and I'm not sure why), BUT I don't think my code is correct. It works but the following line feels wrong to be calling each time the script loads...
$insertRequest = $youtube->videos->insert("status,snippet", $video);
...but without it, I don't know what I would pass to Google_Http_MediaFileUpload() which I need to call each time because otherwise, I wouldn't be able to send the next chunk. Basically, I have to call it each time because I can't store $insertRequest in my database...
I assume I'm missing something, but I couldn't find any documentation or examples of actually resuming a video upload and I couldn't find where the code that calling $youtube->videos->insert() actually lives in the library so it's hard to just work it out.
Here's my full code:
require_once('../../db_conx.php');
require_once('../../vendor/autoload.php');
session_start();

sleep(2);

$OAUTH2_CLIENT_ID = '<<CLIENT ID>>';
$OAUTH2_CLIENT_SECRET = '<<CLIENT SECRET>>';

$client = new Google_Client();
$client->setClientId($OAUTH2_CLIENT_ID);
$client->setClientSecret($OAUTH2_CLIENT_SECRET);
$client->setScopes('https://www.googleapis.com/auth/youtube','https://www.googleapis.com/auth/yt-analytics.readonly','https://www.googleapis.com/auth/yt-analytics-monetary.readonly','https://www.googleapis.com/auth/youtubepartne');
$redirect = filter_var('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'],
  FILTER_SANITIZE_URL);
$client->setRedirectUri($redirect);

$credentials = $db_conx->query("SELECT credentials FROM linked_accounts WHERE id = '8'")->fetch_object()->credentials;
$access_token = json_decode($credentials, true);

$client->setAccessToken($access_token);
$youtube = new Google_Service_YouTube($client);

header("Content-Type: text/plain");

if (isset($_GET["done"])) {

	$uuid = $_REQUEST['qquuid'];
	$result = array("success" => true, "uuid" => $uuid);

} else {

	$chunkSizeBytes = 1 * 1024 * 1024;

	$snippet = new Google_Service_YouTube_VideoSnippet();
	$snippet->setTitle("Test title");
	$snippet->setDescription("Test description");
	$snippet->setTags(array("tag1", "tag2"));

	$snippet->setCategoryId("22");

	$status = new Google_Service_YouTube_VideoStatus();
	$status->privacyStatus = "private";

	$video = new Google_Service_YouTube_Video();
	$video->setSnippet($snippet);
	$video->setStatus($status);

	$vipId = $_GET['vipId'];
	$uploadInProgress = $db_conx->query("SELECT uip FROM videoLab_vip WHERE id = '$vipId'")->fetch_object()->uip;
	if($uploadInProgress==0){

		$client->setDefer(true);

		$insertRequest = $youtube->videos->insert("status,snippet", $video);

		$media = new Google_Http_MediaFileUpload(
		        $client,
		        $insertRequest,
		        'video/*',
		        null,
		        true,
		        $chunkSizeBytes
		);
		$totalFileSize = $_REQUEST['qqtotalfilesize'];
		$media->setFileSize($totalFileSize);
		$fileSizeQuery = mysqli_query($db_conx, "UPDATE videoLab_vip SET uploadFileSize = '$totalFileSize' WHERE id = '$vipId'");

		$videoPath = $_FILES['qqfile']['tmp_name'];
	    	$handle = fopen($videoPath, "rb");
	     	$chunk = fread($handle, $chunkSizeBytes);
	        $media->nextChunk($chunk);

	    	fclose($handle);

		$resumeUri = $media->getResumeUri();
		$resumeUriQuery = mysqli_query($db_conx, "UPDATE videoLab_vip SET resumeUri = '$resumeUri' WHERE id = '$vipId'");

		$client->setDefer(false);

		$uipQuery = mysqli_query($db_conx, "UPDATE videoLab_vip SET uip = '1' WHERE id = '$vipId'");

		$uuid = $_REQUEST['qquuid'];
		$result = array("success" => true, "uuid" => $uuid);

	} else {

		$client->setDefer(true);

		$insertRequest = $youtube->videos->insert("status,snippet", $video);

		$media = new Google_Http_MediaFileUpload(
			$client,
			$insertRequest,
			'video/*',
			null,
			true,
			$chunkSizeBytes
		);

		$fileSize = $db_conx->query("SELECT uploadFileSize FROM videoLab_vip WHERE id = '$vipId'")->fetch_object()->uploadFileSize;
		$media->setFileSize($fileSize);

		$resumeUri = $db_conx->query("SELECT resumeUri FROM videoLab_vip WHERE id = '$vipId'")->fetch_object()->resumeUri;
		$media->resume($resumeUri);

		$videoPath = $_FILES['qqfile']['tmp_name'];
	    	$handle = fopen($videoPath, "rb");
	     	$chunk = fread($handle, $chunkSizeBytes);
	        $media->nextChunk($chunk);

	    	fclose($handle);
		$client->setDefer(false);

		$uuid = $_REQUEST['qquuid'];
		$result = array("success" => true, "uuid" => $uuid);

	}
}

echo json_encode($result);

In this case the call to insert just builds a request (sets the URL and headers like Bearer). nextChunk is the one that sends (opens network connection, sends data, waits for reply from server).
You should have several nextChunks per inserts. It looks like you are only sending the first frame of the buffered file. You need to keep freading until you get every last byte:
$status = false;
$handle = fopen($videoPath, "rb");
while (!$status && !feof($handle)) {
  $chunk = fread($handle, $chunkSizeBytes);
  $status = $media->nextChunk($chunk);
}

Part of the reason insert isn't named something more apt like buildInsertRequest is so it will closely match the HTTP API method all of which are listed on the very great API Explorer which is my favorite place to find links to the docs. In this case you still need to click through the Reference tab to get a description of the insert method.
Finally the PHP code generated for each API is in this repo's sister repo: https://github.com/google/google-api-php-client-services/.

Do we have a sample of this one?  Seems like a nice thing to add :)

@mattwhisenhunt Thanks for the info! My code is based on the PHP example for a resumable upload in the API docs, but what that example is missing, and what I still am unable to work out is how resuming a failed upload is meant to work. For example, say your script is executing (it's initialized everything and started sending over chunks), but then something goes wrong and your script stops executing 1/2 way through the video upload. What I am essentially trying to do is use the resume uri to continue sending the next chunk from where we left off rather than restarting everything. I don't know how to do that (if it's even possible because I could be misunderstanding the purpose of the resume uri), because you need $media->resume($resumeUri); to set the resume uri, but you need to call Google_Http_MediaFileUpload again to use $media and to do that you need to call $youtube->videos->insert("status,snippet", $video); again to get $insertRequest to pass to it. I assume doing that just makes YouTube think you're trying to upload a new video, but I don't see any obvious way to store $insertRequest or $media in a database or however for use again if something goes wrong and the script needs to be restarted and the resume uri is going to be used to resume the previously started video upload. Hopefully that all makes sense. I think I have an idea now how to work around it, but it would obviously be nice to understand how it's intended to be used. I suppose I could work it out myself if I could figure out where the code that's called by $youtube->videos->insert(); lives in the library to fully understand what's being returned by that function.


navmesh generation appears to nuke all cover

What it says on the tin, there. This is a significant issue for making edits to vanilla levels, which is my primary goal with the editor.

Apologies, although I haven't identified the cause, it's clear this issue is selective and isn't occurring to others. closing issue.


http2: fix conn flow control when stream closes on bad content-length

HTTP2 server does not send WINDOW_UPDATE when the client sends more
data than declared in the content-length header.
Client flow control can eventually run out of available bytes which
hangs the client connection as it cannot write DATA frames for any
stream any longer.
Fixes: golang/go#54185

Closed by mistake


Error running setup.py

Running python setup.py develop and seeing this:
nstalled /private/var/folders/q5/76tqhhm15k9__yjtrbdfhdwm0000gn/T/easy_install-4fYJKk/mock-2.0.0/.eggs/pbr-1.9.1-py2.7.egg
Marker evaluation failed, see the following error.  For more information see: http://docs.openstack.org/developer/pbr/compatibility.html#evaluate-marker
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/private/var/folders/q5/76tqhhm15k9__yjtrbdfhdwm0000gn/T/easy_install-4fYJKk/mock-2.0.0/.eggs/pbr-1.9.1-py2.7.egg/pbr/core.py", line 111, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/private/var/folders/q5/76tqhhm15k9__yjtrbdfhdwm0000gn/T/easy_install-4fYJKk/mock-2.0.0/.eggs/pbr-1.9.1-py2.7.egg/pbr/util.py", line 248, in cfg_to_args
    kwargs = setup_cfg_to_setup_kwargs(config, script_args)
  File "/private/var/folders/q5/76tqhhm15k9__yjtrbdfhdwm0000gn/T/easy_install-4fYJKk/mock-2.0.0/.eggs/pbr-1.9.1-py2.7.egg/pbr/util.py", line 431, in setup_cfg_to_setup_kwargs
    if pkg_resources.evaluate_marker('(%s)' % env_marker):
  File "/Users/justinlent/python/anaconda210/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py", line 1302, in evaluate_marker
    return cls.interpret(parser.expr(text).totuple(1)[1])
  File "/Users/justinlent/python/anaconda210/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py", line 1337, in interpret
    return op(nodelist)
  File "/Users/justinlent/python/anaconda210/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py", line 1250, in atom
    return cls.interpret(nodelist[2])
  File "/Users/justinlent/python/anaconda210/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py", line 1337, in interpret
    return op(nodelist)
  File "/Users/justinlent/python/anaconda210/anaconda/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg/pkg_resources.py", line 1271, in comparison
    raise SyntaxError(msg)
SyntaxError: '<' operator not allowed in environment markers
error: Setup script exited with error in setup command: Error parsing /private/var/folders/q5/76tqhhm15k9__yjtrbdfhdwm0000gn/T/easy_install-4fYJKk/mock-2.0.0/setup.cfg: SyntaxError: '<' operator not allowed in environment markers

realizing this my be a consequence of having upgraded to OSX El Capitan and it breaking a lot of developer related stuff

closing.  El Capitan just totally broke my Anaconda setup. Re-installing Anaconda fixed it


When the amount of data reaches a big amount, the performance is not ideal.

My Environment

ArangoDB Version:        3.3.12
Storage Engine:             RocksDB
Deployment Mode:       Cluster
Deployment Strategy:   Manual Start
Configuration:

[server]
endpoint = tcp://<IP_ADDRESS>:8529
storage-engine = rocksdb
authentication = false
threads = 3
[rocksdb]
block-cache-size =<PHONE_NUMBER>6
write-buffer-size = 536870912
max-write-buffer-number = 5
min-write-buffer-number-to-merge = 2
num-threads-priority-high = 3
num-threads-priority-low = 6
max-background-jobs = 6

Infrastructure:                own
Operating System:        centos 7
Used Package:              SUSE or RedHat .rpm

Component, Query & Data
Affected feature:
AQL query using web interface
AQL query (if applicable):
let res = (for v,r,p in 1..2 any 'v_man/60190ab0acafa668445ff9911de7f0de' graph 'ContactsGraph' options {bfs:true, uniqueVertices:'global'} return v)
return length(res)

AQL explain (if applicable):
Query string:
 let res = (for v,r,p in 1..2 any 'v_man/60190ab0acafa668445ff9911de7f0de' graph 'ContactsGraph'
 options {bfs:true, uniqueVertices:'global'} return v)
 return length(res)

Execution plan:
 Id   NodeType          Site       Est.   Comment
  1   SingletonNode     COOR          1   * ROOT
  5   SubqueryNode      COOR          1     - LET res = ...   /* const subquery */
  2   SingletonNode     COOR          1       * ROOT
  3   TraversalNode     COOR        121         - FOR v  /* vertex */ IN 1..2  /* min..maxPathDepth */ ANY 'v_man/60190ab0acafa668445ff9911de7f0de' /* startnode */  GRAPH 'ContactsGraph'
  4   ReturnNode        COOR        121         - RETURN v
  6   CalculationNode   COOR          1     - LET #8 = LENGTH(res)   /* simple expression */
  7   ReturnNode        COOR          1     - RETURN #8

Indexes used:
 By   Type   Collection   Unique   Sparse   Selectivity   Fields        Ranges
  3   edge   e_employ     false    false            n/a   [ `_to` ]     base INBOUND
  3   edge   e_employ     false    false            n/a   [ `_from` ]   base OUTBOUND

Traversals on graphs:
 Id   Depth   Vertex collections   Edge collections   Options                                                Filter conditions
  3   1..2    v_company, v_man     e_employ           bfs: true, uniqueVertices: global, uniqueEdges: path

Optimization rules applied:
 Id   RuleName
  1   optimize-traversals

Dataset:
I can roughly describe the size of the data set.
collection A (for doc): 8,951,950 doc(s)
collection B (for doc): 18,535,402 doc(s)
collection C (for edge): 32,580,443 edge(s)
Replication Factor & Number of Shards (Cluster only):

Steps to reproduce

Problem:
the query used 65.903s.
result:
[
32364
]
Is this performance normal? How to tune?
Expected result:

Similar problem. Any actions we could as users take? If not please let us know if you're going to work on this soon - otherwise we would need to look for another storage engine, since the main goal to use is performance (INSERT, UPDATE, DELETE, much better than MongoDB)

@CalicoBox Does the following query execute any faster?
let res = (for v,r,p in 1..2 any 'v_man/60190ab0acafa668445ff9911de7f0de' graph 'ContactsGraph' options {bfs:true, uniqueVertices:'global'} return true)
return length(res)

Hi @CalicoBox
Just sending a quick followup - did you have the chance to try what Simran suggested in his previous message?
Best,

Hi @logical-and
Did you try what Simran suggested ?
@CalicoBox
Again, could you provide a quick update.
Thanks,

Since there was no feedback in a while, I am closing this issue for now.
Please feel free to reopen the issue by adding a new comment.

Sorry for no reply for ages. I tried  what Simran suggested at that time. Things are looking to be a bit better. But not nearly as good as need.
I have no ideal if that's the normal performance for arangodb. But it's not ideal for me.
Hope things will get better. Cheers.

Hi,
question here too, can you provide an example dataset, or some more information on how your data is distributed?

Hi @CalicoBox,
Glad that Simran's suggestion worked out a bit better. As dothebart requested, can you please provide us with an example dataset or some detailed information on your data distribution? This will help us investigate more.
Thanks!

Isn't this the perfect use case for COLLECT?
@CalicoBox How about this:
FOR v IN 1..2 ANY 'v_man/60190ab0acafa668445ff9911de7f0de' GRAPH 'ContactsGraph'
  OPTIONS { bfs: true, uniqueVertices: 'global' }
  COLLECT WITH COUNT INTO len
  RETURN len

Hi @CalicoBox,
did you already have a chance to try the suggested query of mpoeter?
Please share some feedback regarding the latest comments.

Hi @CalicoBox
We have not received any feedback in a while.
I am closing this issue now. If needed, please feel free to comment and we will reopen this issue.

Maybe also try the AGGREGATE variant and see if it's more memory friendly. WITH COUNT INTO is optimized however and might work similarly.
FOR v IN 1..2 ANY 'v_man/60190ab0acafa668445ff9911de7f0de' GRAPH 'ContactsGraph'
  OPTIONS { bfs: true, uniqueVertices: 'global' }
  COLLECT AGGREGATE len = LENGTH(1)
  RETURN len


Parametrize azure and graph endpoint

It would be interesting to have https://github.com/CERN/msgraph-poll-discourse-plugin/blob/master/plugin.rb#L22 , https://github.com/CERN/msgraph-poll-discourse-plugin/blob/master/lib/validators/msgraph_poll_settings_validator.rb#L16 and https://github.com/CERN/msgraph-poll-discourse-plugin/blob/master/lib/validators/msgraph_poll_settings_validator.rb#L32 parametrized through the UI, same as the token.
It is true that urls are not meant to change in the short-term, but in the event of a change, this can be easily reconfigurable.

So do you suggest to remove the tenant id from settings and putting the entire auth url as a setting?

In my opinion, I would do it as follows:
auth_url =
"#{SiteSetting.azure_ad_endpoint_or_the_name_you_want_to_use}/#{SiteSetting.msgraph_polling_tenant_id}/oauth2/v2.0/token"
You can get inspiration about how GitLab does it through
https://gitlab.com/gitlab-org/gitlab/-/blob/master/vendor/gems/microsoft_graph_mailer/spec/spec_helper.rb#L22
El mar., 6 jun. 2023 15:27, Alessio Cosenza @.***>
escribió:

[image: image]
https://user-images.githubusercontent.com/5256712/243710155-7ac5a46f-ef37-4dee-a2d0-d680506b0f4d.png
So do you suggest to remove the tenant id from settings and putting the
entire auth url as a setting?
—
Reply to this email directly, view it on GitHub
https://github.com/CERN/msgraph-poll-discourse-plugin/issues/5#issuecomment-1578768793,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHAV2RTU56TXYVXYJPTTDWTXJ4V3TANCNFSM6AAAAAAY4KSUDA
.
You are receiving this because you authored the thread.Message ID:
@.***>


Add description of RabbitMq events

Convert this document:
EMAAR-EventsMap-190520-0941.pdf
into Events.md file

https://github.com/OpenMAVN/Welcome/pull/28

@lAnubisl , please update links in events-map.md from bitbucket links to corresponding gihub repos un OpenMAVN organization

https://github.com/OpenMAVN/Welcome/pull/29

@starkmsu If you think this is completed - please close this ticket

Implemented in linked PR


High value of AmazonDynamoDBConfig.MaxErrorRetry causes exception

I have correctly set AmazonDynamoDBConfig.MaxErrorRetry per #285  to 1000.  I am using such a high value because this is a migration tool that we want to pretty much never fail, but just wait until there is enough capacity.  I get the folllowing exception (stack trace shorted to only relavant portion):
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Exception: Batch Write Failed: Number must be either non-negative and less than or equal to Int32.MaxValue or -1.
Parameter name: millisecondsTimeout ---> System.ArgumentOutOfRangeException: Number must be either non-negative and less than or equal to Int32.MaxValue or -1.
Parameter name: millisecondsTimeout
   at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
   at System.Threading.Thread.Sleep(Int32 millisecondsTimeout)
   at Amazon.DynamoDBv2.Internal.DynamoDBRetryPolicy.pauseExponentially(Int32 retries) in d:\Jenkins\jobs\v3-stage-release\workspace\AWSDotNetPublic\sdk\src\Services\DynamoDBv2\Custom\Internal\DynamoDBRetryPolicy.cs:line 58
   at Amazon.DynamoDBv2.Internal.DynamoDBRetryPolicy.WaitBeforeRetry(IExecutionContext executionContext) in d:\Jenkins\jobs\v3-stage-release\workspace\AWSDotNetPublic\sdk\src\Services\DynamoDBv2\Custom\Internal\DynamoDBRetryPolicy.cs:line 47

You can see there appears to be a bug in the DynamoDBRetryPolicy.pauseExponentially method.  The problem seems to be in the line int delay = (retries == 0) ? 0 : 50 * (int)Math.Pow(2, retries - 1);  I believe that Math.Pow(2, retries - 1) is overflowing the range of int causing it to go negative which causes the later line Amazon.Util.AWSSDKUtils.Sleep(delay); to try to sleep for a negative number of milliseconds.

We've released an updated version of DynamoDB and Core which resolves this issue.
For your case, simply upgrading the DynamoDB package is enough. If you are using a different service and need this same functionality, you'll need to update Core to the latest version.

Looking at the new version of pauseExponentially() it looked like there could still be overflow issues.  I wrote a unit test and sure enough, if you set MaxBackoffInMilliseconds = int.MaxValue, then on retry 29 your code would pause for 536,870,912 ms when it should pause for 2,147,483,647 ms (int max).
Here is some unit tested code I am using to compute the correct delay time.  It uses bit shifting which will be much faster than Math.Pow and will also return zero on negative retries,
public int PauseTime(int retries)
{
	if(retries <= 0) return 0;
	retries--;
	// A signed int has 31 bits we can shift in, but we need 6 bits of space to multiply by 50
	if(retries > 31 - 6) return MaxBackoffInMilliseconds;
	var milliseconds = 50 * (1 << retries);
	return Math.Min(milliseconds, MaxBackoffInMilliseconds);
}


18.01

Thanks a bunch @bgruening  - you're the best!  Not sure about the test failure, which is a timeout issue - should I merge anyway?

Mh, not sure what this is ... lets try again :(

Now you can merge :)

Thanks again @bgruening !


.maintain/monitoring: Normalize alerting rules

Start alert names with their component and end with the describing
adjective.

Describe alert duration in message with for more than across all
alerts.

@mxinden I assumed you waited with updating the tests for any feedback regarding wording and hence did not wait with approving until the tests pass. :)

I assumed you waited with updating the tests for any feedback regarding wording and hence did not wait with approving until the tests pass. :)

@haikoschol :D I am tempted to say yes, but to be honest, I simply forgot that max-from-the-past wrote these.

@gabreal is anything fixed on LowNumberOfNewBlocks that needs updating before merging this?

Not that I'm aware of, looks good to go :+1:

bot merge


import dois from Wiley

https://doi.org/10.1002/ciuz.201400660 such dois can't be imported with the current used apis
enable dois import for authors and citations.

Use crossref API along with EuropePMC or crossref alone to retrieve details

screen-capture (19).webm


Create a Policy which detects namespaces stuck in terminating

e.g. MustNotHave
apiVersion: v1
kind: Namespace
metadata:
spec:
status:
phase: Terminating

I think this would be the policy:
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  name: policy-namespaces
  annotations:
    policy.open-cluster-management.io/standards: NIST-CSF
    policy.open-cluster-management.io/categories: CM Configuration Management
    policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
spec:
  remediationAction: inform
  disabled: false
  policy-templates:
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-namespaces
        spec:
          remediationAction: inform
          severity: low
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: v1
                kind: Namespace
                status:
                  phase: Terminating
---
apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
  name: binding-policy-namespaces
placementRef:
  name: placement-policy-namespaces
  kind: PlacementRule
  apiGroup: apps.open-cluster-management.io
subjects:
  - name: policy-namespaces
    kind: Policy
    apiGroup: policy.open-cluster-management.io
---
apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
  name: placement-policy-namespaces
spec:
  clusterConditions:
    - status: 'True'
      type: ManagedClusterConditionAvailable
  clusterSelector:
    matchExpressions:
      - key: environment
        operator: In
        values:
          - dev

@gparvin great.
you could use a tool like ketall[1] or oc with long commands[2] to get the resources stuck in terminating:
[1] https://github.com/corneliusweig/ketall/
[2] https://access.redhat.com/solutions/3986301
this would be also a usecase for Ansible:  if the above policy is not compliant we could invoke a Job and mitigate the Cluster (not 100% but will discuss it)


Feat/revamp search page

I've also changed the logo
and I've made the search box auto focus so you dont have to click on the field to start typing


fix: register providers only for languages matching the documentSelector

Previously, providers were registered for every registered language, not just for the ones matching the documentSelector array passed to the LanguageClient config.
With this fix, language-specific providers are only registered for an existing language if there is a chance of matching, i.e.:

the language appears in the documentSelectors list
there is at least one documentSelector with non-language matching criteria

This reduces the risk of a conflict with existing providers, e.g. when using monaco-languages or monaco-json.

This reduces the risk of a conflict with existing providers, e.g. when using monaco-languages or monaco-json.

I won't use monaco-json together with json LS. It would be confusing for a user.

@gins3000 thanks for your contribution, please ⭐ the repo 🙏 if you like it :)

@akosyakov thanks for the thorough and fast review. I checked, and saw that, indeed, I hadn't starred the repo yet and rectified that ;)


Strings and messages for Preview functionality should be rephrase

Problem:
Current English messages in build for Preview functionality are misleading and should be rephrase to more meaningful or informative sentences.
Proposed Solution:
Here is some suggestion on how to rephrase strings for Preview harvested from /src/extension/_locales/en/messages.json

$1 files successfully previewed. > Preview of $1 files successfully generated. OR
$1 of $2 files previewed... > Preview $1 of $2 files generated...
1 file successfully previewed. > Preview of this file successfully generated.
Are you sure you want to preview $1 files? > Are you sure you want to generate a preview for $1 files?
Are you sure you want to preview 1 file? > Are you sure you want to generate a preview for this file?
Failed to preview $1 files: > Failed to generate preview of $1 files:
Failed to preview 1 file: > Failed to generate preview of 1 file:
File must be previewed first > A preview of the file must be generated first
Previewed: > Preview generated
Previewing failed. Must be Google document or spreadsheet. > Preview generation failed. Must be Google document or spreadsheet.
Previewing failed. Please try again later. > Preview generation failed. Please try again later.
Pro tip: Press ⌘ + S before previewing to see the latest changes immediately... > Pro tip: Press ⌘ + S before generating preview to see the latest changes immediately
Pro tip: Press Ctrl + S before previewing to see the latest changes immediately... > Pro tip: Press Ctrl + S before generating preview to see the latest changes immediately...

:tada: This issue has been resolved in version 6.22.0 :tada:
The release is available on:

GitHub release
v6.22.0

Your semantic-release bot :package::rocket:


Assess to Dataset regarding to Philippines and US

Thanks for the great work! Will you release the data related to the Philippines and the US in the future?

And the tuned cultural specific models CRAFT? Thanks for your time and help!


perf(col_str): reduce max memory usage

Summary
here is memory inuse bytes pprof.
the ColStr WriteColumn copy the buf.

reduce max memory usage bytes by use writev.

@ernado cc

@ernado  could you merge it ?


web support

With this repo, this is good way to fully test stacked if it works on web, would be nice if is tested here.

Good Idea. But we don't even have a customer app yet 😓 we'll do that when we tackle the web version 🌐


CollisionPolygon2D -- Debug collision shape only shows outline in exported projects

Tested versions
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
System information
Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4070 Ti (NVIDIA; <IP_ADDRESS>14) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)
Issue description
In the Godot editor, there is an option under Debug > Visible Collision Shapes to make collision shapes visible while the game is running.
The appearance matches what is visible in the editor window.
To enable this feature for exported projects, one must add the following line of code to the scene:
get_tree().set_debug_collisions_hint(true)
However, this only appears to work for CollisionShape2D nodes in exported projects.
CollisionPolygon2D nodes will only have the outline of their collision shape visible in exported projects.
In editor the whole (filled) collision polygon is visible.
Steps to reproduce
Open the attached project.
Inspect the scene in the editor before running to see how the collision shapes should look in-game.
Run the project and verify that the scene appears as expected (root node has a script attached to enable visible debug shapes.)
Export the project to Windows .exe or Web build.
Run the exported project and see that the CollisionPolygon2D only shows the shape outline.
Minimal reproduction project (MRP)
new-game-project.zip

As a workaround, I've written this tool script to add a Polygon2D child to CollisionPolygon2D nodes.
However I'm not sure how to get the multiple colors drawn for a single shape like they are in the editor.
I've been fiddling around with it for a bit, but I have no idea how it works. (If someone does know, that would be interesting just for my own curiosity...)
`@tool
class_name PolyShader
extends CollisionPolygon2D
Color palette for the triangles
@export var color_palette: Array = [
Color(1, 0, 0, 0.5),  # Red
Color(0, 1, 0, 0.5),  # Green
Color(0, 0, 1, 0.5),  # Blue
Color(1, 1, 0, 0.5),  # Yellow
Color(1, 0, 1, 0.5)   # Magenta
]
Tool button
@export var generate_polygon_button: bool = false:
set(value):
_generate_polygon_button_pressed()
#if generate_polygon_button != value:
#generate_polygon_button = value
#print(generate_polygon_button)
get:
return generate_polygon_button
Called when the button is clicked
func _generate_polygon_button_pressed():
regenerate_polygon()
Regenerate the Polygon2D based on the CollisionPolygon2D's polygon
func regenerate_polygon():
# Search for a child of type Polygon2D
var polygon2d_node = null
for child in get_children():
if child is Polygon2D:
polygon2d_node = child
break
# If no Polygon2D node exists, create one
if polygon2d_node == null:
polygon2d_node = Polygon2D.new()
self.add_child(polygon2d_node)
polygon2d_node.owner = get_tree().edited_scene_root
# Update Polygon2D
polygon2d_node.polygon = self.polygon
polygon2d_node.set_name("Polygon2D")
polygon2d_node.color = color_palette[randi_range(0, color_palette.size()-1)]`

The editor debug and the runtime are not the same mostly for performance and visual clutter reasons and because physics has no editor customization settings for that.
The polygon face drawing requires a convex decomposition. You can't draw those polygon outlines directly except for their lines so you need to turn them into convex polygons / triangles first. Depending on the complexity of the polygon outline this can be performance costly in a draw function at runtime.
What the debug does extra in the editor is to decompose convex the entire polygon array with Geometry2D.decompose_polygon_in_convex() into an array with convex polygons and then draw a rendering polygon for every single convex polygon with CanvasItem.draw_colored_polygon() using some semi random color.

The editor debug and the runtime are not the same mostly for performance and visual clutter reasons and because physics has no editor customization settings for that.
The polygon face drawing requires a convex decomposition. You can't draw those polygon outlines directly except for their lines so you need to turn them into convex polygons / triangles first. Depending on the complexity of the polygon outline this can be performance costly in a draw function at runtime.
What the debug does extra in the editor is to decompose convex the entire polygon array with Geometry2D.decompose_polygon_in_convex() into an array with convex polygons and then draw a rendering polygon for every single convex polygon with CanvasItem.draw_colored_polygon() using some semi random color. The code for that already exists but is disabled without editor tooling, aka at runtime.

Thank you. Convex decomposition, very interesting... I don't know if that existing code is written in C or GDScript, but I went ahead and took a crack at my own version. It's not perfect but I think it does a pretty good job of copying the behavior of the debug shapes.
Updated code is below if anyone is interested. Still not sure exactly how the colors are picked, but I just made a palette that cycles through. Thanks!
`@tool
class_name PolyShader
extends CollisionPolygon2D
Blend Mode
Debug collision polygons do not appear to use regular alpha mix blend mode
So we apply this CanvasItemMaterial with blend_mode = Premult Alpha
And assign polygon color alpha of 0.5 to match the appearance of the debug shapes
const PREMULT_BLEND = preload("res://premult_blend.tres")
alpha
@export_range (0, 1)
var alpha: float = 0.5
options
@export var draw_convex = true  # draw convex polygons
@export var draw_solid = false  # draw a single solid colored polygon instead of convex polygons
Tool button: press to test script in editor and generate polygons
@export var generate_polygon_button: bool = false:
set(value):
_generate_polygon_button_pressed()
get:
return generate_polygon_button
Color palette for convex polygons
To get these colors you can draw a CollisionPolygon2D over a Black background (ColorRect) in the editor
Then use a color picker software to get the RGB / Hex color
To determine the blending mode and alpha I checked the color against both black and white backgrounds
@export var convex_color_palette: Array[Color] = [
Color("#73120d"),
Color("#3e0d73"),
Color("#0d7369"),
Color("#50730d"),
Color("#730d25"),
Color("#200d73"),
Color("#0d734c"),
Color("#6e730d"),
Color("#730d42"),
]
Color palette for solids
@export var solid_color_palette: Array[Color] = [
Color(1, 0, 0, 0.5),  # Red
Color(0, 1, 0, 0.5),  # Green
Color(0, 0, 1, 0.5),  # Blue
Color(1, 1, 0, 0.5),  # Yellow
Color(1, 0, 1, 0.5),   # Magenta
]
Called when the button is clicked
func _generate_polygon_button_pressed():
regenerate_polygon(self.polygon)
Regenerate the Polygon2D based on the CollisionPolygon2D's polygon
func regenerate_polygon(polygon_points: Array):
draw_solid_polygons(polygon_points)
draw_convex_polygons(polygon_points)
Draw a solid polygon
func draw_solid_polygons(polygon_points: Array):
# Search for a child of type Polygon2D
var polygon2d_node = null
for child in get_children():
if child is Polygon2D:
polygon2d_node = child
break
# If no Polygon2D node exists, create one
if polygon2d_node == null:
polygon2d_node = Polygon2D.new()
self.add_child(polygon2d_node)
	# Set owner in the editor, so we can see it update in the scene tree
	if Engine.is_editor_hint() and get_tree().edited_scene_root != null:
		polygon2d_node.owner = get_tree().edited_scene_root

# Update Polygon2D
polygon2d_node.polygon = polygon_points
polygon2d_node.set_name("Polygon2D")
polygon2d_node.color = solid_color_palette[randi_range(0, solid_color_palette.size()-1)]

# Only show convex polygons; hide the base collision shape with modulate
self.self_modulate.a = 1  # actually this messes up the colors if you make it 0 so leave it at 1

# Visibility
if !draw_solid:
	polygon2d_node.hide()
else:
	polygon2d_node.show()

Function to handle drawing of colored convex polygons
func draw_convex_polygons(polygon_points: Array):
# Remove any existing polygons
for child in self.get_children():
if child.name.begins_with("convex"):
child.queue_free()
# Only draw polygons
if polygon_points.size() < 3:
	print("Polygon must have at least 3 points.")
	return

# Decompose the polygon into convex polygons
var convex_polygons : Array[PackedVector2Array] = Geometry2D.decompose_polygon_in_convex(polygon_points)
if convex_polygons.size() == 0:
	print("Failed to decompose polygon into convex parts.")
	return

# Draw each convex polygon with a color from the color palette
var i = 0
for convex_polygon in convex_polygons:
	# Only draw closed polygon shapes
	if convex_polygon.size() < 3:
		continue

	# Choose a colors in order from the color palette
	var next_color : Color
	next_color = get_wrapped_color(i, convex_color_palette, alpha)

	# Add convex polygon
	var poly_child = Polygon2D.new()
	self.add_child(poly_child)

	# Set owner in the editor, so we can see it update in the scene tree
	if Engine.is_editor_hint() and get_tree().edited_scene_root != null:
		poly_child.owner = get_tree().edited_scene_root

	# Assign polygon and color
	poly_child.set_name("convex_polygon_%s" % str(i))
	poly_child.polygon = convex_polygon
	poly_child.color = next_color

	# Set blending mode
	poly_child.material = PREMULT_BLEND

	# Visibility
	if !draw_convex:
		poly_child.hide()
	else:
		poly_child.show()

	# Inc counter
	i += 1

func rgba_to_hex(color: Color) -> String:
# Convert each channel (R, G, B, A) to a two-character hexadecimal value
var r = "%02x" % int(color.r * 255)
var g = "%02x" % int(color.g * 255)
var b = "%02x" % int(color.b * 255)
var a = "%02x" % int(color.a * 255)
# Concatenate to form the hexadecimal string
return "#%s%s%s%s" % [r, g, b, a]

func get_wrapped_color(i: int, color_array: Array, color_alpha: float) -> Color:
if color_array.size() == 0:
	return Color.WHITE  # Return a default color if the palette is empty

# Get next wrapped color
var index = i % color_array.size()
var next_color : Color = color_array[index]
next_color.a = color_alpha

return next_color

`


UI and UX is confusing

So I've tried inpainting with the photoshop plugin on a couple of occations, but I always end up pretty frustrated. Even after going through the tutorials it's very confusing to me. Maybe that's just me, but I wanted to try and provide some feedback in case you're interested:

Firstly I feel like the plugin creates too many layers automatically, which makes me feel like I lose control and it's hard to understand which layer is for what. For example: The layer used for inpainting is automatically created and I have to use that layer. I would prefer it if I could create the layer myself, name it properly and then drag and drop it to the mask field.

Maybe I'm doing something wrong here, but when I delete some images through the viewer, the layer mask also gets deleted and I have to paint it again.

If I delete a generated image layer directly, there doesn't seem to be a method to also delete that image in the viewer. It's stuck there forever or until I restart photoshop.

Generally it feels like I'm supposed to use the viewer instead of managing my layers, but if that's the case I find that very unintuitive for a photoshop workflow.

I disagree with #1 - however I would have liked some instruction that I was supposed to use that auto-generated inpainting mask, it took me a while before I realized I needed to do my masking there.

I while ago I suggested to look at stable.art on how they do it, because in stable.art masking needs only the lasso tool and hit generate. Everything else needed for the process later is done automatically. Extremely convenient. If Auto Photoshop StableDiffusion plugin would adopt this, it would be a perfect plugin for me.
But unfortunately there seems no interest in making this easier to use because I never got a feedback on that. 😔

I disagree with #1 - however I would have liked some instruction that I was supposed to use that auto-generated inpainting mask, it took me a while before I realized I needed to do my masking there.

I mainly don't want the mask to get automatically deleted when I discard an image.


E1211 07:19:48.090611 00006 watch.go:43] Watch subnets: invalid character 'â' looking for beginning of value

I am using etcd3.0.17 and flannel 0.6.2 in my kubernetes, there are a lot of network error log suddenly in my flannel log:
E1211 07:19:40.077502 00006 watch.go:43] Watch subnets: invalid character 'â' looking for beginning of value
Etcd status is healthy, some output for the etcdctl:
etcdctl --peers https://localhost:2379 ls /cluster.local/network/subnets
/cluster.local/network/subnets/<IP_ADDRESS>-24
/cluster.local/network/subnets/<IP_ADDRESS>-24
/cluster.local/network/subnets/<IP_ADDRESS>-24
/cluster.local/network/subnets/<IP_ADDRESS>-24
If I manually delete the subnets, it will generate a new one, then the error log gone.
I deleted two subnets, and a odd status here:
Pods on the new two subnets vm, can reach each other, but can not reach the other pods on the error logs vms. The pods on the error logs vm can reach each other but can not reach the pods on the two new subnets vm.
New subnet output like this:
{"PublicIP":"x.x.x.x","BackendType":"vxlan","BackendData":{"VtepMAC":"a2:81:90:6c:b0:ef"}}
Erros logs subnet output like this:
{"PublicIP":"x.x.x.x","BackendType":"vxlan","BackendData":{"VtepMAC":"66:1b:f8:95:7f:5c"}}
Looks the same.
I am wondering where to find the invalid character 'â' ? It is very hard to input character like this..

I am wondering where to find the invalid character 'â' ? It is very hard to input character like this..

I think this is some kind of invalid data possibly encoding issue? I have seen this before copying and pasting into shell. This is not visible in the shell but you can see the odd hyphens before endpoints below. So I think the issue is not so much with the character itself. Doesn't answer the question of why but maybe it helps shed a little light.
Error: unknown shorthand flag: 'â' in -—endpoints=http://127.0.01:35262

@garyyang85
As @hexfusion mentioned, it is probably due to bad data or bad encoding rather than etcd itself. I would suggest you open an issue in flannel repo to get more help. Thanks!


Multilingual Translation - language-specific components

❓ Questions and Help
Is there any way of identifying the source/target language inside the transformer_layer.py. I'm trying to have a language specific layer inside each transformer layer when performing multilingual translation with the task translation_multi_simple_epoch. But to do that I need to know which is the current language-pair. Is it possible?

no one knows?

@JoaoMCAlves , did you figure it out? I am also wondering about this.
An ugly way to do that would be to use the --encoder-langtok and --decoder-langtok.


Fix a typo in the README.md file

Fixing a small typo at README.md, regarding the installation command of ALSA on a Debian-based Linux distribution.

thanks


无法加载插件

/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/bin/python /Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot/bot.py
10-16 13:02:50 [SUCCESS] nonebot | NoneBot is initializing...
10-16 13:02:50 [INFO] nonebot | Current Env: dev
10-16 13:02:50 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('<IP_ADDRESS>'), 'port': 8080, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'fastapi_reload': True, 'environment': 'dev'}
10-16 13:02:50 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
10-16 13:02:50 [SUCCESS] nonebot | Succeeded to import "echo"
/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
10-16 13:02:51 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot/bot.py", line 25, in
nonebot.load_plugin('nonebot_plugin_course')
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_course/init.py", line 29, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 165, in require
plugin = load_plugin(name)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)

File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_apscheduler/init.py", line 3, in
from nonebot import export, get_driver
ImportError: cannot import name 'export' from 'nonebot' (/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/init.py)
10-16 13:02:51 [ERROR] nonebot | Failed to import "nonebot_plugin_course"
Traceback (most recent call last):
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot/bot.py", line 25, in
nonebot.load_plugin('nonebot_plugin_course')
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_course/init.py", line 29, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 167, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!
10-16 13:02:51 [WARNING] main | Always use nb run to start the bot instead of manually running!
10-16 13:02:51 [SUCCESS] nonebot | Running NoneBot...
10-16 13:02:51 [DEBUG] nonebot | Loaded adapters: OneBot V11
10-16 13:02:51 [INFO] uvicorn | Will watch for changes in these directories: ['/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot']
10-16 13:02:51 [INFO] uvicorn | Uvicorn running on http://<IP_ADDRESS>:8080 (Press CTRL+C to quit)
10-16 13:02:51 [INFO] uvicorn | Started reloader process [3115] using WatchFiles
10-16 13:02:51 [SUCCESS] nonebot | NoneBot is initializing...
10-16 13:02:51 [INFO] nonebot | Current Env: dev
10-16 13:02:51 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('<IP_ADDRESS>'), 'port': 8080, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': set(), 'nickname': set(), 'command_start': {'/'}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'environment': 'dev', 'fastapi_reload': True}
10-16 13:02:51 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
10-16 13:02:51 [SUCCESS] nonebot | Succeeded to import "echo"
/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
10-16 13:02:52 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
File "", line 1, in
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 265, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot/bot.py", line 25, in
nonebot.load_plugin('nonebot_plugin_course')
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_course/init.py", line 29, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 165, in require
plugin = load_plugin(name)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_apscheduler/init.py", line 3, in
from nonebot import export, get_driver
ImportError: cannot import name 'export' from 'nonebot' (/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/init.py)
10-16 13:02:52 [ERROR] nonebot | Failed to import "nonebot_plugin_course"
Traceback (most recent call last):
File "", line 1, in
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 265, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/xiaoyi-bot/bot.py", line 25, in
nonebot.load_plugin('nonebot_plugin_course')
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot_plugin_course/init.py", line 29, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "/Volumes/ExFAT/Dev_env/PyCharmProjects/None-bot/venv/lib/python3.8/site-packages/nonebot/plugin/load.py", line 167, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!

如果这个时候我再添加一个nonebot_plugin_apscheduler，则会提示重复添加

一般来说 nonebot_plugin_apscheduler 是不需要在加载插件时load的，各插件作者一般都会在require里写好，require 会先去 plugin manager 找这个插件，有了就不加载了。未能成功加载 apscheduler 也许跟nonebot版本有关（？
既然你是在 bot.py 里直接加载插件，那可以先尝试一下在 bot.py 里最先加载 nonebot_plugin_apscheduler，这样如果你的 pyproject.toml 文件里面没有加载nonebot_plugin_apscheduler 的话，应该是不会出现plugin already exists的报错的

大佬这个怎么办

 大佬这个怎么办

已修复，请使用pip install --upgrade命令更新
另，有反馈最好新开一个issue而不是在旧的issue下面评论(

哦哦谢了大佬😬不好意思第一次用没看清


Add an @take(n: Int!) directive

This would allow for only taking the first entry in an iterator, or only taking two, or whatever. This is already possible at the root vertex because you decide how many you want to take from the iterator for execute_query but having something like this in trustfall would enable not consuming an entire iterator of an edge or list.
A recent example would be a linter:
query {
  Run {
    ... on NewExpression {
      arguments @take(n: 1) {

      }
    }
  }
}

Where I only needed the first argument of the arguments iterator.
Alternatives: The best you can hope for is to subclass your iterator to a new edge that has a take edge with edge properties for how many to take, This makes the query and schema much more confusing for not much reason if this can be implemented natively. Example:
query {
  Run {
    ... on NewExpression {
      arguments {
        Take(n: 1) {
          iter {

          }
        }
      }
    }
  }
}

Good idea. We should probably do this.
Regarding the workaround, we can do slightly better: the take argument can be inlined into the parent edge itself instead of being on yet another edge.
query {
  Run {
    ... on NewExpression {
      arguments(take: 1) {
        iter {
          # ...
        }
      }
    }
  }
}


Minify template just once

Instead of minifying the results each time the tag is rendered, minify the template when it is read from the file and never again.

Huh. Never thought of that. Makes sense. :+1:

:tada:


⚠ ClamAV has degraded performance

In 3a927c5, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 178 ms

Resolved: ClamAV performance has improved in d666fed.


Quote generator

Related Issue

Info about Issue or bug
Closes:  #1695
Closes: #[issue number that will be closed through this PR]

Describe the changes you've made
A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know!
It is a quote generator project made using html, css and javascript. On every click to the new quote button a new quote appears on the screen.
Describe if there is any unusual behaviour of your code(Write NA if there isn't)
A clear and concise description of it.
Checklist:

[x ] My code follows the style guidelines of this project.
[ x] I have performed a self-review of my own code.
[ x] I have commented my code, particularly in hard-to-understand areas.
[ x] I have made corresponding changes to the documentation.
[ x] New and existing unit tests pass locally with my changes.

Screenshots
Put any screenshot(s) of the project here.

@Shatakshijain There is already a quote generator


clustermesh: Add cilium status section

Brief status:
ClusterMesh:            1/1 clusters ready, 1 global-services

Verbose status:
ClusterMesh:            1/1 clusters ready, 1 global-services
   cluster2: ready, 2 nodes, 3 identities, 1 services
   └  etcd: 1/1 connected, lease-ID=19b870354bdf4432, lock lease-ID=19b870354bdf4434, has-quorum=true: https://cluster2.mesh.cilium.io:2379 - 3.3.12

This change is

Coverage decreased (-0.02%) to 44.533% when pulling f8c029aed41f7592f0e7214eceb74909b0017d79 on pr/tgraf/clustermesh-status into f5c42e7e0cda0c2a0ee46a8467382c8acc6fd388 on master.

test-me-please

@tgraf I thought this would need backport to 1.7?

I'm OK with that but it's definitely not a bugfix so it would be a feature backport.

Given the outstanding clustermesh bug and the fact that this was written to help debug it, I would be in favour of backporting for v1.7 to help debuggability.


Redo Extraction with Pubtator Data

https://www.ncbi.nlm.nih.gov/research/pubtator3/publication/30301880?text=PMC6177401
https://www.ncbi.nlm.nih.gov/research/pubtator3-api/publications/export/biocxml?pmids=30301880&full=true
Take the paragraph text:
<passage>
<infon key="section_type">INTRO</infon>
<infon key="type">paragraph</infon>

do the extraction only if there is a gene annotation:
<annotation id="22805">
<infon key="identifier">115004</infon>
<infon key="type">Gene</infon>

in a later stage you will do the grounding based on the XML contents using the "<annotation ..." blocks for the paragraph. This should be faster and more accurate with GPT4.
You need LXML to parse the XML; ChatGPT should be able to help.

I have been able to come up with initial results
I am parsing the xml file to get the statement and the annotations, then sending both to the llm. i refined the prompt to take note of this new format.
This is the link to the llm results: https://github.com/ndexbio/llm-text-to-knowledge-graph/blob/main/results/PMC6177401/pub_results_PMC6177401.json
the link to the processed xml file: https://github.com/ndexbio/llm-text-to-knowledge-graph/blob/main/results/PMC6177401/PMC6177401_text_paragraphs.json
then the link to the code that processes it: https://github.com/ndexbio/llm-text-to-knowledge-graph/blob/main/python_scripts/pub.py

i have not made it into a full pipeline yet to run as a command line script, but i am working on that and i would get it done before tomorrow. I am also not processing with indra at the main time because of changes in the text format, being no longer sentences but paragraphs.
i also need to ensure that the llm actually receives both the text and the annotations for the processing
this is the link to the prompt i am using: https://github.com/ndexbio/llm-text-to-knowledge-graph/blob/main/data/prompt_file_v4.txt

@dexterpratt
Next steps to take for the Pubtator extraction as discussed yesterday:

Ensure the annotations are being parsed into the model with the text
Process the xml and filter out entitities without NCBI Homologene or MESH identifiers
Refine the prompt to specifically instruct the llm to extract interactions based on the entities in the annotations
Use the identifiers to get the correct name of the genes

@dexterpratt

[ ] Process the xml and filter out entitities without NCBI Homologene or MESH identifiers
[ ] Ensure the annotations are being parsed into the model with the text
[ ] Refine the prompt to specifically instruct the llm to extract interactions based on the entities in the annotations
[ ] Define function to get the correct text of the entity using the identifier number
[ ] Parse the sentences and annotations to the extraction chain to get the interactions
[ ] Compare results with indra results: parse the sentecnes without the annotations to get the results, then compare the extracted indra results with llm results and use evaluation code to help with comparison