What different between 'pretrain' and 'UDA'?

Nice work!
bash scripts/pretrain/visda/run_visda.sh deit_base
bash scripts/uda/visda/run_visda.sh deit_base
What different between 'pretrain' and 'uda'?

'pretrain' is the first stage of the whole stage. It only uses source label data to train the source domain model initialized by the imagenet pretrained model. The performance of the source domain model is the 'Baseline' of the tables.
‘uda’ is the second stage of the whole stage. It uses source labeled data and target unlabeled data to train the target domain model initialized by the source domain model. The performance of the target domain model is the 'CDTrans' of the tables.

Thanks.
two little questions:

Can backbone use ViT directly?

After 'uda' training stage,  for testing, need to run 'python test.py '?

First question
Yes, you can use ViT directly. Our backbone is the ViT architecture, but initialized with DeiT imagenet pre-trained model parameters. You can directly use the ViT imagenet pre-trained model parameters to initialize the source model. In addition, in our experiments, the model performance will be better if the ViT model parameters are used for initialization.
Second question
After the 'uda' training phase, the test results will be automatically displayed at the end of the output ffor easy viewing.  So you do not run the test.py manually.

Nice and thanks

I put pretrained 'ViT-B-16.npz' in path (./data/pretrainModel/),
and change code (./scripts/pretrain/visda/run_visda.sh, line 10) to 'pretrain_model='ViT-B_16.npz''
unfortunately, I meet this error:
Traceback (most recent call last):                                                                                │
File "train.py", line 92, in                                                                                │
model = make_model(cfg, num_class=num_classes, camera_num=camera_num, view_num = view_num)                                            │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 410, in make_model                                                     │
model = build_transformer(num_class, camera_num, view_num, cfg, __factory_hh)                                                         │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 214, in init                                                       │
self._load_parameter(pretrain_choice, model_path)                                                                                │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 218, in _load_parameter                                                │
self.base.load_param(model_path)                                                                                │
File "/home/cy/project/CDTrans-master/model/backbones/vit_pytorch.py", line 611, in load_param                                          │
param_dict = torch.load(model_path, map_location='cpu')                                                                               │
File "/home/cy/.conda/envs/clone/lib/python3.7/site-packages/torch/serialization.py", line 585, in load                                 │
with _open_zipfile_reader(opened_file) as opened_zipfile:                                                                             │
File "/home/cy/.conda/envs/clone/lib/python3.7/site-packages/torch/serialization.py", line 242, in init                             │
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))                                                │
RuntimeError: [enforce fail at inline_container.cc:222] . file not found: Transformer/version

I put pretrained 'ViT-B-16.npz' in path (./data/pretrainModel/),
and change code (./scripts/pretrain/visda/run_visda.sh, line 10) to 'pretrain_model='ViT-B_16.npz''
unfortunately, I meet this error:
Traceback (most recent call last):                                                                                │
File "train.py", line 92, in                                                                                │
model = make_model(cfg, num_class=num_classes, camera_num=camera_num, view_num = view_num)                                            │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 410, in make_model                                                     │
model = build_transformer(num_class, camera_num, view_num, cfg, __factory_hh)                                                         │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 214, in init                                                       │
self._load_parameter(pretrain_choice, model_path)                                                                                │
File "/home/cy/project/CDTrans-master/model/make_model.py", line 218, in _load_parameter                                                │
self.base.load_param(model_path)                                                                                │
File "/home/cy/project/CDTrans-master/model/backbones/vit_pytorch.py", line 611, in load_param                                          │
param_dict = torch.load(model_path, map_location='cpu')                                                                               │
File "/home/cy/.conda/envs/clone/lib/python3.7/site-packages/torch/serialization.py", line 585, in load                                 │
with _open_zipfile_reader(opened_file) as opened_zipfile:                                                                             │
File "/home/cy/.conda/envs/clone/lib/python3.7/site-packages/torch/serialization.py", line 242, in init                             │
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))                                                │
RuntimeError: [enforce fail at inline_container.cc:222] . file not found: Transformer/version

In my opinion, the .npz format is a file format supported by NumPy. You should replace the torch.load() function with numpy.load().
Maybe you can directly use the .pth format file to initialize the model. The pre-trained model can be downloaded as follows:
ViT-Base, ViT-Small

In my opinion, the .npz format is a file format supported by NumPy. You should replace the torch.load() function with numpy.load().
Maybe you can directly use the .pth format file to initialize the model. The pre-trained model can be downloaded as follows:
ViT-Base, ViT-Small

Thanks.
I try now.

Thanks.
I try now.

In paper for Fingure 2:
'The inputs of the framework are the selected pairs from labeling methodthe.
source and target images in the input pair are sent to source branch and target branch respectively.'
Does it means: input of  Hs  is Ps (source branch), and input of Ht is Pt (target branch) ?

The inputs of Hs and Ht are the pairs from the set P={Ps,Pt}. Specifically, for each pair (s,t) in P, s and t are sent to Hs and Ht respectively.

That is
all source data s are sent to Hs,
all target data with pseudo lable (i.e. t) are sent to Ht,
both pair (s,t) in P are sent to Hs_t.
Is right?

Is right?

Yes

anthor question： Will the same target sample be labeled repeatedly?

That depends on whether Ps and Pt have overlaps.

Ok, thanks

Please, is it possible to reproduce these results on colabpro or colab standard? I am keenly interested in knowing more about domain adaptation through the use of transformer architecture. Thanks

Traceback (most recent call last):
File "train.py", line 5, in
from model import make_model
File "/content/drive/MyDrive/Publication2022/CDTrans/model/init.py", line 1, in
from .make_model import make_model
File "/content/drive/MyDrive/Publication2022/CDTrans/model/make_model.py", line 7, in
from .backbones.vit_pytorch import vit_base_patch16_224_TransReID, vit_small_patch16_224_TransReID
File "/content/drive/MyDrive/Publication2022/CDTrans/model/backbones/vit_pytorch.py", line 30, in
from torch._six import container_abcs
ImportError: cannot import name 'container_abcs' from 'torch._six' (/usr/local/lib/python3.7/dist-packages/torch/_six.py)
Please could you help me with this bug?

