evaluating on weights trained with custom dataset

I followed instructions to train with my own custom dataset.
However when I try to evaluate using those trained weight that I got from training my dataset, I get this error.
[01/11 13:41:30 yolact.eval]: Loading model...
WARNING [01/11 13:41:34 yolact.model.load]: Some parameters required by the model do not exist in the checkpoint, and are initialized as they should be: prediction_layers.0.conf_layer.weight, prediction_layers.0.conf_layer.bias, semantic_seg_conv.weight, semantic_seg_conv.bias
[01/11 13:41:34 yolact.eval]: Model loaded.
[01/11 13:41:34 yolact.eval]: Converting to TensorRT...
[01/11 13:41:34 yolact.eval]: Converting backbone to TensorRT...
[01/11 13:41:37 yolact.eval]: Converting protonet to TensorRT...
[01/11 13:41:37 yolact.eval]: Converting FPN to TensorRT...
[01/11 13:41:37 yolact.eval]: Converting PredictionModule to TensorRT...
[01/11 13:41:52 yolact.eval]: Converted to TensorRT.
Traceback (most recent call last):
File "eval.py", line 1407, in
evaluate(net, dataset)
File "eval.py", line 877, in evaluate
evalimage(net, inp, out)
File "eval.py", line 590, in evalimage
preds = net(batch, extras=extras)["pred_outs"]
File "/home/jetson/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jetson/yolact_edge/yolact.py", line 1875, in forward
outs_wrapper["pred_outs"] = self.detect(pred_outs, extras=extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 78, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data, extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 105, in detect
boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 168, in fast_nms
classes = classes[keep]
IndexError: too many indices for tensor of dimension 2

There is a warning saying that the prediction / semantic_seg_conv weights are not loaded:
WARNING [01/11 13:41:34 yolact.model.load]: Some parameters required by the model do not exist in the checkpoint, and are initialized as they should be: prediction_layers.0.conf_layer.weight, prediction_layers.0.conf_layer.bias, semantic_seg_conv.weight, semantic_seg_conv.bias

This might account for the IndexError, can you verify the num_classes related configurations as in #10? And if the problem still exists, can you also provide command that you are using?

There is a warning saying that the prediction / semantic_seg_conv weights are not loaded:
WARNING [01/11 13:41:34 yolact.model.load]: Some parameters required by the model do not exist in the checkpoint, and are initialized as they should be: prediction_layers.0.conf_layer.weight, prediction_layers.0.conf_layer.bias, semantic_seg_conv.weight, semantic_seg_conv.bias

This might account for the IndexError, can you verify the num_classes related configurations as in #10? And if the problem still exists, can you also provide command that you are using?

cfg.num_classes :  10
it says 10, which matches  my class names +1
custom_dataset = dataset_base.copy({
'name': 'custom_dataset',
'train_images': './data/coco/custom/train_coco/',
'train_info':   './data/coco/custom/train_coco/train_annotations.json',

'valid_images': './data/coco/custom/valid_coco/',
'valid_info':   './data/coco/custom/valid_coco/valid_annotations.json',

'has_gt': True,
'class_names': ('classid1', 'classid3', 'classid3', 'classid4', 'classid5', 'classid6', 'classid7', 'classid8', 'classid9')

})
yolact_base_config = coco_base_config.copy({
'name': 'yolact_base',
# Dataset stuff
'dataset': custom_dataset,
'num_classes': len(custom_dataset.class_names) + 1,

it is command line I used when evaluating
python3 eval.py --coco_transfer --trained_model=weights/yolact_edge_746_100000.pth --score_threshold=0.3 --top_k=100 --image=test.jpg:output.jpg
it is command line I used when training
python3 train.py --config=yolact_edge_config --log_folder=./logs/20200108logs/

cfg.num_classes :  10
it says 10, which matches  my class names +1
custom_dataset = dataset_base.copy({
'name': 'custom_dataset',
'train_images': './data/coco/custom/train_coco/',
'train_info':   './data/coco/custom/train_coco/train_annotations.json',

'valid_images': './data/coco/custom/valid_coco/',
'valid_info':   './data/coco/custom/valid_coco/valid_annotations.json',

'has_gt': True,
'class_names': ('classid1', 'classid3', 'classid3', 'classid4', 'classid5', 'classid6', 'classid7', 'classid8', 'classid9')

})
yolact_base_config = coco_base_config.copy({
'name': 'yolact_base',
# Dataset stuff
'dataset': custom_dataset,
'num_classes': len(custom_dataset.class_names) + 1,

it is command line I used when evaluating
python3 eval.py --coco_transfer --trained_model=weights/yolact_edge_746_100000.pth --score_threshold=0.3 --top_k=100 --image=test.jpg:output.jpg
it is command line I used when training
python3 train.py --config=yolact_edge_config --log_folder=./logs/20200108logs/

Can you remove the --coco_transfer and try again?

Can you remove the --coco_transfer and try again?

And for debugging purpose, you can temporarily disable TensorRT with --disable_tensorrt during evaluation.

And for debugging purpose, you can temporarily disable TensorRT with --disable_tensorrt during evaluation.

I tested in many ways, and found out that --coco transfer causes this error,
WARNING [01/11 15:11:30 yolact.model.load]: Some parameters required by the model do not exist in the checkpoint, and are initialized as they should be: prediction_layers.0.conf_layer.weight, prediction_layers.0.conf_layer.bias, semantic_seg_conv.weight, semantic_seg_conv.bias
and when I disabled tensorrt, it gave me a correct output.
Seems like indexError is caused by tensorrt.
However, it is weird that tensorrt has problems, cause I evaluated well with the pretrained coco weights.
By the way my device is jetson agx xavier.

I tested in many ways, and found out that --coco transfer causes this error,
WARNING [01/11 15:11:30 yolact.model.load]: Some parameters required by the model do not exist in the checkpoint, and are initialized as they should be: prediction_layers.0.conf_layer.weight, prediction_layers.0.conf_layer.bias, semantic_seg_conv.weight, semantic_seg_conv.bias
and when I disabled tensorrt, it gave me a correct output.
Seems like indexError is caused by tensorrt.
However, it is weird that tensorrt has problems, cause I evaluated well with the pretrained coco weights.
By the way my device is jetson agx xavier.

If you go to the folder where your model is stored /path/to/model.pth, you will see multiple TensorRT cache files /path/to/model.pth.*.trt. Please delete them as the model weights were altered by --coco_transfer when the cache was initially generated.

If you go to the folder where your model is stored /path/to/model.pth, you will see multiple TensorRT cache files /path/to/model.pth.*.trt. Please delete them as the model weights were altered by --coco_transfer when the cache was initially generated.

I deleted all the cache files.trt. Command line and result are as below.
python3 eval.py --trained_model=weights/yolact_edge_1119_150000.pth --score_threshold=0.3 --top_k=100 --image=sample.jpg:output.jpg
[01/11 15:22:56 yolact.eval]: Loading model...
[01/11 15:23:01 yolact.eval]: Model loaded.
[01/11 15:23:01 yolact.eval]: Converting to TensorRT...
[01/11 15:23:45 yolact.eval]: Converting backbone to TensorRT...
[01/11 15:25:35 yolact.eval]: Converting protonet to TensorRT...
[01/11 15:25:47 yolact.eval]: Converting FPN to TensorRT...
Warning: Encountered known unsupported method torch.zeros
[01/11 15:25:56 yolact.eval]: Converting PredictionModule to TensorRT...
[01/11 15:26:06 yolact.eval]: Converted to TensorRT.
cfg.num_classes :  10
Traceback (most recent call last):
File "eval.py", line 1409, in
evaluate(net, dataset)
File "eval.py", line 878, in evaluate
evalimage(net, inp, out)
File "eval.py", line 591, in evalimage
preds = net(batch, extras=extras)["pred_outs"]
File "/home/jetson/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jetson/yolact_edge/yolact.py", line 1875, in forward
outs_wrapper["pred_outs"] = self.detect(pred_outs, extras=extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 78, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data, extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 105, in detect
boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 168, in fast_nms
classes = classes[keep]
IndexError: too many indices for tensor of dimension 2
So, till now the correct output was when I used --disable_tensorrt without --coco_transfer. However, these two conditions will lower my performance.

I deleted all the cache files.trt. Command line and result are as below.
python3 eval.py --trained_model=weights/yolact_edge_1119_150000.pth --score_threshold=0.3 --top_k=100 --image=sample.jpg:output.jpg
[01/11 15:22:56 yolact.eval]: Loading model...
[01/11 15:23:01 yolact.eval]: Model loaded.
[01/11 15:23:01 yolact.eval]: Converting to TensorRT...
[01/11 15:23:45 yolact.eval]: Converting backbone to TensorRT...
[01/11 15:25:35 yolact.eval]: Converting protonet to TensorRT...
[01/11 15:25:47 yolact.eval]: Converting FPN to TensorRT...
Warning: Encountered known unsupported method torch.zeros
[01/11 15:25:56 yolact.eval]: Converting PredictionModule to TensorRT...
[01/11 15:26:06 yolact.eval]: Converted to TensorRT.
cfg.num_classes :  10
Traceback (most recent call last):
File "eval.py", line 1409, in
evaluate(net, dataset)
File "eval.py", line 878, in evaluate
evalimage(net, inp, out)
File "eval.py", line 591, in evalimage
preds = net(batch, extras=extras)["pred_outs"]
File "/home/jetson/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jetson/yolact_edge/yolact.py", line 1875, in forward
outs_wrapper["pred_outs"] = self.detect(pred_outs, extras=extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 78, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data, extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 105, in detect
boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 168, in fast_nms
classes = classes[keep]
IndexError: too many indices for tensor of dimension 2
So, till now the correct output was when I used --disable_tensorrt without --coco_transfer. However, these two conditions will lower my performance.

If you go to L168 of ./layers/functions/detection.py (as in fast_nms) and use a try block to print the shape of tensors for (classes and keep)? We haven't encountered such problem previously.
And for "these two conditions will lower my performance" do you mean the FPS drop or the AP drop?

If you go to L168 of ./layers/functions/detection.py (as in fast_nms) and use a try block to print the shape of tensors for (classes and keep)? We haven't encountered such problem previously.
And for "these two conditions will lower my performance" do you mean the FPS drop or the AP drop?

classes = torch.arange(num_classes, device=boxes.device)[:, None].expand_as(keep)
print("\n classes : ", classes.shape)
print("\n keep : ", keep.shape)
classes = classes[keep]
The result was as below.
classes :  torch.Size([9, 79])
keep :  torch.Size([9, 79])
I thought disabling tensorrt will lower FPS.

classes = torch.arange(num_classes, device=boxes.device)[:, None].expand_as(keep)
print("\n classes : ", classes.shape)
print("\n keep : ", keep.shape)
classes = classes[keep]
The result was as below.
classes :  torch.Size([9, 79])
keep :  torch.Size([9, 79])
I thought disabling tensorrt will lower FPS.

You might need to do the try-except.
try:
  classes = ...
  classes = classes[keep]
except:
  print('...', shape)

You might need to do the try-except.
try:
  classes = ...
  classes = classes[keep]
except:
  print('...', shape)

    try:
        classes = torch.arange(num_classes, device=boxes.device)[:, None].expand_as(keep)
        classes = classes[keep]
    except:
        print('classes.shape', classes.shape)
        print('keep.shape', keep.shape)

This was the result
classes.shape torch.Size([9, 79])
keep.shape torch.Size([9, 79])
Traceback (most recent call last):
File "eval.py", line 1409, in
evaluate(net, dataset)
File "eval.py", line 878, in evaluate
evalimage(net, inp, out)
File "eval.py", line 591, in evalimage
preds = net(batch, extras=extras)["pred_outs"]
File "/home/jetson/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jetson/yolact_edge/yolact.py", line 1875, in forward
outs_wrapper["pred_outs"] = self.detect(pred_outs, extras=extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 78, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data, extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 105, in detect
boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 174, in fast_nms
boxes = boxes[keep]
IndexError: too many indices for tensor of dimension 3

    try:
        classes = torch.arange(num_classes, device=boxes.device)[:, None].expand_as(keep)
        classes = classes[keep]
    except:
        print('classes.shape', classes.shape)
        print('keep.shape', keep.shape)

This was the result
classes.shape torch.Size([9, 79])
keep.shape torch.Size([9, 79])
Traceback (most recent call last):
File "eval.py", line 1409, in
evaluate(net, dataset)
File "eval.py", line 878, in evaluate
evalimage(net, inp, out)
File "eval.py", line 591, in evalimage
preds = net(batch, extras=extras)["pred_outs"]
File "/home/jetson/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jetson/yolact_edge/yolact.py", line 1875, in forward
outs_wrapper["pred_outs"] = self.detect(pred_outs, extras=extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 78, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data, extras)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 105, in detect
boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/jetson/yolact_edge/layers/functions/detection.py", line 174, in fast_nms
boxes = boxes[keep]
IndexError: too many indices for tensor of dimension 3

This is the same as expected, wierd. What about the data types?
classes.dtype, keep.dtype, are they (torch.int64, torch.bool)

This is the same as expected, wierd. What about the data types?
classes.dtype, keep.dtype, are they (torch.int64, torch.bool)

classes.dtype : torch.int64
keep.dtype : torch.bool
yes they are.

classes.dtype : torch.int64
keep.dtype : torch.bool
yes they are.

This seems all correct, and we haven't seen such issue before. If you don't mind (and your data allows), could you send your model weights and the sample image to me that I can reproduce locally to look into this issue. Thanks.

This seems all correct, and we haven't seen such issue before. If you don't mind (and your data allows), could you send your model weights and the sample image to me that I can reproduce locally to look into this issue. Thanks.

And you can send these to me using email: lhtliu#ucdavis

And you can send these to me using email: lhtliu#ucdavis

Closed upon request.

Closed upon request.

Traceback (most recent call last):
File "eval.py", line 1392, in
evaluate(net, dataset)
File "eval.py", line 868, in evaluate
evalimage(net, inp, out)
File "eval.py", line 580, in evalimage
preds = net(batch)
File "/miniconda/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/workspace/dl/yolact_edge/yolact.py", line 1881, in forward
assert type(extras) == dict
AssertionError

Traceback (most recent call last):
File "eval.py", line 1392, in
evaluate(net, dataset)
File "eval.py", line 868, in evaluate
evalimage(net, inp, out)
File "eval.py", line 580, in evalimage
preds = net(batch)
File "/miniconda/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/workspace/dl/yolact_edge/yolact.py", line 1881, in forward
assert type(extras) == dict
AssertionError

@SanjunLiu Hi, are you using the latest code? Can you pull the latest code and try again, thanks.

@SanjunLiu Hi, are you using the latest code? Can you pull the latest code and try again, thanks.

Sorry , When I want to evaluate my custom model which trained with custom dataset, it showed the same error.
I have already update the latest code,and run the cooment
python3 eval.py --yolact_transfer  --trained_model=./weights/yolact_edge_person_49_400000.pth

what can i do to avoid the error ? Thanks~~
And the other problem is when I want to evaluate the pretrain model (yolact_edge_54_800000.pth),it showed the following error.

After I track the eval.py code, I found the code

        if cfg.torch2trt_fpn or cfg.torch2trt_fpn_int8:
            logger.info("Converting FPN to TensorRT...")
            net.to_tensorrt_fpn(cfg.torch2trt_fpn_int8, batch_size=args.trt_batch_size)

So I change the "yolact_edge_config" ,add the "torch2trt_fpn_int8=true".
And it success to evaluate.
Did I change it right ?
Sorry to bother you ~~

Sorry , When I want to evaluate my custom model which trained with custom dataset, it showed the same error.
I have already update the latest code,and run the cooment
python3 eval.py --yolact_transfer  --trained_model=./weights/yolact_edge_person_49_400000.pth

what can i do to avoid the error ? Thanks~~
And the other problem is when I want to evaluate the pretrain model (yolact_edge_54_800000.pth),it showed the following error.

After I track the eval.py code, I found the code

        if cfg.torch2trt_fpn or cfg.torch2trt_fpn_int8:
            logger.info("Converting FPN to TensorRT...")
            net.to_tensorrt_fpn(cfg.torch2trt_fpn_int8, batch_size=args.trt_batch_size)

So I change the "yolact_edge_config" ,add the "torch2trt_fpn_int8=true".
And it success to evaluate.
Did I change it right ?
Sorry to bother you ~~

@ntut108318099 Regarding your first question, it seems a problem with TensorRT / torch2trt conversion related, and we are currently aware of this issue (which we also heard from another user who trains on the custom dataset). We will let you know once we isolate and fix the issue.
For the second one, it is quite weird, as you can see here, torch2trt_fpn_int8 should exist in all configs, can you verify what has happened to those configs? (did you modify those configs unexpectedly by chance?)
And the code should stop executing after the evaluation finishes, and I do not see a reason why this will execute twice (can you provide the command you are using and verify that you are not making changes to eval.py? thanks.)

@ntut108318099 Regarding your first question, it seems a problem with TensorRT / torch2trt conversion related, and we are currently aware of this issue (which we also heard from another user who trains on the custom dataset). We will let you know once we isolate and fix the issue.
For the second one, it is quite weird, as you can see here, torch2trt_fpn_int8 should exist in all configs, can you verify what has happened to those configs? (did you modify those configs unexpectedly by chance?)
And the code should stop executing after the evaluation finishes, and I do not see a reason why this will execute twice (can you provide the command you are using and verify that you are not making changes to eval.py? thanks.)

@haotian-liu thanks for your quick reply first.
About first question, I will wait for your fix issue. Thanks a lot ~~
About the others question,I rebuild the config and eval.py. It didn't show the error again,maybe I modify the code  unexpectedly by chance...
Sorry to bother you~ about the custom dataset issue , your hard work I really appreciate.

@haotian-liu thanks for your quick reply first.
About first question, I will wait for your fix issue. Thanks a lot ~~
About the others question,I rebuild the config and eval.py. It didn't show the error again,maybe I modify the code  unexpectedly by chance...
Sorry to bother you~ about the custom dataset issue , your hard work I really appreciate.

@ntut108318099 I am grad to hear that your problem has been resolved. We will keep you updated when the TensorRT related issue is investigated and fixed. Thank you for your interest in and support for our work.

@ntut108318099 I am grad to hear that your problem has been resolved. We will keep you updated when the TensorRT related issue is investigated and fixed. Thank you for your interest in and support for our work.

@haotian-liu  sorry, I have another question to ask. You update the train.py. If I want to retrain the model , do I need to add the command about --yolact_transfer ?
The following command is I set .
python3  train.py --config=yolact_edge_config

@haotian-liu  sorry, I have another question to ask. You update the train.py. If I want to retrain the model , do I need to add the command about --yolact_transfer ?
The following command is I set .
python3  train.py --config=yolact_edge_config

@ntut108318099 No you don't need that. You only need that when you are using a model trained with YOLACT.

@ntut108318099 No you don't need that. You only need that when you are using a model trained with YOLACT.

@haotian-liu  so when I use the model  trained by train.py , I didn't use --yolact_transfer on eval.py.
But why yolact_edge_54_800000.pth need to set --yolact_transfer command ?
Did it not trained with train.py in yolact_edge  ?

@haotian-liu  so when I use the model  trained by train.py , I didn't use --yolact_transfer on eval.py.
But why yolact_edge_54_800000.pth need to set --yolact_transfer command ?
Did it not trained with train.py in yolact_edge  ?

@ntut108318099 Because I just took that model from YOLACT.

@ntut108318099 Because I just took that model from YOLACT.

@soohunee @ntut108318099 Hi, we have proposed a solution towards the IndexError issue, please see the newest commits (8569ad7, 1bbdf5f). Hope this resolves the issue, thanks.

@soohunee @ntut108318099 Hi, we have proposed a solution towards the IndexError issue, please see the newest commits (8569ad7, 1bbdf5f). Hope this resolves the issue, thanks.

@haotian-liu  Thanks for your fixed issue.
I updated the new version , but it showed the new error.
The following is the result.

Thanks for your hard work ~~

@haotian-liu  Thanks for your fixed issue.
I updated the new version , but it showed the new error.
The following is the result.

Thanks for your hard work ~~

@ntut108318099 This is weird. I took a look at the tensor here, they seem to be 1-D tensor? Can you print the shape of both classes and idx tensor for me? Thanks.

@ntut108318099 This is weird. I took a look at the tensor here, they seem to be 1-D tensor? Can you print the shape of both classes and idx tensor for me? Thanks.

@ntut108318099 ... And can you also print idx.min() and idx.max() for me.

@ntut108318099 ... And can you also print idx.min() and idx.max() for me.

@haotian-liu  did you mean this ?

@haotian-liu  did you mean this ?

@ntut108318099 This seems some issue with TensorRT or torch2trt. So just to confirm, this occurs when you enable TensorRT, and if --disable_tensorrt, it does not occur?

@ntut108318099 This seems some issue with TensorRT or torch2trt. So just to confirm, this occurs when you enable TensorRT, and if --disable_tensorrt, it does not occur?

@haotian-liu  yes , when I --disable_tensorrt , it does not occur. It succeed ~
So it seems TensorRT or torch2trt issue...
Thanks.

@haotian-liu  yes , when I --disable_tensorrt , it does not occur. It succeed ~
So it seems TensorRT or torch2trt issue...
Thanks.

@ntut108318099 I proposed a potential fix -- can you switch to haotian-dev branch and pull the latest commit and have a try?

@ntut108318099 I proposed a potential fix -- can you switch to haotian-dev branch and pull the latest commit and have a try?

@haotian-liu  It ran successful for a while, and it stopped .
Here's the result.

@haotian-liu  It ran successful for a while, and it stopped .
Here's the result.

@ntut108318099 What's the shape of proto_data and masks?

@ntut108318099 What's the shape of proto_data and masks?

@ntut108318099 And will you see this error if disabling TensorRT?

@ntut108318099 And will you see this error if disabling TensorRT?

@haotian-liu
When it stopped,the shape of masks are different with the other result.

If I disable tensorrt , it won't show the error. It succeed to eval.

@haotian-liu
When it stopped,the shape of masks are different with the other result.

If I disable tensorrt , it won't show the error. It succeed to eval.

@ntut108318099 If without proprietary issue, can you email me your trained model, as well as the specific sample image the error occurs (you can verify it is the one using --image=selected.jpg if you can see the same error). Thanks.

@ntut108318099 If without proprietary issue, can you email me your trained model, as well as the specific sample image the error occurs (you can verify it is the one using --image=selected.jpg if you can see the same error). Thanks.

@haotian-liu  I am trying to use the model with usb camera. To check if the model can use or not.
I will email you my trained model if the error still show by the other way.
Thanks a lot .

@haotian-liu  I am trying to use the model with usb camera. To check if the model can use or not.
I will email you my trained model if the error still show by the other way.
Thanks a lot .

@haotian-liu  I emailed you my trianed model.
Please let me know if you received successfully.

@haotian-liu  I emailed you my trianed model.
Please let me know if you received successfully.

The error showed up.
WARNING [01/18 11:07:23 yolact.layers.detect]: Encountered IndexError as mentioned in https://github.com/haotian-liu/yolact_edge/issues/27. Flattening predictions to avoid error, please verify the outputs. If there are any problems you met related to this, please report an issue.
however the output was pretty good. Would flattening prediction affect any perfrmance ?

The error showed up.
WARNING [01/18 11:07:23 yolact.layers.detect]: Encountered IndexError as mentioned in https://github.com/haotian-liu/yolact_edge/issues/27. Flattening predictions to avoid error, please verify the outputs. If there are any problems you met related to this, please report an issue.
however the output was pretty good. Would flattening prediction affect any perfrmance ?

@soohunee This warning message is intentional as this seems a TensorRT issue and we found a way to get around with it. But normally the output should just be fine.

@soohunee This warning message is intentional as this seems a TensorRT issue and we found a way to get around with it. But normally the output should just be fine.

Hello, when I use the model I trained to execute the following command to evaluate, there will be an error and no output.
$ python eval.py --trained_model=weights/yolact_edge_mobilenetv2_159_8000.pth --score_threshold=0.3 --top_k=100 --image=pig_test.jpg --use_fp16_tensorrt
Config not specified. Parsed yolact_edge_mobilenetv2_config from the file name.

[03/05 16:30:23 yolact.eval]: Loading model...
[03/05 16:30:25 yolact.eval]: Model loaded.
[03/05 16:30:25 yolact.eval]: Converting to TensorRT...
[03/05 16:30:25 yolact.eval]: Converting backbone to TensorRT...
[03/05 16:30:46 yolact.eval]: Converting protonet to TensorRT...
[03/05 16:30:49 yolact.eval]: Converting FPN to TensorRT...
Warning: Encountered known unsupported method torch.zeros
[03/05 16:30:53 yolact.eval]: Converting PredictionModule to TensorRT...
[03/05 16:30:58 yolact.eval]: Converted to TensorRT.
WARNING [03/05 16:30:58 yolact.layers.detect]: Encountered IndexError as mentioned in https://github.com/haotian-liu/yolact_edge/issues/27. Flattening predictions to avoid error, please verify the outputs. If there are any problems you met related to this, please report an issue.

But when I use --disable_tensorrt, it can output normally.
I also switch to haotian-dev branch to try, , but there are still errors.
Traceback (most recent call last):
  File "eval.py", line 1248, in <module>
    evaluate(net, dataset)
  File "eval.py", line 885, in evaluate
    evalimage(net, args.image)
  File "eval.py", line 596, in evalimage
    preds = net(batch, extras=extras)["pred_outs"]
  File "/home/aderd/anaconda3/envs/pytorch_v37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/aderd/joy/yolact_edge-haotian-dev/yolact.py", line 1797, in forward
    outs_wrapper["pred_outs"] = self.detect(pred_outs)
  File "/home/aderd/joy/yolact_edge-haotian-dev/layers/functions/detection.py", line 75, in __call__
    result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data)
  File "/home/aderd/joy/yolact_edge-haotian-dev/layers/functions/detection.py", line 105, in detect
    boxes, masks, classes, scores = self.fast_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
  File "/home/aderd/joy/yolact_edge-haotian-dev/layers/functions/detection.py", line 209, in fast_nms
    if not cfg.use_tensorrt_safe_mode:
AttributeError: 'Config' object has no attribute 'use_tensorrt_safe_mode'

I also disable TensorRT for FPN, but it still doesn’t work.
{
    'torch2trt_fpn': False,
    'torch2trt_fpn_int8': False,
}

I train a category, and I confirmed that cfg.num_classes is correct. This is my data setting in config.
my_custom_dataset = dataset_base.copy({
    'name': 'My Dataset',

    'train_images': './data/',
    'train_info':   './data/annotations.json',

    'valid_images': './data/',
    'valid_info':   './data/annotations.json',

    'has_gt': True,
    'class_names': ('classid1'),
    'label_map': {1:1}

})

yolact_edge_mobilenetv2_config = yolact_edge_config.copy({
    'name': 'yolact_edge_mobilenetv2',
    'dataset': my_custom_dataset,
    'num_classes':2,
    #'torch2trt_fpn': False,
    #'torch2trt_fpn_int8': False,
    'max_size': 550,
    'lr_steps': (2800, 6000, 7000, 7500),
    'max_iter': 8000,
    'backbone': mobilenetv2_backbone
})

Can i ask you what should i do? thank you.

Hello, I just tried the haotian-dev branch and executed this command. It can output normally now.
$python eval.py --trained_model=weights/yolact_edge_mobilenetv2_159_8000.pth --score_threshold=0.3 --top_k=100 --image=pig_test.jpg --use_fp16_tensorrt --use_tensorrt_safe_mode
I want to ask what is the difference between this branch and master? Why can't it output normally when using master to execute --use_fp16_tensorrt?

@chingi071 Grad that you had your problem solved! These two branches are actually the same at this point.
Seems at one point you had an issue with cfg.use_tensorrt_safe_mode. It could be that you accidentally removed 'use_tensorrt_safe_mode': False from data/config.py.
I am not sure if you noticed any other difference between master and haotian-dev. Because they are currently on the SAME commit.

Thank you for your reply! I found out that my master version is old, so there are differences.
I would like to ask why it is necessary to use --use_tensorrt_safe_mode to successfully output?
Why can't the output be displayed successfully by only using the following command? Thank you again for your contribution and help!
$python eval.py --trained_model=weights/yolact_edge_mobilenetv2_159_8000.pth --score_threshold=0.3 --top_k=100 --image=pig_test.jpg --use_fp16_tensorrt

@chingi071 Please see here for explanations why we need this option.

I understand, thank you very much!

hello @haotian-liu , thanks for your effort.

I tried with the pre-trained model that you provided in this repo and able to run the model with and without TRT mode, all are good.
But
I'm having an issue with tensorrt on a model trained on custom data. I'm running on agx xavier.
I was able to run the model without TRT mode.
But
Problems occurred when I tried to run the model in TRT mode. I went through almost issues and I'm now able to run the custom model in TRT mode with the args use_tensorrt_safe_mode
But
The result of the TRT model mode is totally wrong. It seems like all the results are repeated for all images. This problem is the same for master and haotian-dev branches.

Help to advice me what should I investigate now, thanks.

@xuatpham  Maybe I would try removing the TensorRT cache (under weights folder, files ending with .trt) to see if the TensorRT model caches are corrupted. If that does not work, I would dig to see how the TensorRT model outputs for each different layer are different from the ones without TensorRT.

@haotian-liu  thanks for quick response
yes, I always remove all previous .trt in the weights folder before every new run.
btw, the model was trained as a single object, and class_names was defined as (class_name_id1, ) .
Thanks for advice.

@xuatpham
The definition for the class_names looks good to me. Sorry that I am not sure what is happening with your custom model (it is strange that they are outputing the same thing for different inputs)

@xuatpham
The definition for the class_names looks good to me. Sorry that I am not sure what is happening with your custom model (it is strange that they are outputing the same thing for different inputs)


Cleanup Code & Experiments

Much code is left over from my MSc research. This should be cleaned up or removed for the first milestone.

Removed in 7f7d757133bc483e4637be8ee57b86b0bc22e116 release v0.1.0


Best android version for FTC SW testing?

Due to limit access to control hub, we are using android phones for early development, especially for vision tasks.
Just wondering what the best android version to run FTC Robot controller?
From my experiences, android 7/8 on my pixel works well, but android 10 seems to have wifi direct issue causing robot controller restarting issue. I had to power off/on wifi so that Robot controller can be re-started.

The control hub uses Android 7.1 - if you're looking for a comparable Android version, that would be it.


Add additional note to wiki on Emacs compilation buffer for flutter analyze

At, https://github.com/flutter/flutter/wiki/Using-the-Dart-analyzer, it is mentioned that Emacs compilation buffer could provide links to jump to file of flutter analyze error. This didn't work out of the box for me.
Perhaps the wiki could add something like the following:
(add-to-list 'compilation-error-regexp-alist 'dart-analyze)
(add-to-list 'compilation-error-regexp-alist-alist '(dart-analyze "\\([^ ]*\\.dart\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3))

@Hixie, I ask you as you are the original author of this wiki article. is this fine? Perhaps a (with-eval-after-load "compile" ... would help?

I'm going to close this for now since we're not sure how to update it. If anyone has suggestions for good text to add, please file an issue and I'll be happy to add it!


Add email in outlet information

Pull Request Test Coverage Report for Build 204

49 of 49 (100.0%) changed or added relevant lines in 8 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.1%) to 92.74%

Files with Coverage Reduction
New Missed Lines
%

src/main/java/seedu/ptman/model/outlet/OutletInformation.java
1
98.11%

Totals

Change from base Build 200:
0.1%

Covered Lines:
2210

Relevant Lines:
2383

💛  - Coveralls


Add tzn-mqtt recipe

tzn-mqtt is a MQTT to DBus bridge. Messages are received by the embedded MQTT client through a mqtt.torizon.io broker, which are then relayed to client applications via DBus.
Tested with qemuarm64.

Also, you hardcoded that we're currently using dev branch... could we use use-head-next here for hashes/branches, as we de in RAC or Aktualizr?
I think that in the future it might come in hand, so new commits are tested ASAP on our nightlies, and then we perform a hash bump on our releases.

I forgot about use-head-next :-)
For the hashes yea, I could do something like this
diff --git a/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb b/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
index f907b6f..9c5abce 100644
--- a/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
+++ b/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
@@ -9,7 +9,7 @@ SRC_URI += " \
     file://tzn-mqtt.service \
 "

-SRCREV = "516ce5198a077fffcc2a19d946b3c21814841f01"
+SRCREV:use-head-next = "${AUTOREV}"
 S = "${WORKDIR}/git"
 PV = "0.0+git${SRCPV}"
 CARGO_SRC_DIR = ""

But for the branches (if I understood correctly): I wouldn't recommend using the main branch. From the development side of the application itself I think it's best if we wait for the e2e test before merging in to main and switching, as main is not really usable right now on our images.

I forgot about use-head-next :-)
For the hashes yea, I could do something like this
diff --git a/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb b/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
index f907b6f..9c5abce 100644
--- a/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
+++ b/recipes-sota/tzn-mqtt/tzn-mqtt_git.bb
@@ -9,7 +9,7 @@ SRC_URI += " \
     file://tzn-mqtt.service \
 "

 SRCREV = "516ce5198a077fffcc2a19d946b3c21814841f01"
+SRCREV:use-head-next = "${AUTOREV}"
 S = "${WORKDIR}/git"
 PV = "0.0+git${SRCPV}"
 CARGO_SRC_DIR = ""

But for the branches (if I understood correctly): I wouldn't recommend using the main branch. From the development side of the application itself I think it's best if we wait for the e2e test before merging in to main and switching, as main is not really usable right now on our images.

You guys plan to use the git workflow? With a ongoing dev branch that gets merged from time to time to main, and main being the only branch meant to be used on releases?

You guys plan to use the git workflow? With a ongoing dev branch that gets merged from time to time to main, and main being the only branch meant to be used on releases?

My suggestion is to always merge into main from the different feature branches instead of dev because the main test (beside the unit ones) will be done by Lava, as the repo isn't really a thing on its own.
If you want I can merge to main right now and we don't have to switch later from the current dev one.

You guys plan to use the git workflow? With a ongoing dev branch that gets merged from time to time to main, and main being the only branch meant to be used on releases?

My suggestion is to always merge into main from the different feature branches instead of dev because the main test (beside the unit ones) will be done by Lava, as the repo isn't really a thing on its own.
If you want I can merge to main right now and we don't have to switch later from the current dev one.

If that's easy enough to do, yeah!

Let me know how it looks now. I re-tested the changes as well.


table of supported GraphBLAS operations

Greetings from New Mexico! cc @seibert
This is a first cut.  It's not as pretty or detailed as it could be, but it's a start.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
5 unchanged lines in 2 files lost coverage.
Overall coverage remained the same at 81.12%

Files with Coverage Reduction
New Missed Lines
%

mlir_graphblas/engine.py
1
74.9%

mlir_graphblas/tests/test_profile.py
4
51.95%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2230

Relevant Lines:
2749

💛  - Coveralls

Just to be clear: this is covering the state of operations we plan to have by the end of the quarter?  (I see some random ops we don't have yet.)

Should we add a column for the mlir-graphblas name used? i.e. matrix_multiply instead of mxm, union instead of eWiseAdd, etc.

Names added as per Jim's request.  Merging!


test issue

------------------------------- delete below -------------------------------
INSTRUCTIONS
Please follow the instructions and template below to save us time requesting additional information from you. For more information on all of your support options, please see Azure IoT support and help options.
If this is an issue encountered by following a Microsoft document, please open an issue on that page itself. This ensures the fastest targeted response, and you can do this by scrolling all the way down to the bottom of the page to the Feedback section to report the issue.

Search existing issues to avoid creating duplicates.

If possible test using the latest release to make sure your issues has not already been fixed.

Do not share information from your Azure subscription here (connection strings, service names (IoT Hub name, Device Provisioning Service scope ID), etc...). If you need to share any of this information, you can create a ticket and get assistance from Microsoft Support.

Include enough information for us to address the bug:

A detailed description.
A Minimal Complete Reproducible Example. This is code we can cut and paste into a readily available sample and run, or a link to a project you've written that we can compile to reproduce the bug.
Console logs.

Delete these instructions before submitting the bug.

Below is a generic bug report format. We recommend you use it as a template and replace the information below each header with your own.
------------------------------- delete above -------------------------------
Context

OS and version used:  (Windows 10, Ubuntu 18.04, etc. )
Python version:  (in a command prompt: python --version )
pip version:  (in a command prompt: pip --version )
list of installed packages:  ( in a command prompt, from the directory containing your code: pip list )
cloned repo:  ( If you are using a cloned sdk repository, in a command prompt: git describe )

Description of the issue
Please be as detailed as possible: which feature has a problem, how often does it fail, etc.
Code sample exhibiting the issue
Please remove any connection string information!
Console log of the issue
Consider setting the DEBUG environment variable to '*'. This will produce a much more verbose output that will help debugging
Don't forget to remove any connection string information!

hi @me, I'm closing this now


Question: Why Agent?

I'm relatively newbie in Elixir. I'm curious about why you setup an Agent for the elixir-pdf-generator.
Is it really necessary to depend on porcelain and goon(optional) to just call the underlying wkhtmltopdf?

Thanks for the questions!

It works perfectly without goon. I plan to eventually dismiss the usage of temp file for proper IPC. Therefore goon would be cool
Porcelain is a really cool wrapper around erlang ports which does proper shell-out handling. I want to track exec return values and crashes.
The Agent is there to hold state. This way, I need to call System.find_executable only once at startup when no paths are configured

More on the Agent: It could be done via Application.put_env as well but this module is very old (in Elixir terms) and honestly, I didn't know about this back then :-)

👍  thanks again.
Just a minor request: I'd like tmp file vs IPC to be configurable.


Typos fixed, QOL updates.

I spent the last two months reading through GASDocumentation and it was a fun journey. While I was reading, I made sure to notate any typos I found along the way. I barely could find any compared to how monolithic the doc is. Hopefully this PR has covered all the typos!

Some of the fixes I did was that I replaced some of the of UGD prefixes (which stand for GASDocumentation) to UGS (which stand for (GAS Shooter, i.e. the Sample Project). Maybe I shouldn't have done that, but if you look closely that caused me some confusion as in this case for example:

Before it used to say "UGD", and me as a reader was confused to see that the Sample Project uses some other totally different prefix. Let me know what you think regarding that? (I'm asking because in my PR I didn't replace all "GD" prefixes to "GS", which I noticed quite late).
For example, in this case:

I didn't replace UGD to UGS because this code doesn't exist at all the GAS Shooter Sample Project.

Hello,
Thanks for looking into typos. The Sample Project generally refers to the Unreal project included in the GASDocumentation repository https://github.com/tranek/GASDocumentation/tree/master/Source/GASDocumentation. The prefixes for the code snippets should be correct. I understand why it's confusing since the snippets were pulled from many different projects - GD, GS, and even a few PA (my ParagonAssets project that's not public).

Thank you for doing this! 🙌

Actually, thank you Dan for bearing with me through the process! 😄


Question number not shown in Music Quiz

🐛 Bug Report
In the Music Quiz while attempting the questions, question number is not shown. This creates confusion for the user
Add relevant screenshot or video (if any)

@niloysikdar Kindly assign me this under LGM-SoC'21

Assigned @Sukhseerat-Kaur


Use the same AbsolutePathFileCollectionFingerprinter for all task inputs

What the title says.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.


Does Button have a default minimum width?

Does Button have a default minimum width?
I want to get a round button, So I set the following style
<NativeButton style={StyleSheet.flatten( styles.deleteButton)}>
</NativeButton>

for StyleSheet
  deleteButton: {
    width: 18,
    height: 18,
    borderRadius: 9,
    borderColor: '#AEB2D7',
    borderWidth: 0.5,
    backgroundColor: '#C7C7C7',
    marginLeft: 10,
    marginTop: 15
  },

It looks like this

These are wide and high for 60 buttons, rounded to 30, working well

That probably is due to the horizontalPadding. Set it to 0 and try.

It's working, thanks @sankhadeeproy007


Add support for learning new commands

This update creates a generic service in the 'remote' component to enable remote control platforms to learn new commands.
Description:
Related issue: #236
Example 1: Learn a single command
- service: remote.learn_command
  data:
    entity_id: remote.bedroom
    device: television
    command: 'Turn on'

Example 2: Learn a list of commands
- service: remote.learn_command
  data:
    entity_id: remote.bedroom
    device: television
    command:
      - 'Turn on'
      - 'Turn off'
      - 'Source'
      - 'Channel up'
      - 'Channel down'
      - 'Volume up'
      - 'Volume down'

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

If the code does not interact with devices:

[x] Tests have been added to verify that the new code works.

Please add a supported_feature functionality for that. I.e. Light/Climate/MediaPlayer

Please add a supported_feature functionality for that. I.e. Light/Climate/MediaPlayer

Hello friend. Do you mean something like this?
REMOTE_SERVICE_LEARN_COMMAND_SCHEMA = REMOTE_SERVICE_SCHEMA.extend({
    vol.Optional(ATTR_DEVICE): cv.string,
    vol.Optional(ATTR_COMMAND): vol.All(cv.ensure_list, [cv.string]),
    vol.Optional(ATTR_ALTERNATIVE): cv.boolean,
    vol.Optional(ATTR_TIMEOUT): cv.positive_int,
    vol.Optional(ATTR_SUPPORTED_FEATURES): vol.Any('Light', 'Climate', 'MediaPlayer')
})

Okay, I'll do it, just tell me the types that it needs to support, or if you want me to simply validate a string and leave for the platforms to choose.
Just out of curiosity, how will you implement this functionallity inside the remote control platforms?
I ask this because I'm developing a platform and I have the following JSON format in mind to store the codes:
{
    "Bedroom TV": {
        "type": "Television",
        "brand": "Philips",
        "model": "42PFL3403",
        "commands": {
            "Turn on": "JgA0ABsbHRo4Gh0aHBobHB0ZHRobNx0aOBocAA0F==",
            "Turn off": "JgA0ABscNhwbGxscGxsbHBscGxsbNxscNhwbAA0F=="
        }
    }
}

Here I've opted to include "type", "brand" and "model" information. These labels are not directly useful for sending and receiving codes, but I believe they are important for users to share their codes in the future and keep their collection of codes organized. But I decided not to receive these header entries through the learn_command service for two reasons:

These information only needs to be set once per device, and I believe the best way would be through config entries or some kind of data flow. It would be a huge task to repeat the brand and model for every code the user wants to learn.

This approach may lead to conflicts, let's assume that the user sends this payload:

- service: remote.learn_command
  data:
    - device: 'Bedroom TV'
      type: 'Television'
      brand: 'Philips'
      model: '42PFL3403'
      command: 'Turn on'

Followed by this another one:
- service: remote.learn_command
  data:
    - device: 'Bedroom TV'
      type: 'Television'
      brand: 'Philips'
      model: '52PFL3404'
      command: 'Turn off'

The models conflict for the same device, which one should be stored in the JSON file?
So maybe this also aplies to 'supported_features', what if I tell it's a 'MediaPlayer' when I capture the first command and then tell this is a 'Light' when I capture the second. How should platforms handle it?
I think storing the device type is a great idea to keep the codes organized, but maybe this information should be captured elsewhere and only once per device.
Alright, I've made my point, but it's up to you to decide. Just tell me and I'll do it.

 What do you think of adding the following lines to the RemoteDevice class in the __init__.py file:
@property
def supported_features(self):
    """Return the list of supported features."""
    raise NotImplementedError()

I think it would be interesting to define some constants to be imported by platforms that will use this property, but I do not know what kind of features you want to support? Please give me a list of some features you would like to support at first and I will add the constants to the code.

@felipediel
Default is: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/light/init.py#L480-L483
Your new feature is that what we need as SUPPORT_LEARN_COMMAND

@felipediel
Default is: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/light/init.py#L480-L483
Your new feature is that what we need as SUPPORT_LEARN_COMMAND

Now I see the full picture. Done.


quiet mode for inspec scans

Description
This changes the default behavior for inspec during the node converge by suppressing the scan result json report from STDOUT.  Various customers have remarked that the default scan results being dumped to STDOUT is too busy and clutters up the converge output. Users can choose to continue to get the json report output by toggling the attribute: default['audit']['quiet'] = false.  The default value is true.  When, set to true, a short scan result Summary for each profile is output when the compliance_report is executed.
Issues Resolved
N/A
Check List

[x] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[x] New functionality includes testing.
[x] New functionality has been documented in the README if applicable
[x] The CLA has been signed. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

Awesome @jeremymv2 This resolves #23


Not preserving "use client" placement at top of page (Next.js) application

Describe the bug
This bug on started happening recently after months of use with the extension.
In a next.js / react 18 application placing a "use client" directive at the top of the page usually was ignored by the sorter, but now it seems to be sorting it incorrectly placing it at the bottom of the import list.
To Reproduce
Create a react client component, add a few imports, and place the "use client" directive at the top of the page. And save the document.
FYI: Oddly enough it still ignores the "use server" directive accordingly.
Expected behavior
"use client" should be preserved at the top of the page.
 How to run VS Code from terminal in MacOS]
aaron-bond.better-comments
abians.prisma-generate-uml
abierbaum.vscode-file-peek
ahebrank.yaml2json
alefragnani.bookmarks
alfredbirk.tailwind-documentation
antiantisepticeye.vscode-color-picker
apollographql.vscode-apollo
arturodent.find-and-transform
astro-build.astro-vscode
babobski.aspect-ratio
bradlc.vscode-tailwindcss
britesnow.vscode-toggle-quotes
centuplex.quokka
chakrounanas.turbo-console-log
christian-kohler.path-intellisense
cliffsu.cypress-snippets
codeandstuff.package-json-upgrade
dbaeumer.vscode-eslint
dkundel.vscode-new-file
dkundel.vscode-npm-source
donjayamanne.githistory
dozerg.tsimportsorter
drknoxy.eslint-disable-snippets
dsznajder.es7-react-js-snippets
eamodio.gitlens
ecmel.vscode-html-css
edag94.replacequotes
enkia.tokyo-night
esbenp.prettier-vscode
figma.figma-vscode-extension
file-icons.file-icons
formulahendry.auto-complete-tag
frenco.vscode-vercel
github.copilot
github.copilot-chat
github.remotehub
github.vscode-pull-request-github
harehare.textusm
hasefumi23.search-with-cursor
hbenl.vscode-test-explorer
htwx.json-and-jsonc
icrawl.discord-vscode
idered.npm
infeng.vscode-react-typescript
jccr.sandbox
jeffreylanters.npm-package-version-bumper
joeyyizhao.mongo-runner
johnpapa.vscode-peacock
kalimahapps.tailwind-config-viewer
kalimahapps.tailwindcss-kit
kavod-io.vscode-jest-test-adapter
kenhowardpdx.vscode-gist
kruemelkatze.vscode-dashboard
levitatingbusinessman.hyper-vsc
lostintangent.thinking-in-code
lostintangent.vsls-whiteboard
lostintangent.wikilens
masonicboom.web-browser
mattpocock.ts-error-translator
meganrogge.template-string-converter
mongodb.mongodb-vscode
mrmlnc.vscode-duplicate
ms-azuretools.vscode-docker
ms-edgedevtools.vscode-edge-devtools
ms-playwright.playwright
ms-python.debugpy
ms-python.isort
ms-python.python
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.live-server
ms-vscode.remote-explorer
ms-vscode.remote-repositories
ms-vscode.remote-server
ms-vscode.sublime-keybindings
ms-vscode.test-adapter-converter
ms-vsliveshare.vsliveshare
ms-vsliveshare.vsliveshare-pack
mtxr.sqltools
mtxr.sqltools-driver-mysql
mtxr.sqltools-driver-pg
mtxr.sqltools-driver-sqlite
naumovs.color-highlight
nick-rudenko.back-n-forth
nucllear.vscode-extension-auto-import
oouo-diogo-perdigao.docthis
orta.vscode-jest
orta.vscode-twoslash-queries
ortoni.ortoni
pomber.git-file-history
prisma.prisma
qwtel.sqlite-viewer
rafamel.subtle-brackets
rangav.vscode-thunder-client
redhat.vscode-yaml
ritwickdey.liveserver
rohinivsenthil.postcode
rossmassey.shortenurl
shelex.vscode-cy-helper
sheltonlouis.astro-snippets
sirtori.indenticator
stackbreak.comment-divider
stivo.tailwind-fold
streetsidesoftware.code-spell-checker
strigo.linear
tock.vscode-css-custom-properties
unifiedjs.vscode-mdx
usernamehw.errorlens
vincaslt.highlight-matching-tag
visualstudioexptteam.intellicode-api-usage-examples
visualstudioexptteam.vscodeintellicode
vsls-contrib.gistfs
vunguyentuan.vscode-css-variables
wallabyjs.console-ninja
wallabyjs.quokka-vscode
wayou.vscode-todo-highlight
willstakayama.vscode-nextjs-snippets
wix.glean
wix.vscode-import-cost
xyc.vscode-mdx-preview
yoavbls.pretty-ts-errors
young-vform.copy-hover-type
yutengjing.open-in-external-app
zignd.html-css-class-completion

@gaurangrshah
Sorry for the late response!
I can't reproduce the issue from my end.
Is it still an issue? If yes, do you have a demo project for me to test?
Thanks!

Sorry I don't we ended up defaulting to using prettier to sort the imports. I'll see if i can pull it into another next.js project and reproduce.

We (and all of our students) have been using the JS/TS Import/Export Sorter VS Code extension since over a year with various Next.js projects since use client support and use server support were published, and we have never seen a problem with support.
So I'm guessing that this was a misconfiguration and the issue can be closed.


Fix instance binding state tracking

If you call GDExtension's set_binding, followed later by a free_binding this keeps the _instance_bindings allocated, but with the first slot set to zeros.   If you call set_binding again, it will succeed and set the values on the first slot, but will not track the state correctly, so looking it up will incorrectly state that there are no bindings, but attempting to set it will fail due to the assertion that checks for the binding.
This makes _instance_binding_count reflect the reality that there is one item on the table.

Oh god, this got mixed up with my other pending PR.

Fixed the mistake.

Thanks!
There definitely seems to be a bug here, but I'm not sure this is the right fix.
The first instance binding is special for classes that are defined in a GDExtension, which is why set_instance_binding() and clear_internal_extension() treat it the way they do for reloading. But there may be additional instance bindings after the first one that we don't want to lose track of.
For example, let's say a class is defined in GDExtension (so that's the first instance binding) and the developer also used it in C# (which would be the second instance binding) and a reload has happened, which clears out the first binding. So, if set_instance_binding() just changes the count to 1, then we'll effectively forget about the C# instance binding.
I think maybe the bug is actually in free_instance_binding() not treating the first binding as special for GDExtension-defined classes? (FYI, for classes that aren't defined in GDExtension, the first binding isn't special.) Maybe we need to check if this is a GDExtension-defined class, and clear out the first instance binding (if it matches the token), but not move the other bindings up in the list?


[BUG] wash claims sign allows empty versions and revisions

Feature or Problem
Currently, when signing an actor with wash, the version (--ver) and revision (--rev) args are not required. This will lead to claims that are missing some important information.
Related Issues
859
Release Information
v0.79.0
Consumer Impact
stricter wash claims sign cmd that ultimately improves the metadata output of wash inspect
Testing
Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin
[ ] x86_64-windows

Tested on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin
[ ] x86_64-windows

Acceptance or Integration
updated integration tests integration_claims_sign, integration_claims_call_alias

I don't know about the Rust host, but always setting revision to 1 on signed modules will absolutely break updates. Revisions need to either monotonically increase or stay at zero where they are assigned a value based on the clock time at startup

@ahmedtadde Looks good to me once tests are working! I'm glad we can keep revision "optional" in the wasmcloud.toml file and default to 0 for them.

@ahmedtadde Looks good to me once tests are working! I'm glad we can keep revision "optional" in the wasmcloud.toml file and default to 0 for them.

so, for the tests, i am not able to reproduce this https://github.com/wasmCloud/wasmCloud/actions/runs/6711700776/job/18239654369?pr=838 locally? also, i am confused about the error message... looking at the code, i don't see a tags field on the ActorConfig struct

@ahmedtadde Looks good to me once tests are working! I'm glad we can keep revision "optional" in the wasmcloud.toml file and default to 0 for them.

so, for the tests, i am not able to reproduce this https://github.com/wasmCloud/wasmCloud/actions/runs/6711700776/job/18239654369?pr=838 locally? also, i am confused about the error message... looking at the code, i don't see a tags field on the ActorConfig struct

just saw that the tags field is from a change in main. will try to rebase.

@ahmedtadde Ah I see that now too. Thanks for doing that rebase, we had a few edits going into build at the same time 🤔


Wrong documentation for ReaderConfig.startOffset

According to the documentation the valid values for ReaderConfig.startOffset (https://github.com/mostafa/xk6-kafka/blob/main/api-docs/docs/interfaces/ReaderConfig.md#startoffset) are the constants START_OFFSETS_FIRST_OFFSET and START_OFFSETS_LAST_OFFSET.
Those two constants are not included in the module-level constants (see console.log(kafka);) and therefor have no value set and do not work.
The module-level constants include the constants FIRST_OFFSET and LAST_OFFSET though (which work fine).

Hey @AndreasKorn,
Happy to see contributions.

I tried using both START_OFFSETS_LAST_OFFSET and LAST_OFFSET, but didn't work for me.
The consumer always gets the first offset message in the topic, instead of last one.
Here is my Reader config. Did I miss anything?
const sinkTopicReader = new Reader({
brokers: brokers,
partition: 0,
groupTopics: [sinkTopic],
groupID: "test-consumer-group",
startOffset: LAST_OFFSET,
});

Hi,
I actually still have issues reading from latest offset from particular topic and partition. Is there any possibility to properly document and confirm what is the correct way to use START_OFFSETS_LAST_OFFSET or LAST_OFFSET?
Thanx a lot.
Miro


Provide IDocumentSession to custom projections and event subscriptions to allow writes in the same unit of work

Currently, an IDocumentOperation limited to queries is provided to custom projections and event subscriptions.
Exposing IDocumentSession instead will allow calling ForTenant(string) for writes as well.

Rather just move the ForTenant up to IDocumentOperation


Scan throws a UnicodeEncodeError

Scanning a Unicode file (e.g. detect-secrets scan poc.foo) results in
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 76: ordinal not in range(128)

The last place in the stack trace is
https://github.com/Yelp/detect-secrets/blob/3ab11c65dab0e041e090191e9f62eab50f266543/detect_secrets/plugins/common/ini_file_parser.py#L103
https://github.com/Yelp/detect-secrets/pull/129/files was a previous fix for something similar, where from __future__ import unicode_literals fixed the issue easily. I vimd into my site-packages, added the line to ini_file_parser.py, and it fixed it. So we just need to make a PR similar to #129.

This was fixed in https://github.com/Yelp/detect-secrets/pull/143, gonna leave it open until we bump to a new version.


Transform just 1 card without hull and enclose entire card in bounding box and generate new scene

Hi, i was wondering that i wanted to generate a scene with just the card, without the hulls and my bounding box encloses the card. I have been trying to modify your code to do this but always run into errors. Could you take a look and advise what i am doing wrong. My code is:
`
# Scenario with 1 card:
# The original image of a cover has the shape (cardH,cardW,4)
# We first paste it in a zero image of shape (imgH,imgW,4) at position decalX, decalY
# so that the original image is centerd in the zero image
 decalX=int((imgW-cardW)/2)
 decalY=int((imgH-cardH)/2)
# imgaug keypoints of the bounding box of a whole card
def card_to_kps(decalX=decalX, decalY=decalY):
      kps = ia.KeypointsOnImage([ia.Keypoint(x=decalX,y=decalY),
                               ia.Keypoint(x=decalX+length,y=decalY),
                               ia.Keypoint(x=decalX+length,y=decalY+breadth),
                               ia.Keypoint(x=decalX,y=decalY+breadth)], shape=(imgH,imgW,3))

      return kps

def kps_to_polygon(kps):

        #Convert imgaug keypoints to shapely polygon

    pts=[(kp.x,kp.y) for kp in kps]
    return Polygon(pts)

def kps_to_BB(kps):
    """
        Determine imgaug bounding box from imgaug keypoints
    """
    extend=3 # To make the bounding box a little bit bigger
    kpsx=[kp.x for kp in kps.keypoints]
    minx=max(0,int(min(kpsx)-extend))
    maxx=min(imgW,int(max(kpsx)+extend))
    kpsy=[kp.y for kp in kps.keypoints]
    miny=max(0,int(min(kpsy)-extend))
    maxy=min(imgH,int(max(kpsy)+extend))
    if minx==maxx or miny==maxy:
        return None
    else:
        return ia.BoundingBox(x1=minx,y1=miny,x2=maxx,y2=maxy

# imgaug transformation for card
transform_1card = iaa.Sequential([
    iaa.Affine(scale=[0.65,1]),
    iaa.Affine(rotate=(-180,180)),
    iaa.Affine(translate_percent={"x":(-0.25,0.25),"y":(-0.25,0.25)}),
])

# imgaug transformation for the background
scaleBg=iaa.Resize({"height": imgH, "width": imgW})

def augment(img,list_kps,seq, restart=True):
    """
        Apply augmentation 'seq' to image 'img' and keypoints 'list_kps'
        If restart is False, the augmentation has been made deterministic outside the function
    """
    # Make sequence deterministic
    while True:
        if restart:
            myseq=seq.to_deterministic()
        else:
            myseq=seq

        # Augment image, keypoints and bbs
        img_aug = myseq.augment_images([img])[0]
        list_kps_aug = [myseq.augment_keypoints([kp])[0] for kp in list_kps]
        list_bbs = [kps_to_BB(list_kps_aug[1]),kps_to_BB(list_kps_aug[2])]
        valid=True
        # Check the cover bounding box stays inside the image
        for bb in list_bbs:
        if bb is None or int(round(bb.x2)) >= imgW or int(round(bb.y2)) >= imgH or int(bb.x1)<=0 or int(bb.y1)<=0:
                valid=False
                break
        if valid: break
        elif not restart:
            img_aug=None
            break

    return img_aug,list_kps_aug,list_bbs

class BBA:  # Bounding box + annotations
    def __init__(self,bb,classname):
        self.x1=int(round(bb.x1))
        self.y1=int(round(bb.y1))
        self.x2=int(round(bb.x2))
        self.y2=int(round(bb.y2))
        self.classname=card
class Scene:
def __init__(self,bg,img1):
     self.createCardsScene(bg,img1)

def createCardsScene(self,bg,img1):

    # Randomly transform 1st card
    self.img1=np.zeros((imgH,imgW,4),dtype=np.uint8)
    self.img1[decalY:decalY+cardH,decalX:decalX+cardW,:]=img1
    self.img1, self.bbs1=augment(self.img1, transform_1cover)
    #self.class1=class1

def display(self):
    fig,ax=plt.subplots(1,figsize=(8,8))
    ax.imshow(self.final)
    for bb in self.listbba:
        rect=patches.Rectangle((bb.x1,bb.y1),bb.x2-bb.x1,bb.y2-bb.y1,linewidth=1,edgecolor='b',facecolor='none')
        ax.add_patch(rect)
def res(self):
    return self.final
def write_files(self,save_dir,display=False):
    jpg_fn, xml_fn=give_me_filename(save_dir, ["jpg","xml"])
    plt.imsave(jpg_fn,self.final)
    if display: print("New image saved in",jpg_fn)
    create_voc_xml(xml_fn,jpg_fn, self.listbba,display=display)`

Hi,
I imagine you get syntax errors, no ?  Your code is not indented correctly (for instance the class Scene), or have missing parenthese (in return of the function kps_to_BB).

Hi ,
thanks for the reply. The indentations are not an issue and also the missing parentheses. Those are errors while pasting the code here. The issue i have is in how to randomly transform a card and paste it in a new background in the line,
 self.img1, self.bbs1=augment(self.img1, transform_1cover)

i get errors like"missing one argument:seq" or "something like KeypointsOnImage is not iterable" when i try to pass kps as an argument. I was wondering how to change the code such that i paste the entire card and the 4 corners as keypoints and transform them is such a way that it also returns bounding box coordinates of entire card

The error "missing one argument" seems very clear. You give only 2 arguments in the call to augment, while you should give 3 (missing argument: list_kps).

yes i understood that. i tried it and it gives me the above mentioned errors. i will try to solve myself in the meantime, but if you have any suggestions, it would be very helpful


Add bloom ipex inference test

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Handle "Feature" type in shape (geo_interface)

This adds a branch to shape's __geo_interface__ parsing to handle Feature type. I think this is the right thing to do, but I'm not an expert on GeoJSON or __geo_interface__.
Closes https://github.com/shapely/shapely/issues/1814

https://gist.github.com/sgillies/2217756 indicates that __geo_interface__ can also return a Feature type, so it seems the correct thing to do to support this in shape(..) then (cc@sgillies)

Thanks Tom!


read and write file in parent process whose fd sent by its child process-CLONE_FILE

Signed-off-by: Yao Zengzeng<EMAIL_ADDRESS>

please fix up the warmings
init.c: In function ‘hyper_open_container_file’:
init.c:669:6: warning: unused variable ‘size’ [-Wunused-variable]
  int size, fd = -1, ret = -1;
      ^
init.c: In function ‘hyper_cmd_rw_file’:
init.c:775:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
   *rdata = data = malloc(datalen);
          ^
init.c:709:11: warning: unused variable ‘status’ [-Wunused-variable]
  int pid, status, datalen, size;
           ^
init.c:785:41: warning: ‘datalen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    size = write(fd, data + len, datalen - len);
                                         ^


adding annotation for setting arbitrary tag

reference slack conversation with @codenrhoden from 25apr2016
fyi @zyoung51 - did I get this correct?
. @codenrhoden

I can confirm that the example added here worked for me.
Only thing I noticed is that manually applying a tag to a node, when using a tag that does not already exist, does not result in a tag that is returned when listing all tags via GET api/1.1/tags.

@heckj: Documentation appears under nodes: http://rackhd.readthedocs.org/en/latest/rackhd/index.html#api-commands-for-nodes.  Might be worth linking or copying what is already there to keep it consistent?

👍  along with @zyoung51's suggestion.

yeah, I'll shift it up there, thanks! Update shortly...

@zyoung51 @benbp I'm a little concerned it's not clear the piece I added was about externally set/arbitrary tags vs. most of the API being focused on the rules mechanisms. Does this read OK?

@heckj FWIW, this is what is currently in the nodes documentation.  I'm ok with duplicating the documentation and not putting a link.  Would you want to bring in the list/delete references to nodes/:nodeid/tags as well?
 Thanks, I'll update to reference the node API to enable this

@zyoung51 this should be way more sane now

+1


Retain topology index in oemol

This addresses #203. If the test passes, then it should be good to merge.

I think the error here is some weird OpenEye-py35 error.

Any objection to merging this? Otherwise I will merge to avoid the clutter.


Added option to not use sendfile

How would you feel about something like this, Loic?

workaround for #897

That would be terrible for large files.
Look into Ranch, ranch_transport already has a sendfile function that emulates everything the normal sendfile does. All we need to do is call this function instead of the default sendfile when we disable it.

ah, I did see that. good idea

better?

Don't make a new function, just have a case for calling sendfile and a case for checking the result. Also don't use on | off, use true | false. And don't forget to update typespecs and add a test.

I'm having a bit of trouble getting the tests to pass, even without my changes. A whole bunch of this:
maps:to_list failed
Reason: badmap

Are there any known issues/pre-reqs? What version of erlang are you using?
This was on 1.0.3. I can't even get master to build:
$ make
make[1]: Entering directory '/vagrant/deps/cowboy/deps/cowlib'
make[1]: Leaving directory '/vagrant/deps/cowboy/deps/cowlib'
make[1]: Entering directory '/vagrant/deps/cowboy/deps/ranch'
make[1]: Leaving directory '/vagrant/deps/cowboy/deps/ranch'
 GEN    clean-app
 GEN    clean-test-dir
 GEN    coverdata-clean
 ERLC   cowboy.erl cowboy_app.erl cowboy_bstr.erl cowboy_clock.erl cowboy_constraints.er    l     cowboy_handler.erl cowboy_http2.erl cowboy_loop.erl cowboy_middleware.erl cowboy_protocol.erl     cowboy_req.erl cowboy_rest.erl cowboy_router.erl cowboy_spdy.erl cowboy_static.erl cowboy_stream.erl cowboy_sub_protocol.erl cowboy_sup.erl cowboy_tls.erl cowboy_websocket.erl
src/cowboy_protocol.erl:58: can't find include lib "cowlib/include/cow_parse.hrl"
src/cowboy_protocol.erl:278: undefined macro 'IS_WS/1'
src/cowboy_protocol.erl:440: undefined macro 'LOWER/4'
src/cowboy_protocol.erl:266: function parse_hd_name/8 undefined
src/cowboy_protocol.erl:413: function parse_host/3 undefined
src/cowboy_protocol.erl:283: function parse_hd_name_ws/8 is unused
src/cowboy_protocol.erl:290: function wait_hd_before_value/8 is unused
src/cowboy_protocol.erl:303: function parse_hd_before_value/8 is unused
src/cowboy_protocol.erl:322: function wait_hd_value/9 is unused
src/cowboy_protocol.erl:337: function wait_hd_value_nl/9 is unused
src/cowboy_protocol.erl:351: function parse_hd_value/9 is unused
src/cowboy_protocol.erl:369: function clean_value_ws_end/2 is unused
erlang.mk:4702: recipe for target 'ebin/cowboy.app' failed
make[1]: *** [ebin/cowboy.app] Error 1
erlang.mk:81: recipe for target 'all' failed
make: *** [all] Error 2

Am I missing something?

make distclean; make tests

ah, yes!

The option should rather be {sendfile, boolean()}, it should be documented and tests need to be added for the case where it is disabled.

sorry, I had a bit of trouble getting the tests passing (without my change), and then got distracted. I'll try and find some time to finish this

Some tests may fail normally. Just say which one fail and I'll tell you.

@essen updated

3 years later, I have added comparable functionality to the HTTP protocols via the sendfile option. This disables sendfile for the entire listener, including cowboy_static. I'll push it soon. Closing, thanks!


Add option to have cursor not animate to past the edge of the buffer when wrapping is enabled

Contributing guidelines

[X] I have read CONTRIBUTING.md
[X] I have read CODE_OF_CONDUCT.md

Module(s)
mini.animate
Description
When wrapping is enabled, mini.animate animates the cursor as moving to past the edge of the buffer as if wrapping is disabled. An option to have a fix applied to work for wrapping would be great.

Thanks for the suggestion!
Yes, I've noticed it too and thought about fixing it. The problem here was to compute the proper target destination and proper intermediate places. As although the line is displayed wrapped, it isn't so internally (it is still a single line). So it would need some extra work with window views which are both not trivial and might be computationally (relatively) expensive.
I'll take a second look, though.

The problem here was to compute the proper target destination and proper intermediate places. As although the line is displayed wrapped, it isn't so internally (it is still a single line). So it would need some extra work with window views which are both not trivial and might be computationally (relatively) expensive.

From some initial brainstorming I had the idea to do just a basic calculation where you check if the cursor position's column is
greater than the width of the window then to do a calculation to get the displayed position rather than the internal position by subtracting the width from the column number. I am not sure exactly how this would be implemented but I hope it helps!

After having second and even third looks, I can not see an easy way to have this fixed. Computation based on the window width is bound to be problematic for various reasons (multi-byte characters, tab expansion, etc.).
So I am afraid I am going to close this issue as "would be good to fix but I don't think this is possible in reasonable way". If anyone will have a doable idea or if there will be a new Neovim function/interface to simplify this, feel free to comment here.


SitePlanNavService should ignore all non-Page Placed entries in the SPT

Make sure getNodeData is never invoked on any asset that's not a Page.

Added filter to 12.0.1 branch to only load otype=Page

Fixed in 12.0.1


⚠ Bofrost.lu has degraded performance

In a4ee408, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1370 ms

Resolved: Bofrost.lu performance has improved in 8f1fe19 after 9 minutes.


Rename gravity to explicit layoutGravity and textGravity

Follow up of the issue #135 where the gravity property of the textview is shadowed by the one from the parent layout.
I support the @Ribesg proposal about renaming the gravity property to something more explicit, like layoutGravity and textGravity.

Looks like the renaming is not needed anymore with the introducing of "DslMarker" support.
Please create the new issue if you still have the problem.


[api-spec] Schema does not describe its own link field.

I'm working on a generator for a PHP based api client.
Currently the following fields are described for the Schema schema:
<?php
namespace SamIT\Rancher\Generated;

class Schema
{
	/** @var JsonMap */
	public $collectionActions;

	/** @var JsonMap */
	public $collectionFields;

	/** @var JsonMap */
	public $collectionFilters;

	/** @var string[] */
	public $collectionMethods;

	/** @var string[] */
	public $includeableLinks;

	/** @var string */
	public $pluralName;

	/** @var JsonMap */
	public $resourceActions;

	/** @var JsonMap */
	public $resourceFields;

	/** @var string[] */
	public $resourceMethods;

}

This does not comply with the api-spec; missing fields:

id
type
links

It also contains a field includeableLinks which is not mentioned in the api-spec.

@ibuildthecloud Not sent by Java API implementation.  type, links, actions, etc are never listed as resourceFields because they are essentially special metadata fields and not properties of the actual resource.

@vincent99 regarding include / includeableLinks, how about marking it as internal. That way we know we shouldn't use it but we also know that it is something you know about :)
For the other fields, isn't that just semantics? Those fields might be special fields, still they are fields in the resource...
My approach for creating an API client is to define a minimal Schema that contains just enough knowledge to enrich itself by parsing the schemas/schema schema. It then uses that to parse all the other schemas.

type, links, actions, etc are never listed as resourceFields because they are essentially special fields with meaning defined in the spec that the client needs to know what to do with. So listing them in schemas is sorta redundant.

I don't see why an exception for those 3 fields is needed, having them defined as resourceFields does not limit anything it just makes it more explicit.

Include is explicitly not part of the general spec.  It is an extra capability in one specific implementation (Cattle) and we've basically removed all use of because it was a bad idea in the first place.
I have no argument with adding type/links/actions, just explaining why they're not there now.  The spec already defines their type and have specific behavior that relies on that so nobody ever noticed they're not in resourceFields.

BTW there does exist a PHP client I wrote in a previous life... It reads & caches the schema directly instead of doing static code generation, and is probably terrible because I haven't looked at PHP in ~4 years, but it worked at the time and you might find something useful in it.  https://github.com/godaddy/gdapi-php

@vincent99 if you're interested, I've put my initial code online:
https://github.com/SAM-IT/php-rancher-client/

@vincent99 You mentioned earlier that include / includeableLinks is bad. I read the link you provided and can imagine that include lets you do some bad things.
I don't see the harm in providing a list of possible relation names though. It seems ideal to be able to know in advance what kind of relations a type might have.


feat: add github action to make the semantic-release

Hello Capi :)
Just a PR to add Semantic-release and the linked github action !

Not really sure how semver applies here, I'll think about it further.
But the PR is ok!


GH-33727: [Python] array() errors if pandas categorical column has dictionary as string not object

Rationale for this change
Currently writing a pandas dataframe with categorical column of dtype string[pyarrow] fails. The reason for this is that when category with string[pyarrow] dtype is converted to an array in pyarrow it results in a ChunkedArray, not Array, and then DictionaryArray.from_arrays  fails.
What changes are included in this PR?
_handle_arrow_array_protocol method in array.pxi is updated so that in case of a ChunkedArray with one chunk, the result is a pyarrow.Array and not pa.ChunkedArray.
Are these changes tested?
Yes. Tests are added to:

python/pyarrow/tests/parquet/test_pandas.py
python/pyarrow/tests/test_pandas.py
python/pyarrow/tests/test_array.py

Are there any user-facing changes?
No.

Closes: #33727

Thanks! Opened https://github.com/apache/arrow/issues/34755 for the broader question about how to handle chunked arrays in pa.array()


Key preference mechanism

Add a mechanism for indicating a preference for which keys to use for signing a transaction.

@jeffreyssmith2nd is this like owner vs active key?

Yes, except the idea being that you could have any number of arbitrary keys and choose which one you want to sign with. I believe @brandonfancher and @tbfleming had thoughts on how it should be implemented.

More like idea fragments :(


fix(Tabs): handle icon margin in RTL mode

🔗 Linked issue

❓ Type of change

[x] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Before:

After:

📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thanks! 😊


CRAYSAT-1947: fix sorting warnings in sat showrev

Summary and Scope
fix sorting warnings in sat showrev
Issues and Related PRs

Resolves CRAYSAT-1947

Testing
Tested on:

Rocket
Local development environment

Test description:
Risks and Mitigations
Are there known issues with these changes? Any other special considerations?
No
Pull Request Checklist

[x] Version number(s) incremented, if applicable
[x] Copyrights updated
[x] License file intact
[x] Target branch correct
[x] CHANGELOG.md updated
[x] Testing is appropriate and complete, if applicable
[x] HPC Product Announcement prepared, if applicable

Testing on Rocket: https://gist.github.com/ethanholen-hpe/7c2e6f022c6599e2b7dca591e20fc668

/backport release/3.33


Hide "legislation type" search filter

Right now, we just have agenda items, and they're only showing as "Bills" on the search page, so we should just hide it. (The "Bills" thing is just a part of the underlying code that's bubbling up, as the system tracks agenda items as bills.)

Resolved in 29ff63c and civictechto/django-councilmatic@91847ee


Allow accessible options to accept Property types

In our discussion of the API improvement, we realized the utility of passing Properties into the descriptive options/methods. This would allow a simpler implementation in cases where the content of a given PDOM element needs to be dynamic.
This would need to be restricted to Property.<string> or possibly Property.<number>.
For example, setting the description element on a given node might look like:
var n = new Node( {
  descriptionContent: model.someDynamicProperty
} );

Under the hood, the accessibility API would handle registering listeners to the property and updating the appropriate HTML accordingly.

This sounds really nice, and would match the convenient scenery convention that  does this for other things like fill and stroke.

Duplicate of https://github.com/phetsims/scenery/issues/1442


variableInspector makes entries in IPython output history cache

I just installed the latest version from GitHub into JupyterLab 1.0.2, and I see this strange behavior.  It's easier to show than to explain.  Pay attention to the cell numbers.  They start from either 2 or 3, and they increment by 2 after each cell evaluation:

_1 = []
_2 = []

Apparently the variableInspector output is being assigned to its own underscore-number variable after each cell evaluation.

Fix coming soon.

The behavior of the counter should be fixed in #107.
Regarding the issue with populating the kernel with _1 et al. I investigated a little bit. It seems like this is standard behavior in jupyterlab and happens even without the variable inspector installed and for versions prior to jupyterlab 1.0.0. (Usually the variables then are named _i1 etc.


Improve highlighting for Git bare repository tutorial

Sorry for spamming PRs. I realized after the previous PR (https://github.com/dotfiles/dotfiles.github.com/pull/250) was merged that the link/highlighting for the Git bare repository tutorial was unhelpful. This moves the linked portion of the text to be more descriptive.

No problem, thanks for the help


added sahaj in contributors

Hi @Sahaj-Bamba we will happily merge this if you make another pull request with a contribution ;)


Add space after # in headers.

On this page:
http://spinnaker.io/documentation/hello-spinnaker.html
The headers aren't formatted. GitHub supports putting the header directly next to the #, but other applications don't. This should resolve the issue with the header not being formatted correctly.

Thanks for the fix.
Please note that we are in the process of moving our site to https://spinnaker.readme.io/ (but not done yet).
LGTM.


Gmsh ASCII and binary formats

Hello,
I have been trying to import  a grid done with Gmsh (all versions). I have problems even with Version 2, which is supposed to work. Can you advise? I am using the latest version of Gmsh (version 4.6.0, 22 June 2020).
I am able to read the $Nodes correctly, but I have problems with $Elements. Did anybody run into this issue?
Thank you,

Hi, @mpanesi ,
I think we'll need more information.  Are you seeing an error message?  Any more details about the issue would be helpful.
Best wishes,
Mark

Hi all,
I cannot see my response here, so i am going to respond again:
I am adding the error message and the mesh file:
MFEM abort: Gmsh file : vertex index doesn't exist
... in function: void mfem::Mesh::ReadGmshMesh(std::istream&)
... in file: mesh/mesh_readers.cpp:1181
Also, I have asked Pointwise to implement the MFEM format, it seams that for the linear case they are going to do that.
// directly to vertices describing the mesh element
const int n_elem_nodes = nodes_of_gmsh_element[type_of_element-1];
vector vert_indices(n_elem_nodes);
int index;
for (int vi = 0; vi < n_elem_nodes; ++vi)
{
input >> index;
cout<< "index " << index << "\n ";
map<int, int>::const_iterator it = vertices_map.find(index);
if (it == vertices_map.end())
{
MFEM_ABORT("Gmsh file : vertex index doesn't exist");
} //// MARCO HACK
vert_indices[vi] = it->second;
}
MeshNew2.zip

Hi @mpanesi
The uploaded mesh file saves parametric nodes. In other words, there is $ParametricNodes in the file. Please try Mesh.SaveParametric=0, so that GMSH save a regular $Nodes information.

Hi Sshiraiwa
It worked. I used gmsh version 2 format with no option and that made the tricks.
Thank you


merge release/v1.9.0-pre-rc1 to master

关联的Issues (Related Issues)

close
改动 (Proposed Changes)

附注 (Additional Info)

自查清单 (Checklist)
在你认为本 PR 满足被审阅的标准之前，需要确保 / Before you mark the PR ready for review, please make sure that:

[ ] 符合Venus项目管理规范中关于PR的相关标准 / The PR follows the PR standards set out in the Venus project management guidelines
[ ] 具有清晰明确的commit message / All commits have a clear commit message.
[ ] 包含相关的的测试用例或者不需要新增测试用例 / This PR has tests for new functionality or change in behaviour or not need to add new tests.
[ ] 包含相关的的指南以及文档或者不需要新增文档 / This PR has updated usage guidelines and documentation or not need
[ ] 通过必要的检查项 / All checks are green

Codecov Report

Merging #114 (36bdd1e) into master (d8af27f) will increase coverage by 5.43%.
The diff coverage is 49.01%.

Additional details and impacted files

@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   28.12%   33.55%   +5.43%
==========================================
  Files          48       39       -9
  Lines        4092     2366    -1726
==========================================
- Hits         1151      794     -357
+ Misses       2741     1437    -1304
+ Partials      200      135      -65

Flag
Coverage Δ

unittests
33.55% <49.01%> (+5.43%)
:arrow_up:

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

Impacted Files
Coverage Δ

cmd/daemon.go
0.00% <ø> (ø)

cmd/mock/main.go
0.00% <ø> (ø)

filemgr/config_manager.go
68.36% <ø> (-1.83%)
:arrow_down:

integration_test/builder.go
50.00% <ø> (-0.71%)
:arrow_down:

storage/sqlite/conn.go
50.00% <ø> (+11.53%)
:arrow_up:

storage/sqlite/key_store.go
59.77% <ø> (+4.59%)
:arrow_up:

storage/sqlite/key_types.go
84.21% <ø> (ø)

storage/wallet/sign_type.go
0.00% <ø> (ø)

storage/wallet/wallet.go
21.10% <10.52%> (-0.05%)
:arrow_down:

storage/keymix.go
56.86% <50.00%> (+7.97%)
:arrow_up:

... and 7 more


Package is unidentified

The package on Pub is not passing static analysis.
I think that this should be addressed soon.

Thanks for the issue report! It was addressed.


Rendering :actionURL in mail footer

Laravel Version: 5.7.9
PHP Version: 7.1.22
Database Driver & Version: mysql 5.7.23

Description:
When sending mals with an action you get :actionURL rendered in mail footer as there is a typing error in the Illuminate/Notifications/resources/views/email.blade.php:
@lang(
    "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
    'into your web browser: [:actionURL](:actionURL)',
    [
        'actionText' => $actionText,
        'actionUrl' => $actionUrl
    ]
)

Steps To Reproduce:
Use default laravel auth and register.
Getting the register mail you will see this.

Seems like this was fixed already here


intrinsics matrix and extrinsics  matrix

Hello, do you have the intrinsics matrix and extrinsics  matrix after camera calibration? How can I get it?

Hi, I didn't upload those matrices. The camera calibration was done with SensorCortek. They have all copy rights.
You may have to ask for their permissions if must.

Could you please tell me how to contact SensorCortek? Because I think only by obtaining these parameters can I obtain complete and extensible data

calibration_results.zip
I have contacted them myself. The stereo calibration results are attached.
All results were acquired from OpenCV.
I hope they help.


Fix ReactNativeART arc drawing on Android

Motivation: Arc drawing has been broken on Android for some time. @dgladkov submitted a PR, which ended up having a bug and was never merged. This PR should fix that bug as well as provide screenshots to prove it works.
Reproducing the Bug: dgladkov made a simple test app which helps to illustrate the bug. The repo can be found here. The demo app illustrates that on iOS, wedges are drawn correctly, but Android only draws full circles. Direct Link to iOS Before. Direct Link to Android Before.
Proof The Bug is Fixed: Here is a direct link to Android After pic. You can see the wedges match the iOS Before screenshot.
What went wrong: dgladkov's solution relied on Java's modulus, which in fact, implements modulus in a non-standard way. Modulus should always be positive. Java returns the remainder, which can be negative. -120 % 360 will return 240 in Python, but -120 in Java. I created a modulus method which mimics Python's behavior. Math.floorMod(), introduced in Java 8, also gets the job done. See this StackOverflow answer for more information regarding modulus.

To be fair, lots of languages implement % like this.

@spicyj Good catch. That edge case would create a full circle in counter-clockwise mode. I have a fix in place, but first a question: what is the expected result of an arc with startAngle = -360 and endAngle = 20? In my implementation, the result is a full circle, but I guess the argument could be made for a 20 degree arc. The ART docs, unfortunately, do not describe Path.arc().

I think whatever SVG does.
https://github.com/sebmarkbage/art/blob/51ffce8164a555d652843241c2fdda52e186cbbd/modes/svg/path.js#L13

I decided it was best to mimic the behavior of iOS. If the sweep > 360, then a full circle is always drawn. If sweep = 0, no wedge is drawn. Comparison screenshots: iOS and Android. The start/end angles are as follows:
Blue: start: 120, end: 220
Red: start: 120, end: 120
Green: start: -360, end: 20
Orange: start: 120, end: 20

@spicyj, I realized I didn't mention you in my last post. Not sure if that makes a difference.

The post isn't yet tagged as such, but I have signed the CLA.

Assigning to @spicyj who started reviewing this PR.

Hooray :) This is a blocker for my project.

Can you say whether this matches the SVG behavior now? I am fairly sure that is what ART intends to do for this path component.

The fixed behavior seems to conform to intentions. The repo provided uses the Wedge component from react-art, in any case.

Yeah, that seems fair. @facebook-github-bot shipit

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.

It looks like this breaks circle rendering:

const {Surface, Group} = require('ReactART');
const Circle = require('Circle.art');

...

  <Surface width={200} height={200}>
    <Group x={100} y={100}>
      <Circle radius={50} stroke="green" strokeWidth={3} fill="blue" />
    </Group>
  </Surface>

(where Circle.art comes from https://github.com/reactjs/react-art/blob/d1eda4fd8e3ee9462c32d2f611923697195fee14/src/Circle.art.js).
There should not be a line in the middle. I have to revert this commit, but would you want to send a follow-up that fixes this?

Aww, yeah I'll look into it. When should I submit the fix to get it in for the upcoming release?

I think we cut a release every other Sunday, including this weekend.

I just ran this on my machine and it looks fine. This is what it looks like for me. The call to close() in Circle.art is what will create the line segment to close off the final arc. If the path ends at the same point that it starts, there will be no line segment. This functionality is described in the Android Path docs here. The arcs are centered around the same coordinate and the second ends at the same angle the first begins, so the starting points should be identical. I printed some logs of Circle.art to confirm that fact:
04-29 01:54:38.488 1972-2038/com.testproject D/dsf: x: 140.0 y: 280.0 r: 140.0 start: -90.0 end: 90.0 sweep: 180.0
04-29 01:54:38.488 1972-2038/com.testproject D/dsf: x: 140.0 y: 280.0 r: 140.0 start: 90.0 end: -90.0 sweep: 180.0

I don't understand how you got this rendering, but I can't reproduce it.
Anyway, one simple fix would be to remove the call to close() in Circle.art as it doesn't achieve anything, anyway.

Hm, I'm not sure. I was testing on a Nexus 4 simulator on 4.4.4 (API 19).

@spicyj It looks like my changes weren't what broke this. The circle draws correctly up to #4e5c85 of my repo. At some point after that, someone introduced breaking code and my change exposed that break. I will run git bisect when I have time later today to pinpoint the breaking commit.

Sounds good.

I couldn't successfully bisect the commits. After commit #47a470a, I get the red screen of death with the message "Couldn't get the native call queue...". Restarting package manager, reinstalling, etc didn't fix the issue. The message shows for this commit and all subsequent commits. Any hint would could be going wrong?
Circle rendered fine in the commit before that though.

I'm not sure, sorry. Does master work for you? (I don't really work on Android, or on React Native for that matter.)