Skip to content

TypeError: '>' not supported between instances of 'str' and 'int' #1

@clarkenj

Description

@clarkenj

Bonjour, merci pour l'excellent travail! Quand j'utilise lingualab/speechmetryflow il y a une erreur pour ~25 sujets, avec Text2Variable. Je pense il y a une probleme avec un type de total_noms ou total_pronoms?

ERROR ~ Error executing process > 'Text_Metrics (119)'

Caused by:
  Process `Text_Metrics (119)` terminated with an error exit status (1)


Command executed:

  text2variable --pid sub-UGM2462 -d . -l en /data/brambati/dataset/CCNA/derivatives/cookie_txt/results/sub-UGM2462/sub-UGM2462_task-cookie_transcript-www_speaker-participant.txt lg

Command exit status:
  1

Command output:
  Modèles chargés avec succès :
  - Nom personnalisé : english_lg, Modèle : en_core_web_lg

Command error:
  You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
  /usr/local/lib/python3.12/site-packages/transformers/models/auto/modeling_auto.py:1731: FutureWarning: The class `AutoModelWithLMHead` is deprecated and will be removed in a future version. Please use `AutoModelForCausalLM` for causal language models, `AutoModelForMaskedLM` for masked language models and `AutoModelForSeq2SeqLM` for encoder-decoder models.
    warnings.warn(
  Traceback (most recent call last):
    File "/usr/local/bin/text2variable", line 8, in <module>
  Modèles chargés avec succès :
  - Nom personnalisé : english_lg, Modèle : en_core_web_lg
      sys.exit(main())
               ^^^^^^
    File "/usr/local/lib/python3.12/site-packages/lingua_extraction/main.py", line 184, in main
      ratios = calculer_ratios(total_verbes, total_noms, total_pronoms, nombre_verbe_inflexion, mot_ouvert, mot_ferme, nombre_gerondif, total_des_mots)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/lingua_extraction/Caracteristiques_lexicales.py", line 143, in calculer_ratios
      'Pronoms/(Noms+Pronoms)': total_pronoms / (total_noms + total_pronoms) if (total_noms + total_pronoms) > 0 else 'N/A',
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  TypeError: '>' not supported between instances of 'str' and 'int'

Work dir:
  /data/brambati/nclarke/work/3b/ad2184d5ece082183519028cb9b3fe

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions