Autotrigger as snippet option

Allows to specify autotriggered in the snippet options, and the snippet is added to the corresponding autosnippet tables. No need anymore to add snippets and autosnippets separately.
TODO:

[ ] run/modify tests
[x] check if autotable functionality (c.f. lua-users) is worth a try (see this PR for work on this)
[ ] add documentation of the new feature

Should solve #482 eventually

@L3MON4D3 regarding the autotables (not handled nicely in a separate repo, but I wanted to do this on a new branch and the PR to merge that branch with this one belongs to the other repo).
I've got the issue, that you preallocate the tables with the 1000 index (see e.g. here).
Is this really necessary (I see no reason why)? (it prevents me from nicely injecting the automagick metatable)

I've got the issue, that you preallocate the tables with the 1000 index (see e.g. here).
Is this really necessary (I see no reason why)? (it prevents me from nicely injecting the automagick metatable)

Oh, no that's not necessary, it's just that 1000 is the default-priority, so those would probably be created eventually.

Alright, we should move this sub topic to the other PR (sorry for the confusion with the different branches / PRs)

We need to talk about how to represent the autotriggered key comes down to nil/true/false vs -1,0,1. Using the former one seems most logical, on the other hand checking var == false is always weird (to differ between false and nil). The latter one simplifies adding more values (to store how the key was set, even if I don't really can think of a use of this right now).
What is your opinion about this?

I'd also prefer using nil+true/false, but we cannot have any nil-values inside the snippets, due to snippetProxy:
It's used to delay parsing of lsp-snippets until they are actually needed (eg. until just before expansion). This is done by parsing it on __index, so as soon as some value that is not available in the snippetProxy already is accessed, it's parsed.
We want to prevent parsing them on eg. add_snippets, so if autotriggered is nil at that point, it will trigger parsing of all of those snippets :/
(I hope that made sense :sweat_smile:)
Soooo, we'll have to replace at least nil with some other value, I think -1, 0, 1 makes most sense since 0,1 is synonymous with false,true, and I can at least see how -1 might mean undefined.

Yes makes kinda sense (but I'm not that into the lsp-snippet stuff.

So I think implementing this is done (or anything else open?). Now I'm gonna have a look at the tests and the docs.
After that, I'd plan to keep this PR pending until #514 is merged (this way the adjustments to use auto creating tables with this feature happens in here, I consider this nicer than the other way round).

Now I'm gonna have a look at the tests and the docs.

The failing test seems to be due to snippetProxy getting instantiated again... mhmmmm I'll take a look, that shouldn't happen

Ahhh, autotriggered just has to be whitelisted in snippetProxy, just like priority.
(look for license_to_nil :P)

After that, I'd plan to keep this PR pending until #514 is merged (this way the adjustments to use auto creating tables with this feature happens in here, I consider this nicer than the other way round).

Sounds good :+1:

Speaking of license. As this idea comes from the lua-users wiki, should we add some acknowledgement/appreciation for the authors (mentioned in the article) somewhere? (like I already said, I'm new to open source contributing and don't know exactly the code of conduct)

xD
Yeah, that's true, I think it's okay to add a comment above the metatable-definition, "idea from ..."

Oups wrong PR, should have been in #514

Yeah, let's go :D
Rebase would be great :+1:
Tests... yeah, just the usual, check that the new functionality actually works (either via integration (add_snippet_spec.lua) or unit-test)
Doc, you can append to the existing entry on SNIPPET, maybe mention it in add_snippets as well, for the key that sets all snippets to autosnippets (the behaviour for conflicting values would be important to mention)

Hm, I'm still not quite satisfied with the naming, autotriggered as option is kinda long and annoying to type. Nevertheless, it describes the option quite well. Do you have any other suggestions? (I just took the name to have something at first, but now I can't think of some other name which still is consistent with the other options)

Failing tests:

../../tests/integration/snippet_basics_spec.lua:353: Row 1 did not match.: Jumping back into the snippet doesn't seem to be working.

Expected:
  |*a[a[]ab^]ab                                        |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |
Actual:
  |*a[a[]ab]a^b                                        |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |

../../tests/integration/dynamic_spec.lua:271: Row 1 did not match.: To be honest, I've got no Idea on this one

 Expected:
  |*c^cc                                               |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |
Actual:
  |*c^c                                                |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |

Maybe autosnippet?
Alternatively, we don't have to use a boolean, we could do something like type="snippet"/"autosnippet", or snippet_type="regular"/"auto", but tbh, bool seems nicer, and I don't think we'll need more types in the future (although this has already bitten us a bit with regTrig, which will become such a type-like field)
Maybe recommend using extend_decorator (see doc), setting autotriggered is a prime-target for that functionality.

Failing tests:

../../tests/integration/snippet_basics_spec.lua:353: Row 1 did not match.: Jumping back into the snippet doesn't seem to be working.

Expected:
  |*a[a[]ab^]ab                                        |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |
Actual:
  |*a[a[]ab]a^b                                        |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |

../../tests/integration/dynamic_spec.lua:271: Row 1 did not match.: To be honest, I've got no Idea on this one

 Expected:
  |*c^cc                                               |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |
Actual:
  |*c^c                                                |
  |{0:~                                                 }|
  |{2:-- INSERT --}                                      |

Agh, those are a bit broken, I'm not sure why (at least the upper one I've seen fail/not fail on the same commit)

Yeah, all's well again on a34cc52
Not sure what's causing them, but I suspect the testing-framework

Ah this would explain why it works for me locally

Yup, don't worry about those :D

Maybe recommend using extend_decorator (see doc), setting autotriggered is a prime-target for that functionality.

Didn't knew about this, but sounds pretty nice (if not already used using s/as for snippet/auto snippet creation sounds reasonable for "standard setup").

