Is training small model possible for metric depth?

I checked the training procedure for metric depth on NYUv2 Dataset but it seems like it only provides the "large" model.

Of course. This will not be very sophisticated. There are only a few lines that need to be modified.

change
https://github.com/LiheYoung/Depth-Anything/blob/d1ad9cdf699a7adb78a23989107ac104a9fb2687/metric_depth/zoedepth/models/base_models/depth_anything.py#L339-L341 to:

# using Depth-Anything-ViT-S
depth_anything = DPT_DINOv2(features=64, out_channels=[48, 96, 192, 384], use_clstoken=False)
state_dict = torch.load('./checkpoints/depth_anything_vits14.pth', map_location='cpu')

# using Depth-Anything-ViT-B
# depth_anything = DPT_DINOv2(features=128, out_channels=[96, 192, 384, 768], use_clstoken=False)
# state_dict = torch.load('./checkpoints/depth_anything_vitb14.pth', map_location='cpu')

Please remember to download the Depth-Anything-ViT-S and Depth-Anything-ViT-B checkpoints.

change
https://github.com/LiheYoung/Depth-Anything/blob/d1ad9cdf699a7adb78a23989107ac104a9fb2687/metric_depth/zoedepth/models/base_models/depth_anything.py#L331 to:

# using Depth-Anything-ViT-S
self.output_channels = [64, 64, 64, 64, 64]
# using Depth-Anything-ViT-B
# self.output_channels = [128, 128, 128, 128, 128]

Thank you very much! I have made the training work.

Thank you very much! I have made the training work.

@Zhefan-Xu would it be possible to share the pre-trained model, or perhaps add it to the repository? Thank you

Of course. This will not be very sophisticated. There are only a few lines that need to be modified.

change
https://github.com/LiheYoung/Depth-Anything/blob/d1ad9cdf699a7adb78a23989107ac104a9fb2687/metric_depth/zoedepth/models/base_models/depth_anything.py#L339-L341
to:

# using Depth-Anything-ViT-S
depth_anything = DPT_DINOv2(encoder='vits', features=64, out_channels=[48, 96, 192, 384], use_clstoken=False)
state_dict = torch.load('./checkpoints/depth_anything_vits14.pth', map_location='cpu')

# using Depth-Anything-ViT-B
# depth_anything = DPT_DINOv2(encoder='vitb', features=128, out_channels=[96, 192, 384, 768], use_clstoken=False)
# state_dict = torch.load('./checkpoints/depth_anything_vitb14.pth', map_location='cpu')

Please remember to download the Depth-Anything-ViT-S and Depth-Anything-ViT-B checkpoints.

change
https://github.com/LiheYoung/Depth-Anything/blob/d1ad9cdf699a7adb78a23989107ac104a9fb2687/metric_depth/zoedepth/models/base_models/depth_anything.py#L331
to:

# using Depth-Anything-ViT-S
self.output_channels = [64, 64, 64, 64, 64]
# using Depth-Anything-ViT-B
# self.output_channels = [128, 128, 128, 128, 128]

not solved when evaluation
{'attractor_alpha': 1000,
 'attractor_gamma': 2,
 'attractor_kind': 'mean',
 'attractor_type': 'inv',
 'aug': True,
 'avoid_boundary': False,
 'bin_centers_type': 'softplus',
 'bin_embedding_dim': 128,
 'clip_grad': 0.1,
 'data_path': '/mnt/localssd/depth-datasets/nyuv2/NYU_Depth_V2/official_splits/train/',
 'data_path_eval': '/mnt/localssd/depth-datasets/nyuv2/NYU_Depth_V2/official_splits/test/',
 'dataset': 'nyu',
 'degree': 1.0,
 'distributed': True,
 'do_kb_crop': False,
 'do_random_rotate': True,
 'eigen_crop': True,
 'filenames_file': './train_test_inputs/nyudepthv2_train_files_with_gt.txt',
 'filenames_file_eval': './train_test_inputs/nyudepthv2_test_files_with_gt.txt',
 'garg_crop': False,
 'gpu': None,
 'gt_path': '/mnt/localssd/depth-datasets/nyuv2/NYU_Depth_V2/official_splits/train/',
 'gt_path_eval': '/mnt/localssd/depth-datasets/nyuv2/NYU_Depth_V2/official_splits/test/',
 'img_size': [392, 518],
 'input_height': 480,
 'input_width': 640,
 'inverse_midas': False,
 'log_images_every': 0.1,
 'max_depth': 10,
 'max_depth_diff': 10,
 'max_depth_eval': 10,
 'max_temp': 50.0,
 'max_translation': 100,
 'memory_efficient': True,
 'midas_model_type': 'DPT_BEiT_L_384',
 'min_depth': 0.001,
 'min_depth_diff': -10,
 'min_depth_eval': 0.001,
 'min_temp': 0.0212,
 'model': 'zoedepth',
 'n_attractors': [16, 8, 4, 1],
 'n_bins': 64,
 'name': 'ZoeDepth',
 'notes': '',
 'output_distribution': 'logbinomial',
 'prefetch': False,
 'pretrained_resource': 'local::./checkpoints/depth_anything_metric_depth_indoor.pt',
 'print_losses': False,
 'project': 'ZoeDepth',
 'random_crop': False,
 'random_translate': False,
 'root': '.',
 'save_dir': './depth_anything_finetune',
 'shared_dict': None,
 'tags': '',
 'train_midas': False,
 'translate_prob': 0.2,
 'uid': None,
 'use_amp': False,
 'use_pretrained_midas': False,
 'use_shared_dict': False,
 'validate_every': 0.25,
 'version_name': 'v1',
 'workers': 16}
Evaluating zoedepth on nyu...
xFormers not available
xFormers not available
/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/base_models/depth_anything.py:352: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  state_dict = torch.load('./checkpoints/depth_anything_vits14.pth', map_location='cpu')
Params passed to Resize transform:
        width:  518
        height:  392
        resize_target:  True
        keep_aspect_ratio:  False
        ensure_multiple_of:  14
        resize_method:  minimal
