list out of range and checkpoint's state_dict mismatch

hello,
1).  when I try the random init model, it runs into list index out of range for this line  target_cls_idx = [self.object_class_to_target_class[obj.item()]
2).  Then I tried to used the pre-trained UPT's checkpoint, but the state_dict mis-match.
My args' configure is correct. the default value of args.dataset is hicodet.
So I wander whether it is a bug or my problem ?
For 1)
python main.py --eval --backbone resnet101 --dilation --resume /path/to/model --data-root /storage/gaokaifeng

Namespace(alpha=0.5, aux_loss=True, backbone='resnet101', batch_size=2, bbox_loss_coef=5, box_score_thresh=0.2, cache=False, clip_max_norm=0.1, data_root='/storage/gaokaifeng', dataset='hicodet', dec_layers=6, device='cuda', dilation=True, dim_feedforward=2048, dropout=0.1, enc_layers=6, eos_coef=0.1, epochs=20, eval=True, fg_iou_thresh=0.5, gamma=0.2, giou_loss_coef=2, hidden_dim=256, lr_backbone=1e-05, lr_drop=10, lr_head=0.0001, max_instances=15, min_instances=3, nheads=8, num_queries=100, num_workers=2, output_dir='checkpoints', partitions=['train2015', 'test2015'], port='1234', position_embedding='sine', pre_norm=False, pretrained='', print_interval=500, repr_dim=512, resume='/path/to/model', sanity=False, seed=66, set_cost_bbox=5, set_cost_class=1, set_cost_giou=2, weight_decay=0.0001, world_size=1)
=> Rank 0: start from a randomly initialised model
  8%|████████████                                                                                | 766/9546 [01:29<17:09,  8.53it/s]