It is solved now

Thank you. I will update my repos then.

Traceback (most recent call last):
File "train.py", line 113, in
num_query, args.local_rank
File "/content/drive/MyDrive/Publication2022/CDTrans/processor/processor_uda.py", line 337, in do_train_uda
(self_score1, self_feat1, self_prob1), (score2, feat2, prob2), (score1, feat1, prob1), cross_attn  = model(img, t_img, target, cam_label=target_cam, view_label=target_view ) # output: source , target , source_target_fusion
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/Publication2022/CDTrans/model/make_model.py", line 330, in forward
global_feat, global_feat2, global_feat3, cross_attn = self.base(x, x2, cam_label=cam_label, view_label=view_label, domain_norm=domain_norm, cls_embed_specific=cls_embed_specific, inference_target_only=inference_flag)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/Publication2022/CDTrans/model/backbones/vit_pytorch_uda.py", line 516, in forward
x = self.forward_features(x, x2, cam_label, view_label, domain_norm, cls_embed_specific,inference_target_only)
File "/content/drive/MyDrive/Publication2022/CDTrans/model/backbones/vit_pytorch_uda.py", line 498, in forward_features
x,x2,x1_x2_fusion, cross_attn = blk(x,x2,x1_x2_fusion,use_cross=self.use_cross,use_attn=self.use_attn, domain_norm=domain_norm, inference_target_only=inference_target_only)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/Publication2022/CDTrans/model/backbones/vit_pytorch_uda.py", line 230, in forward
xa_attn, xa_attn2, xa_attn3, cross_attn = self.attn(self.norm1(x),self.norm1(x2), inference_target_only=inference_target_only)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/MyDrive/Publication2022/CDTrans/model/backbones/vit_pytorch_uda.py", line 179, in forward
attn3 = (q @ k2.transpose(-2, -1)) * self.scale
RuntimeError: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 11.17 GiB total capacity; 10.45 GiB already allocated; 23.81 MiB free; 10.71 GiB reserved in total by PyTorch)
Please, could help me with this bug? Thanks

RuntimeError: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 11.17 GiB total capacity; 10.45 GiB already allocated; 23.81 MiB free; 10.71 GiB reserved in total by PyTorch)
This is the problem of not having enough memory for GPU devices. Maybe you should run this script with more GPU devices by editing gpus="('0,1')".

Any advice on that, I am running using standard colab notebook on how to edit it. I am keenly interested in your work. Thanks

I am very sorry, I have no experience with colab. You need to have at least 32G of GPU memory to train this project to guarantee accuracy.
Or you can reduce the batch size to run the project, but I have not tested the experimental results.
In the configs/pretrain.yaml and configs/uda.yaml, you can replace the "IMS_PER_BATCH: 64" with "IMS_PER_BATCH: 32" to reduce the batch size.
If there is still  an out-of-memory error, you can use "IMS_PER_BATCH: 16".

Thank you for the information.

Sorry, please could you explain this experiment to me: Does the code
does that or only CDTrans experiments? Thanks
Baseline(DeiT-S)
On Wed, Mar 2, 2022 at 10:42 AM CDTrans @.***> wrote:

Closed #2 https://github.com/CDTrans/CDTrans/issues/2.
—
Reply to this email directly, view it on GitHub
https://github.com/CDTrans/CDTrans/issues/2#event-6169840438, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJXIW2GBWQG2Z7LLAAFJZ53U55AYDANCNFSM5K7NCD5A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

--
Emmanuel Agbeli
Co-operative Master's Student
in Big Data  and Financial Mathematics
African Institute for Mathematical Sciences, AIMS-Senegal
Alternative E-mails: @.*** ;
Phone: +233 (0)501374813 // +221 772 524 794   | Mailing Adress: AIMS
Senegal, Centre IRD Mbour, BP 1418 Mbour  |   Linkedin: Emmanuel Agbeli
|     whatsApp:+233 (0)501374813

Sorry, I don't understand what you said "Is this how the code is done or is it just the CDTrans experiment? Thanks."
I thought I had solved the problems, so I closed the issue. Now I have reopened the issue, so if you have any other questions, post them here. Thanks.

How to reproduce this result from the code? I need clarification on this. Thanks

Just follow the readme settings and process, then run the script file.
But your server is not enough for the gpu memory requirement. When reducing the batch run in such an experimental situation, the accuracy will be little lower than the result of the paper.

2022-02-28 10:23:30,669 reid_baseline.train INFO: Epoch 10 done. Time per batch: 0.747[s] Speed: 21.4[samples/s]
2022-02-28 10:23:55,809 reid_baseline.train INFO: normal accuracy 0.9804756833510827 0.6311898231506348
2022-02-28 10:23:55,810 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 10
2022-02-28 10:23:55,810 reid_baseline.train INFO: Accuracy: 98.0% Mean Entropy: 63.1%
Loading pretrained model for finetuning from ../logs/pretrain/deit_small/office/Amazon/transformer_best_model.pth
2022-02-28 10:24:18,847 reid_baseline.train INFO: normal accuracy 0.9808306709265175 0.6045202612876892
2022-02-28 10:24:18,847 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Best Model
2022-02-28 10:24:18,847 reid_baseline.train INFO: Accuracy: 98.1%
Thank you, I did that but when I run the pretrained script I don't get results for the baseline. As you can I get result for source domain only but not A--> D and A-->W as indicated.

Sorry about the mistake information above. The pretrained script does not display the transfer results directly. When you run the uda script, the pretrained transfer result was displayed before the uda training epoch.

Alright. I am using different parameter values because of my compute resources. I need more clarification of the results shown in the table from the experimental results. Please, I would be glad to have it asap for a presentation. Thanks

100% 45/45 [00:15<00:00, 2.93it/s]
2022-02-28 14:05:50,127 reid_baseline.train INFO: Fisrt Accuracy = 73.87% -> 76.36%
2022-02-28 14:05:50,160 reid_baseline.train INFO: Second Accuracy = 73.87% -> 77.53%
Thank you. please, is this how to know the baseline results from the experiment? I am interested in the baseline results.