Using pretrained resource local::./checkpoints/depth_anything_metric_depth_indoor.pt
/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/model_io.py:55: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  ckpt = torch.load(checkpoint_path, map_location='cpu')
Traceback (most recent call last):
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/evaluate.py", line 160, in <module>
    eval_model(args.model, pretrained_resource=args.pretrained_resource,
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/evaluate.py", line 132, in eval_model
    metrics = main(config)
              ^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/evaluate.py", line 112, in main
    model = build_model(config)
            ^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/builder.py", line 51, in build_model
    return get_version(config.version_name).build_from_config(config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/zoedepth/zoedepth_v1.py", line 264, in build_from_config
    return ZoeDepth.build(**config)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/zoedepth/zoedepth_v1.py", line 259, in build
    model = load_state_from_resource(model, pretrained_resource)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/model_io.py", line 88, in load_state_from_resource
    return load_wts(model, path)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/model_io.py", line 56, in load_wts
    return load_state_dict(model, ckpt)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sensei-fs/users/xuans/code/try-something/depth-anything/Depth-Anything/metric_depth/zoedepth/models/model_io.py", line 49, in load_state_dict
    model.load_state_dict(state)
  File "/opt/conda/envs/depth/lib/python3.11/site-packages/torch/nn/modules/module.py", line 2215, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for ZoeDepth:
        Unexpected key(s) in state_dict: "core.core.pretrained.blocks.12.norm1.weight", "core.core.pretrained.blocks.12.norm1.bias", "core.core.pretrained.blocks.12.attn.qkv.weight", "core.core.pretrained.blocks.12.attn.qkv.bias", "core.core.pretrained.blocks.12.attn.proj.weight", "core.core.pretrained.blocks.12.attn.proj.bias", "core.core.pretrained.blocks.12.ls1.gamma", "core.core.pretrained.blocks.12.norm2.weight", "core.core.pretrained.blocks.12.norm2.bias", "core.core.pretrained.blocks.12.mlp.fc1.weight", "core.core.pretrained.blocks.12.mlp.fc1.bias", "core.core.pretrained.blocks.12.mlp.fc2.weight", "core.core.pretrained.blocks.12.mlp.fc2.bias", "core.core.pretrained.blocks.12.ls2.gamma", "core.core.pretrained.blocks.13.norm1.weight", "core.core.pretrained.blocks.13.norm1.bias", "core.core.pretrained.blocks.13.attn.qkv.weight", "core.core.pretrained.blocks.13.attn.qkv.bias", "core.core.pretrained.blocks.13.attn.proj.weight", "core.core.pretrained.blocks.13.attn.proj.bias", "core.core.pretrained.blocks.13.ls1.gamma", "core.core.pretrained.blocks.13.norm2.weight", "core.core.pretrained.blocks.13.norm2.bias", "core.core.pretrained.blocks.13.mlp.fc1.weight", "core.core.pretrained.blocks.13.mlp.fc1.bias", "core.core.pretrained.blocks.13.mlp.fc2.weight", "core.core.pretrained.blocks.13.mlp.fc2.bias", "core.core.pretrained.blocks.13.ls2.gamma", "core.core.pretrained.blocks.14.norm1.weight", "core.core.pretrained.blocks.14.norm1.bias", "core.core.pretrained.blocks.14.attn.qkv.weight", "core.core.pretrained.blocks.14.attn.qkv.bias", "core.core.pretrained.blocks.14.attn.proj.weight", "core.core.pretrained.blocks.14.attn.proj.bias", "core.core.pretrained.blocks.14.ls1.gamma", "core.core.pretrained.blocks.14.norm2.weight", "core.core.pretrained.blocks.14.norm2.bias", "core.core.pretrained.blocks.14.mlp.fc1.weight", "core.core.pretrained.blocks.14.mlp.fc1.bias", "core.core.pretrained.blocks.14.mlp.fc2.weight", "core.core.pretrained.blocks.14.mlp.fc2.bias", "core.core.pretrained.blocks.14.ls2.gamma", "core.core.pretrained.blocks.15.norm1.weight", "core.core.pretrained.blocks.15.norm1.bias", "core.core.pretrained.blocks.15.attn.qkv.weight", "core.core.pretrained.blocks.15.attn.qkv.bias", "core.core.pretrained.blocks.15.attn.proj.weight", "core.core.pretrained.blocks.15.attn.proj.bias", "core.core.pretrained.blocks.15.ls1.gamma", "core.core.pretrained.blocks.15.norm2.weight", "core.core.pretrained.blocks.15.norm2.bias", "core.core.pretrained.blocks.15.mlp.fc1.weight", "core.core.pretrained.blocks.15.mlp.fc1.bias", "core.core.pretrained.blocks.15.mlp.fc2.weight", "core.core.pretrained.blocks.15.mlp.fc2.bias", "core.core.pretrained.blocks.15.ls2.gamma", "core.core.pretrained.blocks.16.norm1.weight", "core.core.pretrained.blocks.16.norm1.bias", "core.core.pretrained.blocks.16.attn.qkv.weight", "core.core.pretrained.blocks.16.attn.qkv.bias", "core.core.pretrained.blocks.16.attn.proj.weight", "core.core.pretrained.blocks.16.attn.proj.bias", "core.core.pretrained.blocks.16.ls1.gamma", "core.core.pretrained.blocks.16.norm2.weight", "core.core.pretrained.blocks.16.norm2.bias", "core.core.pretrained.blocks.16.mlp.fc1.weight", "core.core.pretrained.blocks.16.mlp.fc1.bias", "core.core.pretrained.blocks.16.mlp.fc2.weight", "core.core.pretrained.blocks.16.mlp.fc2.bias", "core.core.pretrained.blocks.16.ls2.gamma", "core.core.pretrained.blocks.17.norm1.weight", "core.core.pretrained.blocks.17.norm1.bias", "core.core.pretrained.blocks.17.attn.qkv.weight", "core.core.pretrained.blocks.17.attn.qkv.bias", "core.core.pretrained.blocks.17.attn.proj.weight", "core.core.pretrained.blocks.17.attn.proj.bias", "core.core.pretrained.blocks.17.ls1.gamma", "core.core.pretrained.blocks.17.norm2.weight", "core.core.pretrained.blocks.17.norm2.bias", "core.core.pretrained.blocks.17.mlp.fc1.weight", "core.core.pretrained.blocks.17.mlp.fc1.bias", "core.core.pretrained.blocks.17.mlp.fc2.weight", "core.core.pretrained.blocks.17.mlp.fc2.bias", "core.core.pretrained.blocks.17.ls2.gamma", "core.core.pretrained.blocks.18.norm1.weight", "core.core.pretrained.blocks.18.norm1.bias", "core.core.pretrained.blocks.18.attn.qkv.weight", "core.core.pretrained.blocks.18.attn.qkv.bias", "core.core.pretrained.blocks.18.attn.proj.weight", "core.core.pretrained.blocks.18.attn.proj.bias", "core.core.pretrained.blocks.18.ls1.gamma", "core.core.pretrained.blocks.18.norm2.weight", "core.core.pretrained.blocks.18.norm2.bias", "core.core.pretrained.blocks.18.mlp.fc1.weight", "core.core.pretrained.blocks.18.mlp.fc1.bias", "core.core.pretrained.blocks.18.mlp.fc2.weight", "core.core.pretrained.blocks.18.mlp.fc2.bias", "core.core.pretrained.blocks.18.ls2.gamma", "core.core.pretrained.blocks.19.norm1.weight", "core.core.pretrained.blocks.19.norm1.bias", "core.core.pretrained.blocks.19.attn.qkv.weight", "core.core.pretrained.blocks.19.attn.qkv.bias", "core.core.pretrained.blocks.19.attn.proj.weight", "core.core.pretrained.blocks.19.attn.proj.bias", "core.core.pretrained.blocks.19.ls1.gamma", "core.core.pretrained.blocks.19.norm2.weight", "core.core.pretrained.blocks.19.norm2.bias", "core.core.pretrained.blocks.19.mlp.fc1.weight", "core.core.pretrained.blocks.19.mlp.fc1.bias", "core.core.pretrained.blocks.19.mlp.fc2.weight", "core.core.pretrained.blocks.19.mlp.fc2.bias", "core.core.pretrained.blocks.19.ls2.gamma", "core.core.pretrained.blocks.20.norm1.weight", "core.core.pretrained.blocks.20.norm1.bias", "core.core.pretrained.blocks.20.attn.qkv.weight", "core.core.pretrained.blocks.20.attn.qkv.bias", "core.core.pretrained.blocks.20.attn.proj.weight", "core.core.pretrained.blocks.20.attn.proj.bias", "core.core.pretrained.blocks.20.ls1.gamma", "core.core.pretrained.blocks.20.norm2.weight", "core.core.pretrained.blocks.20.norm2.bias", "core.core.pretrained.blocks.20.mlp.fc1.weight", "core.core.pretrained.blocks.20.mlp.fc1.bias", "core.core.pretrained.blocks.20.mlp.fc2.weight", "core.core.pretrained.blocks.20.mlp.fc2.bias", "core.core.pretrained.blocks.20.ls2.gamma", "core.core.pretrained.blocks.21.norm1.weight", "core.core.pretrained.blocks.21.norm1.bias", "core.core.pretrained.blocks.21.attn.qkv.weight", "core.core.pretrained.blocks.21.attn.qkv.bias", "core.core.pretrained.blocks.21.attn.proj.weight", "core.core.pretrained.blocks.21.attn.proj.bias", "core.core.pretrained.blocks.21.ls1.gamma", "core.core.pretrained.blocks.21.norm2.weight", "core.core.pretrained.blocks.21.norm2.bias", "core.core.pretrained.blocks.21.mlp.fc1.weight", "core.core.pretrained.blocks.21.mlp.fc1.bias", "core.core.pretrained.blocks.21.mlp.fc2.weight", "core.core.pretrained.blocks.21.mlp.fc2.bias", "core.core.pretrained.blocks.21.ls2.gamma", "core.core.pretrained.blocks.22.norm1.weight", "core.core.pretrained.blocks.22.norm1.bias", "core.core.pretrained.blocks.22.attn.qkv.weight", "core.core.pretrained.blocks.22.attn.qkv.bias", "core.core.pretrained.blocks.22.attn.proj.weight", "core.core.pretrained.blocks.22.attn.proj.bias", "core.core.pretrained.blocks.22.ls1.gamma", "core.core.pretrained.blocks.22.norm2.weight", "core.core.pretrained.blocks.22.norm2.bias", "core.core.pretrained.blocks.22.mlp.fc1.weight", "core.core.pretrained.blocks.22.mlp.fc1.bias", "core.core.pretrained.blocks.22.mlp.fc2.weight", "core.core.pretrained.blocks.22.mlp.fc2.bias", "core.core.pretrained.blocks.22.ls2.gamma", "core.core.pretrained.blocks.23.norm1.weight", "core.core.pretrained.blocks.23.norm1.bias", "core.core.pretrained.blocks.23.attn.qkv.weight", "core.core.pretrained.blocks.23.attn.qkv.bias", "core.core.pretrained.blocks.23.attn.proj.weight", "core.core.pretrained.blocks.23.attn.proj.bias", "core.core.pretrained.blocks.23.ls1.gamma", "core.core.pretrained.blocks.23.norm2.weight", "core.core.pretrained.blocks.23.norm2.bias", "core.core.pretrained.blocks.23.mlp.fc1.weight", "core.core.pretrained.blocks.23.mlp.fc1.bias", "core.core.pretrained.blocks.23.mlp.fc2.weight", "core.core.pretrained.blocks.23.mlp.fc2.bias", "core.core.pretrained.blocks.23.ls2.gamma".
        size mismatch for core.core.pretrained.cls_token: copying a param with shape torch.Size([1, 1, 1024]) from checkpoint, the shape in current model is torch.Size([1, 1, 384]).
        size mismatch for core.core.pretrained.pos_embed: copying a param with shape torch.Size([1, 1370, 1024]) from checkpoint, the shape in current model is torch.Size([1, 1370, 384]).
        size mismatch for core.core.pretrained.mask_token: copying a param with shape torch.Size([1, 1024]) from checkpoint, the shape in current model is torch.Size([1, 384]).
        size mismatch for core.core.pretrained.patch_embed.proj.weight: copying a param with shape torch.Size([1024, 3, 14, 14]) from checkpoint, the shape in current model is torch.Size([384, 3, 14, 14]).
        size mismatch for core.core.pretrained.patch_embed.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.0.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.0.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.0.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.0.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.0.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.0.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.0.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.1.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.1.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.1.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.1.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.1.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.1.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.1.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.2.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.2.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.2.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.2.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.2.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.2.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.2.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.3.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.3.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.3.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.3.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.3.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.3.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.3.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.4.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.4.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.4.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.4.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.4.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.4.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.4.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.5.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.5.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.5.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.5.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.5.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.5.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.5.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.6.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.6.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.6.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.6.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.6.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.6.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.6.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.7.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.7.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.7.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.7.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.7.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.7.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.7.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.8.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.8.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.8.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.8.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.8.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.8.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.8.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.9.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.9.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.9.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.9.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.9.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.9.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.9.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.10.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.10.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.10.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.10.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.10.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.10.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.10.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.norm1.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.norm1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.attn.qkv.weight: copying a param with shape torch.Size([3072, 1024]) from checkpoint, the shape in current model is torch.Size([1152, 384]).
        size mismatch for core.core.pretrained.blocks.11.attn.qkv.bias: copying a param with shape torch.Size([3072]) from checkpoint, the shape in current model is torch.Size([1152]).
        size mismatch for core.core.pretrained.blocks.11.attn.proj.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([384, 384]).
        size mismatch for core.core.pretrained.blocks.11.attn.proj.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.ls1.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.norm2.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.norm2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.mlp.fc1.weight: copying a param with shape torch.Size([4096, 1024]) from checkpoint, the shape in current model is torch.Size([1536, 384]).
        size mismatch for core.core.pretrained.blocks.11.mlp.fc1.bias: copying a param with shape torch.Size([4096]) from checkpoint, the shape in current model is torch.Size([1536]).
        size mismatch for core.core.pretrained.blocks.11.mlp.fc2.weight: copying a param with shape torch.Size([1024, 4096]) from checkpoint, the shape in current model is torch.Size([384, 1536]).
        size mismatch for core.core.pretrained.blocks.11.mlp.fc2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.blocks.11.ls2.gamma: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.norm.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.pretrained.norm.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.depth_head.projects.0.weight: copying a param with shape torch.Size([256, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([48, 384, 1, 1]).
        size mismatch for core.core.depth_head.projects.0.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([48]).
        size mismatch for core.core.depth_head.projects.1.weight: copying a param with shape torch.Size([512, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([96, 384, 1, 1]).
        size mismatch for core.core.depth_head.projects.1.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([96]).
        size mismatch for core.core.depth_head.projects.2.weight: copying a param with shape torch.Size([1024, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([192, 384, 1, 1]).
        size mismatch for core.core.depth_head.projects.2.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([192]).
        size mismatch for core.core.depth_head.projects.3.weight: copying a param with shape torch.Size([1024, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([384, 384, 1, 1]).
        size mismatch for core.core.depth_head.projects.3.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.depth_head.resize_layers.0.weight: copying a param with shape torch.Size([256, 256, 4, 4]) from checkpoint, the shape in current model is torch.Size([48, 48, 4, 4]).
        size mismatch for core.core.depth_head.resize_layers.0.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([48]).
        size mismatch for core.core.depth_head.resize_layers.1.weight: copying a param with shape torch.Size([512, 512, 2, 2]) from checkpoint, the shape in current model is torch.Size([96, 96, 2, 2]).
        size mismatch for core.core.depth_head.resize_layers.1.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([96]).
        size mismatch for core.core.depth_head.resize_layers.3.weight: copying a param with shape torch.Size([1024, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([384, 384, 3, 3]).
        size mismatch for core.core.depth_head.resize_layers.3.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([384]).
        size mismatch for core.core.depth_head.scratch.layer1_rn.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 48, 3, 3]).
        size mismatch for core.core.depth_head.scratch.layer2_rn.weight: copying a param with shape torch.Size([256, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 96, 3, 3]).
        size mismatch for core.core.depth_head.scratch.layer3_rn.weight: copying a param with shape torch.Size([256, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 192, 3, 3]).
        size mismatch for core.core.depth_head.scratch.layer4_rn.weight: copying a param with shape torch.Size([256, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 384, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet1.out_conv.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]).
        size mismatch for core.core.depth_head.scratch.refinenet1.out_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit1.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit1.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit1.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit1.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit2.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit2.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit2.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet1.resConfUnit2.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet2.out_conv.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]).
        size mismatch for core.core.depth_head.scratch.refinenet2.out_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit1.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit1.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit1.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit1.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit2.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit2.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit2.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet2.resConfUnit2.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet3.out_conv.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]).
        size mismatch for core.core.depth_head.scratch.refinenet3.out_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit1.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit1.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit1.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit1.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit2.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit2.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit2.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet3.resConfUnit2.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet4.out_conv.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]).
        size mismatch for core.core.depth_head.scratch.refinenet4.out_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit1.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit1.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit1.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit1.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit2.conv1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit2.conv1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit2.conv2.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.refinenet4.resConfUnit2.conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for core.core.depth_head.scratch.output_conv1.weight: copying a param with shape torch.Size([128, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 64, 3, 3]).
        size mismatch for core.core.depth_head.scratch.output_conv1.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([32]).
        size mismatch for core.core.depth_head.scratch.output_conv2.0.weight: copying a param with shape torch.Size([32, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 32, 3, 3]).
        size mismatch for conv2.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 64, 1, 1]).
        size mismatch for conv2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([64]).
        size mismatch for seed_bin_regressor._net.0.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 64, 1, 1]).
        size mismatch for seed_projector._net.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 64, 1, 1]).
        size mismatch for projectors.0._net.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 64, 1, 1]).
        size mismatch for projectors.1._net.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 64, 1, 1]).
        size mismatch for projectors.2._net.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 64, 1, 1]).
        size mismatch for projectors.3._net.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 64, 1, 1]).


