fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Leaked Semaphore when applying fairseq train using Alignments and the criterion is label_smoothed_cross_entropy ?

Open muhammed-saeed opened this issue 1 year ago • 0 comments

resource_tracker: There appear to be 8 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d

LABEL_CROSS_ENTROPY=label_smoothed_cross_entropy_with_alignment

CUDA_LAUNCH_BLOCKING=1 CUDA_VISIBLE_DEVICES=1,3

fairseq-train "/home/CE/musaeed/alignments_directory/binaraized_moses_bpe_vocab_bpe_en_pcm.tokenized.en-pcm"
--arch transformer
--dropout $DROPOUT
--attention-dropout 0 --encoder-embed-dim $EMBEDDING_SIZE
--encoder-ffn-embed-dim $ENC_FFNN
--encoder-layers $ENCODER_LAYERS
--encoder-attention-heads $ENCODER_ATTENTION_HEADS
--encoder-learned-pos
--decoder-embed-dim $EMBEDDING_SIZE
--decoder-ffn-embed-dim $DEC_FFNN
--decoder-layers $DECODER_LAYERS
--decoder-attention-heads $DECODER_ATTENTION_HEADS
--decoder-learned-pos
--max-epoch $EPOCH
--optimizer adam
--lr 5e-4
--batch-size $BATCH_SIZE
--seed 1 --encoder-layerdrop $ENCODER_LAYER_DROPOUT --decoder-layerdrop $DECODER_LAYER_DROPOUT
--criterion $LABEL_CROSS_ENTROPY --warmup-updates $WARMUP_UPDATES
--source-lang $SOURCE_LANGUAGE --label-smoothing $LABEL_SMOOTHING
--lr-scheduler $lEARNING_POLICY --save-dir $SAVE_DIR
--find-unused-parameters
--target-lang $TARGET_LANGUAGE
--activation-dropout $ACTIVATION_DROPOUT --fp16
--ddp-backend=no_c10d --share-all-embeddings --load-alignments --distributed-no-spawn`

What have you tried?

Changing the criterion into label_smoothed_cross_entropy, solved the issue but I am not sure whether or not this is the ideal criterion method to train the model using the alignments. I have tried both conda environments with Python 3.9 and 3.7 but still encounter the same error

What's your environment?

muhammed-saeed avatar Aug 17 '22 00:08 muhammed-saeed