Please, I am able to capture the uda results but for the baseline results, I find it difficult to get it from the output. I would be glad if you could help me with that.  Now I am using higher GPU memory of 52 GB which is sufficient to run the deit_small model.
Thanks

Sorry, I was busy with other work and didn't reply in time. You can use the following evaluation script to manually get baseline results for the transfer target domain.
model='deit_small'
model_type='vit_small_patch16_224_TransReID'
pretrain_model='deit_small_distilled_patch16_224-649709d9.pth'
for target_dataset in 'dslr' 'webcam'
do
        python test.py --config_file 'configs/pretrain.yml' MODEL.DEVICE_ID "('0')" \
        TEST.WEIGHT '../logs/pretrain/'$model'/office/Amazon/transformer_10.pth' \
        DATASETS.NAMES 'Office' DATASETS.NAMES2 'Office' \
        OUTPUT_DIR '../logs/uda/'$model'/office/' \
        DATASETS.ROOT_TRAIN_DIR './data/office31/amazon_list.txt' \
        DATASETS.ROOT_TRAIN_DIR2 './data/office31/'$target_dataset'_list.txt' \
        DATASETS.ROOT_TEST_DIR './data/office31/'$target_dataset'_list.txt' \
        MODEL.Transformer_TYPE $model_type \
        MODEL.PRETRAIN_PATH './data/pretrainModel/'$pretrain_model \

done

Thanks for your patience. I have gotten what I want.

My results are not the same as the ones in the readme file. Could it be the version of Cuda I'm using Tesla P100-PCIE? I wanted to reproduce the same results for the small model. Thanks

Can you provide the training script and log to show the training details. The script is working on my training machine. I need to see the difference between your training details and mine

2022-03-09 11:52:26,979 reid_baseline.train INFO: Fisrt Accuracy = 69.77% -> 75.81%
2022-03-09 11:52:27,065 reid_baseline.train INFO: Second Accuracy = 69.77% -> 78.44%  This is the first major accuracy result I get when I run this script : !bash scripts/uda/officehome/run_officehome_Ar.sh deit_small. My results seems not look exactly as the ones display on the page.

It can be seen that the pre-trained model loaded in the uda script is incorrectly trained. Could you provide the detail of the pretrained training script and log?

model=$1
if [ ! -n "$1" ]
then
echo 'pelease input the model para: {deit_base, deit_small}'
exit 8
fi
if [ $model == 'deit_base' ]
then
model_type='vit_base_patch16_224_TransReID'
pretrain_model='deit_base_distilled_patch16_224-df68dfff.pth'
else
model='deit_small'
model_type='vit_small_patch16_224_TransReID'
pretrain_model='deit_small_distilled_patch16_224-649709d9.pth'
fi
python train.py --config_file configs/pretrain.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES 'OfficeHome'
OUTPUT_DIR '../logs/pretrain/'$model'/office-home/Art'
DATASETS.ROOT_TRAIN_DIR './data/OfficeHomeDataset/Art.txt'
DATASETS.ROOT_TEST_DIR './data/OfficeHomeDataset/Product.txt'
MODEL.Transformer_TYPE $model_type
MODEL.PRETRAIN_PATH './data/pretrainModel/'$pretrain_model \
Here is the pretrained script I used: !bash scripts/pretrain/officehome/run_officehome_Ar.sh deit_small

