Minimal example based on colorpicker

Hi,
So I am creating a minimal example for a ASF add-on based on the colorpicker add on.
Of course, I am trying to do it correctly, following any conventions, and I realized am not completely sure about the naming of javascript file, it is called bootstrap-colorpicker, and I am not sure why, as it more jquery-based than bootstrap-based. Also, not many other add-ons use the bootstrap-xxx.js naming scheme.
It feels a little bit confusing to me, its path in the template cache should be enough?

I don't quite remember why that is, probably didn't give it much thought. Should probably be changed to follow some sort of standard.

If I may make a suggestion, I would propose that the standard would be the same as the full name of the add-on, as that:

Can't be all that wrong.
Is common already
Easy to remember. The same as the containing bower_components-folder.
Makes it easier to see where one is while debugging. Also, for example, "main.js", or a subset of the name may conflict with code that interact with the the component.

Next question:
According to most style guides and documents, the common unit of indentation of JS, and also the upcoming Typescript, is 4 spaces. And personally, I am a four space guy.
However, ASF seem to use 2 spaces. And I know that this, for some reason, is a somewhat contentious subject. Some people think 2 spaces looks better.
The problem is that most IDE:s are preset to four spaces for .js files, and they constantly complain of the indentation. And it seems a little bit crappy when an example immediately triggers negative responses.
Is it OK to use 4 spaces in the example? To get people to adhere to these standards, it could be a good form to follow the others, just sayin'.

Question 3:
When returning the schemaFormProvider provider for the default, can't the caller of the function add the key to the options.lookup dict? It seems strange that you always have to do the options.lookup[sfPathProvider.stringify(options.path)] = f;. And then return f to something that probably could be able to do that itself as it is obviously passing the options parameter. Are there situations where you do not wan't that to be done?

Hi,
So now I have created an example.
It wasn't as super-minimal as I thought it would be, but it contains some important tricks.
I am thinking of creating a really minimal version, with just an input and a label, or something.

Whatever, I made a minimal example aswell.

I have now started a make-over of the extending ASF documentation, the goal is to make it more easy to understand, consequently I have another question.
Question 4:
It uses the expression "field", "type of field", as in "adding a new field". I cannot see anything happening other than adding form types, not fields or field types. Have I misunderstood something?
If not, I will unify to only talking about field types.

So now I have made a rewrite of the extending article, in addition to trying to make it a little bit more easy to follow, I have used the "minimal" and "camelCase" examples throughout, instead of datepicker, as they have only the data that is needed:
https://github.com/OptimalBPM/angular-schema-form-add-ons/blob/New_Extending/documentation/extending.md
I do have another question:
Question 5:
What is the typical use case for the "add a new decorator"-way of extending ASF?

I would be grateful if someone could proofread it and give me some feedback.

I have now also added a Python script that creates a new add-on based on one of the examples:
https://github.com/OptimalBPM/angular-schema-form-add-ons/tree/master/tools


Reduce nesting

It's part of the refactoring.

Job PR-796-1 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-796/1/index.html


Un-needed attribute

It appears that the color attribute defined in "attrs.xml" is not needed and it conflicts with newer versions of the API
    <attr name="color" format="string"></attr>

Thanks for the comment. I would like to keep updated the repo, I will try to take a look and work on it.

I had a chance to look at it in a bit more detail.  It appears that "color"
was an attribute from the original color wheel version and isn't needed
anymore.  It also conflicts with an attribute in API 21 (maybe earlier than
that - although I didn't verify that).  I've made the changes in my own
fork.  Would you like me to do a pull request?
On Fri, Jan 9, 2015 at 2:58 AM, Jesús<EMAIL_ADDRESS>wrote:

Thanks for the comment. I would like to keep updated the repo, I will try
to take a look and work on it.
—
Reply to this email directly or view it on GitHub
https://github.com/JesusM/HoloCircleSeekBar/issues/4#issuecomment-69308675
.

Sure!Do it and I will check it!Thanks!

Hi,
I submitted the pull request (at least I think I did - it is my first one).
Jim
On Fri, Jan 9, 2015 at 8:53 AM, Jesús<EMAIL_ADDRESS>wrote:

Sure!Do it and I will check it!Thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/JesusM/HoloCircleSeekBar/issues/4#issuecomment-69343679
.

I just merged it. Thanks!


Http::Verb eq Missing

Hi,
I just came across these lines:
'eq' is not used for comparison of of "CL" and "IND" in Lines 133 and 138, or is this intentional?
Am I missing the point here? :-)
https://github.com/boostorg/beast/blob/6af4c01e5662926372a7e43f3194fe01846a28dd/include/boost/beast/http/impl/verb.ipp#L133
https://github.com/boostorg/beast/blob/6af4c01e5662926372a7e43f3194fe01846a28dd/include/boost/beast/http/impl/verb.ipp#L138

That is odd.. investigating! Thanks

Verbs must be uppercase, so this is technically not a bug (it works correctly as written). But it looks weird, and preliminary benchmarks suggest using a simple operator== performs better.

Thank you!


add argp's shadow

Cool stuff. If you're feeling heroic, it'd be awesome to see this added to ctf-tools as well :-)


Update dLux docs before pip incrementation

To reflect new AlphaCen() syntax

@LouisDesdoigts incrementing now, don't think it should mess with anything in dLux docs but if something breaks blame me


Issue with parsing contained resource from JSON