Add skip attribute to input objects

What do you think about adding a #[graphql(skip)] attribute for deriving GraphQLInputObject like GraphQLObject?
I often find myself wanting to skip fields for input objects (e.g. a database id that should be auto generated and not set by users).
Describe the solution you'd like
It would be awesome to be able to do something like:
#[derive(juniper::GraphQLScalarValue)]
struct Id(String); // or `uuid::Uuid` etc.

impl Default for Id {
    fn default() -> Self {
        Id::generate()
    }
}

#[derive(serde::Serialize, juniper::GraphQLInputObject)]
struct UserInput {
    #[graphql(skip)]
    #[serde(default)]
    id: Id,

    name: String,
}

Describe alternatives you've considered

Creating a separate struct with the same fields + the additional skipped fields and using that for the db. This is what I am currently doing and it is rather cumbersome and brittle. I would prefer to not have to use proc-macros to keep the fields of the two in sync (and to auto-generate From impls because that seems overkill and my project already takes way too long to compile on very fast hardware.
Preprocessing the documents in the database to auto generate ids and set the id field. I would love to do this but Elasticsearch doesn't support this (see [this] issue (https://github.com/elastic/elasticsearch/issues/41163) and this issue).

Additional context
In reality I would use it more like this with the elastic crate:
#[derive(serde::Serialize, juniper::GraphQLInputObject, elastic_derive::ElasticType)]
struct UserInput {
    #[graphql(skip)]
    #[elastic(id)]
    #[serde(default)]
    id: Id,

    name: String,
}

#[derive(serde::Deserialize, juniper::GraphQLObject, elastic_derive::ElasticType)]
struct User {
    // GraphQL API consumers should be able to *view* but not set the id field.
    #[elastic(id)]
    id: Id,

    name: String,
}

This would tell elastic to use the id field as the document ID and would create a document that looks like:
{
  "_index": "users",
  "_type": "_doc",
  "_id": "31cfad4a-814d-4e0b-bea9-52ceaefa8f96",
  "_source": {
    "id": "31cfad4a-814d-4e0b-bea9-52ceaefa8f96",
    "name": "Bob"
  }
}

Sure, this seems like something we should do for consistency.

Ok. I’ll see if I can open a PR for it.

Sounds good! You should probably hold off until we merge the async branch onto master (extremely soon)

I am looking for add #[graphql(skip)] on GraphQLInputObject too.
Have you news about this possible feature ?

@tyranron should we add this feature as a part of #[derive(GraphQLInputObject)] or push users to create another struct with From impl? I'm in favour of this, mainly because we already allow skip on #[derive(GraphQLObject)], so Rust structs are already may not be describing pure GraphQL schema. Also approach with From impl isn't very refactoring friendly, as adding a field to a input object wouldn't raise error for missing field on From target.

@ilslv I don't really like the idea of pushing users to something. We have already possibility to provide From for another struct. Having  #[graphql(ignore)] in addition to that will be quite handy (imagine PhantomData or PhantomPinned field for whatever purpose).
Of course, we should require the Default impl for the skipped fields.


Store BTC value history

Before every jump
After every jump
Once per day at least

Done once  https://github.com/erwanlbp/trading-bot/pull/36 is merge


New App Submission

App Logo (Required)

App Details (Required)
Type: Wallet
Name: f(x)Wallet
Homepage Url: https://download.functionx.io/
Chains supported: Bitcoin, Ethereum, Function X and more in future
App Url (Required - at least one)
Browser Url:
iOS Url: https://apps.apple.com/us/app/f-x-wallet-by-pundi-x-labs/id1504798360
Android Url: https://play.google.com/store/apps/details?id=com.pundix.functionx
Mac Url:
Windows Url:
Linux Url:
Mobile Linking (Optional)
Deep Link:
Universal Link:
Desktop Linking (Optional)
Deep Link:
Universal Link:
Metadata (Optional)
Short Name:
Primary Color:
Secondary Color:

Added on commit 105557a3d982aa622b638965798dd6c1acf41fdb


Remove non-existent file from coveralls configuration

We noticed in a private project that this file isn’t present in the codebase. Therefore, there is no need to skip it when running coveralls.

🦀 Requesting reviewers for this pull request:

@remiprev (contributor with 45 commits in the last 90 days and 82 commits overall)


Extending z with custom types

I'm using Day.js extensively in my application. The way to check for dayjs type is to check instanceof dayjs (the function):
import dayjs from "dayjs";
const date = dayjs();
console.log(date instanceof dayjs) // true

The param type of z.instanceof only accepts classes with constructors, but it works in runtime for checking instanceof dayjs. This means that I have to typecast dayjs as any every time I need it in instanceof:
const dateType = z.instanceof(dayjs as any);

Is there an option to extend z so that I can do something like z.dayjs()?

So dayjs actually provides a class for me to use: z.instanceof(dayjs.Dayjs). However, I would still like to know if it's possible to extend z with custom types.

I'm using dayjs, too. It will be nice if we can extend z with dayjs, moment or other custom types

#metoo.
I am using it inside z.preprocess(v => typeof v === 'string' && v.length && dayjs(v), z.instanceof(dayjs.Dayjs)).
z.instanceof(dayjs.Dayjs) is not working. it throws "TypeError: Cannot read properties of undefined (reading 'name') at Object.instanceOfType [as instanceof]"
z.instanceof(dayjs as any) is not working. It turns the type to "any".

Hi guys,
I am still wondering how to add dayjs type with zod. Any update to deal with this use case ?
Thanks

I ended up using:
{
  myDayjsProp: z
    .string()
    .transform(v => (v.length && dayjs(v)) || undefined)
    .optional()
}

I ended up using:
{
  myDayjsProp: z
    .string()
    .transform(v => (v.length && dayjs(v)) || undefined)
    .optional()
}

Thanks for the workaround !

It will be nice to extend with custom types like moment or dayjs "natively".
Something like this: z.daysjs()


SD cards (not external storage) not accessible

/storage/emulated/0 is the base directory used, but external SD cards such as those at

/storage/extSdCard
will be inaccessible.

reference: 1, 2

Find more information. According to reference 1:

The WRITE_EXTERNAL_STORAGE permission must only grant write access to the primary external storage on a device. Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories as allowed by synthesized permissions. Restricting writes in this way ensures the system can clean up files when applications are uninstalled.


Home filtering and ordering options

CPod version: v1.27.0
Description:
(1) For most podcasts I would like to start listening from the first episode ever released. This implies sorting the Home list from old to new (the inverse of the current). Could ordering options be added?
(2) Additionally, I was able to find the full list of episodes hiding behind the 'Details' button of every subscription. Any chance this could be made more visible and easily accessible? For instance by having a drop down filter in Home that filters the large list to only show episodes from a single subscription.
(3) Finally, if the above are not easily achieved, given the number of entries in Home seems to be hardcoded to a maximum of around 500, regardless of the number of subscriptions. Could an setting to increase this number be added?
Some podcasts have way over 500 episodes and currently adding one of those pushes all old episodes out of the Home list.

@z-------------  Mind if I take a stab at this? I'd love to contribute to this app

How do you order the podcasts by date? I don't see it anywhere.


completed medium hack

docker built and ran; airdefense generated; vi…sulizer played https://medium.com/@meirgotroot/chatdev-review-the-good-the-bad-and-the-ugly-469b5cb691d4

Sorry it's my mistake to submit a learning branch to the original repo. Please ignore.


Small bits of Python 3.8 → 3.10 modernization

Bumping target-version = "py38" to "py310" in pyproject.yaml will cause Ruff to enable new rules, fixes, and formatting. This is a subset that doesn’t include mass changes. Since we have not yet bumped target-version, they’re not yet lint-enforced.

Merged, thanks @andersk!


docs: minor changes

Description
This PR contains minor changes in documentation.
Checklist

[ ] README.md has been updated or is not required
[ ] push trigger tests
[ ] manual release test
[ ] automated releaes test
[ ] pull request trigger tests
[ ] schedule trigger tests
[ ] workflow errors/warnings reviewed and addressed

Testing done
(for each selected checkbox, the corresponding test results link should be listed here)

:tada: This PR is included in version 4.18.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Can not block new line in textInput (Android)

Hi, guys.
After I added this package, I can not block new line in Android. (not sure in iOS)
When I click return Key on keyboard,
Actual Result: It adds a new line in textInput.
Expected Result : It gets out of textInput.
RN: 0.62
The help would be very appriciated.

Use multiline={false}


Clarify when to use @DefaultCoder

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @pabloem

LGTM.
I wonder if it's good to also mention why Serializable is not a good idea?

I wonder if it's good to also mention why Serializable is not a good idea?

Do you have an explanation? I'm not very familiar with Java coders.

the only reasons I can think of are:

Much larger data sizes when using SerializableCoder
Non-deterministing encoding when using SerializableCoder

I think it's a good addition. I wanted to say "as much as Nx" instead of "much larger", but I don't know how much larger. 2x, 10x, 100x?

Here's one example:

https://blog.softwaremill.com/the-best-serialization-strategy-for-event-sourcing-9321c299632b

In this example, it seems ~10x, and also worse in performance.
In this blog post: https://devopedia.org/data-serialization they mention Oracle saying Java SErialization was a 'horrible mistake', and compare other serialization methods.

WDYT?

WDYT?

Sorry I've been busy. I'll take a look soon

PTAL, I expanded the text a bit.

Ping, thanks

awesome. LGTM! Please feel free to merge as you see fit : )