Traceback (most recent call last):
  File "main.py", line 210, in <module>
    mp.spawn(main, nprocs=args.world_size, args=(args,))
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 198, in start_processes
    while not context.join():
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 160, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
    fn(i, *args)
  File "/home/gaokaifeng/project/upt/main.py", line 99, in main
    ap = engine.test_hico(test_loader)
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/gaokaifeng/project/upt/utils.py", line 169, in test_hico
    output = net(inputs)
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 963, in forward
    output = self.module(*inputs[0], **kwargs[0])
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/gaokaifeng/project/upt/upt.py", line 252, in forward
    logits, prior, bh, bo, objects, attn_maps = self.interaction_head(
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/gaokaifeng/project/upt/interaction_head.py", line 366, in forward
    prior_collated.append(self.compute_prior_scores(
  File "/home/gaokaifeng/project/upt/interaction_head.py", line 260, in compute_prior_scores
    target_cls_idx = [self.object_class_to_target_class[obj.item()]
  File "/home/gaokaifeng/project/upt/interaction_head.py", line 260, in <listcomp>
    target_cls_idx = [self.object_class_to_target_class[obj.item()]
IndexError: list index out of range

For 2):
(torch111) gaokaifeng@server1:~/project/upt$ python main.py \
>         --data-root /storage/gaokaifeng \
>         --eval \
>         --backbone resnet101 \
>         --dilation \
>         --resume checkpoints/upt-r101-dc5-hicodet.pt
Namespace(alpha=0.5, aux_loss=True, backbone='resnet101', batch_size=2, bbox_loss_coef=5, box_score_thresh=0.2, cache=False, clip_max_norm=0.1, data_root='/storage/gaokaifeng', dataset='hicodet', dec_layers=6, device='cuda', dilation=True, dim_feedforward=2048, dropout=0.1, enc_layers=6, eos_coef=0.1, epochs=20, eval=True, fg_iou_thresh=0.5, gamma=0.2, giou_loss_coef=2, hidden_dim=256, lr_backbone=1e-05, lr_drop=10, lr_head=0.0001, max_instances=15, min_instances=3, nheads=8, num_queries=100, num_workers=2, output_dir='checkpoints', partitions=['train2015', 'test2015'], port='1234', position_embedding='sine', pre_norm=False, pretrained='', print_interval=500, repr_dim=512, resume='checkpoints/upt-r101-dc5-hicodet.pt', sanity=False, seed=66, set_cost_bbox=5, set_cost_class=1, set_cost_giou=2, weight_decay=0.0001, world_size=1)
=> Rank 0: continue from saved checkpoint checkpoints/upt-r101-dc5-hicodet.pt
Traceback (most recent call last):
  File "main.py", line 210, in <module>
    mp.spawn(main, nprocs=args.world_size, args=(args,))
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 198, in start_processes
    while not context.join():
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 160, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
    fn(i, *args)
  File "/home/gaokaifeng/project/upt/main.py", line 76, in main
    upt.load_state_dict(checkpoint['model_state_dict'])
  File "/home/gaokaifeng/anaconda3/envs/torch111/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1497, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for UPT:
        size mismatch for detector.class_embed.weight: copying a param with shape torch.Size([81, 256]) from checkpoint, the shape in current model is torch.Size([92, 256]).
        size mismatch for detector.class_embed.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([92]).

Hi @Dawn-LX,
This seems to be resulted from the same issue in #77. If the classifier weights have 92 classes instead of 81, it suggests you are using the original DETR implementation, not the custom one attached in the submodule.
Simply navigate to the detr directory and checkout all changes until git status shows no more modifications.
Fred.

Hi @Dawn-LX,
This seems to be resulted from the same issue in #77. If the classifier weights have 92 classes instead of 81, it suggests you are using the original DETR implementation, not the custom one attached in the submodule.
Simply navigate to the detr directory and checkout all changes until git status shows no more modifications.
Fred.

Than you for your quick reply! I will further discuss this in issue #77 .


RDS Instance region should be required

What happened?

I tried to create an RDS instance without a region (i.e. without spec.forProvider.region) and got the following error:
  Warning  CannotObserveExternalResource  4s (x2 over 4s)   managed/rdsinstance.database.aws.crossplane.io  cannot describe RDS instance: unknown endpoint, could not resolve endpoint, partition: "aws", service: "rds", region: "", known: [eu-south-1 rds-fips.ca-central-1 rds-fips.us-east-1 af-south-1 ap-east-1 ap-northeast-2 ap-southeast-1 eu-north-1 rds-fips.us-west-2 ap-southeast-2 ca-central-1 eu-west-1 me-south-1 rds-fips.us-east-2 ap-northeast-1 ap-south-1 eu-central-1 eu-west-3 us-west-2 us-west-1 eu-west-2 rds-fips.us-west-1 sa-east-1 us-east-1 us-east-2]

I believe that since we moved region out of the ProviderConfig it must now be specified on the resource.
How can we reproduce it?

Create the following RDS instance:
apiVersion: database.aws.crossplane.io/v1beta1
kind: RDSInstance
metadata:
  name: example-rds
spec:
  forProvider:
    dbInstanceClass: db.t3.medium
    engine: mysql
    allocatedStorage: 20

What environment did it happen in?
Crossplane version: crossplane/provider-aws:v0.16.0

The region field has been added after the resource was v1beta1. We'll make it required when we bump to v1beta2 or v1. See comment here.

@muvaf That makes sense - thanks!
(Funnily enough I realised that this was the case last night as I was falling asleep. I'm a little disturbed that my mind apparently runs through Crossplane bugs when it's shutting down for the night.)


Dress Rehearsal

USAGE OF:
Frontend
Backend
API
Agile
HOOK:
Points: 3.6-4.0
Reason:
KNOWLEDGE:
Points: 3.6-4.0
Reason:
VALUE:
Points: 0.6-1.0
Reason:
WOW FACTOR:
Reason

USAGE OF:

[X] Frontend
[ ]  Backend
[ ]  API
[ ]  Agile

HOOK:
Points: 3.6-4.0
Reason:
Instrument tracker for music.
KNOWLEDGE:
Points: 3.6-4.0
Reason:
VALUE:
Points: 0.6-1.0
Reason:
WOW FACTOR:
Reason:

USAGE OF:

[x]  Frontend
[x] Backend
[x] API
[x] Agile
HOOK:
Points: 3.8
Reason: good presentation, clear

KNOWLEDGE:
Points: 4.0
Reason: able to explain everything
VALUE:
Points: 0.8
Reason: good at tracking music
WOW FACTOR: alright
Reason: could have been more visually appealing

USAGE OF:

[X] Frontend
[X] Backend
[X] API
[X] Agile

HOOK: Keeping track of your practice time
Points: 3.8
Reason: Doesn't pull you like it is supposed to. Good Idea.
KNOWLEDGE:
Points: 3.9
Reason: Demonstrated excellence in knowledge of backend and forntend. Included Parallelx.
VALUE:
Points: 0.95
Reason: Unique Idea helps put everything digital instead on paper
WOW FACTOR:
Points: 0.92
Reason: Not one of a kind. Could have been more visually appealing.

USAGE OF:
Frontend
Backend
API
Agile
HOOK:
Points: 3.6
Reason: There wasn't really much of a hook, and wasn't too engaging.
KNOWLEDGE:
Points: 3.8
Reason:
VALUE:
Points: .9
Reason:
Seems very useful for beginners who are learning how to play and instrument, but I think the more advanced players wouldn't need it.
WOW FACTOR: The graphs
Reason: 1
Was very useful and shows the progress you are making.
9.3/10

8.3/9

Criteria/Key Features:
Frontend - done
Backend 0 - done
API - done
Agile - done
HOOK:
Points: 3.8
Reason: Interesting, definitely a useful design!
KNOWLEDGE:
Points: 4.0
Reason: Able to explain everything as asked, did a great job.
VALUE:
Points: 1.0
Reason: definitely looks like something useful
Overall: 8.8/9

Frontend
Backend
API
Agile
HOOK:
Points: 3.7
Reason: good presentation
KNOWLEDGE:
Points: 3.9
Reason: able to explain everything
VALUE:
Points: 0.7
Reason: good at tracking music
WOW FACTOR: good

Lakshanya S
Avanthika D
Bella M
Eun L
HOOK: 3.9
Unique topic
KNOWLEDGE: 3.9
Explained very well to audience
VALUE: 0.8
Music is interesting to many people so is important for people
WOW FACTOR: 0.7
The graphs/charts
9.3/10

Frontend
Backend
API
HOOK: 3.9
Unique topic
KNOWLEDGE: 3.9
Explained very well to audience
VALUE: 0.8
Music is interesting to many people so is important for people
WOW FACTOR: 0.7
The graphs/charts
9.3/10

Frontend
Backend
API
HOOK: 3.9
Unique topic
KNOWLEDGE: 3.9
The knowledge was very well explained to the users- good job!!
VALUE: 0.8
Music is important to many artists and it changes their everyday lives.
WOW FACTOR: 0.7
The charts and graphs that were included were very cool.
9.3/10


Getting "The location for an app block is no longer supported" error when adding extension in checkout customization

Please list the package(s) involved in the issue, and include the version you are using
@shopify/cli: 3.59.0
@shopify/ui-extensions: 2024.1.1
@shopify/ui-extensions-react: 2024.1.1
Describe the bug
I'm trying to make a super basic extension that just adds an info banner above the shipping options during checkout.  We have Shopify Plus and I've got it working, but when I go to save my customization of the checkout form in Shopify It gives me the following error: "The location for an app block is no longer supported. To save, you need to move the app block to a valid location or remove it".  I'm adding it to the "purchase.checkout.shipping-option-list.render-before" target which looks to be valid based on https://shopify.dev/docs/api/checkout-ui-extensions/unstable/targets/shipping/purchase-checkout-shipping-option-list-render-before.
Steps to reproduce the behavior:

Build basic extension only app based on docs and add a checkout ui extension.
Set target of "Banner" to purchase.checkout.shipping-option-list.render-before.
Deploy to test store, then add the extension in the checkout customization.

Expected behavior
It is showing the info banner correctly in the checkout customizer when I add it, it just doesn't let me save.
Additional context
There may be something obvious I'm missing here, but I can't see anything in the docs that say which app block targets are valid and which are not.

Hey @Brandonperdue , can you share your shopify.extension.toml file for this extension?
What steps did you follow to add the extension to your checkout?


Test optimized style processing

Don't review.
This is experiment with logging of decoding time for #853.
Compare results with #862.

Decoders tests please

Decoders tests please

Decoders tests please

Decoders tests please

Superseded by #878


JavaFX runtime not found

OS : OS X El Capitan
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
Latest version of jrubyfx
I am trying to launch a jrubyfx GUI from a Java application, but I am currently running into the following issue :
"JavaFX runtime not found.  Please install Java 7u6 or newer or set environment variable JFX_DIR to the folder that contains jfxrt.jar"
I have set the environment variable to the correct path of the jfxrt.jar but it is still not working. Any help is greatly appreciated.

Hmm interesting, java 102 must have moved the jars on osx. Could you please find the path that jfxrt.jar is actually at underneath your java home and send it to me?

@byteit101  here is the path to my jar
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/jfxrt.jar
I edited the path and the issue is now resolved. But I am running into an 'open_stream' error when I tried to launch the jar from a Java application. Could you resolve this? or should I create another issue?

Hmm, ok that is odd, you shouldn't need to provide JFX_DIR for that. Is this the released version or from master?

This is the released version, I have tried to run it off master as well. The main issue now is that I keep running into the 'open_stream' error, it cannot find my fxml file when I specify the fxml_root as :
fxml_root File.dirname(__FILE__)
I have tried hard coding the path to the fxml file, I then run into the following issue :
#<NoMethodError: undefined method []' for nil:NilClass> /Applications/MagicDraw/plugins/csrr/csrr_gemjar.jar!/gems/jrubyfx-1.1.1-java/lib/jrubyfx/controller.rb:352:in get_fxml_loader'

JRubyFX 2.0 has been released. Your issue may have been fixed in 2.0. If your issue still applies to JRubyFX 2.0, please reopen this issue.


Validation not working on Safari (desktop and iPhone/iPad)

The validation script is working perfectly in Chrome and Firefox, but doesn't seem to be working in Safari for me. Even with empty fields, the form still submits and (best case) reloads the page and resets all of the forms.
Meanwhile, on Chrome/Firefox, I see proper tooltips and form error indicators. I've tried versions 1.3.6 and down to 1.3.4, and still no luck... However, the script seems to be working fine on the website. Is there a known issue ongoing? Or is this simply a programming error on my part...

This issue can be easily reproduced by opening jqBootstrapValidation's home page in safari, choosing the example for number validator, putting some random letters and clicking 'Test Validation' button. You will still see 'OK' in the pop-up.


npm run build-assets --production is broken under ubuntu 16.04 server

Hi all.
When I try to run npm run build-assets --production in my staging server, the build fails when tries to build materialize-css fonts.
Below the stack:
ERROR in /webapps/ecommerce/saleor/shared/node_modules/materialize-css/dist/fonts/roboto/Roboto-Thin.woff2
    Module parse failed: /webapps/ecommerce/saleor/shared/node_modules/materialize-css/dist/fonts/roboto/Roboto-Thin.woff2 Unexpected character '' (1:4)
    You may need an appropriate loader to handle this file type.
    (Source code omitted for this binary file)
     @ /webapps/ecommerce/saleor/shared/node_modules/css-loader?{"sourceMap":true}!/webapps/ecommerce/saleor/shared/node_modules/postcss-loader/lib?{"sourceMap":true,"plugins":[null]}!/webapps/ecommerce/saleor/shared/node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./saleor/static/dashboard/scss/dashboard.scss 6:62480-62542
cd /webapps/ecommerce/saleor/current && npm run build-assets --production stderrnpm ERR! code ELIFECYCLE

The same stack for all fonts inside materialize-css project.
It seems to try to open the file using sass-loader instead of file-loader.
In my osx development machine all works as expected.
I'm using node 8.9.0 and npm 5.6.0
I'm missing some package?
Thanks for your help.

You tried to reinstall npm?

Yes, I've changed also Nodejs version.

I encountered the same problem but with phantomjs in digital ocean, it looks like the low RAM in my droplet was causing the problem, I didn't upgrade it though. I know maybe the solution is not the best but you can always build your production assets in your development machine and simply replace the files, along with the webpack-bundle.json file(the one that is generated after you run npm run build-assets), in your production server.

I think this is resolved by now.


kubernetes cpu limits are not respected by services using the reva runtime

Running the loadtests I saw this in a group service log:
{"level":"info","service":"groups","time":"2024-02-14T12:51:10Z","line":"github.com/cs3org/reva/v2@v2.18.1-0.20240129131717-cff0a2eeb959/cmd/revad/runtime/runtime.go:178","message":"running on 8 cpus"}

But the pod is configured to use
     Requests:
       cpu:     15m
       memory:  50Mi

ocis is not changing the GOMAXPROCS but reva does:
// adjustCPU parses string cpu and sets GOMAXPROCS
// according to its value. It accepts either
// a number (e.g. 3) or a percent (e.g. 50%).
// Default is to use all available cores.
func adjustCPU(cpu string) (int, error) {
	var numCPU int

	availCPU := runtime.NumCPU()

	if cpu != "" {
		if strings.HasSuffix(cpu, "%") {
			// Percent
			var percent float32
			pctStr := cpu[:len(cpu)-1]
			pctInt, err := strconv.Atoi(pctStr)
			if err != nil || pctInt < 1 || pctInt > 100 {
				return 0, fmt.Errorf("invalid CPU value: percentage must be between 1-100")
			}
			percent = float32(pctInt) / 100
			numCPU = int(float32(availCPU) * percent)
		} else {
			// Number
			num, err := strconv.Atoi(cpu)
			if err != nil || num < 1 {
				return 0, fmt.Errorf("invalid CPU value: provide a number or percent greater than 0")
			}
			numCPU = num
		}
	} else {
		numCPU = availCPU
	}

	if numCPU > availCPU || numCPU == 0 {
		numCPU = availCPU
	}

	runtime.GOMAXPROCS(numCPU)
	return numCPU, nil
}

I don't know how much of a prolem this is. Needs investigation. Maybe switch to https://github.com/uber-go/automaxprocs to correct the calculation of available CPUs. See https://nemre.medium.com/is-your-go-application-really-using-the-correct-number-of-cpu-cores-20915d2b6ccb
Further reading: https://engineering.grab.com/performance-bottlenecks-go-apps

cc @wkloucek


Single Responsibility: Table class

Allow for simple indexing, die size member, and possible table link in table outcome.

Make hashable for table linking.