(I did not delve into this in detail but I thought I'd report it here FWIW)
Using the latest snapshot and querying for MedicationPrescription, the contained Medication resources are not parsed correctly -- the link is there but the actual resource content is null. When I change the rest client to force using XML instead of JSON it works well.

Hi @mochaholic, thanks for reporting!
Is this against a public server by any chance? If so, can you share the URL you're using so we can put together a unit test?

No. But here is an example (I have redacted the urls). containedResources.size() is 0.
     I also report this issue https://github.com/jamesagnew/hapi-fhir/issues/144.

The snippet above doesn't actually have any contained resources in it. I.e. I don't see any "#med" anywhere except in the reference so I would expect getContainedResources() to not return anything.
I've added a unit test for this in checkin https://github.com/jamesagnew/hapi-fhir/commit/0ca1b9feab9454eed997c74bfa02cb4f5bbcd6f7 but so far I haven't been able to reproduce. The unit test passes so presumably there is something I'm missing.

That's right sorry I rushed a bit. The problem seems to be in the JSON encoder. When I got the XML bundle the contained resource is there but when I switched to JSON and copied seems like the contained resource didn't appear. Let me work on this a bit more to come up with an example.

Fantastic, that would be great. I'm hoping to release HAPI FHIR 1.0 within
the next 24 hours so it would be awesome to have this bug fixed in that
release.
Cheers,
James
On Thu, Apr 2, 2015 at 12:09 PM, Mohammad Jafari<EMAIL_ADDRESS>wrote:

That's right sorry I rushed a bit. The problem seems to be in the JSON
encoder. When I got the XML bundle the contained resource is there but when
I switched to JSON and copied seems like the contained resource didn't
appear. Let me work on this a bit more to come up with an example.
—
Reply to this email directly or view it on GitHub
https://github.com/jamesagnew/hapi-fhir/issues/146#issuecomment-88961277
.

OK so I can reproduce this issue now with a resource I created on the uhn test server:
FhirContext context = FhirContext.forDstu2();
IGenericClient restClient = context.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu2");
restClient.setEncoding(EncodingEnum.XML);
Bundle bundle = restClient.search(new UriDt("http://fhirtest.uhn.ca/baseDstu2/MedicationPrescription?patient=13123"));
int containedResourcesWithXML = bundle.getEntries().get(0).getResource().getContained().getContainedResources().size();
System.out.println(containedResourcesWithXML);
        restClient.setEncoding(EncodingEnum.JSON);
        bundle = restClient.search(new UriDt("http://fhirtest.uhn.ca/baseDstu2/MedicationPrescription?patient=13123"));
        int containedResourcesWithJSON = bundle.getEntries().get(0).getResource().getContained().getContainedResources().size();
        System.out.println(containedResourcesWithJSON);

        assert containedResourcesWithXML == containedResourcesWithJSON;

Ahh fantastic. Thanks for all the effort in tracking this down, we now have a working unit test! Solution should be coming up shortly.


Facial Attribute

Hello, @LynnHo  Can you tell how we can do facial feature extraction, means if input any image of face and then how we can get the 40 facial attribute from that.
Thanks.

@xyzdcgan You should train a 40 attribute model.

But how @LynnHo Using what i can get 40 attribute of face.

@xyzdcgan The Celeba dataset contains 40 attribute annotations.

But i want 40 attribute in custom image dataset. @LynnHo

@xyzdcgan One solution is to predict 40 attributes of your custom dataset using a well-trained attribute predictor (trained on Celeba or others).

okay, do you know any attribute predictor..! @LynnHo

@xyzdcgan I am not an expert on attribute prediction. You may refer to the state-of-the-art papers for attribute prediction.

Yes not an issue @LynnHo


Improve remarks

This is a first attempt to unify remarks that mention other standards and add generic references to TEI and EAD websites (see #878).

There are two "ll"s in modelled.

Not in American English: https://www.oxfordlearnersdictionaries.com/definition/english/model_2

sigh In all other English-speaking countries, there are two Ls.
Next thing you know we'll be changing everything to Farenheit. :-D

Some comments:

I think the question on ”modelled“ vs ”model“ is something that is tied to a general decision on language usage in the guidelines and might be a question for our editors in chief of the guidelines @kepper @pe-ro ?
unfying the sentences referencing external standards in terms of order of HTML, EAD, TEI etc. seems fine to me also because it's more or less just a standard phrase.
concerning tag-usage here (tei:ref) I'm wondering how this fits with #900 and also here I think some general tagging guidelines for the guidelines should be developed before we implement more such changes

but anyway thanks for bringing this up and starting others to think about those things ;-)

Although I personally prefer modelled over modeled I guess the guidelines tend to be us-american english, but I leave this to our native speakers and @music-encoding/guidelines-editors-in-chief to decide.
One question though concerning the <ref> tagging shoudn't we go a step more semantic in the sense of #913 and use <name> with @reffor tagging organisations/institution e.g.:
[…] is modeled on an element of the <name ref="https://www.tei-c.org">Text Encoding Initiative (TEI)</name>.

an later add <ref> tags if (not when ;-) we explicitly link to the specific element definitions?

Closing this and separating into different pull requests.


Learning rate as parameter

The Python script should be called with the learning rate as parameter. This learning rate should also be stored in the file name of the resulting network. By doing this we can train several nets in parallel and then take the best one.

I close this issue as it's not that much needed anymore since we now many onnx files are generated during one learning session. See
https://github.com/carsten-wenderdel/wildbg/commit/07bad18b6d43468680b168d2ac9a4b4d164d3d6e
and related to that also
https://github.com/carsten-wenderdel/wildbg/commit/7781a74d70be8759ec0788daf7cdb182198f0509


A validation for checking if fields of an array store unique values

Problem Statement:
Let's suppose we have an array(FieldArrayType) of users with two fields(FieldType): userName and userEmail. As it is an array we can add multiple users at once, but there is a catch, we can have two(or more than two) users with the same name but any two users cannot have the same email address.
How can we add a validation to check if there are two userEmail fields which contains the same email address?
P.S. I will suggest that you add the unique validator to the list of default validations provided by formly, in the next formly version(v6) as it may have a lot of use cases like one mentioned above.

I'm on my phone so I can't give code here but theoretically have you had any issue with using a "validators" definition on the array field that will check for duplicate data in the model?
It could follow our detect same password example but doesn't even have to.
Could be made generic with an extension as well.

@kenisteward
Can you please ping the url of the same password example in the comments?
It'll be really helpful.

@kenisteward
Can you please ping the url of the same password example in the comments?
It'll be really helpful.

Sorry not password I meant our unique value example
https://formly.dev/examples/validation/unique-value-async-validation
Instead of doing it at the formgroup level you could do it at the formarray level.

@kenisteward,
In this example we have an array of existing userNames but in the scenario described above we will not have that. Instead we will have them in a model that will look like this:
{
 "users": [
        {
            "userName": "userName1",
            "userEmail"<EMAIL_ADDRESS>        },
        {
            "userName": "userName2",
            "userEmail"<EMAIL_ADDRESS>        },
        {
            "userName": "userName3",
            "userEmail"<EMAIL_ADDRESS>        }
    ]
}

Is it possible to do that without involving the field group and index?

@kenisteward,
In this example we have an array of existing userNames but in the scenario described above we will not have that. Instead we will have them in a model that will look like this:
{
 "users": [
        {
            "userName": "userName1",
            "userEmail"<EMAIL_ADDRESS>        },
        {
            "userName": "userName2",
            "userEmail"<EMAIL_ADDRESS>        },
        {
            "userName": "userName3",
            "userEmail"<EMAIL_ADDRESS>        }
    ]
}

Is it possible to do that without involving the field group and index?

The example assumes you want the validation to show on the actual field itself and not on the array. If it is acceptable for the error to show in an errors box then formatting for that for the field array is fine.
If not you can still apply the unique to every field by simply using the fieldconfig's parent property to get to the array field config and grab the model or form control to find unique values in it.
Again sorry I'm on my phone so coding this out would be awkward but we have docs on the fields I'm talking about in the comments of the formlyfieldxonfig ( that should show up when using intellisense I believe )
The validator always passes enough information to go up and down the model chain to make any type of validator the user wants. We do this internally on a wrapper library I made very often.

The example assumes you want the validation to show on the actual field itself and not on the array. If it is acceptable for the error to show in an errors box then formatting for that for the field array is fine.
If not you can still apply the unique to every field by simply using the fieldconfig's parent property to get to the array field config and grab the model or form control to find unique values in it.
Again sorry I'm on my phone so coding this out would be awkward but we have docs on the fields I'm talking about in the comments of the formlyfieldxonfig ( that should show up when using intellisense I believe )
The validator always passes enough information to go up and down the model chain to make any type of validator the user wants. We do this internally on a wrapper library I made very often.

Yes,
The assumption you made is absolutely correct. I was also thinking about using the parent property of fieldConfig to grab the model.
I'll try that now.
Thanks for your quick response @kenisteward .


chore: merge main to dev

@evegufy i've branched this branch off of dev and than merged main into it to resolve the merge issues.


Add  to cart section text color need to improved

in Add to cart section adding  added items not clearly visible due to text color

@khushi-joshi-05  please assign me this issue under GSSOC . I want to work on this issue.

Can u pleasse Assign me this issue .I would like to Work on this issue

@AakankshaSarode can you Describe your issue!

I would like to work on this issue under GSSoC . Please assign this issue to me.

@sunny0625  someone already solved this issue


Use libc_bitflags! for BSD in fcntl.rs

There's a build failure for NetBSD I don't quite understand. Hopefully you can figure it out.

I have no idea why libc is not viable on NetBSD.

You can easily test this locally by doing rustup target install x86_64-unknown-netbsd and then cargo build --target=x86_64-unknown-netbsd since it's just a compilation error. Looks like a module import is missing or something on the netbsd target. Let me know if you get stuck!

@equal-l2 Are you still able to drive this forward? Would love to get this into the next 0.9 release.

I'd like to include a change to the libc_bitflags to use the same syntax as the new bitflags macro. This way we don't need to change struct to flags and ; to , for every entry. Would you be willing to expand this PR to include a change to that macro here as well?
Additionally, each of these const modules can be combined into one and you can use #cfg[] attributes to specify which platforms have which constants. This way we only have each variable declared once instead of multiple times for the various platforms. Should also reduce the LoC a decent amount.

I'd like to include a change to the libc_bitflags to use the same syntax as the new bitflags macro. This way we don't need to change struct to flags and ; to , for every entry. Would you be willing to expand this PR to include a change to that macro here as well?

That's too hard for me at this moment, sorry.

bors r+


How to use mixup and mosaic augmentation

I have been trying to implement mosaic and mixup augmentation but always get stuck with these errors. I dont know how to navigate it through, hoping for some help.
Thank you
Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/mmdetection/mmdet/datasets/custom.py", line 195, in getitem
data = self.prepare_train_img(idx)
File "/content/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img
return self.pipeline(results)
File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in call
data = t(data)
File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2255, in call
results = self._mixup_transform(results)
File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2286, in _mixup_transform
assert 'mix_results' in results
AssertionError

@Brym-Gyimah mosaic and mixup must be used together with MultiImageMixDataset.

Is there an example of how MultiImageMixDataset has been used as I’m not getting much clarity on the official doc

You can take a look at the yolox model config, it uses MultiImageMixDataset there

Hi, did you solve it?  I added the content referencing to the yolox model config,  I thus  have the same problem. I found that it happen at the second epochs, it is difference between  the loading train_pipelines. but I don't know how to fix it.

hi, I met the same problem with you.but it is about mosaic_transform, do you solve it? really need your help,thx.

@y78h11b09 sorry for the late response, have not been following the thread. Have you managed to solve it?
@junnnxie have you tried the aforementioned yolox config? If you did, can I know more about the error message?

@y78h11b09 sorry for the late response, have not been following the thread. Have you managed to solve it?
@junnnxie have you tried the aforementioned yolox config? If you did, can I know more about the error message?

about the yolox config I just modify the dataset path and num_classes.my dataset has 9 classes with different resolution like 1024x1024, 1536x1536.

Can you also show your config file? thanks

Can you also show your config file? thanks

base = ['./schedules/schedule_1x.py', './default_runtime.py']
model settings
model = dict(
type='YOLOX',
backbone=dict(type='CSPDarknet', deepen_factor=0.33, widen_factor=0.5),
neck=dict(
type='YOLOXPAFPN',
in_channels=[128, 256, 512],
out_channels=128,
num_csp_blocks=1),
bbox_head=dict(
type='YOLOXHead', num_classes=9, in_channels=128, feat_channels=128),
train_cfg=dict(assigner=dict(type='SimOTAAssigner', center_radius=2.5)),
# In order to align the source code, the threshold of the val phase is
# 0.01, and the threshold of the test phase is 0.001.
test_cfg=dict(score_thr=0.01, nms=dict(type='nms', iou_threshold=0.65)))
dataset settings
data_root = 'nfs/project/netdisk/<IP_ADDRESS>/object_detection/project/merge/'
dataset_type = 'CocoDataset'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
img_scale = (1024, 1024)
train_pipeline = [
dict(type='Mosaic', img_scale=img_scale, pad_val=114.0),
dict(
type='RandomAffine',
scaling_ratio_range=(0.1, 2),
border=(-img_scale[0] // 2, -img_scale[1] // 2)),
dict(
type='MixUp',
img_scale=img_scale,
ratio_range=(0.8, 1.6),
pad_val=114.0),
dict(
type='PhotoMetricDistortion',
brightness_delta=32,
contrast_range=(0.5, 1.5),
saturation_range=(0.5, 1.5),
hue_delta=18),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Resize', keep_ratio=True),
dict(type='Pad', pad_to_square=True, pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]
train_dataset = dict(
type='MultiImageMixDataset',
dataset=dict(
type=dataset_type,
ann_file=data_root + 'json/train.json',
img_prefix=data_root + 'images/all/',
pipeline=[
dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True)
],
filter_empty_gt=False,
),
pipeline=train_pipeline,
dynamic_scale=img_scale)
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=img_scale,
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(type='Pad', size=img_scale, pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img'])
])
]
data = dict(
samples_per_gpu=4,#8,
workers_per_gpu=2,
train=train_dataset,
val=dict(
type=dataset_type,
ann_file=data_root + 'json/val.json',
img_prefix=data_root + 'images/val/',
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'json/val.json',
img_prefix=data_root + 'images/val/',
pipeline=test_pipeline))
optimizer
default 8 gpu
optimizer = dict(
type='SGD',
lr=0.01,
momentum=0.9,
weight_decay=5e-4,
nesterov=True,
paramwise_cfg=dict(norm_decay_mult=0., bias_decay_mult=0.))
optimizer_config = dict(grad_clip=None)
learning policy
lr_config = dict(
delete=True,
policy='YOLOX',
warmup='exp',
by_epoch=False,
warmup_by_epoch=True,
warmup_ratio=1,
warmup_iters=5,  # 5 epoch
num_last_epochs=15,
min_lr_ratio=0.05)
runner = dict(type='EpochBasedRunner', max_epochs=300)
resume_from = None
interval = 10
custom_hooks = [
dict(type='YOLOXModeSwitchHook', num_last_epochs=15, priority=48),
dict(
type='SyncRandomSizeHook',
ratio_range=(14, 26),
img_scale=img_scale,
priority=48),
dict(
type='SyncNormHook',
num_last_epochs=15,
interval=interval,
priority=48),
dict(type='ExpMomentumEMAHook', resume_from=resume_from, priority=49)
]
checkpoint_config = dict(interval=interval)
evaluation = dict(interval=interval, metric='bbox')
log_config = dict(interval=50)

Can you also show your config file? thanks

I can train other networks like cascade_rcnn with no problem, I think the yolox config still need to modify but I have no idea.

I have been trying to implement mosaic and mixup augmentation but always get stuck with these errors. I dont know how to navigate it through, hoping for some help. Thank you
Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/mmdetection/mmdet/datasets/custom.py", line 195, in getitem data = self.prepare_train_img(idx) File "/content/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img return self.pipeline(results) File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in call data = t(data) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2255, in call results = self._mixup_transform(results) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2286, in _mixup_transform assert 'mix_results' in results AssertionError

hi, do you solve your problem?I also met it and didin't work it out. hope to  have your help

you can do "workflow = [('train', 24 ),('val',1)]",  and commented  runner = dict(type = 'EpochBasedRunner', max_epoches=50), other configs  as following the yolox configs:
Model
conv_cfg = dict(type='ConvDWS')
norm_cfg = dict(type='SyncBN',momentum=0.01, eps=1e-3)#dict(type='SyncBN'),
act_cfg = dict(type='Mish') #'Mish' 'MemoryEfficientSwish','Swish'(),
model = dict(
type='CPSS',
backbone=dict(
),
neck=dict(
),
bbox_head=dict(
),
)
#training and testing settings
train_cfg = dict(
assigner=dict(type='CPSSAssigner', topk=9, match_lost_gt=False,lamda=1),
allowed_border=-1,
pos_weight=-1,
debug=False,#,
frozenset=dict(fronzed_layers= None, excluded_layers=None) #
)
test_cfg = dict(
nms_pre=1000,
min_bbox_size=0,
score_thr=0.05,#default 0.05
nms=dict(type='soft_nms', iou_threshold=0.60, min_score=0.05),#default:0.6
max_per_img=100)
dataset_type = 'CrowdHumanDataset'
dataset_type = 'CocoDataset'
data_root = '/home/yangxb/mmdetection-master/data/crowdhuman/'
img_size = (896, 896)
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True)
train_pipeline = [
dict(type='Mosaic', img_scale=img_size, pad_val=114.0),
dict(
type='RandomAffine',
scaling_ratio_range=(0.1, 2),
border=(-img_size[0] // 2, -img_size[1] // 2)
),
dict(type='MixUp', img_scale=img_size, ratio_range=(0.8, 1.6), pad_val=114.0),
dict(type='PhotoMetricDistortion',
brightness_delta=32,
contrast_range=(0.5, 1.5),
saturation_range=(0.5, 1.5),
hue_delta=18),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Resize', keep_ratio=True),
dict(type='Pad', pad_to_square=True, pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=img_size,
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(type='Pad', size=img_size, pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img'])
])
]
data = dict(
samples_per_gpu = 2,# imgs_per_gpu=8,#[2,4,8]
workers_per_gpu=0,#[0,1,2]
train=dict(
type='MultiImageMixDataset',
dataset=dict(
type=dataset_type,
ann_file=data_root + 'annotations/train.json',
img_prefix=data_root + 'CrowdHuman_train/Images/',
pipeline=[dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True)],
filter_empty_gt=False,
),
pipeline=train_pipeline,
dynamic_scale= img_size
),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/val.json',
img_prefix=data_root + 'CrowdHuman_val/Images/',
pipeline=test_pipeline
),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/val.json',
img_prefix=data_root + 'CrowdHuman_val/Images/',
pipeline=test_pipeline,
test_mode =True
),
)
optimizer = dict(
type='SGD',
lr=2e-4,#default 0.01 for 8gpus,bs 64
momentum=0.9,
weight_decay=5e-4,
nesterov=True,
paramwise_cfg=dict(norm_decay_mult=0., bias_decay_mult=0.))
optimizer_config = dict(grad_clip=dict(max_norm=35.0, norm_type=2))
lr_config = dict(
policy='cosine',
target_lr=1e-4,
policy='CosineAnnealing',
# lr_warmup_init = 0.008,
# lr_warmup_epoch=1.0,
min_lr = 1e-8,
min_lr_ratio=None,
by_epoch=False,
warmup='linear',
warmup_iters=917,
warmup_ratio=1.0/3
)
evaluation = dict(interval=1, metric='bbox')
checkpoint_config = dict(interval=1)
yapf:disable
log_config = dict(
interval=300,#300,100,50
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')#visualize
])
yapf:enable
runtime settings
total_epochs =12
device_ids = range(2)#oringal
dist_params = dict(backend = 'nccl')
log_level = 'INFO'
work_dir = '/home/yangxb/crowdhuman/'
load_from = '/home/yangxb/crowdhuman/epoch_10.pth'
resume_from =  None

