From fa30dbe54d6853a5dfb7d8afba1d4fd3589e1fa6 Mon Sep 17 00:00:00 2001 From: Bagus Tris Atmaja Date: Thu, 18 Apr 2024 18:44:42 +0900 Subject: [PATCH] update docs --- docs/source/index.rst | 5 +++++ nkululeko/demo.py | 16 ++++++++-------- nkululeko/predict.py | 13 +++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index c2183446..f4100ef1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -61,6 +61,11 @@ The examples only covers some important features of Nkululeko. For more details, nkululeko.utils.rst +.. automodule:: nkululeko + :members: + :undoc-members: + :show-inheritance: + Indices and tables ================== diff --git a/nkululeko/demo.py b/nkululeko/demo.py index 02fa94a9..eda595e3 100644 --- a/nkululeko/demo.py +++ b/nkululeko/demo.py @@ -6,15 +6,15 @@ This script is used to test the loading of a previously trained model and run it in demo mode. It requires the project config file to be run before. -Usage: -python -m nkululeko.demo [--config CONFIG] [--file FILE] [--list LIST] [--folder FOLDER] [--outfile OUTFILE] +Usage: +python -m nkululeko.demo [--config CONFIG] [--file FILE] [--list LIST] [--folder FOLDER] [--outfile OUTFILE] -Options: ---config CONFIG The base configuration file (default: exp.ini) ---file FILE A file that should be processed (16kHz mono wav) ---list LIST A file with a list of files, one per line, that should be processed (16kHz mono wav) ---folder FOLDER A name of a folder where the files within the list are in (default: ./) ---outfile OUTFILE A filename to store the results in CSV +Options: \n +--config CONFIG The base configuration file (default: exp.ini) \n +--file FILE A file that should be processed (16kHz mono wav) \n +--list LIST A file with a list of files, one per line, that should be processed (16kHz mono wav) \n +--folder FOLDER A name of a folder where the files within the list are in (default: ./) \n +--outfile OUTFILE A filename to store the results in CSV (default: None) """ import argparse import configparser diff --git a/nkululeko/predict.py b/nkululeko/predict.py index dea29201..7d830de5 100644 --- a/nkululeko/predict.py +++ b/nkululeko/predict.py @@ -2,6 +2,19 @@ # use some model and add automatically predicted labels to train and test splits # then save as a new dataset +"""This script is used to call the nkululeko PREDICT framework. + +It loads a configuration file, creates a new experiment, +and performs automatic prediction on the train and test datasets. The predicted labels are added to the datasets and +saved as a new dataset. + +Usage: \n + python3 -m nkululeko.predict [--config CONFIG_FILE] \n + +Arguments: \n + --config (str): The path to the base configuration file (default: exp.ini) +""" + import argparse import configparser import os