https://github.com/codekie/snow_report_mapper
https://github.com/codekie/snow_report_mapper
rust
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/codekie/snow_report_mapper
- Owner: codekie
- Created: 2022-08-03T11:26:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-04T14:12:12.000Z (almost 4 years ago)
- Last Synced: 2025-02-02T14:35:07.571Z (over 1 year ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ServiceNow report mapper
This crate creates a OpenAI fine-tuning file to enable the model to categorize ServiceNow incidents into assignment
groups.
# Usage
```
USAGE:
snow_report_mapper [OPTIONS]
ARGS:
Filepath to the SNOW incidents export
Filepath to the SNOW export of the assignment groups
Filepath where the mapped training file should be stored to
OPTIONS:
-h, --help Print help information
-s, --stats Prints additional statistics
-v, --verbose Verbose output
-V, --version Print version information
```
To get this help, run:
```bash
$ snow_report_mapper --help
```
For more details, check the rust documentation of this crate.
# Fine tune the model
Check the [official docs](https://beta.openai.com/docs/guides/fine-tuning) on how to fine-tune the model.
Before the generated files can be used, they have to be mapped to the `JSONL` format. For that it's recommended to use
the official [utility tools](https://beta.openai.com/docs/guides/fine-tuning/cli-data-preparation-tool):
```bash
$ openai tools fine_tunes.prepare_data -f
```
It also shows suggestions if there are any and provides you with the proper command, to actual fine tune the model, in
the end.
## Troubleshooting
If you encounter an error message like:
```
The number of classes in file-7zfLf0xUhfTomlH7XPs5OGUL does not match the number of classes specified in the
hyperparameters
```
After triggering the fine tuning job, you can omit the parameters `--compute_classification_metrics` and
`--classification_n_classes` (additionally to its numeric value). You will lose the
[Classification specific metrics](https://beta.openai.com/docs/guides/fine-tuning/classification-specific-metrics)
but at least it works then.
# Motivation
The main reasons why I've built this, is to learn Rust and to get a bit more familiar with OpenAI. As a
"starter project" I've decided to train a model so that it's able to determine an appropriate assignment group for a
ServiceNow incident, based on the incident title. In order to that, I need training data in the appropriate format.