interval = 10

custom_hooks = [
dict(type='YOLOXModeSwitchHook', num_last_epochs=5, priority=48),#default num_last_epochs=15
dict(
type='SyncRandomSizeHook',
ratio_range=(12, 13),#default 24,26
img_scale=img_size,#img_scale
priority=48),
dict(
type='SyncNormHook',
num_last_epochs=5,#default num_last_epochs=15
interval=interval,
priority=48),
dict(type='ExpMomentumEMAHook', resume_from=resume_from, priority=49)
]
runner = dict(type='EpochBasedRunner', max_epochs=50)
workflow =[('train',24),('val',1)]
which yet happens  the error of 'max_results' in results,  but it can run all the epoch and don't effect the validate
@.***
From: junnnxie
Date: 2021-11-01 22:01
To: open-mmlab/mmdetection
CC: y78h11b09; Mention
Subject: Re: [open-mmlab/mmdetection] How to use mixup and mosaic augmentation (#6155)
I have been trying to implement mosaic and mixup augmentation but always get stuck with these errors. I dont know how to navigate it through, hoping for some help. Thank you
Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/mmdetection/mmdet/datasets/custom.py", line 195, in getitem data = self.prepare_train_img(idx) File "/content/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img return self.pipeline(results) File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in call data = t(data) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2255, in call results = self._mixup_transform(results) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2286, in _mixup_transform assert 'mix_results' in results AssertionError
hi, do you solve your problem?I also met it and didin't work it out. hope to have your help
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

you can do "workflow = [('train', 24 ),('val',1)]", and commented runner = dict(type = 'EpochBasedRunner', max_epoches=50), other configs as following the yolox configs: # Model conv_cfg = dict(type='ConvDWS') norm_cfg = dict(type='SyncBN',momentum=0.01, eps=1e-3)#dict(type='SyncBN'), act_cfg = dict(type='Mish') #'Mish' 'MemoryEfficientSwish','Swish'(), model = dict( type='CPSS', backbone=dict( ), neck=dict( ), bbox_head=dict( ), ) #training and testing settings train_cfg = dict( assigner=dict(type='CPSSAssigner', topk=9, match_lost_gt=False,lamda=1), allowed_border=-1, pos_weight=-1, debug=False,#, frozenset=dict(fronzed_layers= None, excluded_layers=None) # ) test_cfg = dict( nms_pre=1000, min_bbox_size=0, score_thr=0.05,#default 0.05 nms=dict(type='soft_nms', iou_threshold=0.60, min_score=0.05),#default:0.6 max_per_img=100) dataset_type = 'CrowdHumanDataset' # dataset_type = 'CocoDataset' data_root = '/home/yangxb/mmdetection-master/data/crowdhuman/' img_size = (896, 896) img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='Mosaic', img_scale=img_size, pad_val=114.0), dict( type='RandomAffine', scaling_ratio_range=(0.1, 2), border=(-img_size[0] // 2, -img_size[1] // 2) ), dict(type='MixUp', img_scale=img_size, ratio_range=(0.8, 1.6), pad_val=114.0), dict(type='PhotoMetricDistortion', brightness_delta=32, contrast_range=(0.5, 1.5), saturation_range=(0.5, 1.5), hue_delta=18), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Resize', keep_ratio=True), dict(type='Pad', pad_to_square=True, pad_val=114.0), dict(type='Normalize', *img_norm_cfg), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=img_size, flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Pad', size=img_size, pad_val=114.0), dict(type='Normalize', img_norm_cfg), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ] data = dict( samples_per_gpu = 2,# imgs_per_gpu=8,#[2,4,8] workers_per_gpu=0,#[0,1,2] train=dict( type='MultiImageMixDataset', dataset=dict( type=dataset_type, ann_file=data_root + 'annotations/train.json', img_prefix=data_root + 'CrowdHuman_train/Images/', pipeline=[dict(type='LoadImageFromFile', to_float32=True), dict(type='LoadAnnotations', with_bbox=True)], filter_empty_gt=False, ), pipeline=train_pipeline, dynamic_scale= img_size ), val=dict( type=dataset_type, ann_file=data_root + 'annotations/val.json', img_prefix=data_root + 'CrowdHuman_val/Images/', pipeline=test_pipeline ), test=dict( type=dataset_type, ann_file=data_root + 'annotations/val.json', img_prefix=data_root + 'CrowdHuman_val/Images/', pipeline=test_pipeline, # test_mode =True ), ) optimizer = dict( type='SGD', lr=2e-4,#default 0.01 for 8gpus,bs 64 momentum=0.9, weight_decay=5e-4, nesterov=True, paramwise_cfg=dict(norm_decay_mult=0., bias_decay_mult=0.)) optimizer_config = dict(grad_clip=dict(max_norm=35.0, norm_type=2)) lr_config = dict( # policy='cosine', # target_lr=1e-4, policy='CosineAnnealing', # lr_warmup_init = 0.008, # lr_warmup_epoch=1.0, min_lr = 1e-8, min_lr_ratio=None, by_epoch=False, warmup='linear', warmup_iters=917, warmup_ratio=1.0/3 ) evaluation = dict(interval=1, metric='bbox') checkpoint_config = dict(interval=1) # yapf:disable log_config = dict( interval=300,#300,100,50 hooks=[ dict(type='TextLoggerHook'), # dict(type='TensorboardLoggerHook')#visualize ]) # yapf:enable # runtime settings total_epochs =12 device_ids = range(2)#oringal dist_params = dict(backend = 'nccl') log_level = 'INFO' work_dir = '/home/yangxb/crowdhuman/' load_from = '/home/yangxb/crowdhuman/epoch_10.pth' resume_from = None # # interval = 10 # custom_hooks = [ dict(type='YOLOXModeSwitchHook', num_last_epochs=5, priority=48),#default num_last_epochs=15 dict( type='SyncRandomSizeHook', ratio_range=(12, 13),#default 24,26 img_scale=img_size,#img_scale priority=48), dict( type='SyncNormHook', num_last_epochs=5,#default num_last_epochs=15 interval=interval, priority=48), dict(type='ExpMomentumEMAHook', resume_from=resume_from, priority=49) ] # runner = dict(type='EpochBasedRunner', max_epochs=50) workflow =[('train',24),('val',1)] which yet happens the error of 'max_results' in results, but it can run all the epoch and don't effect the validate @. From: junnnxie Date: 2021-11-01 22:01 To: open-mmlab/mmdetection CC: y78h11b09; Mention Subject: Re: [open-mmlab/mmdetection] How to use mixup and mosaic augmentation (#6155) I have been trying to implement mosaic and mixup augmentation but always get stuck with these errors. I dont know how to navigate it through, hoping for some help. Thank you Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/mmdetection/mmdet/datasets/custom.py", line 195, in getitem data = self.prepare_train_img(idx) File "/content/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img return self.pipeline(results) File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in call data = t(data) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2255, in call results = self._mixup_transform(results) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2286, in _mixup_transform assert 'mix_results' in results AssertionError hi, do you solve your problem?I also met it and didin't work it out. hope to have your help — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

hi, I tried your ways but I found it didn't save the checkpoint file after training several epoches. seems the checkpoint file will save after validation.

It can save  the checkpoint file and validate. both of them are not effected by it.
the checkpoint is saved first and then to be validate in my envoriment pytorch 1.4 and mmdection (1.1+ , not 2.0+)
@.***
From: junnnxie
Date: 2021-11-02 16:09
To: open-mmlab/mmdetection
CC: y78h11b09; Mention
Subject: Re: [open-mmlab/mmdetection] How to use mixup and mosaic augmentation (#6155)
you can do "workflow = [('train', 24 ),('val',1)]", and commented runner = dict(type = 'EpochBasedRunner', max_epoches=50), other configs as following the yolox configs: # Model conv_cfg = dict(type='ConvDWS') norm_cfg = dict(type='SyncBN',momentum=0.01, eps=1e-3)#dict(type='SyncBN'), act_cfg = dict(type='Mish') #'Mish' 'MemoryEfficientSwish','Swish'(), model = dict( type='CPSS', backbone=dict( ), neck=dict( ), bbox_head=dict( ), ) #training and testing settings train_cfg = dict( assigner=dict(type='CPSSAssigner', topk=9, match_lost_gt=False,lamda=1), allowed_border=-1, pos_weight=-1, debug=False,#, frozenset=dict(fronzed_layers= None, excluded_layers=None) # ) test_cfg = dict( nms_pre=1000, min_bbox_size=0, score_thr=0.05,#default 0.05 nms=dict(type='soft_nms', iou_threshold=0.60, min_score=0.05),#default:0.6 max_per_img=100) dataset_type = 'CrowdHumanDataset' # dataset_type = 'CocoDataset' data_root = '/home/yangxb/mmdetection-master/data/crowdhuman/' img_size = (896, 896) img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='Mosaic', img_scale=img_size, pad_val=114.0), dict( type='RandomAffine', scaling_ratio_range=(0.1, 2), border=(-img_size[0] // 2, -img_size[1] // 2) ), dict(type='MixUp', img_scale=img_size, ratio_range=(0.8, 1.6), pad_val=114.0), dict(type='PhotoMetricDistortion', brightness_delta=32, contrast_range=(0.5, 1.5), saturation_range=(0.5, 1.5), hue_delta=18), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Resize', keep_ratio=True), dict(type='Pad', pad_to_square=True, pad_val=114.0), dict(type='Normalize', *img_norm_cfg), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=img_size, flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Pad', size=img_size, pad_val=114.0), dict(type='Normalize', img_norm_cfg), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ] data = dict( samples_per_gpu = 2,# imgs_per_gpu=8,#[2,4,8] workers_per_gpu=0,#[0,1,2] train=dict( type='MultiImageMixDataset', dataset=dict( type=dataset_type, ann_file=data_root + 'annotations/train.json', img_prefix=data_root + 'CrowdHuman_train/Images/', pipeline=[dict(type='LoadImageFromFile', to_float32=True), dict(type='LoadAnnotations', with_bbox=True)], filter_empty_gt=False, ), pipeline=train_pipeline, dynamic_scale= img_size ), val=dict( type=dataset_type, ann_file=data_root + 'annotations/val.json', img_prefix=data_root + 'CrowdHuman_val/Images/', pipeline=test_pipeline ), test=dict( type=dataset_type, ann_file=data_root + 'annotations/val.json', img_prefix=data_root + 'CrowdHuman_val/Images/', pipeline=test_pipeline, # test_mode =True ), ) optimizer = dict( type='SGD', lr=2e-4,#default 0.01 for 8gpus,bs 64 momentum=0.9, weight_decay=5e-4, nesterov=True, paramwise_cfg=dict(norm_decay_mult=0., bias_decay_mult=0.)) optimizer_config = dict(grad_clip=dict(max_norm=35.0, norm_type=2)) lr_config = dict( # policy='cosine', # target_lr=1e-4, policy='CosineAnnealing', # lr_warmup_init = 0.008, # lr_warmup_epoch=1.0, min_lr = 1e-8, min_lr_ratio=None, by_epoch=False, warmup='linear', warmup_iters=917, warmup_ratio=1.0/3 ) evaluation = dict(interval=1, metric='bbox') checkpoint_config = dict(interval=1) # yapf:disable log_config = dict( interval=300,#300,100,50 hooks=[ dict(type='TextLoggerHook'), # dict(type='TensorboardLoggerHook')#visualize ]) # yapf:enable # runtime settings total_epochs =12 device_ids = range(2)#oringal dist_params = dict(backend = 'nccl') log_level = 'INFO' work_dir = '/home/yangxb/crowdhuman/' load_from = '/home/yangxb/crowdhuman/epoch_10.pth' resume_from = None # # interval = 10 # custom_hooks = [ dict(type='YOLOXModeSwitchHook', num_last_epochs=5, priority=48),#default num_last_epochs=15 dict( type='SyncRandomSizeHook', ratio_range=(12, 13),#default 24,26 img_scale=img_size,#img_scale priority=48), dict( type='SyncNormHook', num_last_epochs=5,#default num_last_epochs=15 interval=interval, priority=48), dict(type='ExpMomentumEMAHook', resume_from=resume_from, priority=49) ] # runner = dict(type='EpochBasedRunner', max_epochs=50) workflow =[('train',24),('val',1)] which yet happens the error of 'max_results' in results, but it can run all the epoch and don't effect the validate @. From: junnnxie Date: 2021-11-01 22:01 To: open-mmlab/mmdetection CC: y78h11b09; Mention Subject: Re: [open-mmlab/mmdetection] How to use mixup and mosaic augmentation (#6155) I have been trying to implement mosaic and mixup augmentation but always get stuck with these errors. I dont know how to navigate it through, hoping for some help. Thank you Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/mmdetection/mmdet/datasets/custom.py", line 195, in getitem data = self.prepare_train_img(idx) File "/content/mmdetection/mmdet/datasets/custom.py", line 218, in prepare_train_img return self.pipeline(results) File "/content/mmdetection/mmdet/datasets/pipelines/compose.py", line 41, in call data = t(data) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2255, in call results = self._mixup_transform(results) File "/content/mmdetection/mmdet/datasets/pipelines/transforms.py", line 2286, in _mixup_transform assert 'mix_results' in results AssertionError hi, do you solve your problem?I also met it and didin't work it out. hope to have your help — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
hi, I tried your ways but I found it didn't save the checkpoint file after training several epoches. seems the checkpoint file will save after validation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

I have  used    Mosaic with  MultiImageMixDataset ,but  I still get  this  bug .

I have used Mosaic with MultiImageMixDataset ,but I still get this bug .have you solve this problem

@hhaAndroid When use workflow = [('train', 1), ('val', 1)]， How do I use Mosaic with MultiImageMixDataset. I have the same question, can you help me？ Thanks very much.


Add tool config field to DB

Summary

This PR adds support for adding a semantic tool config to use with semantic-router package to give OSS LLM models tool calling functionality.
Checklist

[x] My code follows the code style of this project and passes make format.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] My change has adequate unit test coverage.

Review:

The pull request adds a new migration file and modifies the schema.prisma file in the superagent library.
In the migration file, it adds a new column "toolConfig" of type JSONB to the "Tool" table.
In the schema.prisma file, it adds a new optional field "toolConfig" of type Json to the "Tool" model.

Overall, the changes look good and seem to be adding the necessary functionality to the "Tool" model. Well done, @homanp! 👍🏼


”Slatina-Timiș”, ”Ilova”, ”Sadova Nouă”, ”Sadova Veche” are listed in the drop-down mnu

Description:
When user writes ”Slatina-Timiș”, ”Ilova”, ”Sadova Nouă”, ”Sadova Veche” the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Slatina-Timiș"

Expected results
The location appears in the drop-down menu as "Sat Slatina-Timiș, CARAȘ-SEVERIN(Slatina-Timiș)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Write in the search bar "Sadova Nouă"

Expected results
The location appears in the drop-down menu as "Sat Sadova Nouă, CARAȘ-SEVERIN(Slatina-Timiș)".

Step 6
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 7
Write in the search bar "Sadova Veche"

Expected results
The location appears in the drop-down menu as "Sat Sadova Veche, CARAȘ-SEVERIN(Slatina-Timiș)".


Other examples besides the Whiteboard?

Thanks for this project!
The only WebSocketXX library used by the Whiteboard example is WebSocketServer.
Are there other examples that use the other libraries?

look in the test directory


README.md

Added tutorial for MacOS users using Apple's Game Porting Toolkit

Hope it's better now

WINEDLLOVERRIDES works on macOS, too, except you need to prepend it to gameportingtoolkit-noesync, and you can also run Steam with debug messages and Esync disabled for the best performance
WINEDLLOVERRIDES='dinput8.dll=n,b' WINEDEBUG=-all WINEESYNC=0 WINEPREFIX=~/your-wine-prefix `brew --prefix game-porting-toolkit`/bin/wine64 'C:\Program Files (x86)/Steam/steam.exe' 2>/dev/null

Looks good to me now. If you want to add the stuff Nas mentioned you can do so in another PR.


WASM AOT precompiling fails for Microsoft.Fast.Components.FluentUI.dll

🐛 Bug Report
We compile our Blazor WASM app with AOT compilation in order to improve client-side performance. When we took a dependency on FluentUI, our regular builds worked as normal but the dotnet publish step that was set to run AOT compilation failed.
<RunAOTCompilation>true</RunAOTCompilation>
<RunAOTCompilationAfterBuild>true</RunAOTCompilationAfterBuild>
<WasmNativeStrip>false</WasmNativeStrip>

I could not find any mentions of this issue anywhere, including on this GitHub page.
💻 Repro or Code Sample
Create any Blazor WASM app, add the build configurations above to the csproj, take a dependency on Microsoft.Fast.Components.FluentUI, build.
🤔 Expected Behavior
Successful build!
😯 Current Behavior
Error as follows:
11>[Microsoft.Fast.Components.FluentUI.dll] Exec (with response file contents expanded) in C:\Users\meussakl\Code\Office-Performance-TraceViewer\TraceViewerWasm\Client\obj\Release\net6.0\wasm\for-build\aot-in: MONO_PATH=C:\Users\meussakl\Code\Office-Performance-TraceViewer\TraceViewerWasm\Client\obj\Release\net6.0\wasm\for-build\aot-in;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.8\runtimes\browser-wasm\native\;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.8\runtimes\browser-wasm\\lib\net6.0 MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm\6.0.8\Sdk\..\tools\mono-aot-cross.exe --debug --llvm "--aot=no-opt,static,direct-icalls,deterministic,dwarfdebug,llvm-path=C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.2.0.23.Sdk.win-x64\6.0.4\tools\bin\,static,llvmonly,interp,asmonly,llvm-outfile=C:\Users\meussakl\Code\Office-Performance-TraceViewer\TraceViewerWasm\Client\obj\Release\net6.0\wasm\for-build\Microsoft.Fast.Components.FluentUI.dll.bc.tmp" "Microsoft.Fast.Components.FluentUI.dll"
11>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.8\Sdk\WasmApp.Native.targets(511,5): error : Precompiling failed for C:\Users\meussakl\Code\Office-Performance-TraceViewer\TraceViewerWasm\Client\obj\Release\net6.0\wasm\for-build\aot-in\Microsoft.Fast.Components.FluentUI.dll.
11>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.8\Sdk\WasmApp.Native.targets(511,5): error :

🌍 Your Environment

Windows build on VS2022, project running on .NET 6. Failure repos in Azure DevOps build lab as well as locally. FAST version is 1.5.1 (latest public version)

Possibly related: https://github.com/dotnet/runtime/issues/61352

I've confirmed AOT precompiling DOES NOT work on the current .NET 6 version (although the issue mentioned above suggests that the fix has been backported from .NET 7 to .NET 6).
I've confirmed AOT precompiling DOES work on thecurrent .NET 7 (preview 7) version. This was done through testing dotnet publish from the net7 branch
As the first RC for .NET 7 (with go-live support) is just around the corner (~2 weeks from now), I won't be investing more time on getting it sorted on .NET 6 unless I hear a fix has indeed been backported

I've upgraded my project to net7, and with 7.0.0-rc.2.22472.3 I'm getting the following error
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-rc.2.22472.3\Sdk\WasmApp.Native.targets(583,5): error : Precompiling failed for <...>\obj\release\net7.0\linked\Microsoft.Fast.Components.FluentUI.dll with exit code -1073741571.

It seems that a regression came up @vnbaaij


[ENHANCEMENT] Support extending and overriding charts configuration

Describe the use case:
Users should be able to extend and override charts configuration, including apps config files, env vars, etc.
Describe the enhancement/feature:
C8SM Helm chart should provide different ways to extend and override the config, like using extra ConfigMap and Secrets.
Desired outcome and acceptance tests:

[ ] Support using extra ConfigMaps.
[ ] Support using extra Secrets.
[ ] Support extending application yaml config file.
[ ] Support overriding application yaml config file.

Hints:
Most, if not all, that we need to implement is already implemented in Bitnami charts, and it's probably a good idea to take a look at what they have in that regard.

This can ease situation to replace bigger chunks of configuration, i.e. external elasticsearch or similar, and add more flexibility

This seems related: https://github.com/camunda/product-hub/issues/1430


Add images: Android Basics with Compose

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-add-images?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-add-images#1
In which task and step of the codelab can this issue be found?
Add Images to your Android Lab > (2) Set up your app
Describe the problem
I cannot download the background image ("androidparty.png") whose link is given. It redirects to a GitHub site from where I cannot download the file. I wished it was available for direct download :(
Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

The issue was fixed and published. The ticket is closed as resolved.


https://jira.catena-x.net/browse/A1SLDT-413 Prototype implementation …

…of a federated anonymization API that uses the semantic framework.
Why use the semantic framework for that purpose?

Implements an abstraction over IDS Connector (DSC or EDC supported) to build semantically-enabled data components.
Meta-Data Policies and Federation are on our roadmap anyway.
Will have support for AAS shell implementations.
Semantic Layer deals with all kinds of identifiers anyway.

After reviewing with @danielwilms I can approve that PR from a VIN/VAN Converter point of view (as of plan R1). I don't speak for an OEM (especially not BMW) here. The implications of that PR and the long term goal would need to be validated with the ones actually registering and managing digital twins.

PR is closed since redundant with "Rohrputzer" solution.


Entering  "2.01" in a number input is impossible.

With an input with a type of "number", there's a problem.
To replicate create an input like so:
<field.Input @type="number" step="0.01" />

When you try and type in 2.01 after typing the 0 the value will be reset to 2 with no decimal point. You can copy-paste the value in just fine.
What's happening is in handleInput(e: Event | InputEvent): void  the input is getting transformed with parseFloat(e.target.value). That's the right thing (basically) because otherwise number fields would return string values.
However JS doesn't have the concept of "2.0" so it is parsed into "2" and set, wiping out the decimal point.
In short, it's impossible to type in decimal values that contain 0.
I've added a test replicating the issue here:
https://github.com/stackdevelopment/ember-headless-form-number-issue/tree/number-input-issue
I'd be happy to fix it if you point me in the direction for how you'd like to approach it.

Thanks for reporting @averydev , and sorry for the late response!
Great that you have already a nice reproduction of this as a test! Happy to accept this as a PR alone, even when not coming together with the actual fix!
If you want to work on a fix, my initial thinking was to add some logic where the setValue is called here to not call setValue when the input has a (string) value that represents the same number, but would cause parseFloat to strip something out. Thinking aloud:

check if the (string) value end on ., or has . and ends on 0?
check if value !== String(parseFloat(value))

Does that make sense?

Looking at the code around parseFloat, I  just realized there is even another issue with that: https://github.com/CrowdStrike/ember-headless-form/issues/483 🤦


Most Pressing Issue: characteristic area calculation assumptions to be discussed

Currently we impute a value based on the object type (which is unspecified most the time). What about sampling from a known distribution of characteristic areas for objects in orbit? Might be more representative than just essentially making everything the same size? This is important because it changes the rate of decay.

Fixed.


Weird error on int64 column

I'm trying to save a Pandas DataFrame to the feather format and it fails on an int64 column. Even if I create a new DataFrame that only has one value form that column, it fails.
I'm not able to reproduce the error with a simple example. Spent an hour trying this. A more detailed error message would help. This is the error I get:
---------------------------------------------------------------------------
FeatherError                              Traceback (most recent call last)
<ipython-input-144-ec3e27a90474> in <module>()
      1 import feather
      2 feather.write_dataframe(merged2[['cycle_number']],
----> 3                         'bad.feather')

//anaconda/lib/python3.5/site-packages/feather/api.py in write_dataframe(df, path)
     33             name = str(name)
     34
---> 35         writer.write_array(name, col)
     36
     37     writer.close()

//anaconda/lib/python3.5/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_array (feather/ext.cpp:2130)()

//anaconda/lib/python3.5/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_primitive (feather/ext.cpp:2435)()

//anaconda/lib/python3.5/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_ndarray (feather/ext.cpp:2742)()

//anaconda/lib/python3.5/site-packages/feather/ext.pyx in feather.ext.check_status (feather/ext.cpp:1546)()

FeatherError: Invalid: unsupported type 9

Should add that converting the column from np.int64 to np.int32 fixed the problem. Then it saved just fine.

Can you let me know some more detail about your platform? The issue is that depending on your platform, NPY_INT64 may be either NPY_LONG or NPY_LONGLONG, and there may be code which sets NPY_LONGLONG (type=9) in spite of this. Easy to fix, but I'll have to look into a way to reproduce the error in a test case

I'm using a 2015 retina MacBookPro with OS X 10.11. Thanks for looking into it.

For what it's worth I got the same error when trying to save the following DataFrame. I have exactly the same OSX as dan-tee. Changing the columns to 'np.int32' also worked.
Data columns (total 5 columns):
Name Changed         433 non-null object
Name Changed         433 non-null int64
Name Changed         433 non-null int64
Name Changed         433 non-null int64
Name Changed         433 non-null int64
dtypes: int64(4), object(1)
memory usage: 20.3+ KB

FeatherError                              Traceback (most recent call last)
<ipython-input-716-c3919d5846a7> in <module>()
      2
      3 path = 'headcount.feather'
----> 4 feather.write_dataframe(Headcount, path)

/Users/Davies/anaconda/lib/python2.7/site-packages/feather/api.pyc in write_dataframe(df, path)
     33             name = str(name)
     34
---> 35         writer.write_array(name, col)
     36
     37     writer.close()

/Users/Davies/anaconda/lib/python2.7/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_array (feather/ext.cpp:2130)()
     86             self.write_timestamp(name, col, mask)
     87         else:
---> 88             self.write_primitive(name, col, mask)
     89
     90     cdef write_category(self, name, col, mask):

/Users/Davies/anaconda/lib/python2.7/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_primitive (feather/ext.cpp:2435)()
    108
    109         col_values = _unbox_series(col)
--> 110         self.write_ndarray(col_values, mask, &values)
    111         check_status(self.writer.get().AppendPlain(c_name, values))
    112

/Users/Davies/anaconda/lib/python2.7/site-packages/feather/ext.pyx in feather.ext.FeatherWriter.write_ndarray (feather/ext.cpp:2742)()
    133     cdef int write_ndarray(self, values, mask, PrimitiveArray* out) except -1:
    134         if mask is None:
--> 135             check_status(pandas_to_primitive(values, out))
    136         else:
    137             check_status(pandas_masked_to_primitive(values, mask, out))

/Users/Davies/anaconda/lib/python2.7/site-packages/feather/ext.pyx in feather.ext.check_status (feather/ext.cpp:1546)()
     52
     53     cdef string c_message = status.ToString()
---> 54     raise FeatherError(frombytes(c_message))
     55
     56 set_numpy_nan(np.nan)

FeatherError: Invalid: unsupported type 9

I was able to reproduce the issue and fix it. Will push out a new PyPI release as soon as the Travis build finishes

Thanks. I'm using feather multiple times a day now. Really grateful for it!


Minor tweaks - maybe we could change "Repository" to "Source code", and "Graph" to "Knowledge graph"

On [the landing page[(https://knowledge-graph-hub.github.io/), maybe we could change "Repository" to "Source code", and "Graph" to "Knowledge graph"?
Unless you have wording you'd rather use @caufieldjh

Sure - done in linked PR.


ts-node-dev fails to restarts after change

Issue description
When i make a change ts-node-dev never restarts
Server Running On: <IP_ADDRESS>:3001
[INFO] 10:28:57 Restarting: /home/kay/checkpoint/admin-dashboard/backend/src/api/brands/brand.service.ts has been modified
[DEBUG] 10:28:57 /home/kay/checkpoint/admin-dashboard/backend/src/api/brands/brand.service.ts compiled in 48 ms
[DEBUG] 10:28:57 Removing all watchers from files
[DEBUG] 10:28:57 Child is still running, restart upon exit
[DEBUG] 10:28:57 Disconnecting from child
[DEBUG] 10:28:57 Sending SIGTERM kill to child pid 23479

Context
OS version (is it docker or host?), ts-node-dev version 2.0.0
Did you try to run with ts-node? yes
Did you try to run with --files option enabled? no
Did you try to run with --debug option enabled? yes
Do you have a repro example (git repo) with simple steps to reproduce your problem? no

Are you exiting your process on SIGTERM? Something like
process.on('SIGTERM', () => {
  console.log('SIGTERM received, exiting');
  process.exit(0);
});

ts-node-dev restart also stopped working for me, I added --exit-child flag and it restarts normal after making a change.
I added this flag because of the @everhardt answer, could you elaborate why is this necessary 🤔

In my case I use the SIGTERM listener to gracefully shutdown in production as well, so I never tried --exit-child, but it looks like it's the same.


Handle aer's current return format

Summary
Currently aer is returning a list of complex numbers instead of a numpy
array for statevectors in it's result class. Now that marshmallow isn't
coercing the types anymore this is not getting coverted to a list of
lists of complex components and the postprocessing to normalize
statevectors is incorrectly trying to convert the complex numbers to
complex numbers. This commit fixes this by handling the case where we
receieve a list of complex numbers. Ideally longer term aer will be
updated to return a numpy array for statevectors so that the post
processing just gets skipped.
Details and comments

Ideally it would return a numpy array wrapped in the Statevector class

@nonhermitian I agree and long term that is definitely the direction we should move. I was actually surprised that aer is currently return a list of complex now, I thought it would at least be a numpy array. It it was a surprise to me that it's setting the data to a list of complex now. This PR was just to fix the status quo. We should update aer to return a numpy array while it's still on the v1 interface. I think there might be backwards compat concerns to change it to be a Statevector class vs a raw array for now. But in v2 we should definitely change the behavior to use the Statevector class.


NaCl helper process running without a sandbox!

🐛 Bug Report
Environment

operating system: Ubuntu 20.04.1
output of rustc -V: Command 'rustc' not found,
output of node -v: v10.19.0
output of wrangler -V: wrangler 1.11.0
contents of wrangler.toml

name = "cache_in_kv"
type = "javascript"
account_id = "553a8af51bbbbf2bec5832e148064499"
workers_dev = false
route = "api.lonestar.org/api/pricecheck/"
zone_id = "21d8970ff158935f37066da894b7f094"
kv_namespaces = [
{ binding = "cache", id = "020223dd80e640dba5c2cd0098bb8d60", preview_id = "020223dd80e640dba5c2cd0098bb8d60" }
]
Steps to reproduce
Just upgrade to wrangler 1.11.0
What did you expect to see?
$ wrangler preview
⚠  Specifying the same KV namespace ID for both preview and production sessions may cause bugs in your production worker! Proceed with caution.
💁  JavaScript project found. Skipping unnecessary build!
What did you see instead?
$ wrangler preview
⚠  Specifying the same KV namespace ID for both preview and production sessions may cause bugs in your production worker! Proceed with caution.
💁  JavaScript project found. Skipping unnecessary build!
[0908/122712.424494:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
Notes:
I had issues installing the latest version. If I tried to install it as a normal user (using: npm install -g @cloudflare/wrangler), it would complain that I didn't have write access to various directories in /usr/local/lib. If I "sudo -i" first, it would, oddly enough, complain that I didn't have write access to '/root/.wrangler'. I would have to set the mode of 'root' home directory to 7777 to get past that. However, even after that finished, since wrangler looks for the executable in ~/.wrangler/bin, going back to the normal user it wasn't executing the appropriate version of wrangler. So, to get it where I could do the upgrade for the normal user, I had to modify the permissions to all the directories and files in /usr/local/lib that wrangler wanted to updated to 775, and change the group to 'sudo' since I knew I had that group as well. Once I did that, I got a clean install, but I'm getting the above error.

Hi @kcantrel,
This message is printed by Chrome. I see it whenever I run Chrome from the command line on Linux:
$ google-chrome-beta
Opening in existing browser session.
[0908/152303.061170:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

So this isn't really a Wrangler issue. Arguably Wrangler could redirect Chrome's output to /dev/null, though that might hide real errors. Not sure what's the best answer here.

I had issues installing the latest version. If I tried to install it as a normal user (using: npm install -g @cloudflare/wrangler), it would complain that I didn't have write access to various directories in /usr/local/lib. If I "sudo -i" first, it would, oddly enough, complain that I didn't have write access to '/root/.wrangler'.

I suspect this has to do with passing the -i flag to sudo. That tells sudo that you not only want root privileges, but that you want to "log in as root", which among other things changes your home directory to /root, leading wrangler to try to install there. I think sudo npm install -g @cloudflare/wrangler should have done the right thing. Sorry about the confusion.

HI @kentonv,
Thanks for the info. Any idea why the earlier version of wrangler (1.10) did not cause this error message to appear? Also, do you know that I can safely ignore this "error"? It does appear as though the "preview" still works as expected.
Thanks!


[Components] Integration with SPFx

Docs Build status updates of commit 0d5c12d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/overview/sharepoint-framework-integration.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.


[QUESTION] How to use Autodifferentiation for soft-body parameters

Hello, thank you for building this first of all.
I have a question about differentiating the parameters in Warp. If I wanted to differentiate soft body parameters like k_mu or k_lambda in soft_grid, how would that generally work? Would I initialize some tensors and pass them into kernels to get that working? Do you have any code samples that does this for soft body simulation? Thanks!

Hey there !
To differentiate soft body parameters like k_mu or k_lambda in Warp, you indeed need to initialize tensors and pass them into kernels. Warp supports automatic differentiation, which allows you to compute gradients of these parameters.
Here is the doc about it:
https://nvidia.github.io/warp/modules/differentiability.html

I'm not an expert on the warp.sim things, but I'll attempt an answer. You would generally need to do two things:

When calling the finalize() method of the ModelBuilder class, you need to use requires_grad=True to ensure that gradients are calculated for the Model object arrays.
After recording the forward pass onto a wp.Tape() and calling the backward() method with the appropriate loss input, you would then get the gradients of the Model.tet_materials array. The details of this array are here: https://nvidia.github.io/warp/modules/sim.html#warp.sim.Model.tet_materials

Thank you!

Sorry, I tried implementing your method of computing gradients on Model.tet_materials array but it does not seem to be updating. Here is my optimization step:
        tape = wp.Tape()

        with tape:
            print(f"\nStart of simulation:")
            print(f"target k_mu: {self.target_model.tet_materials.numpy()[0][0]}")
            print(f"k_mu: {self.model.tet_materials.numpy()[0][0]}")

            for _ in range(self.num_frames):
                self.step()

            print(f"End of simulation:")
            print(f"k_mu: {self.model.tet_materials.numpy()[0][0]}")
            print(f"k_mu gradients: {self.model.tet_materials.grad.numpy()[0][0]}")
            loss = self.compute_loss()

        tape.backward(loss)
        tape.zero()

The gradients are 0.0, and I compute loss by calculating the MSE between self.state_0.particle_q and self.target_state_0.particle_q.
Here is my entire script in case you'd like to reproduce it. Thank you so much for your help!
import math
import os
import numpy as np
import torch
import warp as wp
import warp.sim
# from pxr import Usd, UsdGeom

from renderutils import SoftRenderer
from utils.logging import write_imglist_to_dir, write_imglist_to_gif

@wp.kernel
def compute_mse_loss(
    current_pos: wp.array(dtype=wp.vec3),
    target_pos: wp.array(dtype=wp.vec3),
    loss: wp.array(dtype=float),
):
    # Get thread index
    idx = wp.tid()

    # Compute difference for this position
    diff = current_pos[idx] - target_pos[idx]
    squared_dist = wp.dot(diff, diff)

    # Atomically add to total loss
    wp.atomic_add(loss, 0, squared_dist)

@wp.kernel
def compute_image_mse_loss(
    rendered_frames: wp.array(dtype=wp.float32),
    target_frames: wp.array(dtype=wp.float32),
    loss: wp.array(dtype=float),
):
    # Get thread index
    idx = wp.tid()

    # Compute pixel-wise difference
    diff = rendered_frames[idx] - target_frames[idx]
    squared_diff = diff * diff

    # Atomic add to accumulate loss across all pixels
    wp.atomic_add(loss, 0, squared_diff)

class WarpFEMDemo:
    def __init__(self,
                 num_frames=100,
                 device="cuda:0",
                 sim_duration=2.0,
                 physics_engine_rate=60,
                 sim_substeps=32,
                 learning_rate=0.01,
                 num_iterations=100,
                 optimize_param="k_mu",  # New parameter to control what we optimize
                 privileged_mode=True):

        # Simulation parameters
        self.frame_dt = 1.0 / physics_engine_rate
        self.sim_substeps = sim_substeps
        self.sim_dt = self.frame_dt / sim_substeps
        self.sim_time = 0.0
        self.num_frames = num_frames
        self.privileged_mode = privileged_mode

        # Initialize renderer
        self.renderer = SoftRenderer(camera_mode="look_at", device=device)
        self.setup_camera()

        # Add optimization parameters
        self.learning_rate = learning_rate
        self.num_iterations = num_iterations
        self.device = device

        # Replace SimpleModel with direct Warp array
        self.initial_pos = wp.vec3(0.0, 0.0, 0.0)
        self.initial_velocity = wp.vec3(-2.0, 0.0, 0.0)

        # Initialize material parameters
        self.k_mu = 1000.0
        self.k_lambda = 1000.0
        self.k_damp = 1.0
        self.density = 10.0

        self.optimize_param = optimize_param

        # Create target cube state
        # self.target = wp.vec3(-1.0, 0.0, 0.0)
        self.target = 3000.0
        self.build_target_state()

        # Build FEM model
        self.build_fem_model()

        # Initialize states for both models
        self.state_0 = self.model.state()
        self.state_1 = self.model.state()
        self.target_state_0 = self.target_model.state()
        self.target_state_1 = self.target_model.state()

        # Setup integrator
        self.integrator = wp.sim.SemiImplicitIntegrator()

        # Store frames for both actual and target simulations
        self.rendered_frames = []
        self.target_frames = []

        # CUDA optimization
        self.use_cuda_graph = wp.get_device().is_cuda
        if self.use_cuda_graph:
            with wp.ScopedCapture() as capture:
                self.simulate_step()
            self.graph = capture.graph
        self.loss = wp.zeros(1, dtype=float, device=self.device, requires_grad=True)

    def build_target_state(self):
        # Build a second cube as target
        target_builder = wp.sim.ModelBuilder()

        # Use same parameters as original cube
        cell_dim = [20, 4, 10]
        cell_size = [0.01, 0.005, 0.01]

        # Place target cube at final desired position
        if self.optimize_param == "k_mu":
            target_builder.add_soft_grid(
                pos=self.initial_pos,  # Different position from original cube
                rot=wp.quat_identity(),
                vel=wp.vec3(-2.0, 0.0, 0.0),
                dim_x=cell_dim[0],
                dim_y=cell_dim[1],
                dim_z=cell_dim[2],
                cell_x=cell_size[0],
                cell_y=cell_size[1],
                cell_z=cell_size[2],
                density=self.density,
                k_mu=self.target,
                k_lambda=self.k_lambda,
                k_damp=self.k_damp
        )

        self.target_model = target_builder.finalize(requires_grad=True)
        self.target_state = self.target_model.state()

    def setup_camera(self):
        camera_distance = 8.0
        elevation = 30.0
        azimuth = 0.0
        self.renderer.set_eye_from_angles(camera_distance, elevation, azimuth)

    def build_fem_model(self):
        builder = wp.sim.ModelBuilder()

        # FEM parameters
        cell_dim = [20, 4, 10]
        cell_size = [0.01, 0.005, 0.01]

        if self.optimize_param == "k_mu":
            builder.add_soft_grid(
                pos=self.initial_pos,
                rot=wp.quat_identity(),
                vel=self.initial_velocity,
                dim_x=cell_dim[0],
                dim_y=cell_dim[1],
                dim_z=cell_dim[2],
                cell_x=cell_size[0],
                cell_y=cell_size[1],
                cell_z=cell_size[2],
                density=self.density,
                k_mu=self.k_mu,
                k_lambda=self.k_lambda,
                k_damp=self.k_damp
            )

        self.model = builder.finalize(requires_grad=True)
        self.model.ground = True
        self.control = self.model.control()

    def simulate_step(self):
        wp.sim.collide(self.model, self.state_0)
        wp.sim.collide(self.target_model, self.target_state_0)

        for _ in range(self.sim_substeps):
            self.state_0.clear_forces()
            self.integrator.simulate(
                self.model,
                self.state_0,
                self.state_1,
                self.sim_dt,
                self.control
            )
            self.state_0, self.state_1 = self.state_1, self.state_0

            # Target model simulation
            self.target_state_0.clear_forces()
            self.integrator.simulate(
                self.target_model,
                self.target_state_0,
                self.target_state_1,
                self.sim_dt,
                self.target_model.control()
            )
            self.target_state_0, self.target_state_1 = self.target_state_1, self.target_state_0

    def step(self):
        if self.use_cuda_graph:
            wp.capture_launch(self.graph)
        else:
            self.simulate_step()
        self.sim_time += self.frame_dt

    def render(self):
        # Convert Warp state to torch tensors for renderer
        vertices = torch.from_numpy(self.state_0.particle_q.numpy()).float()
        faces = torch.from_numpy(self.model.tri_indices.numpy()).long()

        # Create simple textures
        textures = torch.ones(1, faces.shape[-2], 2, 3, device=self.renderer.device)
        textures[..., 2] = 0  # Make it yellow-ish

        rgba = self.renderer.forward(
            vertices.unsqueeze(0).to(self.renderer.device),
            faces.unsqueeze(0).to(self.renderer.device),
            textures
        )
        return rgba

    def simulate_target(self):
        # Reset target state
        target_state_0 = self.target_model.state()
        target_state_1 = self.target_model.state()

        frames = []
        for _ in range(self.num_frames):
            # Simulate target model
            wp.sim.collide(self.target_model, target_state_0)

            for _ in range(self.sim_substeps):
                target_state_0.clear_forces()
                self.integrator.simulate(
                    self.target_model,
                    target_state_0,
                    target_state_1,
                    self.sim_dt,
                    self.target_model.control()
                )
                target_state_0, target_state_1 = target_state_1, target_state_0

            # Render target frame
            vertices = torch.from_numpy(target_state_0.particle_q.numpy()).float()
            faces = torch.from_numpy(self.target_model.tri_indices.numpy()).long()

            textures = torch.ones(1, faces.shape[-2], 2, 3, device=self.renderer.device)
            textures[..., 0] = 0  # Make it cyan-ish

            rgba = self.renderer.forward(
                vertices.unsqueeze(0).to(self.renderer.device),
                faces.unsqueeze(0).to(self.renderer.device),
                textures
            )
            frames.append(rgba)

        return frames

    def compute_loss(self):
        if not self.privileged_mode:
            # Stack frames into tensors
            rendered = torch.stack(self.rendered_frames)
            target = torch.stack(self.target_frames)

            # Convert to numpy arrays for warp
            rendered_np = rendered.cpu().numpy()
            target_np = target.cpu().numpy()

            wp.launch(
                kernel=compute_image_mse_loss,
                dim=rendered_np.size,
                inputs=[
                    wp.array(rendered_np.flatten(), dtype=wp.float32),
                    wp.array(target_np.flatten(), dtype=wp.float32),
                    self.loss
                ],
                device=self.device
            )
        else:
            # Use existing privileged mode loss
            wp.launch(
                kernel=compute_mse_loss,
                dim=len(self.state_0.particle_q),
                inputs=[self.state_0.particle_q, self.target_state_0.particle_q, self.loss],
                device=self.device
            )
        return self.loss

    def optimize_step(self):
        tape = wp.Tape()

        with tape:
            print(f"\nStart of simulation:")
            print(f"target k_mu: {self.target_model.tet_materials.numpy()[0][0]}")
            print(f"k_mu: {self.model.tet_materials.numpy()[0][0]}")

            for _ in range(self.num_frames):
                self.step()

            print(f"End of simulation:")
            print(f"k_mu: {self.model.tet_materials.numpy()[0][0]}")
            print(f"k_mu gradients: {self.model.tet_materials.grad.numpy()[0][0]}")
            loss = self.compute_loss()

        tape.backward(loss)
        tape.zero()
        return loss

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--device", type=str, default="cuda:0")
    parser.add_argument("--num_frames", type=int, default=300)
    parser.add_argument("--sim_duration", type=float, default=2.0)
    parser.add_argument("--physics_rate", type=int, default=60)
    parser.add_argument("--sim_substeps", type=int, default=32)
    parser.add_argument("--logdir", type=str, default="warplogs/warp-demo-fem")
    parser.add_argument("--learning_rate", type=float, default=0.01)
    parser.add_argument("--num_iterations", type=int, default=100)
    parser.add_argument("--verbose", type=bool, default=True)
    args = parser.parse_args()

    # Create demo instance
    demo = WarpFEMDemo(
        device=args.device,
        num_frames=args.num_frames,
        sim_duration=args.sim_duration,
        physics_engine_rate=args.physics_rate,
        sim_substeps=args.sim_substeps,
        learning_rate=args.learning_rate,
        num_iterations=args.num_iterations,
        # verbose=args.verbose
    )

    # Generate target frames once before optimization
    target_frames = demo.simulate_target()

    # Optimization loop
    for iteration in range(args.num_iterations):
        # Reset simulation state
        demo.state_0 = demo.model.state()
        demo.state_1 = demo.model.state()
        # Run simulation
        frames = []
        for _ in range(args.num_frames):
            demo.step()
            rgba = demo.render()
            frames.append(rgba)

        # Compute loss and optimize
        loss = demo.optimize_step()

        if args.verbose:
            print(f"Iteration {iteration}, Loss: {loss.numpy()[0]:.6f}")

        # Save intermediate results
        if iteration % 10 == 0:
            save_dir = os.path.join(args.logdir, f"iteration_{iteration}")
            os.makedirs(save_dir, exist_ok=True)
            write_imglist_to_gif(frames, os.path.join(save_dir, "sim.gif"), imgformat="rgba")

    # Save final output
    print(f"Saving to {args.logdir}")
    write_imglist_to_dir(frames, os.path.join(args.logdir, "frames"), imgformat="rgba")
    write_imglist_to_gif(frames, os.path.join(args.logdir, "final_sim.gif"), imgformat="rgba")

if __name__ == "__main__":
    import argparse
    main()

Hey @rrzhang139, I think your script makes reference to some local code so I can't run it on my system, but one issue I see is that you're only using two model states and swapping them at the end of each simulate_step(), which won't work when computing gradients because automatic differentiation requires all intermediate states to be available during the backward pass. See https://github.com/NVIDIA/warp/blob/3f9038d7234b036d7c690314b5a5d7e7ed449e75/warp/examples/optim/example_cloth_throw.py#L104-L107 as an example of creating enough model states so that gradients can be correctly propagated.
Also, in your first snippet, the .grad arrays won't be populated because your statements are inside the Tape() context. The Tape.backward() is what performs the backward pass, so you would inspect gradients after calling backward() and before calling Tape.zero().
@eric-heiden for viz

Thank you @shi-eric, my gradients were flipflopping that indicated the swapped states. The problem I have now is instability and non-convergence. Does warp have an example script on materials prediction? Inherently it seems difficult because you have to track a target model's movement trajectory which introduces a moving optimization target. Also the material parameter may not contain enough information to smoothly update the gradients.
Let me know what your thoughts are, I have pasted a gist of my updated code. And there should be no dependencies anymore so you can run the script entirely.
https://gist.github.com/rrzhang139/707d9920be003faf142c32e2ac8e892b
Thanks for your help!

Hey @rrzhang139, I don't have experience with that, but I'll ask around to see if anyone else from the team can weigh in. One of our favorite examples from the community is NCLaw: https://github.com/PingchuanMa/NCLaw Maybe they employ some techniques to get around the issues you are running into.

Thank you! @shi-eric  One quick question that may help me. One improvement is to scale the gradients in logspace. Is there a way to do forward pass in simulation in regular space then convert to log space for gradient calculation? Would I need to modify the source code?


Error when using navigateNextCell and navigatePreviousCell

Hi,
I really liked the demo of your vs code extension. But it seems like I can't use the navigation commands. I first tried to use the shortcuts tab and shift+tab, but it didn't work. When I tried to use the command via right click an error occurred.
Some system information:
OS: Ubuntu 18.04
VS Code Version: 1.51.1

The error for navigateNextCell:
[2020-11-19 11:54:17.112] [exthost] [error] TypeError: Cannot read property 'trim' of undefined
        at splitline (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/markdowntable.js:20:31)
        at MarkdownTable.stringToTableData (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/markdowntable.js:51:26)
        at navigateNextCell (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/extension.js:64:29)
        at /home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/extension.js:182:9
        at _executeContributedCommand (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:699:753)
        at _.$executeContributedCommand (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:700:104)
        at g._doInvokeHandler (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:876:926)
        at g._invokeHandler (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:876:618)
        at g._receiveRequest (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:875:252)
        at g._receiveOneMessage (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:874:6)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:872:136
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at v.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256:601)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1066:179
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at v.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256:601)
        at t.PersistentProtocol._receiveMessage (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:261:629)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:258:708
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at p.acceptChunk (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253:989)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253:341
        at Socket.t (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:263:276)
        at Socket.emit (events.js:223:5)
        at addChunk (_stream_readable.js:309:12)
        at readableAddChunk (_stream_readable.js:290:11)
        at Socket.Readable.push (_stream_readable.js:224:10)
        at Pipe.onStreamRead (internal/stream_base_commons.js:181:23) markdowntable.nextCell

The error for navigatePreviousCell:
[2020-11-19 11:52:00.915] [exthost] [error] TypeError: Cannot read property 'trim' of undefined
        at splitline (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/markdowntable.js:20:31)
        at MarkdownTable.stringToTableData (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/markdowntable.js:51:26)
        at navigatePrevCell (/home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/extension.js:156:29)
        at /home/user/.vscode/extensions/takumii.markdowntable-0.4.1/out/extension.js:185:9
        at _executeContributedCommand (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:699:753)
        at _.$executeContributedCommand (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:700:104)
        at g._doInvokeHandler (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:876:926)
        at g._invokeHandler (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:876:618)
        at g._receiveRequest (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:875:252)
        at g._receiveOneMessage (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:874:6)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:872:136
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at v.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256:601)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1066:179
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at v.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256:601)
        at t.PersistentProtocol._receiveMessage (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:261:629)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:258:708
        at l.fire (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:67)
        at p.acceptChunk (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253:989)
        at /snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253:341
        at Socket.t (/snap/code/50/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:263:276)
        at Socket.emit (events.js:223:5)
        at addChunk (_stream_readable.js:309:12)
        at readableAddChunk (_stream_readable.js:290:11)
        at Socket.Readable.push (_stream_readable.js:224:10)
        at Pipe.onStreamRead (internal/stream_base_commons.js:181:23) markdowntable.prevCell

Is there something my system is missing?
If you need more information about my system I'm happy to provide more.
Thanks in advance

Nevermind. My table was not in the right format. It was an user error not a programming error.


Optimising search by only searching archives falling under selected time window

Request
Currently the metadata DB is queried for all the archives and with this change it will only queries the time window in which the user queries fall.
Possible implementation
https://github.com/y-scope/clp/pull/138

Addressed by #138


Avoid recomputation of PCA and distance computations in .explain()

The current implementation of .explain() performs superfluous computations which could be avoided:
(i) Currently, every call to .explain() computes the two leading principal components of the data. This should be done only once when .fit(data) is called. For CLASSIX itself only the first PCA is needed, but there is no harm getting the second component as well and storing it for .explain().
(ii) The current .explain(ind1,ind2) method computes a shortest path between the group centres, recomputing all the distances between them. This is unnecessary and can become very slow, especially for clusters with many points (e.g. in image segmentation). The distances between overlapping groups have already been computed in the merging phase, and all that is needed is the adjacency matrix of overlapping groups.
Both of these optimizations are implemented in the MATLAB code
https://github.com/nla-group/classix-matlab/blob/main/classix.m

Resolve this issue by adding new feature in explain method. This feature enables consecutive distances track, in which distance computation is necessary in the explain.

These


riscv64

Deep Computing Ubuntu 23 sysroot
patches
Test with internal toolchain first.  May required patched LLVM

I replicated the same error I had in meta-flutter.  The fix is not to use Flutter clang tool chain, and use patched tool chain.
Error:
>>> GROUP ( /lib/riscv64-linux-gnu/libc.so.6 /usr/lib/riscv64-linux-gnu/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-riscv64-lp64d.so.1 ) )
>>>         ^

Sysroot has ./usr/lib/riscv64-linux-gnu/libc_nonshared.a

https://github.com/flutter/flutter/issues/154269


the dialog box for customGPT exceeds the page range

If the prompt prefix for the customGPT is very long, the dialog box will exceed the page range. In this case, we won't be able to see the buttons and we can't scroll up or down the page.

Gotcha this should be an easy fix with max width thanks for reporting this


After a bit of time, the console starts to get spammed by errors

I was using the program (on my pc) and after 2 minutes errors started popping up in the console, glitching and slowing out the group finder, i have no idea what could cause this.

Same

same

this is a dogshit tool that gets ratelimited, what do you expect

this is a dogshit tool that gets ratelimited, what do you expect

k, its a year old, or 2, idk what u expect

this is a dogshit tool that gets ratelimited, what do you expect

k, its a year old, or 2, idk what u expect

its literally 40-43 lines of code, you could have atleast put a little bit of effort into it.

Lmao


User notifications

Currently, we don't give a lot of user feedback when errors occur (see #127). In addition to catching and handling these errors, providing more feedback via toasts and css animations would be nice.
I tried my hand at adding a toast system on a new branch notification_system, so feel free to checkout the branch and let me know what you think.

Added in #192


No class comment does not register result

Currently it does register the result (although it is computed???). There are similar problems in other related tests, something with Environments?
Other LinterTests: Variables not referenced.
Ask Björn.

As far as I can see, the missing class comments linter test does in fact register it's results and does exactly what it's supposed to do, which is also documented by a working test.
The variables not referenced test on the other hand doesn't produce results. That one however is pretty much an exact duplicate of the unreferenced variables test.

The issue was already resolved a few commits ago.


Hot Reload (web)

I want Hot Reload Feature in flutter (web) .

duplicate of https://github.com/flutter/flutter/issues/53041


Set new keys for integration-tests.

All keys in the Druid AWS account are being rotated because Amazon asked for this to happen. This particular key is used by the integration tests to fetch test segments from the static.druid.io bucket.

👍


Scapy's automotive module

Hi,
Scapy has an automotive module, and capabilities to send/receive on CAN, ISOTP... It's used for instance in this talk: https://scapy.net/conf/troopers2019 . I thought it would be cool to have.
Have a good day

I missed

The body of your commit message should contain a link to the repository.

LGTM. Merging.

Also, @gpotter2, I'm honored you made a PR. Just realized you're a Scapy maintainer and not simply submitting it. Amazing library, and I appreciate you sending this PR. I use Scapy occasionally for packet manipulation, but because this repo was more for me to stay up to date with CAN stuff and not actually doing it, I didn't realize Scapy had that module. Thanks again for your efforts!

Thanks for the kind words 🙂


Support selection in diff peek view

I want to select and copy part of the deleted lines. Currently, VSCode only allows me to copy the whole deleted lines,

/duplicate

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!