2022-03-09 11:42:16,126 reid_baseline INFO: Saving model in the path :../logs/pretrain/deit_small/office-home/Art
2022-03-09 11:42:16,127 reid_baseline INFO: Namespace(config_file='configs/pretrain.yml', local_rank=0, opts=['MODEL.DEVICE_ID', "('0')", 'DATASETS.NAMES', 'OfficeHome', 'OUTPUT_DIR', '../logs/pretrain/deit_small/office-home/Art', 'DATASETS.ROOT_TRAIN_DIR', './data/OfficeHomeDataset/Art.txt', 'DATASETS.ROOT_TEST_DIR', './data/OfficeHomeDataset/Product.txt', 'MODEL.Transformer_TYPE', 'vit_small_patch16_224_TransReID', 'MODEL.PRETRAIN_PATH', './data/pretrainModel/deit_small_distilled_patch16_224-649709d9.pth'])
2022-03-09 11:42:16,128 reid_baseline INFO: Loaded configuration file configs/pretrain.yml
2022-03-09 11:42:16,129 reid_baseline INFO:
MODEL:
PRETRAIN_CHOICE: 'imagenet'
PRETRAIN_PATH: './data/pretrainModel/deit_base_distilled_patch16_224-df68dfff.pth'
METRIC_LOSS_TYPE: 'triplet'
IF_LABELSMOOTH: 'on'
IF_WITH_CENTER: 'no'
NAME: 'transformer'
NO_MARGIN: True
DEVICE_ID: ('0')
Transformer_TYPE: 'vit_base_patch16_224_TransReID' #vit_small_patch16_224_TransReID
STRIDE_SIZE: [16, 16]
FC_SETTING: 'TransReID'
TASK_TYPE: 'classify_DA'
UDA_STAGE: 'pretrain'
INPUT:
SIZE_TRAIN: [256, 256]
SIZE_TEST: [256, 256]
SIZE_CROP: [224, 224]
PROB: 0.5 # random horizontal flip
RE_PROB: 0.0 # random erasing
PADDING: 0
PIXEL_MEAN: [0.485, 0.456, 0.406]
PIXEL_STD: [0.229, 0.224, 0.225]
DATASETS:
NAMES: ('OURAPI')
ROOT_TRAIN_DIR: ('./datasets/reid_datasets/Corrected_Market1501')
NAMES2: ('OURAPI')
ROOT_TRAIN_DIR2: ('./datasets/reid_datasets/Refined_DukeMTMC_reID')
ROOT_TEST_DIR: ('./datasets/reid_datasets/Refined_DukeMTMC_reID')
DATALOADER:
SAMPLER: 'softmax'
NUM_INSTANCE: 4
NUM_WORKERS: 8
SOLVER:
OPTIMIZER_NAME: 'SGD'
MAX_EPOCHS: 10
BASE_LR: 0.008
IMS_PER_BATCH: 64
STEPS: [40, 80]
GAMMA: 0.
WARMUP_FACTOR: 0.01
WARMUP_EPOCHS: 10
WARMUP_METHOD: 'linear'
LARGE_FC_LR: False
CHECKPOINT_PERIOD: 10
LOG_PERIOD: 100
EVAL_PERIOD: 1
WEIGHT_DECAY:  1e-4
WEIGHT_DECAY_BIAS: 1e-4
BIAS_LR_FACTOR: 2
TEST:
EVAL: True
IMS_PER_BATCH: 256
RE_RANKING: False
RE_RANKING_TRACK: False
WEIGHT: '../logs/trans4DA/transformer_120.pth'
NECK_FEAT: 'after'
FEAT_NORM: 'yes'
OUTPUT_DIR: '../logs/trans4DA'
2022-03-09 11:42:16,129 reid_baseline INFO: Running with config:
DATALOADER:
NUM_INSTANCE: 4
NUM_WORKERS: 8
SAMPLER: softmax
DATASETS:
NAMES: OfficeHome
NAMES2: OURAPI
PLUS_NUM_ID: 100
QUERY_MINING: False
ROOT_TEST_DIR: ./data/OfficeHomeDataset/Product.txt
ROOT_TRAIN_DIR: ./data/OfficeHomeDataset/Art.txt
ROOT_TRAIN_DIR2: ./datasets/reid_datasets/Refined_DukeMTMC_reID
INPUT:
AA_PROB: 0.0
PADDING: 0
PIXEL_MEAN: [0.485, 0.456, 0.406]
PIXEL_STD: [0.229, 0.224, 0.225]
PROB: 0.5
RE_PROB: 0.0
SIZE_CROP: [224, 224]
SIZE_TEST: [256, 256]
SIZE_TRAIN: [256, 256]
MODEL:
AIE_COE: 1.5
BLOCK_PATTERN: normal
CAMERA_EMBEDDING: False
COS_LAYER: False
DEVICE: cuda
DEVICE_ID: 0
DEVIDE_LENGTH: 4
DIST_TRAIN: False
DROP_OUT: 0.0
DROP_PATH: 0.1
FC_SETTING: TransReID
FROZEN: -1
ID_LOSS_TYPE: softmax
ID_LOSS_WEIGHT: 1.0
IF_LABELSMOOTH: on
IF_WITH_CENTER: no
LAST_STRIDE: 1
LOCAL_F: False
METRIC_LOSS_TYPE: triplet
NAME: transformer
NECK: bnneck
NO_MARGIN: True
NO_SHUFFLE: False
PATCH_SHUFFLE: 2
PRETRAIN_CHOICE: imagenet
PRETRAIN_PATH: ./data/pretrainModel/deit_small_distilled_patch16_224-649709d9.pth
PROB: 0.0
RECIP_LOSS:
STRIDE_SIZE: [16, 16]
TASK_TYPE: classify_DA
THRESH: 0.23
TRIPLET_LOSS_WEIGHT: 1.0
Transformer_TYPE: vit_small_patch16_224_TransReID
UDA_STAGE: pretrain
VIEWPOINT_EMBEDDING: False
YIWEI_NUM: 5
lameda: 0.5
OUTPUT_DIR: ../logs/pretrain/deit_small/office-home/Art
SOLVER:
BASE_LR: 0.008
BIAS_LR_FACTOR: 2
CENTER_LOSS_WEIGHT: 0.0005
CENTER_LR: 0.5
CHECKPOINT_PERIOD: 10
CLUSTER_MARGIN: 0.3
COSINE_MARGIN: 0.5
COSINE_SCALE: 30
EVAL_PERIOD: 1
GAMMA: 0.0
IMS_PER_BATCH: 64
LARGE_FC_LR: False
LOG_PERIOD: 100
MARGIN: 0.3
MAX_EPOCHS: 10
MOMENTUM: 0.9
OPTIMIZER_NAME: SGD
RANGE_ALPHA: 0
RANGE_BETA: 1
RANGE_K: 2
RANGE_LOSS_WEIGHT: 1
RANGE_MARGIN: 0.3
SEED: 1234
STEPS: (40, 80)
WARMUP_EPOCHS: 10
WARMUP_FACTOR: 0.01
WARMUP_METHOD: linear
WEIGHT_DECAY: 0.0001
WEIGHT_DECAY_BIAS: 0.0001
WITH_PSEUDO_LABEL_FILTER: False
TEST:
DIST_MAT: dist_mat.npy
EVAL: True
FEAT_NORM: yes
FLIP_FEATS: off
IMS_PER_BATCH: 256
NECK_FEAT: after
RE_RANKING: False
RE_RANKING_TRACK: False
WEIGHT: ../logs/trans4DA/transformer_120.pth
=> Office-Home loaded
Dataset statistics:
train Art and valid is Product
subset   | # ids | # images | # cameras
train   |    65 |     2427 |         1
valid   |    65 |     4439 |         1
use shuffle sampler strategy
using Transformer_type: vit_small_patch16_224_TransReID as a backbone
using stride: [16, 16], and part number is num_y14 * num_x14
using drop_path_rate is : 0.1
using aie_xishu is : 1.5
embed_diim 384 mlp_ratio 4
distill need to choose right cls token in the pth
Resized position embedding: %s to %s torch.Size([1, 197, 384]) torch.Size([1, 197, 384])
Position embedding resize to height:14 width: 14
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3458: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode)
Loading pretrained ImageNet model......from ./data/pretrainModel/deit_small_distilled_patch16_224-649709d9.pth
===========building transformer===========
label smooth on, numclasses: 65
pretrain train
2022-03-09 11:42:22,731 reid_baseline.train INFO: start training
2022-03-09 11:43:53,441 reid_baseline.train INFO: Epoch 1 done. Time per batch: 2.386[s] Speed: 26.8[samples/s]
2022-03-09 11:46:18,637 reid_baseline.train INFO: normal accuracy 0.46677179544942554 4.173189640045166
2022-03-09 11:46:20,383 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 1
2022-03-09 11:46:20,383 reid_baseline.train INFO: Accuracy: 46.7% Mean Entropy: 417.3%
2022-03-09 11:46:38,128 reid_baseline.train INFO: Epoch 2 done. Time per batch: 0.466[s] Speed: 137.4[samples/s]
2022-03-09 11:46:50,589 reid_baseline.train INFO: normal accuracy 0.533678756476684 4.168734073638916
2022-03-09 11:46:50,810 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 2
2022-03-09 11:46:50,811 reid_baseline.train INFO: Accuracy: 53.4% Mean Entropy: 416.9%
2022-03-09 11:47:09,281 reid_baseline.train INFO: Epoch 3 done. Time per batch: 0.481[s] Speed: 133.0[samples/s]
2022-03-09 11:47:21,750 reid_baseline.train INFO: normal accuracy 0.5370578959225051 4.143702030181885
2022-03-09 11:47:21,995 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 3
2022-03-09 11:47:21,996 reid_baseline.train INFO: Accuracy: 53.7% Mean Entropy: 414.4%
2022-03-09 11:47:39,975 reid_baseline.train INFO: Epoch 4 done. Time per batch: 0.469[s] Speed: 136.5[samples/s]
2022-03-09 11:47:52,470 reid_baseline.train INFO: normal accuracy 0.5215138544717278 4.034971237182617
2022-03-09 11:47:52,698 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 4
2022-03-09 11:47:52,699 reid_baseline.train INFO: Accuracy: 52.2% Mean Entropy: 403.5%
2022-03-09 11:48:10,741 reid_baseline.train INFO: Epoch 5 done. Time per batch: 0.471[s] Speed: 136.0[samples/s]
2022-03-09 11:48:23,236 reid_baseline.train INFO: normal accuracy 0.5242171660283848 3.778974771499634
2022-03-09 11:48:23,484 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 5
2022-03-09 11:48:23,484 reid_baseline.train INFO: Accuracy: 52.4% Mean Entropy: 377.9%
2022-03-09 11:48:41,485 reid_baseline.train INFO: Epoch 6 done. Time per batch: 0.470[s] Speed: 136.3[samples/s]
2022-03-09 11:48:53,950 reid_baseline.train INFO: normal accuracy 0.5512502815949538 3.4040982723236084
2022-03-09 11:48:54,194 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 6
2022-03-09 11:48:54,194 reid_baseline.train INFO: Accuracy: 55.1% Mean Entropy: 340.4%
2022-03-09 11:49:12,185 reid_baseline.train INFO: Epoch 7 done. Time per batch: 0.469[s] Speed: 136.4[samples/s]
2022-03-09 11:49:24,721 reid_baseline.train INFO: normal accuracy 0.6019373732822708 3.0578365325927734
2022-03-09 11:49:24,964 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 7
2022-03-09 11:49:24,965 reid_baseline.train INFO: Accuracy: 60.2% Mean Entropy: 305.8%
2022-03-09 11:49:43,114 reid_baseline.train INFO: Epoch 8 done. Time per batch: 0.473[s] Speed: 135.2[samples/s]
2022-03-09 11:49:55,615 reid_baseline.train INFO: normal accuracy 0.6587069159720658 2.7747511863708496
2022-03-09 11:49:55,864 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 8
2022-03-09 11:49:55,865 reid_baseline.train INFO: Accuracy: 65.9% Mean Entropy: 277.5%
2022-03-09 11:50:13,948 reid_baseline.train INFO: Epoch 9 done. Time per batch: 0.472[s] Speed: 135.7[samples/s]
2022-03-09 11:50:26,478 reid_baseline.train INFO: normal accuracy 0.6990313133588646 2.4651548862457275
2022-03-09 11:50:26,731 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 9
2022-03-09 11:50:26,731 reid_baseline.train INFO: Accuracy: 69.9% Mean Entropy: 246.5%
2022-03-09 11:50:44,935 reid_baseline.train INFO: Epoch 10 done. Time per batch: 0.475[s] Speed: 134.9[samples/s]
2022-03-09 11:50:58,938 reid_baseline.train INFO: normal accuracy 0.6976796575805362 2.492262601852417
2022-03-09 11:50:58,938 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Epoch: 10
2022-03-09 11:50:58,939 reid_baseline.train INFO: Accuracy: 69.8% Mean Entropy: 249.2%
Loading pretrained model for finetuning from ../logs/pretrain/deit_small/office-home/Art/transformer_best_model.pth
2022-03-09 11:51:11,818 reid_baseline.train INFO: normal accuracy 0.6990313133588646 2.4651548862457275
2022-03-09 11:51:11,819 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Best Model
2022-03-09 11:51:11,819 reid_baseline.train INFO: Accuracy: 69.9%

This is the log for the pretrained model script.

I was running the exact scripts you provided on the Github page.

This is the log for the pretrained model script.

I needed to verify the results on your page.

Please, is there a way to reach out for further clarification on the code? like mail, Twitter and etc. Thanks

After testing on an RTX2080Ti machine, I got 69.0% and 80.2% for the pre-trained model and uda model respectively in Art->Product of the office-home dataset. The model has a little different result from the pre-trained model. However, according to my evaluation, the final results of UDA on this new machine have the same level of performance, with some exceeding the tabular data on the github project and some below.

2022-03-09 11:52:26,979 reid_baseline.train INFO: Fisrt Accuracy = 69.77% -> 75.81%
2022-03-09 11:52:27,065 reid_baseline.train INFO: Second Accuracy = 69.77% -> 78.44%

The accuracy shown here is the quality of the pseudo-label, not the final accuracy of the UDA, you need to check the final UDA results after the model is trained.

Loading pretrained model for finetuning from ../logs/uda/deit_small/office-home/Art2Clipart/transformer_best_model.pth
2022-03-09 16:32:16,494 reid_baseline.train INFO: normal accuracy 0.6041237113402061 0.07715962827205658
2022-03-09 16:32:16,494 reid_baseline.train INFO: Classify Domain Adapatation Validation Results - Best model
2022-03-09 16:32:16,494 reid_baseline.train INFO: Accuracy: 60.4%
I believe this is the CDTrans-small result but how do I get the baseline result as indicated in the table?

Please, how would the results look like after running these two scripts?
!bash scripts/pretrain/officehome/run_officehome_Ar.sh deit_small
!bash scripts/uda/officehome/run_officehome_Ar.sh deit_small
On Wed, Mar 23, 2022 at 4:10 PM CDTrans @.***> wrote:

After testing on an RTX2080Ti machine, I got 69.0% and 80.2% for the
pre-trained model and uda model respectively in Art->Product of the
office-home dataset. The model has a little different result from the
pre-trained model. However, according to my evaluation, the final results
of UDA on this new machine have the same level of performance, with some
exceeding the tabular data on the github project and some below.
2022-03-09 11:52:26,979 reid_baseline.train INFO: Fisrt Accuracy = 69.77%
-> 75.81%
2022-03-09 11:52:27,065 reid_baseline.train INFO: Second Accuracy = 69.77%
-> 78.44%
The accuracy shown here is the quality of the pseudo-label, not the final
accuracy of the UDA, you need to check the final UDA results after the
model is trained.
—
Reply to this email directly, view it on GitHub
https://github.com/CDTrans/CDTrans/issues/2#issuecomment-1076520447, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJXIW2A34UCJAFNGDBOFYVDVBM66VANCNFSM5K7NCD5A
.
You are receiving this because you commented.Message ID:
@.***>

--
Emmanuel Agbeli
Co-operative Master's Student
in Big Data  and Financial Mathematics
African Institute for Mathematical Sciences, AIMS-Senegal
Alternative E-mails: @.*** ;
Phone: +233 (0)501374813 // +221 772 524 794   | Mailing Adress: AIMS
Senegal, Centre IRD Mbour, BP 1418 Mbour  |   Linkedin: Emmanuel Agbeli
|     whatsApp:+233 (0)501374813

I believe this is the CDTrans-small result but how do I get the baseline result as indicated in the table?

After testing on my new machine, extending the epoch can achieve the performance of the baseline results. You can try to change epoch like MAX_EPOCHS=15, 20 or 25 to get same high level of baseline performance. I guess this may be related to different physical server architectures.

I believe this is the CDTrans-small result but how do I get the baseline result as indicated in the table?

After testing on my new machine with 2 RTX 2080Ti GPU, extending the epoch can achieve the performance of the baseline results. In the pretrain scripts, you can try to change epoch like MAX_EPOCHS=15, 20 or 25 to get same high level of baseline performance. I guess this may be related to different physical server architectures. Please excuse the delay in reply as I am busy with work.

Thank you for the response but how do get the baseline results in the table? I am using colab pro+. My current issue is how to get the baseline results from the output logs. I have seen the CDTrans-small results after training but I don't know how to get the baseline results shown in the table. Thanks

You can use the following scripts to get the office-home baseline result about Art->Product, Real_World, Clipart
model='deit_small'
model_type='vit_small_patch16_224_TransReID'
pretrain_model='deit_small_distilled_patch16_224-649709d9.pth'
for target_dataset in 'Product' 'Real_World' 'Clipart'
do
        python test.py --config_file 'configs/pretrain.yml' MODEL.DEVICE_ID "('0')" \
        TEST.WEIGHT '../logs/pretrain/'$model'/office-home/Art/transformer_10.pth' \
        DATASETS.NAMES 'OfficeHome' DATASETS.NAMES2 'OfficeHome' \
        OUTPUT_DIR '../logs/uda/'$model'/office-home/' \
        DATASETS.ROOT_TRAIN_DIR './data/OfficeHomeDataset/Art.txt' \
        DATASETS.ROOT_TRAIN_DIR2 './data/OfficeHomeDataset/'$target_dataset'.txt' \
        DATASETS.ROOT_TEST_DIR './data/OfficeHomeDataset/'$target_dataset'.txt' \
        MODEL.Transformer_TYPE $model_type \
        MODEL.PRETRAIN_PATH './data/pretrainModel/'$pretrain_model \

done

You can use the following scripts to get the office-home baseline result about Art->Product, Real_World, Clipart
model='deit_small'
model_type='vit_small_patch16_224_TransReID'
pretrain_model='deit_small_distilled_patch16_224-649709d9.pth'
for target_dataset in 'Product' 'Real_World' 'Clipart'
do
        python test.py --config_file 'configs/pretrain.yml' MODEL.DEVICE_ID "('0')" \
        TEST.WEIGHT '../logs/pretrain/'$model'/office-home/Art/transformer_10.pth' \
        DATASETS.NAMES 'OfficeHome' DATASETS.NAMES2 'OfficeHome' \
        OUTPUT_DIR '../logs/uda/'$model'/office-home/' \
        DATASETS.ROOT_TRAIN_DIR './data/OfficeHomeDataset/Art.txt' \
        DATASETS.ROOT_TRAIN_DIR2 './data/OfficeHomeDataset/'$target_dataset'.txt' \
        DATASETS.ROOT_TEST_DIR './data/OfficeHomeDataset/'$target_dataset'.txt' \
        MODEL.Transformer_TYPE $model_type \
        MODEL.PRETRAIN_PATH './data/pretrainModel/'$pretrain_model \

done

!bash scripts/uda/officehome/run_officehome_Ar.sh deit_small. Please, what is the output of this one? Where can I get this script on your repos? Please, forgive me for my disturbance. you could show me that. My major issue is getting the baseline results. I am only running the exact script on the repos:
!bash scripts/pretrain/officehome/run_officehome_Ar.sh deit_small.
!bash scripts/uda/officehome/run_officehome_Ar.sh deit_small.

