Skip to content

Commit 2019e61

Browse files
committed
docs: update contributing.rst
- Remove entry for `skll/__init__.py` since it's now blank. - Update entry for `skll/metrics.py` since it now does more. - Fix all of the link anchors to point to the correct line numbers.
1 parent 1df4e9d commit 2019e61

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

doc/contributing.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ Organization
2323

2424
The main Python code for the SKLL package lives inside the ``skll`` sub-directory of the repository. It contains the following files and sub-directories:
2525

26-
- `__init__.py <https://github.com/EducationalTestingService/skll/blob/main/skll/__init__.py>`__ : Code used to initialize the ``skll`` Python package.
27-
2826
- `config/ <https://github.com/EducationalTestingService/skll/tree/main/skll/config>`__ : Code to parse SKLL experiment configuration files.
2927

3028
- `experiments/ <https://github.com/EducationalTestingService/skll/tree/main/skll/experiments>`__ : Code that is related to creating and running SKLL experiments. It also contains code that collects the various evaluation metrics and predictions for each SKLL experiment and writes them out to disk.
3129

3230
- `learner/ <https://github.com/EducationalTestingService/skll/tree/main/skll/learner>`__ : Code for the `Learner <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py>`__ and `VotingLearner <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py>`__ classes. The former is instantiated for all learner names specified in the experiment configuration file *except* ``VotingClassifier`` and ``VotingRegressor`` for which the latter is instantiated instead.
3331

34-
- `metrics.py <https://github.com/EducationalTestingService/skll/blob/main/skll/metrics.py>`__ : Code for any custom metrics that are not in ``sklearn.metrics``, e.g., ``kappa``, ``kendall_tau``, ``spearman``, etc.
32+
- `metrics.py <https://github.com/EducationalTestingService/skll/blob/main/skll/metrics.py>`__ : Code for any custom metrics that are not in ``sklearn.metrics``, e.g., ``kappa``, ``kendall_tau``, ``spearman``, etc. This module also contains the code that powers :ref:`user-defined custom metrics <custom_metrics>`.
3533

3634
- `data/ <https://github.com/EducationalTestingService/skll/tree/main/skll/data>`__
3735

@@ -80,12 +78,12 @@ There are three main entry points into the SKLL codebase:
8078
`run_experiment <https://skll.readthedocs.io/en/latest/run_experiment.html#using-run-experiment>`__ script. When you run the command
8179
``run_experiment <config_file>``, the following happens (at a high level):
8280

83-
- the configuration file is handed off to the `run_configuration() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L482>`__ function in ``experiments.py``.
81+
- the configuration file is handed off to the `run_configuration() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L609>`__ function in ``experiments.py``.
8482

85-
- a `SKLLConfigParser <https://github.com/EducationalTestingService/skll/blob/main/skll/config/__init__.py#L41>`__ object is instantiated from ``config.py`` that parses all of the relevant fields out of the given configuration file.
83+
- a `SKLLConfigParser <https://github.com/EducationalTestingService/skll/blob/main/skll/config/__init__.py#L44>`__ object is instantiated from ``config.py`` that parses all of the relevant fields out of the given configuration file.
8684

87-
- the configuration fields are then passed to the `_classify_featureset() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L56>`__ function in ``experiments.py`` which instantiates the learners (using code from ``learner.py``), the featuresets (using code from ``reader.py`` & ``featureset.py``), and runs the experiments, collects the results, and writes them out to disk.
85+
- the configuration fields are then passed to the `_classify_featureset() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L64>`__ function in ``experiments.py`` which instantiates the learners (using code from ``learner.py``), the featuresets (using code from ``reader.py`` & ``featureset.py``), and runs the experiments, collects the results, and writes them out to disk.
8886

89-
2. **SKLL API**. Another way to interact with SKLL is via the SKLL API directly in your Python code rather than using configuration files. For example, you could use the `Learner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py#L324>`__ or `VotingLearner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py#L254>`__ methods to load saved models of those types from disk and make predictions on new data. The documentation for the SKLL API can be found `here <https://skll.readthedocs.io/en/latest/api.html>`__.
87+
2. **SKLL API**. Another way to interact with SKLL is via the SKLL API directly in your Python code rather than using configuration files. For example, you could use the `Learner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py#L384>`__ or `VotingLearner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py#L243>`__ methods to load saved models of those types from disk and make predictions on new data. The documentation for the SKLL API can be found `here <https://skll.readthedocs.io/en/latest/api.html>`__.
9088

9189
3. **Utility scripts**. The scripts listed in the section above under ``utils`` are also entry points into the SKLL code. These scripts are convenient wrappers that use the SKLL API for commonly used tasks, e.g., generating predictions on new data from an already trained model.

0 commit comments

Comments
 (0)