Man, these stupid decisions where the options are soooooo close together :|
autosnippet is to-the-point, but type is more "neutral" (I hope you know what I mean, if not I'll try my best to explain it xD), and I think I prefer it a tiny bit because of that.
type also fits a taaad better with existing api, as you said, but it's also a bit more ambiguous, so highlighting what type does in the doc would be important.
I don't get what you meant with "parse something like snippet+otherTypeOption", could you elaborate there?

Ah I think I understand, autosnippet is already kinda "biased" (ans reading quickly over a snippet where the word autosnippet occurs in the options (even if there's written false afterwards), one might think about the snippet the wrong way (maybe :shrug:))

I don't get what you meant with "parse something like snippet+otherTypeOption", could you elaborate there?

If other "types of types" come up which claim the same option (like using the type option to configure autosnippets and regTrigs), one could of course merge these in on type option by using something like snippet+regTrig or autosnippet+noRegTrig, something like that.
So the argument was not to use the type option to prevent any clashes like this in the first place.
On the other hand you're right, type just fits in so nicely and the way this plugin is written its really normal snippets and autosnippets as two basic types. Every other type-like stuff will always be just a "sub-type" (hierarchically speaking below the (auto)snippet typing).
So I think we're closing in on the type option after all (you've got me convinced ^^).

Ah I think I understand, autosnippet is already kinda "biased" (ans reading quickly over a snippet where the word autosnippet occurs in the options (even if there's written false afterwards), one might think about the snippet the wrong way (maybe shrug))

Yeeah, exactly. Why call it autosnippet, and not snippet? That whole conundrum is avoided with type

If other "types of types" come up which claim the same option (like using the type option to configure autosnippets and regTrigs), one could of course merge these in on type option by using something like snippet+regTrig or autosnippet+noRegTrig, something like that. So the argument was not to use the type option to prevent any clashes like this in the first place.
On the other hand you're right, type just fits in so nicely and the way this plugin is written its really normal snippets and autosnippets as two basic types. Every other type-like stuff will always be just a "sub-type" (hierarchically speaking below the (auto)snippet typing).

Mhmmm okay, we'll have to use a different name for the trigger-type (probably trigType). Now, I'm not sure which is nicer (in the future), snippetType and trigType (autotrigger and trigger-type are orthogonal), or type and trigType (trigger-type is a subtype to autotrigger, as you suggested).
For this one, I really don't care, just wanted to mention the differences from my POV.
(collapsing the type-options into one string is interesting, it's close to what ultisnips is doing. Might be cool to implement an option that takes a string like that, for quick compatibility :D)

So I think we're closing in on the type option after all (you've got me convinced ^^).

Ayyyy :D

(collapsing the type-options into one string is interesting, it's close to what ultisnips is doing. Might be cool to implement an option that takes a string like that, for quick compatibility :D)

To be honest, not a big fan of this one, as the mapping which setting goes to which option has to be positional (at least if it's the way I think of it right now) so introducing default values or giving just one setting seems pretty ugly. But that should be part of another issue/PR, not this one.
Just mentioning it again, since if you already are thinking about this the type key is the only logical key for such a general option. Thus we really should "reserve" it for that purpose and go with snippetType (sorry for the many changes of mind on my
So I'll quickly rename the keys in the code and in the docs. Not sure if you want to have a final look at the change before I squash the commits and merging afterwards.

To be honest, not a big fan of this one, as the mapping which setting goes to which option has to be positional (at least if it's the way I think of it right now) so introducing default values or giving just one setting seems pretty ugly. But that should be part of another issue/PR, not this one.

Yeah, not in this PR, I just have to immediately write down ideas I have :sweat_smile:
(just to quickly explain: we accept a string, if it contains eg. A, the snippet is a autosnippet, if not a regular one. b for expanding at beginning of line only, r for regex-triggers. Could be an alternative (no, extension! merging options could be fiddly, but doable) to the rather "long" options we have right now)

Thus we really should "reserve" it for that purpose and go with snippetType (sorry for the many changes of mind)

definitely no worries at all, it doesn't hurt to consider multiple options (tbh, I also think snippetType is the safer option)
Just squash, I'll check the result :D

Oh and just a sort note. I'll just use snippetType for indexing the by_... tables (if the strings are already presents, why not). I just have to switch from the singular form (much more comprehensive in configuring s({snippetType="autosnippets"}) is kinda weird) to the plural form (otherwise direct indexing doesn't work). (of course using asserts to ensure only valid values are present).
And due to string interning (at least I hope luajit does this (PUC lua does it to my knowledge)) this shouldn't pose a problem

Should be finally finished. If you still want to have a look at the single commits, you can look at this branch (I like to at least keep the atomic commits somewhere around for a while).

So this is the end of the development of this feature (all in all it took quite some time in the end, even when looking at the code its pretty few changes). It was fun working with you and discussing things (maybe at some points to much in detail ^^) (I'm not really used to projects which I don't do completely on my own).
And thanks for your input on the design decisions :+1:

Oh and just a sort note. I'll just use snippetType for indexing the by_... tables (if the strings are already presents, why not). I just have to switch from the singular form (much more comprehensive in configuring s({snippetType="autosnippets"}) is kinda weird) to the plural form (otherwise direct indexing doesn't work). (of course using asserts to ensure only valid values are present). And due to string interning (at least I hope luajit does this (PUC lua does it to my knowledge)) this shouldn't pose a problem

Oh yeah, that's nice :+1:
I like the additional asserts, we should be much more generous with stuff like that :D

Should be finally finished (2nd force push was the rebase on master).

Yessss looks good :tada::tada:
It really took quite some time :sweat_smile: But I think this is a really nice addition, so it was worth it (& I'm very happy with the interface we now have to it, Plus: autotables make adding snippets much easier) (Also, I guess it took a bit longer than usual just because of the autotables, which are a finnicky and require a lot of attention to detail)
You're right, we did discuss some things a bit too much, but I really think that leads to better results (even though it takes a bit longer to get there)

And thanks for your input on the design decisions :+1:

Always :P
Thanks a lot for your work, and your patience especially :D


Added Support For ByteArray Image Loading

This is an attempt to add support for loading byte array in the image loading preprocessing DSL.
This PR is not ready yet, there are still big design changes needed but it can start a discussion.
Relates to issue https://github.com/JetBrains/KotlinDL/issues/321

Hi, thank you for the PR. The functionality of preprocessing images already loaded into the memory is indeed very useful. But in my opinion, it should be implemented differently. In my mind, the process of loading images (from files or other sources) should in some form be a part of the dataset, not preprocessing, as it looks like the knowledge about the source of the images is intrinsic to the dataset implementation. Take for example OnFlyImageDataset. It already heavily depends on the preprocessing loading stage as it keeps files with images in the field and uses them to load data on the fly (see OnFlyImageDataset#init). In principle, this code could be changed to load images from elsewhere, but having images as byte arrays in memory would defy the purpose of this class. The other Dataset implementation, OnHeapDataset can actually be made to work with byte arrays. To do so, one can implement a method similar to  OnHeapDataset#create, but without accessing loading stage of the preprocessing function (and probably asserting it to be not set) and just accepting images as a parameter.
If loading stage is moved out preprocessing, then preprocessing would become just a filter able to work on any images, either from a dataset or loaded manually from any sources.
What do you think about this approach?

Hello @juliabeliaeva , I very much prefer your approach and I agree with the fact that the dataset has the responsibility to load the data therefore it would make more sense to have it implemented in the dataset (and it might simplify the implementation).
I have not looked into OnHeadDataset too much, in fact this was the last thing to check for my proposal but I will scrap the proposal and follow your suggestion to make the changes mostly in the Dataset objects instead.
Just a remark, I think it's important to think about an approach that will be easily grasped whether you want to preprocess for training or for inference. My initial thought was to implement it in the Loading preprocessing because the examples propose to use only the preprocessing dsl when we just want to preprocess an image for inference for instance.
Your idea of having it in the Dataset object makes perfect sense but let's not forget to update the examples and make it clear that whether you want to preprocess for training or inference, you gotta create a Dataset object.


[SPARK-49640][PS] Apply reservoir sampling in SampledPlotBase

What changes were proposed in this pull request?
Apply reservoir sampling in SampledPlotBase
Why are the changes needed?
Existing sampling approach has two drawbacks:
1, it needs two jobs to sample max_rows rows:

df.count() to compute fraction = max_rows / count
df.sample(fraction).to_pandas() to do the sampling

2, the df.sample is based on Bernoulli sampling which cannot guarantee the sampled size == expected max_rows, e.g.
In [1]: df = spark.range(10000)

In [2]: [df.sample(0.01).count() for i in range(0, 10)]
Out[2]: [96, 97, 95, 97, 105, 105, 105, 87, 95, 110]

The size of sampled data is floating near the target size 10000*0.01=100.
This relative deviation cannot be ignored, when the input dataset is large and the sampling fraction is small.
Does this PR introduce any user-facing change?
No
How was this patch tested?
CI and manually check
Was this patch authored or co-authored using generative AI tooling?
No

will send separate PR for the new dataframe plotting

Thank you @zhengruifeng !

Merged to master.

I’m wondering if this is considered a “user-facing change” since the sampling directly affects the appearance of the plot

hmm, I don't think this is a “user-facing change” because:
1, it only take affect when number of rows > max_rows;
2, it is just another (better) implementation of uniform sampling;

thanks, merged to master


Not working for material-ui@next

babel-plugin-direct-import version: 0.4.0
material-ui version: 1.0.0-beta.18
I've double and triple checked that my code is not importing the List,Menu, and Popover components but they're still showing up when I run source-map-explorer to investigate bundle size.

Hello @Graham42 !
This plugis was built for material-ui@next in first place. So it should work with zero-configuration.
Please check you dependency graph with webpack analyze tool.

Also, maybe it's worth to check with one of source-map-explorer analogues .

I tried those 3 tools and they all reported the same result.
I've narrowed this down to the TextField component. I've created a minimal case you can verify for yourself if you like. https://github.com/Graham42/bug-babel-direct-import-material-ui-next
Just run
npm run build
npm run stats

If you import just Button for example. The plugin works correctly. It's just once I have the TextField that it bundles a bunch extra.

Here my result:

From this we can see that not all modules included, but only (I will skip obvious ones):

ButtonBase
List
Modal
Form
Select
Popover
Menu

I checked TextField dependencies:
import React from 'react';
import warning from 'warning';
import type { ChildrenArray, Node } from 'react';
import Input, { InputLabel } from '../Input';
import FormControl from '../Form/FormControl';
import FormHelperText from '../Form/FormHelperText';
import Select from '../Select/Select';

Now trail leads to Select component dependencies:
import React from 'react';
import type { ChildrenArray, Element } from 'react';
import warning from 'warning';
import SelectInput from './SelectInput';
import withStyles from '../styles/withStyles';
import Input from '../Input'; // Import to enforce the CSS injection order
import { isMuiElement } from '../utils/reactHelpers';

And SelectInput dependencies:
import React from 'react';
import type { Element, Node } from 'react';
import classNames from 'classnames';
import keycode from 'keycode';
import warning from 'warning';
import Menu from '../Menu/Menu';
import { isDirty } from '../Input/Input';
import ArrowDropDownIcon from '../svg-icons/ArrowDropDown';

And finally Menu dependencies:
import React from 'react';
import type { Node } from 'react';
import { findDOMNode } from 'react-dom';
import getScrollbarSize from 'dom-helpers/util/scrollbarSize';
import withStyles from '../styles/withStyles';
import Popover from '../Popover';
import MenuList from './MenuList';
import type { TransitionCallback } from '../internal/transition';

With MenuList dependencies:
import React from 'react';
import type { Node } from 'react';
import { findDOMNode } from 'react-dom';
import keycode from 'keycode';
import contains from 'dom-helpers/query/contains';
import activeElement from 'dom-helpers/activeElement';
import ownerDocument from 'dom-helpers/ownerDocument';
import List from '../List';

I wish this example will help you understand why you have unimported code in your app.
Have a nice hacking!

That's unfortunate that components unrelated to my simple use case are getting pulled in. Thanks for your help. I've open https://github.com/mui-org/material-ui/issues/9262 to hopefully improve this.


Add University of Regina

bd157840cbf91eee05a89871723127684a7825ba

bd157840cbf91eee05a89871723127684a7825ba

domain<EMAIL_ADDRESS>website: www.uregina.ca
cs website: www.uregina.ca\science\cs

@CathyCat87 I am sorry, the domain uregina.ca is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


Fix fla url

Reposting this for preview
fsfe option in query string and button fixed other options are taken correctly from query, but not displayed

Closing, because this PR is outdated and wrong.


Fixed ugly layer with a nice cobalt color

I fixed the issue of the ugly green layer color.
I added a nice vs-code cobalt theme look to the layer selection.
Changed this file: src/airunner/pyqt/layer.ui

The ticket was referring to the background color green of the selected layers as seen in this screen shot. I may have given you the wrong line number...

also the border color looks purple on my end not blue for some reason

ok

i will put the rest on a new pull request

ii will put the other code on a new pull request


[Monitoring] Verify and test reward mechanism

From @merula89 :
There is a bug in the current way we wanted to detect rewards. On the farmer machine there is no winning msg. On the harvester (which is winning) there is the following in the debug.log file:
2021-07-18T16:03:54.450 harvester chia.harvester.harvester: INFO 9 plots were eligible for farming d914cb09bb... Found 1 proofs. Time: 1.10663 s. Total 4014 plots 2021-07-18T16:03:54.451 harvester harvester_server : DEBUG -> new_proof_of_space to peer <IP_ADDRESS> 30f9e4f1c0d11807edc8f82f38411b46d149ac4a5690a524389cb6f52b2fd596

I checked the database after finding a reward and indeed the reward count is updated correctly @merula89


energy: iio-capture integration

This is a continuation of #72.
Fixes/changes requested in that PR have been added.
close #72

I've just pushed a new commit to support multiple channels (i.e. multiple probes)

Can you just push a fresh new patch, reviewing this one is quite confusing.
Moreover, we do not need to keep track the previous version of the patch while you can still give credit by adding a "suggested-by" tag in the commit message ;-)

Will push a branch with some patches to back-port, fixing previous comments, and some other to stack on top, adding some new interesting feature...


error: name '_C' is not defined in ms_deform_attn.py

/data# /usr/bin/python3 /data/pratibha/GroundingDINO/Dino.py
/data/pratibha/GroundingDINO/groundingdino_swint_ogc.pth ; exist: True
/data/pratibha/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py ; exist: True
/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")
/usr/local/lib/python3.8/dist-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)
return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
final text_encoder_type: bert-base-uncased
/usr/local/lib/python3.8/dist-packages/transformers/modeling_utils.py:962: FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
warnings.warn(
Traceback (most recent call last):
File "/data/pratibha/GroundingDINO/Dino.py", line 26, in
boxes, logits, phrases = predict(model=model, image=image, caption=TEXT_PROMPT, box_threshold=BOX_TRESHOLD, text_threshold=TEXT_TRESHOLD)
File "/data/pratibha/GroundingDINO/groundingdino/util/inference.py", line 68, in predict
outputs = model(image[None], captions=[caption])
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py", line 327, in forward
hs, reference, hs_enc, ref_enc, init_box_proposal = self.transformer(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 258, in forward
memory, memory_text = self.encoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 576, in forward
output = checkpoint.checkpoint(
File "/usr/local/lib/python3.8/dist-packages/torch/_compile.py", line 24, in inner
return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/_dynamo/eval_frame.py", line 489, in _fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/_dynamo/external_utils.py", line 17, in inner
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/checkpoint.py", line 482, in checkpoint
return CheckpointFunction.apply(function, preserve, *args)
File "/usr/local/lib/python3.8/dist-packages/torch/autograd/function.py", line 553, in apply
return super().apply(*args, **kwargs)  # type: ignore[misc]
File "/usr/local/lib/python3.8/dist-packages/torch/utils/checkpoint.py", line 261, in forward
outputs = run_function(*args)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py", line 785, in forward
src2 = self.self_attn(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 338, in forward
output = MultiScaleDeformableAttnFunction.apply(
File "/usr/local/lib/python3.8/dist-packages/torch/autograd/function.py", line 553, in apply
return super().apply(*args, **kwargs)  # type: ignore[misc]
File "/data/pratibha/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py", line 53, in forward
output = _C.ms_deform_attn_forward(
NameError: name '_C' is not defined
This error is being flashed everytime i try to find the output for the task.

Hey, did you figure out what was causing the error? I am getting the same error but $CUDA_HOME is set correctly in the environment.

我也有同样的问题

Hey, I'm also getting this error and not sure why.

I'm also getting this error and not sure why. @GPY11 @Abhishek-Iyer1 did you figure it out? @bhandaripratibha06 mind sharing how you resolved it?

If you have a CUDA environment, please make sure the environment variable CUDA_HOME is set. It will be compiled under CPU-only mode if no CUDA available.
Please make sure following the installation steps strictly, otherwise the program may produce:
NameError: name '_C' is not defined
If this happened, please reinstalled the groundingDINO by reclone the git and do all the installation steps again.
how to check cuda:
echo $CUDA_HOME
If it print nothing, then it means you haven't set up the path/
Run this so the environment variable will be set under current shell.
export CUDA_HOME=/path/to/cuda-11.3
Notice the version of cuda should be aligned with your CUDA runtime, for there might exists multiple cuda at the same time.
If you want to set the CUDA_HOME permanently, store it using:
echo 'export CUDA_HOME=/path/to/cuda' >> ~/.bashrc
after that, source the bashrc file and check CUDA_HOME:
source ~/.bashrc
echo $CUDA_HOME
In this example, /path/to/cuda-11.3 should be replaced with the path where your CUDA toolkit is installed. You can find this by typing which nvcc in your terminal:
For instance, if the output is /usr/local/cuda/bin/nvcc, then:
export CUDA_HOME=/usr/local/cuda

Windows solution, I found that this module uses the same attention module as deformable detr, so if you've used deformable detr you can change the
from groundingdino import _C
to
import MultiScaleDeformableAttention as _C

Hey, did you figure out what was causing the error? I am getting the same error but $CUDA_HOME is set correctly in the environment.

me too, $CUDA_HOME is right, and there is _C.cpython-310xxxx file in groundingdino. Did you solve it?


Sync with master

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/Create-Packages/Source-and-Config-File-Transformations.md
:white_check_mark:Succeeded

docs/Tools/Package-Manager-UI.md
:white_check_mark:Succeeded

docs/Visual-Studio-Extensibility/Visual-Studio-Templates.md
:white_check_mark:Succeeded

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


Update setup-go to be able to cache

Fixes: #73
Updating setup-go become enabling cache.
https://github.com/actions/setup-go#v4

Thank you for the contribution @u5surf 💯


new(cmake,ci): added support for using jemalloc allocator instead of glibc one

What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area build
/area CI
What this PR does / why we need it:
The jemalloc allocator is enabled by default for published packages.
We never really tried different allocators, but https://github.com/falcosecurity/falco/issues/2495#issuecomment-2479020521 seems to suggest that jemalloc can help us prevent memory starving the system.
Also, jemalloc allows us to customize is behavior and profile the application via malloc.conf (https://github.com/jemalloc/jemalloc/wiki/Getting-Started).
For example:
sudo MALLOC_CONF="prof:true,lg_prof_interval:30,prof_accum:false,prof_prefix:jeprof.out,prof_final:true" falco

Future work might involve supporting malloc_stats_print as part of Falco stats/metrics system.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

new(cmake,ci): added support for using jemalloc allocator instead of glibc one and use it by default for release artifacts

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/milestone 0.40.0

CI Build / test-dev-packages / test-packages (pull_request) Failing after 2m

There must be some issues with sanitizer + jemalloc i think :/

/cc @sgaist


Atlas Kubernetes Operator, getting error when migration has "CREATE INDEX CONCURRENTLY"

Atlas Kubernetes Operator with 0.2.0 in k8s v1.25.11
When applying migrations containing:
apiVersion: v1
kind: ConfigMap
metadata:
  name: migrationdir-psql
data:
<PHONE_NUMBER>5510_create_tables.sql: |
    -- Add new schema named "cd"
    CREATE SCHEMA "cd";
    -- Create "facilities" table
    CREATE TABLE "cd"."facilities" ("facid" integer NOT NULL, "name" character varying(100) NOT NULL, "membercost" numeric NOT NULL, "guestcost" numeric NOT NULL, "initialoutlay" numeric NOT NULL, "monthlymaintenance" numeric NOT NULL, PRIMARY KEY ("facid"));
    -- Create "members" table
    CREATE TABLE "cd"."members" ("memid" integer NOT NULL, "surname" character varying(200) NOT NULL, "firstname" character varying(200) NOT NULL, "address" character varying(300) NOT NULL, "zipcode" integer NOT NULL, "telephone" character varying(20) NOT NULL, "recommendedby" integer NULL, "joindate" timestamp NOT NULL, PRIMARY KEY ("memid"), CONSTRAINT "members_recommendedby_fkey" FOREIGN KEY ("recommendedby") REFERENCES "cd"."members" ("memid") ON UPDATE NO ACTION ON DELETE SET NULL);
    -- Create "bookings" table
    CREATE TABLE "cd"."bookings" ("bookid" integer NOT NULL, "facid" integer NOT NULL, "memid" integer NOT NULL, "starttime" timestamp NOT NULL, "slots" integer NOT NULL, PRIMARY KEY ("bookid"), CONSTRAINT "bookings_facid_fkey" FOREIGN KEY ("facid") REFERENCES "cd"."facilities" ("facid") ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT "bookings_memid_fkey" FOREIGN KEY ("memid") REFERENCES "cd"."members" ("memid") ON UPDATE NO ACTION ON DELETE NO ACTION);
<PHONE_NUMBER>5923_create_indexes.sql: |
    -- Create index "bookings.facid_memid" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.facid_memid" ON "cd"."bookings" ("facid", "memid");
    -- Create index "bookings.facid_starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.facid_starttime" ON "cd"."bookings" ("facid", "starttime");
    -- Create index "bookings.memid_facid" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.memid_facid" ON "cd"."bookings" ("memid", "facid");
    -- Create index "bookings.memid_starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.memid_starttime" ON "cd"."bookings" ("memid", "starttime");
    -- Create index "bookings.starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.starttime" ON "cd"."bookings" ("starttime");
    -- Create index "members.joindate" to table: "members"
    CREATE INDEX CONCURRENTLY "members.joindate" ON "cd"."members" ("joindate");
    -- Create index "members.recommendedby" to table: "members"
    CREATE INDEX CONCURRENTLY "members.recommendedby" ON "cd"."members" ("recommendedby");
  atlas.sum: |
    h1:xTbw3AxHRH3YSW7dOGteMxvcigM3f/Y7pdkwwScmbGM=
<PHONE_NUMBER>5510_create_tables.sql h1:BWXssdgcYxJcYSNOaK7bYlhgB5LsumtrNXiBfkC3HiU=
<PHONE_NUMBER>5923_create_indexes.sql h1:WQxGEQSGBr+QCZQB+/cRZ84Ei8Br2iJ9nbwC9/k2oW8=

We get:
Name:         atlasmigration-psql1
Namespace:    databases
Labels:       <none>
Annotations:  <none>
API Version:  db.atlasgo.io/v1alpha1
Kind:         AtlasMigration
Metadata:
  Creation Timestamp:  2023-07-17T17:18:37Z
  Generation:          1
  Managed Fields:
    API Version:  db.atlasgo.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:dir:
          .:
          f:configMapRef:
        f:urlFrom:
          .:
          f:secretKeyRef:
    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2023-07-17T17:18:37Z
    API Version:  db.atlasgo.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:conditions:
        f:lastApplied:
        f:observed_hash:
    Manager:         manager
    Operation:       Update
    Subresource:     status
    Time:            2023-07-17T17:22:23Z
  Resource Version:  53914104
  UID:               6c0ed890-5cbe-4383-85c3-ae9ff072b43a
Spec:
  Dir:
    Config Map Ref:
      Name:  migrationdir-psql
  URL From:
    Secret Key Ref:
      Key:   url
      Name:  psql1-creds
Status:
  Conditions:
    Last Transition Time:  2023-07-17T17:18:37Z
    Message:               sql/migrate: sql/migrate: execute: executing statement "CREATE INDEX CONCURRENTLY \"bookings.facid_memid\" ON \"cd\".\"bookings\" (\"facid\", \"memid\");" from version "20230712165923": pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block: sql/migrate: execute: write revision: pq: current transaction is aborted, commands ignored until end of transaction block
    Reason:                Reconciling
    Status:                False
    Type:                  Ready
  Last Applied:            0
  observed_hash:
Events:                    <none>

Same result for 11, 13, 15 PostgreSQLs spinning with CNPG Operator.

I think setting txmode to none in this current file should solve the issue, because the default behavior is running each file within a transaction. See: https://atlasgo.io/versioned/apply#file-level-transaction-mode
Can you try this and report if that solves the issue?

I've tried using https://atlasgo.io/versioned/apply#file-level-transaction-mode
<PHONE_NUMBER>5923_create_indexes.sql: |
    -- atlas:txmode none
    -- Create index "bookings.facid_memid" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.facid_memid" ON "cd"."bookings" ("facid", "memid");
    -- Create index "bookings.facid_starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.facid_starttime" ON "cd"."bookings" ("facid", "starttime");
    -- Create index "bookings.memid_facid" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.memid_facid" ON "cd"."bookings" ("memid", "facid");
    -- Create index "bookings.memid_starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.memid_starttime" ON "cd"."bookings" ("memid", "starttime");
    -- Create index "bookings.starttime" to table: "bookings"
    CREATE INDEX CONCURRENTLY "bookings.starttime" ON "cd"."bookings" ("starttime");
    -- Create index "members.joindate" to table: "members"
    CREATE INDEX CONCURRENTLY "members.joindate" ON "cd"."members" ("joindate");
    -- Create index "members.recommendedby" to table: "members"
    CREATE INDEX CONCURRENTLY "members.recommendedby" ON "cd"."members" ("recommendedby");

but still getting the:
Status:
  Conditions:
    Last Transition Time:  2023-07-17T18:15:58Z
    Message:               sql/migrate: sql/migrate: execute: executing statement "CREATE INDEX CONCURRENTLY \"bookings.facid_memid\" ON \"cd\".\"bookings\" (\"facid\", \"memid\");" from version "20230712165923": pq: CREATE INDEX CONCURRENTLY cannot run inside a transaction block: sql/migrate: execute: write revision: pq: current transaction is aborted, commands ignored until end of transaction block
    Reason:                Reconciling
    Status:                False
    Type:                  Ready

After changing file to:
<PHONE_NUMBER>5923_create_indexes.sql: |
    -- atlas:txmode none

    CREATE INDEX CONCURRENTLY "bookings.facid_memid" ON "cd"."bookings" ("facid", "memid");
    CREATE INDEX CONCURRENTLY "bookings.facid_starttime" ON "cd"."bookings" ("facid", "starttime");
    CREATE INDEX CONCURRENTLY "bookings.memid_facid" ON "cd"."bookings" ("memid", "facid");
    CREATE INDEX CONCURRENTLY "bookings.memid_starttime" ON "cd"."bookings" ("memid", "starttime");
    CREATE INDEX CONCURRENTLY "bookings.starttime" ON "cd"."bookings" ("starttime");
    CREATE INDEX CONCURRENTLY "members.joindate" ON "cd"."members" ("joindate");
    CREATE INDEX CONCURRENTLY "members.recommendedby" ON "cd"."members" ("recommendedby");

Status:
  Conditions:
    Last Transition Time:  2023-07-17T18:20:20Z
    Message:
    Reason:                Applied
    Status:                True
    Type:                  Ready
  Last Applied:<PHONE_NUMBER>
  Last Applied Version:<PHONE_NUMBER>5923
  observed_hash:           d721437cb2fc4821a74764784a86d7feb6e4da758b40df28a7bac07151edf7ec

everything worked as expected. Thanks! Not sure if comments are breaking some parsing.

A file directive should be separated by two newlines from the first statement's comment.
Closing as the issue was resolved. You're more than welcome to join our Discord server in case you need more help with it.

Thanks a lot for your help!

@vmrm
how did you calculate atlas.sum ?
can you explain it to me
atlas.sum: |
h1:xTbw3AxHRH3YSW7dOGteMxvcigM3f/Y7pdkwwScmbGM=
20230712165510_create_tables.sql h1:BWXssdgcYxJcYSNOaK7bYlhgB5LsumtrNXiBfkC3HiU=
20230712165923_create_indexes.sql h1:WQxGEQSGBr+QCZQB+/cRZ84Ei8Br2iJ9nbwC9/k2oW8=

Use atlas migrate hash

@rotemtam
can you give me more details please. im not sure how to use it.
i have a couple of XXX.sql files and i am going to use atlas kubernetes operator to migrate my test database.
i am not sure how to calcute the atlas.sum content in atlas-migrate-configmap.yaml


Make a second pass at removing boot dependency from model providers modules.

Somehow the big PR for removing boot resulted in failing tests we didn't catch, despite best efforts.
The ChatOptions for various models that has @NestedPropertyConfiguration on them now result in test failures.
These are being disabled for now so that we can get the build green and then come back to clean it up in a separate pass.
Search for @Disabled with this issue number.

This is already fixed. Closing the issue.


Rancher v2.2.8 navbar showing different names

Rancher v2.2.8 the navbar is showing the names differently sometimes. Confirmed that it's not only me there are few users experiencing the same.

Same case here, most of the time when having chrome tab opened on Rancher UI, then pc goes asleep and wake up.

Can confirm I've had the same issue. It's been very intermittent so I haven't been able to pinpoint a cause. It does pop up most often in similar cases to the above ^

We will plan to backport this into the 2.3.x series but the fix is already in master.

Available in latest-2.3.

Observed this issue as below in older release

Tested with v2.3-head with UI-index latest-2.3 , did not observe the navigation bar error .


CRA v4 Fast Refresh requires CSP script-src-elem 'unsafe-inline' to be set

Describe the bug
CRA v4 introduced react-refresh, using this with a CSP requires adding script-src-elem 'unsafe-inline' or somehow predicting the added inline scripts hash.
Obviously we can disable CSP (or add 'unsafe-inline' to the script-src-elem directive) for development, and still keep it enabled in all deployed environments where this isn't an issue. But it would be great to be able to have a strict CSP enabled even in development, to help detect violations earlier.
Environment
  System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 12.21.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Edge: Not Found
    Firefox: 86.0.1
    Safari: 14.0.3
  npmPackages:
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    react-scripts: ^4.0.3 => 4.0.3
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

Run npx create-react-app my-app to create a sample app.
Add a strict CSP to <head> in index.html e.g.

    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'">

Start the app with npm start and open the site in some CSP-capable browser.
Edit App.js triggering react-refresh.

Expected behavior
Reload without CSP violation.
Actual behavior
CSP reports a violation of the script-src-elem 'self' directive.
Reproducible demo
See steps to reproduce.

The changes in how fast-refresh works in CRA v5 seem to have fixed this. The new method will instead require adding connect-src 'self' which is much more acceptable to me, and is in fact already necessary for my current project where I initially encountered this issue.


AttributeError: 'NoneType' object has no attribute 'group'

Hello,
I am trying to run the script in my environment and getting the following issue with Lenovo disccovery:
[+] Checking warranty "PF0YGGMG,PC0YMT12,PC041X7D,PC0KEL3C,PC04W5AY,PC04W5AU,PC0DLDYY,PC0EAMV2,PC0KEL2Y,PC04W5AZ,PC050NXP,PC0EAMVM,PF0QRJD8,PC0EAMWF,PC0RKQ3X,PC0SYDM2,PC0RKQ46,PC0RKQ2S,PC0RKQ2J,PC0RKQ3S,PC090UQ8,PC050NXU,PC0DLDW3,PC090UMB,PC050P06,PC0SYDLC,PC090UQ9,PC0EAMW8,PC041X77,PC0DLDW1,PF0XPPKU,PF0YGJTC,PC0E4ZGB,PF0REZ9Y,PF0ZJ9A5,PF0L02C8,PF0ZJ9AK,PF0ZJ99D"
[+] Checking possible product "PF0YGGMG"
Traceback (most recent call last):
File "starter.py", line 155, in
loader(vendor, vendor_api, d42_rest)
File "starter.py", line 92, in loader
result = vendor_api.run_warranty_check(inline_serials)
File "C:\Users\dbrodsky\denis\Files\warranty_ibm_lenovo.py", line 100, in run_warranty_check
json_object = json.loads(data_object.group(1))
AttributeError: 'NoneType' object has no attribute 'group'

Hello Denis, I am currently updating the standalone script and making sure that it is still functional for all vendors. Are you still experiencing this issue or were you able to resolve this problem.

issue has been replicated, Lenovo has updated their API and the warranty script needs to be updated.

PR in progress


Add forge lint

This is a tracker for additional static analysis beyond what solc outputs. Static analysis can apply to things like safety, optimization and code style. Currently a few projects implement different components and aspects

https://github.com/crytic/slither
https://github.com/eth-sri/securify2
https://github.com/trailofbits/manticore
https://github.com/ConsenSys/mythril

Most of these tools seem to focus on security. For example securify2 tries to tackle the SWC registry where the solidity compiler fails
I took a brief look at Slither to see the complexity of implementing their Detector list. Each detector loops through the nodes in Slither's own intermediate representation known as SlithIR. SlithIR gets built by visiting the AST output given by crytic-compile. The IR attempts to provide additional data to the AST by adding variable references, scopes and the type information for builtin functions and variables. Internally, the Slither uses a visitor pattern for converting the AST to the IR, which seems to translate fairly nicely to the visitor exposed for solang-parser Parse Tree. I think the real challenge will be to create an incremental IR representation from the Parse Tree ignoring completeness but offering correctness so that we may build the static analysis tool over time. Luckily, the simplicity of Solidity scopes, as well as the strong typing of solidity, should make this a lot easier.

I forgot to add the obvious solhint as well which splits up rules into "Security", "Best Practices", "Style Guide" and "Miscellaneous" found here. It seems to me by briefly looking through their codebase and the rule-set, that these are pretty much directly applied to the AST and don't even require another IR

Hi @montyly! I think @gakonst would be the best at answering this question, as my opinion here does not necessarily reflect the opinion of the project. That being said, I think the goal here is NOT to replace Slither. This was just an investigation of possible features for a possible tool. The goal of foundry as I have understood it, is to deliver a unified toolkit with a single binary. The power of having linting here in combination with a formatter for example would be able to do easy things such as automatically fixing things like non-underscored locally-scoped variables and such. This may contribute to other things in the toolkit down the road like maybe an LSP or the like. And of course we would like to expand the usefulness of that tool as much as possible, but I don't think we would have the time or resources to expand that scope to where Slither is. I think we just want to reach as many people as possible with easy tools for best practices and security

+1 on not trying to redo all of Slither/SlithIR's work, but if we can get a reasonable set of features just by parsing with solang parser it'd be quite nice. And agree that this has downstream implications on exposing over LSP, auto-fixing etc.

One feature request to add to forge lint is an option for named imports, e.g. preferring import {X} from "A.sol" over import "A.sol"

Hey, yeah I would be happy to integrate solstat into Foundry's build pipeline. Solstat uses the solang-parser to parse solidity contracts and then runs static analysis on the AST to look for various optimizations, QA and exploits. Right now, there is an emphasis on optimizations and QA, with only a few very low severity exploits being identified. There are quite a few new patterns that are queued up to be integrated into the next version, which range from a variety of optimizations, QA and vulns.
It would be really helpful to hear what solstat would need for a smooth integration. For example, is there a preferred way to output the identified patterns that would integrate nicely into Foundry? Right now the build is modular and flexible, so it shouldn't be too hard to adjust to what is needed.
Im also open to any thoughts/ideas that might be useful for a Foundry integration. With all this info, I can prioritize getting the updates integrated and a new version pushed.

From @slvDev in #7668
Description
A static analyzer should be a combination of known issues, common anti-patterns, informational (eg "write better code"), and gas optimization.

known issues
common anti-patterns: eg Unvalidated result of ecrecover()
informational: Style Guides, Complex calculation in expression, etc
gas optimization: eg Optimize storage/struct layout

Suggested lint options

--include - run only on specified files
--exclude - exclude specified files
--include-path - run linter on files matching the specified glob pattern.
--exclude-path - run linter on files that do not match the specified glob pattern.
--format: json | markdown - generate report in json or formatted markdown format
--only-severity: high | med | low | info | gas - use only selected severity for output (can be multiple)
--ignore-severity: high | med | low | info | gas - ignore selected severity (can be multiple)
--with-description - usually description is large, should disable it by default to avoid too long console output.
--show-description: detector title - show description of detector

Suggested output style
Informational: Non-specific Imports
Description(optional): This form is not recommended for use, because it unpredictably pollutes the namespace.
If you add new top-level items inside “filename”, they automatically appear in all files that import like this from “filename”.
It is better to import specific symbols explicitly.
  --> src/Counter.sol:
   |
 3 |   import "./ICounter.sol";
   |           ^^^^^^^^^^^^^^


Recipes: Kalua Pork with Cabbage

added a link to recipes

Looks good, but please pay attention to the capitalization in the PR title as described in the contributing doc in the future.


is_record/2 behaves unexpectedly

In writing tests for the clj:record? macro, I believe I've discovered a bug in LFE.
See this gist for details.
tl;dr
> (defrecord foo a b c d)
set-foo-d
> (is_record #(foo) 'foo)
true

... but #(foo) is not a #foo{}.

Same behaviour on lfe-1.1.1.

This is not really a bug but a glitch in the interface between erlang and LFE.
When you define a record in LFE all the access forms are macros. There is an is-XXX macro for testing if something is a record of a specific type. So for the foo record there is an (is-foo thing) macro which tests if thing is foo record. There is no generic (is-record thing foo).
Now is_record/2 is an erlang BIF. If the erlang compiler knows about the named record type it expands to a test of both tag and size. If it does not know about the record it just becomes a test that the tag is correct. This occurs very early in the erlang compiler so the LFE compiler cannot use it. This is what happens in your example.
I have no obvious solution to this.
http://erlang.org/doc/man/erlang.html#is_record-2

Noted. Perhaps we can/should do the same, i.e. expand to is-foo in clj:record? and cl:recordp.

Closing as a non-issue, or at least an ignorable one. I've added a note in the clj.lfe docs.


Expand Floquet calibration to arbitrary FSim gates

Added a method try_convert_gate_to_fsim which can convert to PhaseCalibratedFSimGate wide range of gates, including sqrt(iSWAP), Sycamore and Controlled-Z gates.
Used this method (instead of try_convert_sqrt_iswap_to_fsim) as default gate translator in all methods in workflow.py.

As a result, compensation step Floquet calibration now works not only for sqrt(iSWAP), but also for:

all FSim gates (including Sycamore gate);
PhasedFSim gates (such that zeta=gamma=0);
all ISwapPow gates;
all PhasedISwapPow gates;
CZPow gates without global phase (including CZ).

This change doesn't affect characterization step the Floquet calibration.

Hi Wojtek, I resolved most of your comments, and rewrote try_convert_gate_to_fsim so it tries to make engine gate as "canonical" as possible, in paricular now theta is in range [0, pi).
I am still not sure how to write good integration test for the new compensation - let's discuss that. Should i expand engine simulator to support arbitrary imperfect FSim gates (and not only sqrt(iSWAP)).

I added a test utilizing the engine simulator. Please take another look.

Hi @mrwojtek, I addressed your comments and added more tests. PTAL.

I addressed issue with global_phase and other suggestions.
@mrwojtek

@balopat can we have approval from code owners from this?


Cannot find module '@angular/core' after new update

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OSX El Capitan
Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node -- version and paste the result here:

Can't run any ng commands all same error
Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Updated the cli from beta 14 to beta 18 using all 6 steps.
ng init and all other ng commands give me "Cannot find module '@angular/core'"
The log given by the failure.

Normally this include a stack trace and some more information.

Error: Cannot find module '@angular/core'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
....
Mention any other details that might be useful.

Just encountered this issue as well.
To fix: run npm install and try again.

@shicechi Thanks for the reply. I just did that after deleting the node_modules. It does work now but I never ran the ng init command. Did you do that, hopefully it doesn't cause future problems?

@keithmichelson I did run the ng init command though. But instead of skipping all the file checks, inspect each by typing in d to see the difference and modify the files accordingly. Some config files do actually need a override for this update. I so far haven't encountered any other problems but I could be wrong.

@shicechi Thanks, I just went through and did the same just to make sure, luckily that command worked after the npm install.

Dupe of https://github.com/angular/angular-cli/issues/2410, fixed by https://github.com/angular/angular-cli/pull/2870


[BUG] < Error GitHub Action for Close Old PRs>

Description
I found this error while scrolling through some pull requests. I think this is why the auto-merge option has stopped working.
Screenshots
No response
Any additional information?
No response
What browser are you seeing the problem on?
No response
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[ ] I am willing to work on this issue (optional)
[ ] I am a GSSoC'23 contributor

@CBID2 I want to work on this issue, it may take a little more time to complete as I have never worked on GitHub actions but want to learn more about it.

@CBID2 I want to work on this issue, it may take a little more time to complete as I have never worked on GitHub actions but want to learn more about it.

I just assigned you another issue. Finish that one before we continue the conversation about this issue.

@CBID2 I want to work on this issue, it may take a little more time to complete as I have never worked on GitHub actions but want to learn more about it.

I just assigned you another issue. Finish that one before we continue the conversation about this issue.

Ya sure no problem.

@CBID2 I have an idea -
generally working with github actions :

We create a GHA workflow with that would run once per day (or manually using [on.workflow_dispatch]

The error you're encountering is due to the missing module '@octokit/rest'. It seems that the version of the 'actions/github-script' action you're using is incompatible with the code that relies on the '@octokit/rest' module.

- You can assign this issue to me I can fix this.
- Now you might think that I am already assigned with a issue but I think this is a important `Github workflow Action` as now due to GSSoC we are getting a lot of PRs so we should give it priory to make PRs manageable.

I will wrap up this issue quickly and will resume to my other assigned issue right now.

- I am a GSSoC contributor so you can keep the label as it is !

Go for it @ujjawaltyagii! By the way, are you a maintainer for LinksHub?

@CBID2 Been contributing actively to the LinksHub from last 3 months still haven't got that privilege yet 😅

@CBID2 Been contributing actively to the LinksHub from last 3 months still haven't got that privilege yet 😅

@rupali-codes, I think we should granted @ujjawaltyagii the role of maintainer. They've been making pretty effective contributions to this project, and we could use more help lol 😂

@CBID2 I have been noticing :), also, should we turn LinksHub into github org?

@CBID2 This issue is duplicate of #715 👀

@CBID2 This issue is duplicate of #715 👀
Hey @rupali-codes. They are different. @ujjawaltyagii just managed to find a way to address both

@CBID2 This issue is duplicate of #715 👀
Hey @rupali-codes. They are different. @ujjawaltyagii just managed to find a way to address both with one solution

ok


Add json serialization for PauliInteractionGate

also make a constant ALL_CAPS and use simpler type annotation

#5353

Strange lint error


Update default deny/audit behaviour

Reintroduce default deny/audit changes f383637 (#602)
Revert default deny/audit changes in 30c8f54 (#668)
TODO

[x] Add more test cases
[x] Verify Audit Mode behaviour

Codecov Report

Merging #724 (2ec5f6f) into main (1aaee57) will decrease coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #724      +/-   ##
==========================================
- Coverage   37.91%   37.84%   -0.07%
==========================================
  Files          24       24
  Lines        8643     8637       -6
==========================================
- Hits         3277     3269       -8
- Misses       4929     4933       +4
+ Partials      437      435       -2

Impacted Files
Coverage Δ

KubeArmor/enforcer/appArmorProfile.go
44.82% <ø> (-0.04%)
:arrow_down:

KubeArmor/monitor/syscallParser.go
58.44% <0.00%> (-1.11%)
:arrow_down:

KubeArmor/feeder/policyMatcher.go
40.58% <0.00%> (-0.11%)
:arrow_down:

Continue to review full report at Codecov.

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

Handled in #727


Upgrade vendors

It passes the tests, it builds and I can start it. Recommending we get it merged.


codegen: fix DeepCopy races

Fixes https://github.com/istio/api/issues/3019
The deepcopygen we use is from Kubernetes. Its not quite suitable for our types due to our usage of protobuf, which has limitations on dereferencing pointer types. This causes race conditions in concurrent usage of the DeepCopy function.
This is possible to trigger with real Istio (found by running Istio in a live cluster with -race, though our current tests happen to not trigger things I guess), as well as other usage of istio/client-go (as the reporter found).
I ran istio/istio with this change and found all tests continue to pass, and running in a live cluster no longer fails

In response to a cherrypick label: new pull request created: #2339


Fix for issues in importing the tap

Unless applying this fix for https://github.com/sdkman/homebrew-tap/issues/5, now the tap cannot even be imported..
It looks like Brew has become more strict in checking syntax errors in (imported) formulas, as the following are errors I get when trying to (unsuccessfully) tap this repo (after having untapped it):
$ brew tap sdkman/tap
==> Tapping sdkman/tap
Cloning into '/opt/homebrew/Library/Taps/sdkman/homebrew-tap'...
remote: Enumerating objects: 55, done.
remote: Counting objects: 100% (55/55), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 55 (delta 16), reused 39 (delta 0), pack-reused 0
Receiving objects: 100% (55/55), 10.36 KiB | 3.45 MiB/s, done.
Resolving deltas: 100% (16/16), done.
Error: Invalid formula (sonoma): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (arm64_sonoma): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (ventura): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (arm64_ventura): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (monterey): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (arm64_monterey): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (big_sur): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (arm64_big_sur): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (catalina): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (mojave): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (high_sierra): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (sierra): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (el_capitan): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Invalid formula (x86_64_linux): /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
No available formula with the name "sdkmancli". Did you mean sdkman-cli?
In formula file: /opt/homebrew/Library/Taps/sdkman/homebrew-tap/Formula/sdkmancli.rb
Expected to find class Sdkmancli, but only found: SdkmanCli.
Error: Cannot tap sdkman/tap: invalid syntax in tap!

This might need to be fixed somehow in https://github.com/sdkman/sdkman-cli/blob/master/src/jreleaser/distributions/sdkman-cli/brew/formula.rb.tpl. I think something is awry with the jreleaser config.
Until then, the sdkmancli formula that installs 5.18.2 won't work. The sdkman-cli formula that installs 5.18.1 works.


2.x: Split HBApplication into Builder and Running types

Split HBApplication into HBApplicationBuilder which will be used to build the application and HBApplication which will be the immutable instance of the running application. This allows us to pass the application around as part of the request handler context without Sendable concerns.
This does cause some issues with application extensions, in that you would have to duplicate them across both the builder and running application types. But I might get around that by removing the extension framework. And push for people to use direct dependency injection, instead of hanging everything off the application

I approve of using dependency injection solutions, ASP.net is also a proponent of dependency injection.

#224


Katrina's extents change when renderers are enabled

To reproduce:

Load a Katrina VDC
Create a 2D Data renderer and enable it
The extents grow

Closing. We can validate with the next release.


chip-device-ctrl - resolve command gives error with all-clusters-app on mac

Problem
chip-device-ctrl - resolve command fails with all-clusters-app on mac

expected behavior : resolve dns and update address of the node in the device controller after command
resolve 0 135246
actual behavior - resolve command gives error with all-clusters-app on mac like:

chip-device-ctrl > resolve 0 135246
[1624866923276] [0x828ff] CHIP: [DIS] Node ID resolved for 0x000000000002104E to fe80::c6dd:57ff:fe5b:f7f0
Node address has been updated
[1624866923276] [0x828ff] CHIP: [CTL] OperationalDiscoveryComplete for device ID 135246
Current address: unknown
chip-device-ctrl > [1624866923277] [0x828ff] CHIP: [CTL] LoadSecureSessionParameters returning error 2022
[1624866923277] [0x828ff] CHIP: [CTL] Device connection failed. Error OS Error 2022 (0x000007E6): Invalid argument

system configuration

platform : macOS
kit : esp32 devkitC

logs

device side : device-side.txt

python controller side : python-ctrl.txt

@PSONALl Which exact revision are you seeing this on?
Also, that failure does not look like it's coming from resolve per se... Just out of curiosity:

Is this reliably reproducible?
Does issuing zcl OnOff Toggle 135246 1 0 or something else that would actually try to use the connection to the device work after seeing the above error?

Which exact revision are you seeing this on?

I am using esp-idf release/v4.2 branch and latest chip head

2. zcl OnOff Toggle 135246 1 0 or something else that would actually try to use the connection to the device work after seeing the above error?

No, zcl OnOff Toggle 135246 1 0 is also not working after the above error

nd latest chip head

So revision 17dbc199973f3532d360d26ecbe4f13a4ecafebc?
Just to make sure we are looking at similar timing, are you manually typing in the chip-device-ctrl commands?  Or just pasting them all in at once so the next one runs as soon as the previous one completes?
I'll see if I can reproduce, but I haven't been able to so far.  Given that, if you can reproduce reliably, are you willing/able to step through in a debugger and see what's going on?  Or add more logging and do likewise?  In particular, it looks from those logs like pychip_DeviceController_GetAddressAndPort in src/controller/python/ChipDeviceController-ScriptBinding.cpp is returning an error.  So it would be useful to check whether that's true and if so which of the calls there fails, exactly, and why.
Also, would be useful to have a stack to the "LoadSecureSessionParameters returning error" log line happening; that's in Device::LoadSecureSessionParameters in src/controller/CHIPDevice.cpp.

So revision 17dbc199973f3532d360d26ecbe4f13a4ecafebc?

Yes!

Just to make sure we are looking at similar timing, are you manually typing in the chip-device-ctrl commands? Or just pasting them all in at once so the next one runs as soon as the previous one completes?

I have manually typed the chip-device-ctrl commands

I'll see if I can reproduce, but I haven't been able to so far. Given that, if you can reproduce reliably, are you willing/able to step through in a debugger and see what's going on? Or add more logging and do likewise? In particular, it looks from those logs like pychip_DeviceController_GetAddressAndPort in src/controller/python/ChipDeviceController-ScriptBinding.cpp is returning an error. So it would be useful to check whether that's true and if so which of the calls there fails, exactly, and why.
Also, would be useful to have a stack to the "LoadSecureSessionParameters returning error" log line happening; that's in Device::LoadSecureSessionParameters in src/controller/CHIPDevice.cpp.

Ok, Thanks @bzbarsky-apple , I will check

I have updated logs for the above issue, still facing error for my macOS BigSur 11.1, please check

Here are the details:
I am using:

esp-idf : tag v4.3 (head at c9646ff0beffc86d2c6d1bfbad34da16e328e0e3 )
chip : master ( head 6d613877186c73372e1c17298d46e6dd910bebae )
platform: macOS BigSur 11.1
kit - esp32 devkit

Currently facing issue for resolve command like:
chip-device-ctrl > resolve 0 135246
[1626426434869] [45189:287982] CHIP: [DIS] Node ID resolved for 0x000000000002104E to [fe80::c6dd:57ff:fe5b:f7f0]:11097
Node address has been updated
[1626426434869] [45189:287982] CHIP: [CTL] OperationalDiscoveryComplete for device ID 135246
[1626426434870] [45189:287982] CHIP: [CTL] LoadSecureSessionParameters returning error 2000016
[1626426434870] [45189:287982] CHIP: [CTL] Device connection failed. Error OS Error 0x02000016: Invalid argument
Failed to commission: 33554454

Detailed logs:

device side: device-logs.txt
controller side: python-ctrl-logs.txt

Also while tracing the error, I have found that error is returned while sending IP packet. The function IPEndPointBasis::SendMsg  from src/inet/IPEndPointBasis.cpp is returning error, In the  function IPEndPointBasis::SendMsg At following point sendmsg returns -1, thus lenSent becomes -1, so it returns error
    // Send IP packet.
    const ssize_t lenSent = sendmsg(mSocket.GetFD(), &msgHeader, 0);
    if (lenSent == -1)
        return chip::System::MapErrorPOSIX(errno);

Also while tracing the error, I have found that error is returned while sending IP packet

@PSONALl Which packet is that?  That is, what does the stack to that IPEndPointBasis::SendMsg look like when this fails?

@PSONALl Which packet is that? That is, what does the stack to that IPEndPointBasis::SendMsg look like when this fails?

This is how the stack looks like:
Device::EstablishConnectivity (src/controller/CHIPDevice.cpp)
Device::LoadSecureSessionParametersIfNeeded (src/controller/CHIPDevice.cpp)
Device::LoadSecureSessionParameters (src/controller/CHIPDevice.cpp)
Device::WarmupCASESession (src/controller/CHIPDevice.cpp)
CASESession::EstablishSession (src/protocols/secure_channel/CASESession.cpp)
CASESession::SendSigmaR1 (src/protocols/secure_channel/CASESession.cpp)
ExchangeContext::SendMessage (src/messaging/ExchangeContext.cpp)
ExchangeMessageDispatch::SendMessage (src/messaging/ExchangeMessageDispatch.cpp)
TransportMgrBase::SendMessage (src/transport/TransportMgrBase.cpp)
UDP::SendMessage (src/transport/raw/UDP.cpp)
UDPEndPoint::SendMsg (src/inet/UDPEndPoint.cpp)
UDP point
IPEndPointBasis::SendMsg (src/inet/IPEndPointBasis.cpp)

OK, so the very first packet we try to send is failing...
At the place where we print this:
[1626426434869] [45189:287982] CHIP: [DIS] Node ID resolved for 0x000000000002104E to [fe80::c6dd:57ff:fe5b:f7f0]:11097

a few questions:

Is that IP address correct, presumably?
Can you ping6 that address from the machine that is ending up with the error stack above, given the right -I value?
Is our mdns resolution finding the right interface id in this case?

This issue is solved now with recent master branch commit head  3d8d542b4dcc69cfa1b39af6df882687968fb67c .  Closing this issue.


[BUG] QueueServiceClient().SetProperties fails with Version error

Describe the bug
      var client = new QueueServiceClient(serviceUri, credentials);
      var currentVersion = (await client.GetPropertiesAsync()).Value.Logging.Version;
        var defaultRetentionPolicy = new QueueRetentionPolicy { Days = 90, Enabled = true };
        var defaultQueueMetric = new QueueMetrics
        {
          Version = currentVersion,
          Enabled = true,
          IncludeApis = true,
          RetentionPolicy = defaultRetentionPolicy
        };

        var queueServiceProps = new QueueServiceProperties
        {
          Logging = new QueueAnalyticsLogging
          {
            Version = currentVersion,
            Delete = true,
            Read = true,
            Write = true,
            RetentionPolicy = defaultRetentionPolicy
          },
          HourMetrics = defaultQueueMetric,
          MinuteMetrics = defaultQueueMetric
        };

        await client.SetPropertiesAsync(queueServiceProps);

This fails with "unexpected value for Version" if the Version is 2.0. We are able to send 1.0 here as a hard coded value but that will change the existing setting that we have from 2.0 to 1.0.
Expected behavior
The Version property should accept a value of 2.0.
Actual behavior (include Exception or Stack Trace)
System.Private.CoreLib: Exception while executing function: queue. Azure.Storage.Queues: XML specified is not syntactically valid.
RequestId:c2cf62e9-d003-004d-4873-523b8f000000
Time:2020-07-05T02:27:24.4055884Z
Status: 400 (XML specified is not syntactically valid.)
ErrorCode: InvalidXmlDocument

Additional Information:
LineNumber: 1
LinePosition: 234
Reason: Unexpected value for Version.

Headers:
Server: Windows-Azure-Queue/1.0,Microsoft-HTTPAPI/2.0
x-ms-request-id: c2cf62e9-d003-004d-4873-523b8f000000
x-ms-version: 2018-11-09
x-ms-error-code: InvalidXmlDocument
Date: Sun, 05 Jul 2020 02:27:23 GMT
Content-Length: 332
Content-Type: application/xml

To Reproduce

Environment:

Name and version of the Library package used:
<PackageReference Include="Azure.Storage.Queues" Version="12.3.2"/>

@AlexGhiondea
Would you please also add "Client" tag for this issue?
As we will monitor the ARP storage issues: with "Storage" but not with "Client" tag.
As this issue is for dataplane, would you mind to add "Client" tag, so our monitor won't report it.

@blueww:   Apologies; you're correct in that the Client tag was missed here.   Rest assured that we do our best to sort between management and data plane clients when triaging.

When I run the repro on an account with logging values that match your Portal tab, I get traffic like:
GET https://testqueue32874.queue.core.windows.net/?restype=service&comp=properties HTTP/1.1
Host: testqueue32874.queue.core.windows.net
x-ms-version: 2019-12-12
x-ms-client-request-id: 767bb5d1-4588-431d-bf41-cefa29e20d89
x-ms-return-client-request-id: true
User-Agent: azsdk-net-Storage.Queues/12.3.2 (.NET Core 3.1.4; Microsoft Windows 10.0.18363)
x-ms-date: Mon, 06 Jul 2020 15:33:55 GMT

HTTP/1.1 200 OK
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/xml
Server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 6268c9cd-0003-0060-59aa-530d42000000
x-ms-client-request-id: 767bb5d1-4588-431d-bf41-cefa29e20d89
x-ms-version: 2019-12-12
Date: Mon, 06 Jul 2020 15:33:56 GMT

265
<?xml version="1.0" encoding="utf-8"?><StorageServiceProperties><Logging><Version>2.0</Version><Read>true</Read><Write>true</Write><Delete>true</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></MinuteMetrics><Cors /></StorageServiceProperties>
0

PUT https://testqueue32874.queue.core.windows.net/?restype=service&comp=properties HTTP/1.1
Host: testqueue32874.queue.core.windows.net
x-ms-version: 2019-12-12
x-ms-client-request-id: c348cbe0-fc32-4f9f-82e0-106bad6913fd
x-ms-return-client-request-id: true
User-Agent: azsdk-net-Storage.Queues/12.3.2 (.NET Core 3.1.4; Microsoft Windows 10.0.18363)
x-ms-date: Mon, 06 Jul 2020 15:33:56 GMT
Content-Type: application/xml
Content-Length: 580

<StorageServiceProperties><Logging><Version>2.0</Version><Delete>true</Delete><Read>true</Read><Write>true</Write><RetentionPolicy><Enabled>true</Enabled><Days>90</Days></RetentionPolicy></Logging><HourMetrics><Version>2.0</Version><Enabled>true</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>90</Days></RetentionPolicy><IncludeAPIs>true</IncludeAPIs></HourMetrics><MinuteMetrics><Version>2.0</Version><Enabled>true</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>90</Days></RetentionPolicy><IncludeAPIs>true</IncludeAPIs></MinuteMetrics></StorageServiceProperties>

HTTP/1.1 400 XML specified is not syntactically valid.
Content-Length: 332
Content-Type: application/xml
Server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 6268ca0d-0003-0060-7aaa-530d42000000
x-ms-client-request-id: c348cbe0-fc32-4f9f-82e0-106bad6913fd
x-ms-version: 2019-12-12
x-ms-error-code: InvalidXmlDocument
Date: Mon, 06 Jul 2020 15:33:56 GMT

<?xml version="1.0" encoding="utf-8"?><Error>InvalidXmlDocument<Message>XML specified is not syntactically valid.
RequestId:6268ca0d-0003-0060-7aaa-530d42000000
Time:2020-07-06T15:33:56.7477326Z</Message><LineNumber>1</LineNumber><LinePosition>234</LinePosition><Reason>Unexpected value for Version.</Reason></Error>

I think the important details in the initial GET response are:

<Logging><Version>2.0</Version>
<HourMetrics><Version>1.0</Version>

You're using the Logging value for currentVersion and then setting that as the metric's version.  The REST documentation describes the version parameters the same with Required if Logging, Metrics, HourMetrics, or MinuteMetrics settings are specified. The version of Storage Analytics to configure. and both 1.0 and 2.0 are valid Storage Analytics values for Queues  Based on the error, it looks like only 1.0 is supported for metrics.
Changing your repro code to distinguish between metrics and logging works for me:
var client = new QueueServiceClient(ConnectionString);
var currentProperties = (await client.GetPropertiesAsync()).Value;
var defaultRetentionPolicy = new QueueRetentionPolicy { Days = 90, Enabled = true };
var defaultQueueMetric = new QueueMetrics
{
    Version = currentProperties.HourMetrics.Version, // Assume this is the same for Minute
    Enabled = true,
    IncludeApis = true,
    RetentionPolicy = defaultRetentionPolicy
};

var queueServiceProps = new QueueServiceProperties
{
    Logging = new QueueAnalyticsLogging
    {
        Version = currentProperties.Logging.Version,
        Delete = true,
        Read = true,
        Write = true,
        RetentionPolicy = defaultRetentionPolicy
    },
    HourMetrics = defaultQueueMetric,
    MinuteMetrics = defaultQueueMetric
};

await client.SetPropertiesAsync(queueServiceProps);

This is expected. Logging supports V1.0 and V2.0. Metrics, HourMetrics and MinuteMetrics only support 1.0. We will update the rest documentation to make this more clear.


Transformers version

This is not an issues as such, it's a question: is there any particular reason for using transformers==2.3.0? At the time of the writing, the latest transformers library version was 3.0.2.
Does it introduce any bug, incompatibilities or anything else that is known to stop the scripts from working?

The package was written when 2.3.0 was the latest transformers version. With 3.0.2 you can now rewrite decoder.py to only a dozen of lines. I was about to update gpt2bot but got stuck with another project. You're welcome to contribute :)

Oh, ok, thanks. I probably will contribute once I have anything useful to contribute.


Memory deallocation for Mesh with Tetrahedrons

Hello,
I've noticed the construction with TetMemory used in deallocating elements of the Mesh which consists of Tetrahedrons, and I have a memory leak in my code around it.
What I am doing is: I create a new mesh with say 2000 elements, and then add them one by one using Element * el = new Tetrahedron(...) and AddElement(el). And valgrind then reports to me a memory leak, like all the element data was not freed in the end, after calling the destructor of Mesh object.
Is there anything special about Tetrahedron case? I noticed an if clause about it in Mesh::FreeElement(), does it require something special to be done during mesh construction which I missed?
Thanks,
Kirill

The default memory management for Tetrahedron elements inside a Mesh object does not use new and delete - we use a custom allocator. Therefore, when adding elements to a Mesh, you should use either

Mesh::NewElement and then Mesh::AddElement, or
one of the Mesh methods: AddTri, AddTriangle, AddQuad, etc.

Since you still see a memory leak when using AddTet, there is still some memory issue that needs to be resolved. Can you run valgrind using the options --leak-check=full --show-reachable=yes --track-origins=yes and post the relevant output here?

Thanks for the response @tzanio,
It did help me to get a clearer picture. I fixed the issue by using AddTet() (previous message by me in this thread was wrong because I introduced another bug while replacing AddElement by AddTet()).
So, I've got the clean valgrind run.


query a ghost-ci-dummy user's projects in C++

Small step to demonstrate proof of concept with MS Rest SDK

using python now


Implement initial data model

This adds the tables described in #1. The model classes and test files are also generated by Rails, but I'll save fleshing those out for future branches.
This also adds the Devise gem for authentication so that the users table could be generated with the structure Devise expects.
/cc @rewinfrey @ihavenotea

Addressed your feedback, Rick!

@cheshire137 @rewinfrey
I know this pull request is closed, but I just wanted to say that after some thinking I agree with this:

That feels like a business logic concern rather than a data model concern. I think having two separate user types here will make our business logic unnecessarily more complex starting out.

I am okay with having just one kind of user for this first version, I think it will make it easier for users and it also looks like it will be less work for you guys.

I know this pull request is closed

That's never a problem! Even if a pull request gets merged before you're able to give feedback, we can always follow up in a later pull request to address your feedback. 👍

I am okay with having just one kind of user for this first version

I went with the separate users and players tables in this branch because I'm still concerned about how the app would work when there's just the team organizer using the app. Rob needs to put Zion and Cheshire in his team composition, but Zion and Cheshire aren't users of the app. The users table has requirements like "you have to have a password" or "your have to have an email address," but the players table just needs a name.

Ahhh okay. Sound good, thanks Cheshire!


Fix handling of multiline strings for input box prompts

Easy fix that resolves JENKINS-36661.  We do escaping on the string and replace all end of line combinations with a <br> tag.
@reviewbybees

:bee:

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@reviewbybees done

This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.


lots of bright lines on the oncoplot

I plot about 900 samples and the data is downloaded from TCGA, the color is not obvious whatever zoom in or out

Hi,
This issue is similar to #340
Install the tool from GitHub and decrease the values for argument sepwd_samples in oncoplot and it should minimize the width of white border lines. Let me know if it helps.

I can just install maftools_2.0.10.tar.gz from github, can't get the newest version 2.0.15.
BiocManager::install("PoisonAlien/maftools")

Its fine. Its still 2.0.10 on GitHub - Its just says 2.0.15 in the NEWS. Do you see any error while installing?

Its fine. Its still 2.0.10 on GitHub - Its just says 2.0.15 in the NEWS. Do you see any error while installing?

I tried sepwd_samples = 0 to 2, it still has gap between samples and color is light

Usually it works with smaller width. Also try saving your plot to pdf with larger width to get most of it. That being said,  with samples size as large as yours its hard to draw a heatmap distinguishing samples.

The old version maftools performs well, I think it's a bug of new version(light gap becomes obvious when zoom in or out even pdf with larger width), can you fix it?
Thanks

Older version used draw the plots with ComplexHeatmap library but I moved all the plots to base graphics because of customization. Reverting back would take lots of code change and I dont have enough time to do that. Maybe I will do it gradually but for now it will remain the same. Sorry for the inconvenience :|

I set the parameter sepwd_samples = 0 and still has a white gap between samples. Maybe it's the gap caused unusual oncoplot, can you check it?

I checked on TCGA BRCA cohort with 1020 samples and seems ok to me.
> TCGAmutations::tcga_load(study = "BRCA")
> png(filename = "~/Documents/temp/brca_default.png")
> oncoplot(maf = tcga_brca_mc3)
> dev.off()

Default oncoplot

> png(filename = "~/Documents/temp/brca_sep0.1.png")
> oncoplot(maf = tcga_brca_mc3, sepwd_samples = 0.1)
> dev.off()

with sepwd_samples = 0.1

similarly with sepwd_samples = 0

I tried mutect2 data from TCGAbiolinks, it still has white gap and won't change with the sepwd_samples parameter

library(TCGAbiolinks)
mut <- GDCquery_Maf(tumor = "LIHC", pipelines = "mutect2")
library(maftools)
maf <- read.maf(maf = mut)
pdf("oncoplotTop20.pdf",width = 12,height = 6)
oncoplot(maf = maf,
top = 20,
sepwd_samples = 0
)
dev.off()

I also tried the same code you provided using TCGAmutations package and still can't get the same plot as you showed above. Can you provide your sessionInfo of R?
Much Thanks

Here is it.


Microsoft Vision API Keys found in source

https://github.com/l465659833/Bigbang/blob/1f55712d0c9e141387995cf35555d4077fffb7a0/app/src/main/java/com/forfan/bigbang/util/OcrAnalsyser.java
Since these keys are checked into the public github, anyone can see/use them. You should probably get new keys, retire these and store these with non-version-controlled config.

Thanks for your advice.


Package is missing __type in some cases for generic classes

Hi,
this is basically the continuation of #30. You can use the following code snippet to reproduce the issue. The first test will fail as the __type statement is missing for the generic class. The second test will be successful after adding the key manually. I used 2.0.0-dev.13.
import 'package:collection/collection.dart';
import 'package:dart_mappable/dart_mappable.dart';
import 'package:flutter_test/flutter_test.dart';

part 'mapper_generic_class_test.mapper.dart';

@MappableClass()
class GenericClass<T> with GenericClassMappable<T> {
  final List<T>? genericList1;
  final List<T>? genericList2;

  const GenericClass({
    this.genericList1,
    this.genericList2,
  });

  GenericClass<T> copyWithAlt({List<T>? genericList1, List<T>? genericList2}) {
    return GenericClass<T>(
      genericList1: genericList1 ?? this.genericList1,
      genericList2: genericList2 ?? this.genericList2,
    );
  }

  @override
  String toString() {
    return 'GenericClass $genericList1 $genericList2';
  }
}

void main() {
  group('Generic class conversion', () {
    test('Check conversion String', () {
      GenericClass<String> entry = const GenericClass<String>(
        genericList1: ['1', '2'],
        genericList2: ['2'],
      );

      List<String> choices = ['1', '2', '3'];
      entry = entry.copyWith(genericList1: choices);
      expect(
        entry.runtimeType,
        GenericClass<String>,
      );

      Map<String, dynamic> entryMap = entry.toMap();

      GenericClass entryFromMap = GenericClassMapper.fromMap(entryMap);

      expect(entryFromMap.runtimeType, entry.runtimeType);
      expect(
        entryFromMap.runtimeType,
        GenericClass<String>,
      );

      expect(
        const DeepCollectionEquality().equals(
          entryFromMap,
          entry,
        ),
        true,
      );
    });

    test('Check conversion String (manual add of __type)', () {
      GenericClass<String> entry = const GenericClass<String>(
        genericList1: ['1', '2'],
        genericList2: ['2'],
      );

      List<String> choices = ['1', '2', '3'];
      entry = entry.copyWith(genericList1: choices);
      expect(
        entry.runtimeType,
        GenericClass<String>,
      );

      Map<String, dynamic> entryMap = entry.toMap();

      // Manual fix
      entryMap['__type'] = 'GenericClass<String>';

      GenericClass entryFromMap = GenericClassMapper.fromMap(entryMap);

      expect(entryFromMap.runtimeType, entry.runtimeType);
      expect(
        entryFromMap.runtimeType,
        GenericClass<String>,
      );

      expect(
        const DeepCollectionEquality().equals(
          entryFromMap,
          entry,
        ),
        true,
      );
    });
  });
}

Maybe also interesting: This was already working with HEAD 46a0d11.

The .toMap on a class will almost never add the type key. This is by design.
https://github.com/schultek/dart_mappable/blob/main/packages/dart_mappable/doc/generics.md

Ahhh ok. And as I now need to set up the combined container first the toValue function was removed from the class mixins.

you can use GenericClassMapper.container

Works fine. Is there a possibility to use a different name for the combined mapper? Container has a high probability of overlapping with the Container widget

Its named after the library, e.g. for library main, it is called mainContainer. Or what do you mean?

So i guess ots easy enough to avoid any conflicts by just setting the lib name.


a comet can access files from another comet's desk without setting it to public

I can reproduce the issue:

create two fresh comets on the same machine (I run them in docker containers, don't know if it matters)
create a file in the home desk of comet1:

comet1> *%/secret/md 'this is a secret'

execute a merge in comet2:

comet2> |merge %test ~comet1 %home
>=
; ~comet1 is your neighbor
[~.~comet2 ~.home ~.0 ~.gen ~.ls ~]
> +ls /=test=
~

Now wait 15 minutes (tcp timeout maybe?) and then the following message appears in comet2:

merged with strategy %init

Now you can see secret file in comet2:

comet2> +ls /=test=
LICENSE/txt app/ gen/ lib/ mar/ ren/ sec/com/ secret/md sur/ sys/ tests/new-hoon/ web/
comet2> +cat /=test=/secret/md
/~comet2/test/~2018.3.11..06.19.40..6c88/secret/md
this is a secret

/cc @Fang-

More info:
> .^({dict:clay dict:clay} cp+/===)
[[src=/ rul=[mod=%white who={}]] src=/ rul=[mod=%white who={}]]

I think the general problem is that Clay isn't applying permissions in the
cases of merges and syncs.
On Sun, Mar 11, 2018 at 4:01 PM, Assaf Berg<EMAIL_ADDRESS>wrote:

More info:

.^({dict:clay dict:clay} cp+/===)
[[src=/ rul=[mod=%white who={}]] src=/ rul=[mod=%white who={}]]

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/667#issuecomment-372157724, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA1Y9du6_-ZiqUagR-n5R35lz-g5CtwMks5tdazSgaJpZM4SllBf
.

If it's not applying the permissions why is it still waiting 15 minutes?

Closing as this appears to more or less be a duplicate of #657.


Formatting error

Hi!
I found a formatting error at the second bullet in the Account for the peek card in ambient mode heading of 4th step.

Hi @LouisCAD, thanks for the report. We're looking into this.

This sample has been migrated to a new location and updates are happening there. In addition, the new location can accept Pull Requests (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!


make producer.Kinesis respect api limits

The kinesis api has hard limits that require no more than 500 records or 5MB per PutRecords call, and no more than 1MB per record.
This change makes sure that gollum respects those three limits by making multiple PutRecords calls if needed, and making more records if needed.
The result is that BatchMaxMessages and RecordMaxMessages can safely be set to higher values that would have previously caused errors.

If I remember correctly the ratelimits were indirectly enforced by the batch size chosen.
Need to check that.

it's true that rate limits can be enforced using batch size, but if gollum message size is unpredictable, and RecordMaxMessages is high enough, then some kinesis records may unnecessarily exceed the 1MB record size limit

Ah, ok - that's correct.
The current batch implementation only looks at the count, not the size.

I'm no longer able to work on this

@relud Thanks for letting us know. Do you still think it would make sense to integrate into Gollum?
If yes, we might want to check it out in detail.

yes, I definitely think it makes sense. these limits are hard limits, that aws doesn't allow limit increases for.

Okay, thank you. I reopened the PR. I can't promise anything in terms of timeline, but we will check it out if we can make it. Thank you for your effort.