The above script is to get baseline results for office-home about Art->Product, Real_World, Clipart. This script is not included in the Github repository, because not everyone is interested in the baseline results. For other baseline results like Clipart->Art, Product, Real_World, you should edit this script to get it.
To summarize:
If you want to get the baseline model results, then you need to use the above script or modify it
If you want to get consistent baseline results with the table, then you need to adjust the max_epoch parameter, which may be caused by different physical machines

The above script is to get baseline results for office-home about Art->Product, Real_World, Clipart. This script is not included in the Github repository, because not everyone is interested in the baseline results. For other baseline results like Clipart->Art, Product, Real_World, you should edit this script to get it.
To summarize:
If you want to get the results of the baseline model, then you need to run the above script first or modify it and run it later.
If you want to get consistent baseline results with the table, then you need to adjust the max_epoch parameter, which may be caused by different physical machines

Thank you for the information. I needed it for my work.

Please use Git terminal running bash scripts/pretrain office31 / run_office_amazon. Sh deit_base when how to debug the code? I use Windows. Or do I have to use Linux debug code?


Invoking SwiftPM from open source toolchain crashes because symbols are defined both in system stdlib and toolchain stdlib

Running any SwiftPM command from an open source toolchain crashes because there are symbols defined both in the system stdlib and the stdlib shipped as part of the toolchain.
This affects both main and 5.7 snapshot toolchains. Things must have broken sometime between 2/22 and 4/4. swift-DEVELOPMENT-SNAPSHOT-2022-02-22-a.xctoolchain still works while swift-DEVELOPMENT-SNAPSHOT-2022-04-04-a.xctoolchain doesn’t (I don’t have any intermediate toolchains installed to check)
Steps to reproduce
mkdir mypackage
$ cd mypackage
$ swift package init
$ /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/bin/swift package describe
objc[46731]: Class _TtCs27_KeyedEncodingContainerBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119558) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7acd38). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs27_KeyedDecodingContainerBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119710) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7acef0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs19__EmptyArrayStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d1181b0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79c8d8). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCVVs17__CocoaDictionary5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd76a10) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad100). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCVs17__CocoaDictionary8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd76ac8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad1b8). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs22__RawDictionaryStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d1183b8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79cb68). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs26__EmptyDictionarySingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118478) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79cc48). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs24__SwiftEmptyNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd67df8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79cec0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs11_AnyKeyPath is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119a40) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad3e0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs20__SwiftNativeNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d1185f0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79cf30). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs26_SwiftNativeNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118658) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79cf98). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs25__SwiftNativeNSDictionary is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d1186c0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d020). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs18__SwiftNativeNSSet is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118730) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d0b0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs25__SwiftNativeNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd67e68) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d140). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs32__stdlib_ReturnAutoreleasedDummy is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd67ed8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d1e8). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCVVs10__CocoaSet5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd76bf8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad530). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCVs10__CocoaSet8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119b68) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad5e8). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs15__RawSetStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118850) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d388). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs19__EmptySetSingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118908) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d460). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs18_StringBreadcrumbs is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119c70) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad6f0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs21__SwiftNativeNSString is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118a60) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d658). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs15__StringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118ac8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d6e0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs21__SharedStringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118b48) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79d780). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs41__SwiftNativeNSArrayWithContiguousStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118bd8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79da60). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs20_SwiftNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118c48) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79dd38). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs22__SwiftDeferredNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118cc0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79ddd0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs28__ContiguousArrayStorageBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118d48) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79de90). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs15__VaListBuilder is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119e00) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad880). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs18__stdlib_AtomicInt is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd76cb0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c7ad930). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNSErrorLayoutStandin is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118e00) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f2f0). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSError is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118e28) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f318). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs12_SwiftObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118e78) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f368). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftValue is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118ef0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f3e0). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNull is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd696c0) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f430). One of the two will be used. Which one is undefined.
objc[46731]: Class SwiftNativeNSObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85dd696e8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f458). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118f18) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f4a8). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSMutableArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118f68) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f4f8). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSDictionaryBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d118fb8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f548). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSSetBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119008) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f598). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSStringBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d119058) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f5e8). One of the two will be used. Which one is undefined.
objc[46731]: Class __SwiftNativeNSEnumeratorBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff85d1190a8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10c79f638). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs25CheckedContinuationCanary is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb5e6d1858) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x10b3131a0). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs17DispatchQueueShim is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb5e6d18e8) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x10b313230). One of the two will be used. Which one is undefined.
objc[46731]: Class _TtCs9MainActor is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb5e6d1980) and /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x10b3132c8). One of the two will be used. Which one is undefined.
fish: Job 1, '/Library/Developer/Toolchains/s…' terminated by signal SIGSEGV (Address boundary error)

rdar://92784432

I don’t think this is specific to my setup. It was brought to my attention by @kimdv and he’s seeing the same issue.

I'm seeing a very similar issue when trying to build swift-format using SwiftPM with an open source toolchain. I've tried the following open source toolchains, and gotten the same results in both:

swift-DEVELOPMENT-SNAPSHOT-2022-04-04-a.xctoolchain
swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain

$ export TOOLCHAINS='org.swift.57202205041a'
$ swift package build swift-format
objc[2629]: Class _TtCs27_KeyedEncodingContainerBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa518) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108970d38). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs27_KeyedDecodingContainerBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa6d0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108970ef0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs19__EmptyArrayStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9170) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089608d8). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCVVs17__CocoaDictionary5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58da0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108971100). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCVs17__CocoaDictionary8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58e58) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089711b8). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs22__RawDictionaryStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9378) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108960b68). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs26__EmptyDictionarySingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9438) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108960c48). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs24__SwiftEmptyNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a188) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108960ec0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs11_AnyKeyPath is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2faa00) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089713e0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs20__SwiftNativeNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f95b0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108960f30). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs26_SwiftNativeNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9618) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108960f98). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs25__SwiftNativeNSDictionary is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9680) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961020). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs18__SwiftNativeNSSet is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f96f0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089610b0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs25__SwiftNativeNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a1f8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961140). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs32__stdlib_ReturnAutoreleasedDummy is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a268) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089611e8). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCVVs10__CocoaSet5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58f88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108971530). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCVs10__CocoaSet8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fab28) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089715e8). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs15__RawSetStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9810) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961388). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs19__EmptySetSingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f98c8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961460). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs18_StringBreadcrumbs is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fac30) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089716f0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs21__SwiftNativeNSString is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9a20) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961658). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs15__StringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9a88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089616e0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs21__SharedStringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9b08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961780). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs41__SwiftNativeNSArrayWithContiguousStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9b98) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961a60). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs20_SwiftNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9c08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961d38). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs22__SwiftDeferredNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9c80) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961dd0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs28__ContiguousArrayStorageBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9d08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108961e90). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs15__VaListBuilder is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fadc0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108971880). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs18__stdlib_AtomicInt is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf59040) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108971930). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNSErrorLayoutStandin is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9dc0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089632f0). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSError is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9de8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963318). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs12_SwiftObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9e38) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963368). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftValue is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9eb0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089633e0). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNull is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4ba50) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963430). One of the two will be used. Which one is undefined.
objc[2629]: Class SwiftNativeNSObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4ba78) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963458). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9ed8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089634a8). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSMutableArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9f28) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089634f8). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSDictionaryBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9f78) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963548). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSSetBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9fc8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963598). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSStringBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa018) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x1089635e8). One of the two will be used. Which one is undefined.
objc[2629]: Class __SwiftNativeNSEnumeratorBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa068) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x108963638). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs25CheckedContinuationCanary is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1d88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x106d811a0). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs17DispatchQueueShim is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1e18) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x106d81230). One of the two will be used. Which one is undefined.
objc[2629]: Class _TtCs9MainActor is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1eb0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x106d812c8). One of the two will be used. Which one is undefined.
 One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs27_KeyedDecodingContainerBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa6d0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609bef0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs19__EmptyArrayStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9170) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608b8d8). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCVVs17__CocoaDictionary5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58da0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c100). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCVs17__CocoaDictionary8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58e58) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c1b8). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs22__RawDictionaryStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9378) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608bb68). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs26__EmptyDictionarySingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9438) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608bc48). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs24__SwiftEmptyNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a188) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608bec0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs11_AnyKeyPath is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2faa00) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c3e0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs20__SwiftNativeNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f95b0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608bf30). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs26_SwiftNativeNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9618) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608bf98). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs25__SwiftNativeNSDictionary is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9680) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c020). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs18__SwiftNativeNSSet is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f96f0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c0b0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs25__SwiftNativeNSEnumerator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a1f8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c140). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs32__stdlib_ReturnAutoreleasedDummy is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4a268) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c1e8). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCVVs10__CocoaSet5Index7Storage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf58f88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c530). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCVs10__CocoaSet8Iterator is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fab28) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c5e8). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs15__RawSetStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9810) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c388). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs19__EmptySetSingleton is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f98c8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c460). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs18_StringBreadcrumbs is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fac30) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c6f0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs21__SwiftNativeNSString is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9a20) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c658). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs15__StringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9a88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c6e0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs21__SharedStringStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9b08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608c780). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs41__SwiftNativeNSArrayWithContiguousStorage is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9b98) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608ca60). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs20_SwiftNSMutableArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9c08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608cd38). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs22__SwiftDeferredNSArray is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9c80) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608cdd0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs28__ContiguousArrayStorageBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9d08) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608ce90). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs15__VaListBuilder is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fadc0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c880). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs18__stdlib_AtomicInt is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf59040) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10609c930). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNSErrorLayoutStandin is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9dc0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e2f0). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSError is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9de8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e318). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs12_SwiftObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9e38) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e368). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftValue is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9eb0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e3e0). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNull is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4ba50) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e430). One of the two will be used. Which one is undefined.
objc[12974]: Class SwiftNativeNSObject is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84cf4ba78) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e458). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9ed8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e4a8). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSMutableArrayBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9f28) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e4f8). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSDictionaryBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9f78) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e548). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSSetBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2f9fc8) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e598). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSStringBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa018) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e5e8). One of the two will be used. Which one is undefined.
objc[12974]: Class __SwiftNativeNSEnumeratorBase is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7ff84c2fa068) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib (0x10608e638). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs25CheckedContinuationCanary is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1d88) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x104c021a0). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs17DispatchQueueShim is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1e18) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x104c02230). One of the two will be used. Which one is undefined.
objc[12974]: Class _TtCs9MainActor is implemented in both /usr/lib/swift/libswift_Concurrency.dylib (0x7ffb4d8a1eb0) and /Users/dylansturg/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2022-05-04-a.xctoolchain/usr/lib/swift/macosx/libswift_Concurrency.dylib (0x104c022c8). One of the two will be used. Which one is undefined.
Segmentation fault: 11

yea odd, it must be some search path that exists on your machines but no on mine

interesting to see what @shahmishal sees on the CI & smoke tests that should catch this

I see the same error messages when trying to use the open-source toolchain in CLion on macOS.

I'm running into the same issue, building main branches from scratch. Some more info:

I'm using Xcode 13 beta 4 as recommended
macOS version 12.3.1
I tried compiling with both --use-os-runtime and without
Removing the copy of the libraries in the .xctoolchain path (expectedly) fixes the issue

Other than that the build machine is very vanilla. There are a small number of homebrew packages installed, several versions of Xcode (13.3, 13.3.1), and that is basically it.

Yep, swift-5.7-DEVELOPMENT-SNAPSHOT-2022-05-10-a seems to work for me.

Also verified that swift-5.7-DEVELOPMENT-SNAPSHOT-2022-05-10-a works for me.

swift-5.7-DEVELOPMENT-SNAPSHOT-2022-05-10-a works also for me.

Any updates on this? Any ETA on the proper fix in main? We can't build swift-format at head right now because of this issue (using the 5.7 snapshot doesn't work because of version incompatibilities).

As #5703 was merged, does that mean this issue is resolved and can be closed?

I believe so, yes.