docs: add example json files

Consider to add exmaple JSON files to give user insigth of possible appliaction.
Or link to examples in https://github.com/ieeh-tu-dresden/powerfactory-tools

@sasanjac do you have a recommendation?


FileTarget - ConcurrentWrites=false by default for better compatibility

See also #2742 and #2824 and #2925 and #3059 (Xamarin mobile platforms also don't like global mutex) and #3893

This change is

prefer testing the global mutex, before disabling it

I prefer not throwing exceptions as part of normal operation. The ConcurrentWrites is useful with IIS with multiple AppDomains. But on NetCore then there is no longer multiple AppDomains, so there will only be a single NLog instance.
Also the ConcurrentWrites introduces an overhead and complexity, that most NetCore-application do not need. Because WindowsMultiProcessFileAppender is not available on NetCore.

I prefer not throwing exceptions as part of normal operation.

Me neither, but there isn't a property to check. So I this case I think it's a better option than changing the default for all.
Also note that frameworks like MVC also throw exceptions under the hood in normal operation. Last but not least, we are preventing a exception in this case (the mutex not available exception)

I think it's a better option than changing the default for all.

Well I think it is a better default to have ConcurrentWrites = false for all NetCore-platforms. Mostly because the time of the IIS and multiple AppDomains is over.

And having NetCore-platforms without support mutex, makes a good excuse to disable it by default (along with avoiding the extra complexity and overhead).

We could detect that (try-catch) and that isn't difficult? I don't like to move to default false, if there isn't another option.
IMO smart defaults (detect it) are much better defaults than a black-white choice.

The default is KeepFileOpen = false. No need to have ConcurrentWrites = true also.
Sent from my Sony Xperia
---- Julian Verdurmen wrote ----
And having NetCore-platforms without support mutex, makes a good excuse to disable it by default (along with avoiding the extra complexity and overhead).
We could detect that (try-catch) and that isn't difficult? I don't like to move to default false, if there isn't another option.
IMO smart defaults (detect it) are much better defaults than a black-white choice.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/pull/3048#issuecomment-450531202, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnEjMoJzsDerD1J1AAgmmFN2Y7z5Zks5u-AvsgaJpZM4Zc4Yp.

@304NotModified prefer testing the global mutex, before disabling it

Well if you look at #2742 then the attempt of using the mutex takes down the application (UWP NetNative)
Still think that NetCore should have ConcurrentWrites=false by default, as #3079 will only help on certain NetCore platforms.
It will give the highest compatibility and the best performance on the NetCore-platform. IIS-users will not be affected as they will be using Net45.

IIS-users will not be affected as they will be using legacy Net45.

