You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -77,20 +78,32 @@ MMLU Branch is an adaptation of MMLU that is designed to test custom knowledge t
77
78
78
79
A teacher model is used to generate new multiple choice questions based on the knowledge document included in the taxonomy Git branch. A “task” is then constructed that references the newly generated answer choices. These tasks are then used to score the model’s grasp on new knowledge the same way MMLU works. Generation of these tasks are done as part of the [InstructLab SDG](https://github.com/instructlab/sdg) library.
79
80
80
-
## MT-Bench / MT-Bench Branch Testing Steps
81
+
## Development
81
82
82
83
> **⚠️ Note:** Must use Python version 3.10 or later.
83
84
85
+
### Set up your dev environment
86
+
87
+
The following tools are required:
88
+
89
+
-[`git`](https://git-scm.com)
90
+
-[`python`](https://www.python.org) (v3.10 or v3.11)
91
+
-[`pip`](https://pypi.org/project/pip/) (v23.0+)
92
+
-[`bash`](https://www.gnu.org/software/bash/) (v5+, for functional tests)
93
+
94
+
#### Optional: Use [cloud-instance.sh](https://github.com/instructlab/instructlab/tree/main/scripts/infra) to launch and setup an instance
95
+
84
96
```shell
85
-
# Optional: Use cloud-instance.sh (https://github.com/instructlab/instructlab/tree/main/scripts/infra) to launch and setup the instance
Before pushing changes to GitHub, you need to run the tests as shown below. They can be run individually as shown in each sub-section
120
+
or can be run with the one command:
121
+
122
+
```shell
123
+
tox
124
+
```
125
+
126
+
#### Unit tests
127
+
128
+
Unit tests are enforced by the CI system using [`pytest`](https://docs.pytest.org/). When making changes, run these tests before pushing the changes to avoid CI issues.
129
+
130
+
Running unit tests can be done with:
131
+
132
+
```shell
133
+
tox -e py3-unit
134
+
```
135
+
136
+
By default, all tests found within the `tests` directory are run. However, specific unit tests can run by passing filenames, classes and/or methods to `pytest` using tox positional arguments. The following example invokes a single test method `test_mt_bench` that is declared in the `tests/test_mt_bench.py` file:
Functional tests are enforced by the CI system. When making changes, run the tests before pushing the changes to avoid CI issues.
145
+
146
+
Running functional tests can be done with:
147
+
148
+
```shell
149
+
tox -e py3-functional
150
+
```
151
+
152
+
#### Coding style
153
+
154
+
Cli follows the python [`pep8`](https://peps.python.org/pep-0008/) coding style. The coding style is enforced by the CI system, and your PR will fail until the style has been applied correctly.
155
+
156
+
We use [pre-commit](https://pre-commit.com/) to enforce coding style using [`black`](https://github.com/psf/black), and [`isort`](https://pycqa.github.io/isort/).
157
+
158
+
You can invoke formatting with:
159
+
160
+
```shell
161
+
tox -e ruff
162
+
```
163
+
164
+
In addition, we use [`pylint`](https://www.pylint.org) to perform static code analysis of the code.
165
+
166
+
You can invoke the linting with the following command
0 commit comments