NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
195 stars 41 forks source link

Improve outputs of project inspection CLI commands #694

Closed juhoinkinen closed 1 year ago

juhoinkinen commented 1 year ago

An example output of list-projects:

Project ID                Project Name                   Vocabulary ID  Language  Trained  Modification time  
--------------------------------------------------------------------------------------------------------------
tfidf-fi                  TF-IDF Finnish                 yso            fi        True     2023-04-21 10:28:37
tfidf-sv                  TF-IDF Swedish                 yso            sv        True     2023-04-21 10:30:17
tfidf-en                  TF-IDF English                 yso            en        True     2023-04-21 10:30:45
fasttext-fi               fastText Finnish               yso            fi        True     2023-04-21 10:33:16
fasttext-sv               fastText Swedish               yso            sv        True     2023-04-21 10:32:25
fasttext-en               fastText English               yso            en        True     2023-04-21 10:31:28
omikuji-parabel-fi        Omikuji Parabel Finnish        yso            fi        True     2023-04-21 10:35:14
omikuji-parabel-sv        Omikuji Parabel Swedish        yso            sv        True     2023-04-21 10:32:12
omikuji-parabel-en        Omikuji Parabel English        yso            en        True     2023-04-21 10:31:47
mllm-fi                   YSO MLLM Finnish               yso            fi        False    -                  
mllm-en                   YSO MLLM English               yso            en        False    -                  
mllm-sv                   YSO MLLM Swedish               yso            sv        False    -                  
yake-fi                   YAKE Finnish                   yso            fi        True     2023-04-21 10:23:56
ensemble-fi               Ensemble Finnish               yso            fi        False    2023-04-21 10:33:16
ensemble-sv               Ensemble Swedish               yso            sv        False    2023-04-21 10:32:25
ensemble-en               Ensemble English               yso            en        False    2023-04-21 10:31:28
ykl-omikuji-parabel-fi    YKL Omikuji Parabel Finnish    ykl            fi        False    -                  
thema-omikuji-parabel-fi  Thema Omikuji Parabel Finnish  thema-fi       fi        False    -                  

An example output of list-vocabs:

Vocabulary ID  Languages    Size   Loaded
-----------------------------------------
yso            en,fi,se,sv  38179  True  
ykl            -            -      False 
thema-fi       -            -      False 

An example output of show-project:

Project ID:        fasttext-fi
Project Name:      fastText Finnish
Language:          fi
Vocabulary:        yso
Vocab language:    fi
Access:            public
Backend:           fasttext
Trained:           True
Modification time: 2023-04-21 10:33:16
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (3451bd3) 99.63% compared to head (0cc9fe3) 99.63%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #694 +/- ## ======================================= Coverage 99.63% 99.63% ======================================= Files 89 89 Lines 6222 6253 +31 ======================================= + Hits 6199 6230 +31 Misses 23 23 ``` | [Impacted Files](https://codecov.io/gh/NatLibFi/Annif/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi) | Coverage Δ | | |---|---|---| | [annif/cli.py](https://codecov.io/gh/NatLibFi/Annif/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-YW5uaWYvY2xpLnB5) | `99.65% <100.00%> (+<0.01%)` | :arrow_up: | | [annif/cli\_util.py](https://codecov.io/gh/NatLibFi/Annif/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-YW5uaWYvY2xpX3V0aWwucHk=) | `98.98% <100.00%> (+0.11%)` | :arrow_up: | | [tests/test\_cli.py](https://codecov.io/gh/NatLibFi/Annif/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-dGVzdHMvdGVzdF9jbGkucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

juhoinkinen commented 1 year ago

I started to think adding also "Backend" column to the output of list-projects, but maybe that is too much detail in there. But backend could be shown by show-projects.

juhoinkinen commented 1 year ago

Yet another addition would be to dump project configuration to output of show-project.

Other possible items to be added to the show-project output have been listed in the old issue https://github.com/NatLibFi/Annif/issues/329.

juhoinkinen commented 1 year ago

Yet another addition would be to dump project configuration to output of show-project.

The output for project configuration could be like this (hiding the parameters that are already shown by the above lines):

$ annif show-project fasttext-fi 
Project ID:        fasttext-fi
Project Name:      fastText Finnish
Language:          fi
Vocabulary:        yso
Vocab language:    fi
Access:            public
Trained:           True
Modification time: 2023-04-21 10:33:16
Parameters:
  backend:         fasttext
  analyzer:        voikko(fi)
  dim:             500
  lr:              0.25
  epoch:           30
  loss:            hs
  limit:           100
  chunksize:       24
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

osma commented 1 year ago

Maybe simplest would be to merge this as it is now, then possibly work on the project configuration display in a follow-up PR?