I'm not sure if that's true

@304NotModified I'm not sure if that's true

Please explain how changing the default for NetCore will affect legacy Net45 applications?

I mean, IIS users aren't limited to non core .NET (I think)

@304NotModified I mean, IIS users aren't limited to non core .NET (I think)

You mean the new In-process hosting model ?
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2
Looks like one have to wait for NetCore 3.0 to know the final level of isolation.
But until now it has been one process/appdomain for one website on NetCore. For legacy IIS then it is possible to spin up an extra AppDomain for the same website. This extra AppDomain for the same website required across-process file-synchronization.

I think we should disable it for all platforms, or none.
What is the performance gain when ConcurrentWrites=false?

From  #3490 then:

KeepFileOpen=true, ConcurrentWrites=false = 5,387.220 ns
KeepFileOpen=true, ConcurrentWrites=true  = 11,171.048 ns

But I guess this is with atomic-file-appender, and not with ForceMutex

I think we should disable it for all platforms, or none.

;)

I think there are 3 audiences for NLog.

The ones that will just use NLog and it should be convenient and simple. Performance is important, but perfect is not needed.
The ones that needs performance. They should have the controls (and good written advice) to get the most performance - a (small) feature loss is acceptable.
Benchmarks. Those are benchmarking unrealistic things. Nobody does while(true) doLog.

I think it's more important to to focus on 1 and 2.  If we focus on 3, that could hurt 1 and 2. That we will lose on 3 is really pity (I've seen comparisons before) - but that is an explicit choice.

I think it's more important to compare when KeepFileOpen=false (the default).

When using KeepFileOpen=false then it doesn't change performance with ConcurrentWrites=false. The only difference is that it retries file-open-operation on failure (because of conflict with other application). Actually think that KeepFileOpen=false should ignore ConcurrentWrites and always perform retry on failure.
Should rename these parameters:

concurrentWriteAttemptDelay -> FileOpenRetryDelay
concurrentWriteAttempts -> FileOpenRetryCount

And change this line:
https://github.com/NLog/NLog/blob/899c3f51a681303855c21d03a17aa19cc5412e91/src/NLog/Internal/FileAppenders/BaseFileAppender.cs#L204
Into:
if ((!CreateFileParameters.ConcurrentWrites && !CreateFileParameters.KeepFileOpen) || i + 1 == CreateFileParameters.FileOpenRetryCount)

My priority is this:

Compatibility with most platforms
Performance
So I don't mind that KeepFileOpen=false by default. But I do mind that ConcurrentWrites=true is enabled by default as it hurts performance and give compatibility issues with KeepFileOpen=true.

so could we set ConcurrentWrites to false when unset and KeepFileOpen=true?
(sorry if this is proposed before)

so could we set ConcurrentWrites to false when unset and KeepFileOpen=true?

Same as having ConcurrentWrites=false by default. And perform the above rename of parameters (FileOpenRetryCount + FileOpenRetryDelay) so they apply for both ConcurrentWrites=true and KeepFileOpen=false.

For NLog 5.0 then it would be nice if the default FileTarget didn't know about ConcurrentWrites (No Mutex-writes, No Atomic-writes. No FileWatchers. No Compression). Just being plain and simple without crazy logic.
Then one can make a ConcurrentFileTarget that inherits from FileTarget that adds Mutex + Atomic + FileWatchers
Then one can make a CompressArchiveFileWrapper that hooks into the wrapped FileTarget and reacts to archive-events.

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev@899c3f5). Click here to learn what that means.
The diff coverage is 100%.

@@          Coverage Diff          @@
##             dev   #3048   +/-   ##
=====================================
  Coverage       ?     80%
=====================================
  Files          ?     349
  Lines          ?   27549
  Branches       ?    3654
=====================================
  Hits           ?   21903
  Misses         ?    4596
  Partials       ?    1050

@304NotModified Have now added a commit that changes ConcurrentWrites=false for all platforms.
But since breaking change, then it will be for NLog 5.0. And since NLog 5.0 should breakup FileTarget so there is FileTarget + ConcurrentFileTarget then this PR might not be relevant?

Created #3492 for NLog 4.6.6, while waiting for ConcurrentFileTarget to be ready for NLog 5.0

And since NLog 5.0 should breakup FileTarget so there is FileTarget + ConcurrentFileTarget then this PR might not be relevant?

Is the ConcurrentFileTarget , the slow  or the fast one?

ConcurrentFileTarget uses mutex or atomic file-append together with file watchers.
But since NLog 5 has changed status to minimum breaking change, then I think such a split is for NLog 6.
Sent from my Sony Xperia
---- Julian Verdurmen wrote ----
And since NLog 5.0 should breakup FileTarget so there is FileTarget + ConcurrentFileTarget then this PR might not be relevant?
Is the ConcurrentFileTarget , the slow or the fast one?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/pull/3048?email_source=notifications&email_token=ACXZ7HG2FTHHTQ2JM7VQUP3QOTU3JA5CNFSM4GLTQYU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBGYMTQ#issuecomment-541951566, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HDHR63AIU3AZSPMPBDQOTU3JANCNFSM4GLTQYUQ.

Resolved merge conflicts for merging into DEV-branch.

Think this belongs to NLog 5.0, since the goal is to make NLog to be more slim and work on more platforms out-of-the-box.

Think this belongs to NLog 5.0, since the goal is to make NLog to be more slim and work on more platforms out-of-the-box.

Updated wiki: https://github.com/NLog/NLog/wiki/File-target


Top bar across both mobile sportsbook and trading UIs looks taller than it should be

Height should be 48px

Seems fine


How to set up this project. ?

I tried installing gatsby and there's an error stating that to delete "package-lock.json"

(This was the error)
There was a problem loading the local develop command. Gatsby may not be installed in your site's "node_modules" directory. Perhaps you need to run "npm
install"? You might need to delete your "package-lock.json" as well.


Add support for package statements

I am reviewing https://github.com/mockito/mockito/pull/2047 atm, which adds apiguardian statements to various Mockito internal classes that are used by the mockito-junit-jupiter extension. This approach is quite ad-hoc, as we would have to add the annotation when we start using it. An alternative approach would be to add the annotation to every single class we have in org.mockito.internal, but that seems to be quite invasive as well.
Would it be possible to allow the annotation to be added on package statements (e.g. in a package-info.java) for org.mockito.internal? That would then indicate that all classes in its (sub-)packages are marked internal.
I am not sure if OSGi tooling would need to be updated to support the new location, but at least it would allow us to more nicely integrate apiguardian into Mockito.
CC @rotty3000

Great idea. We would have to improve bnd to handle this but it's still the right approach.

Originally the annotation was introduced to avoid "internal" or "experimental" packages because those cannot be promoted to a different status without breaking backward compatibility. I can see use cases for this, though, so I'd be in favor.
@sbrannen WDYT?

I think it would be OK to allow @API to be declared at the package level, and I'm sure it would be useful in certain scenarios.
The only issue is that doing so will require that tools supporting API Guardian will have to take package-level declarations into account as well, with class-level declarations overriding package-level declarations.
But... perhaps that's an issue for very many people at this point in time.

But... perhaps that's an issue for very many people at this point in time.

You meant to write "not an issue", right?

@sbrannen As I understand it, tools that are currently not processing package statement wouldn't see the annotation either. So I think it would gracefully degrade (e.g. ignore). I guess @rotty3000 could shine a light on that from BND's perspective if that assumption is correct?

You meant to write "not an issue", right?

Correct. I'll edit my comment.

As I understand it, tools that are currently not processing package statement wouldn't see the annotation either. So I think it would gracefully degrade (e.g. ignore).

Well, I wouldn't call that graceful degradation. If the author assumes the tool honors the package-level declaration and therefore omits superfluous class-level declarations, then the tool would think such classes are not annotated with any form of @API declaration, thereby not honoring the author's intent.

I'll have to double check with a real test case, but from a quick review of the bnd code it seems that package annotation would work with no changes. In other words even an older version of bnd look like they would do the right thing (I will confirm this over the next few days).

I also think it would be very useful to have @API support at the package level
a +1 from me

Is anyone interested in sending a small PR?

I can send a PR. I was mostly waiting on the confirmation of @rotty3000 that the approach will work with BND tooling.

@TimvdLippe apologies. I've been really busy, but making this work in bnd :) and don't foresee any complications.


Baseline network test failing on v1.6.2

On Fedora 30 and Fedora 31, Podman v1.6.2 is failing during the Network test portion of the Baseline tests.  I'm not sure if this is anticipated or not.    I'm not sure if this had failed prior.  The script to reproduce the issue:
#!/bin/bash
# test_podman_network.sh
# A script to be run at the command line with Podman installed.
# This should be run against a new kit to provide base level testing
# on a freshly installed machine with no images or container in
# play.  This currently needs to be run as root.
#
# To run this command:
#
# /bin/bash -v test_podman_baseline.sh -d # Install and then deinstall Docker
# /bin/bash -v test_podman_baseline.sh -n # Do not perform docker test
# /bin/bash -v test_podman_baseline.sh -e # Stop on error
# /bin/bash -v test_podman_baseline.sh    # Continue on error
#

#######
# See if we want to stop on errors and/or install and then remove Docker.
#######
HOST_PORT="${HOST_PORT:-8080}"
showerror=0
installdocker=0
usedocker=1
while getopts "den" opt; do
    case "$opt" in
    d) installdocker=1
       ;;
    e) showerror=1
       ;;
    n) usedocker=0
       ;;
    esac
done

if [ "$installdocker" -eq 1 ] && [ "usedocker" -ne 0 ]
then
    echo "Script will install and then deinstall Docker."
fi

if [ "$showerror" -eq 1 ]
then
    echo "Script will stop on unexpected errors."
    set -e
fi

pkg_manager=`command -v dnf`
if [ -z "$pkg_manager" ]; then
    pkg_manager=`command -v yum`
fi

echo "Package manager binary: $pkg_manager"

########
# Test networking, bind mounting a file, stdin/stdout redirect
########
echo "Testing networking: ..."
port_test_failed=0
txt1="Hello, Podman"
echo "$txt1" > /tmp/hello.txt
podman run -d --name myweb -p "$HOST_PORT:80" -w /var/www -v /tmp/hello.txt:/var/www/index.txt busybox httpd -f -p 80
echo "$txt1" | podman exec -i myweb sh -c "cat > /var/www/index2.txt"
txt2=$( podman exec myweb cat /var/www/index2.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS1" || { echo "FAIL1"; port_test_failed=1; }
txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:$HOST_PORT/index.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS2" || { echo "FAIL2"; port_test_failed=1; }
txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:$HOST_PORT/index2.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS3" || { echo "FAIL3"; port_test_failed=1; }
# podman run --rm --net container:myweb --add-host myweb:<IP_ADDRESS> busybox wget -qO - http://myweb/index.txt
rm /tmp/hello.txt
podman stop myweb
podman rm myweb
[ "0$port_test_failed" -eq 1 ] && [ "0$showerror" -eq 1 ] && {
  echo "networking test failed";
  exit -1;
}

Test 1 and Test 3 fail in the above:
# /bin/bash -v test_podman_network.sh
#!/bin/bash
# test_podman_network.sh
# A script to be run at the command line with Podman installed.
# This should be run against a new kit to provide base level testing
# on a freshly installed machine with no images or container in
# play.  This currently needs to be run as root.
#
# To run this command:
#
# /bin/bash -v test_podman_baseline.sh -d # Install and then deinstall Docker
# /bin/bash -v test_podman_baseline.sh -n # Do not perform docker test
# /bin/bash -v test_podman_baseline.sh -e # Stop on error
# /bin/bash -v test_podman_baseline.sh    # Continue on error
#

#######
# See if we want to stop on errors and/or install and then remove Docker.
#######
HOST_PORT="${HOST_PORT:-8080}"
showerror=0
installdocker=0
usedocker=1
while getopts "den" opt; do
    case "$opt" in
    d) installdocker=1
       ;;
    e) showerror=1
       ;;
    n) usedocker=0
       ;;
    esac
done

if [ "$installdocker" -eq 1 ] && [ "usedocker" -ne 0 ]
then
    echo "Script will install and then deinstall Docker."
fi

if [ "$showerror" -eq 1 ]
then
    echo "Script will stop on unexpected errors."
    set -e
fi

pkg_manager=`command -v dnf`
if [ -z "$pkg_manager" ]; then
    pkg_manager=`command -v yum`
fi

echo "Package manager binary: $pkg_manager"
Package manager binary: /usr/bin/dnf

########
# Test networking, bind mounting a file, stdin/stdout redirect
########
echo "Testing networking: ..."
Testing networking: ...
port_test_failed=0
txt1="Hello, Podman"
echo "$txt1" > /tmp/hello.txt
podman run -d --name myweb -p "$HOST_PORT:80" -w /var/www -v /tmp/hello.txt:/var/www/index.txt busybox httpd -f -p 80
Trying to pull docker.io/library/busybox...
Getting image source signatures
Copying blob 7c9d20b9b6cd done
Copying config 19485c79a9 done
Writing manifest to image destination
Storing signatures
5658a6985fd0da8aab22423253e38ff3aee3a2472dd5c3e0f874dcfcf2b6d634
echo "$txt1" | podman exec -i myweb sh -c "cat > /var/www/index2.txt"
Error: read unixpacket @->/var/run/libpod/socket/7951c50ead57ba765aa85879ba2a1e5e77a6072e30601192f17ddb772e103676/attach: read: connection reset by peer
txt2=$( podman exec myweb cat /var/www/index2.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS1" || { echo "FAIL1"; port_test_failed=1; }
FAIL1
txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:$HOST_PORT/index.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS2" || { echo "FAIL2"; port_test_failed=1; }
PASS2
txt2=$( podman run --rm --net host busybox wget -qO - http://localhost:$HOST_PORT/index2.txt )
[ "x$txt1" == "x$txt2" ] && echo "PASS3" || { echo "FAIL3"; port_test_failed=1; }
FAIL3
# podman run --rm --net container:myweb --add-host myweb:<IP_ADDRESS> busybox wget -qO - http://myweb/index.txt
rm /tmp/hello.txt
podman stop myweb
5658a6985fd0da8aab22423253e38ff3aee3a2472dd5c3e0f874dcfcf2b6d634
podman rm myweb
5658a6985fd0da8aab22423253e38ff3aee3a2472dd5c3e0f874dcfcf2b6d634
[ "0$port_test_failed" -eq 1 ] && [ "0$showerror" -eq 1 ] && {
  echo "networking test failed";
  exit -1;
}

May I know what happens if you reboot your system between every two tests? I've just upgraded to v1.6.2 (Ubuntu) and a weird thing that I've noticed is that somehow after a container that exposes a port and mounts a named volume is stopped (and removed), the port cannot be reused until I reboot my system. I'm running in root-less mode, not sure whether the same thing happens under root mode.

Rootfull and rootless networking have almost nothing in common.  If you see a port as still being locked in rootless podman, then I would think that their must be a process holding the socket open.  Perhaps slirp4netns is still running or some proces sof the container?  Or maybe the pause container.
@AkihiroSuda @giuseppe WDYT?

this is simply the regression in run -i behaviour.  @mheon was looking into it before his pto.

@baude @mheon Do we still have this issue?


How to Resume training?

@muupan
Hello
My training job has been aborted, How can I resume training from my snapshot files?
Thanks

@muupan
any help?