A package containing the logger demo for Software Hut using Hugging Face 🤗 Transformers Trainer.
Project description
Software Hut Logger
A package containing the logger demo for Software Hut using Hugging Face 🤗 Transformers Trainer.
Important Notes:
- If you find anything is broken or confusing, please open an issue so that all teams can benefit from any explanations and fixes.
- This module was developed on linux and is untested on Windows. I would recommend using WSL2 if you don't have a linux machine available but Windows might work. I won't be able to support Windows specific issues.
- You won't need to run the training script but if you really want to, linux/WSL2 and CUDA>=12.1 on an NVIDIA GPU are required.
Index
- Installation & Setup: Instructions for setting up the environment.
- Usage: How to use the software after installation.
- Commands: List of available commands and their descriptions.
- Metadata File Contents: Details about the contents of the metadata file.
TODO
- Finish documentation
- Add system monitoring
1. Installation & Setup
# Create a virtual environment
python3 -m venv shl-demo-venv
source shl-demo-venv/bin/activate
pip install software-hut-logger
NOTE: If you want to edit the code or rerun the training script for any reason, let me know and I'll add instructions.
2. Usage
If installed correctly, the package should be available as a command-line tool.
# Both commands are equivalent
shl <command> [ --project-name <project-name> ] [ --experiment-name <experiment-name> ] [ --run-name <run-name> ] [...command-specific-options]
software-hut-logger <command> [ --project-name <project-name> ] [ --experiment-name <experiment-name> ] [ --run-name <run-name> ] [...command-specific-options]
NOTE: Anywhere that "-" is used in an argument name, "_" is also valid.
EXPAND: What the hell is this command description syntax?
Backus-Naur-Form-style (BNF-style) command description syntax
| Command | Description |
|---|---|
<command> |
Required argument |
[ --optional-args ] |
Optional arguments |
| |
Logical OR (mutually exclusive) |
Examples:
# argument1 is required
<argument1>
# One of argument1 or argument2 must be specified
<argument1 | argument2>
# argument1 is optional
[argument1]
# argument1 is required and argument2 is optional
<argument2> [argument1]
# If argument1 is specified, then argument2 is required
[argument1 <argument2>]
2.1 Commands
There are three commands you can use but only two that you'll probably need to use.
2.1.1 start-server
Starts a mock endpoint for you to explore uploading runs to. It is currently implemented with an API key -- if you chose to implement authentication in a different way, let me know and I'll add support for that.
shl server <start [--upload-url <upload-url>] [--upload-port <upload-port>] [-q | --quiet] [--api-key <api-key>] [--workers <num-workers>] | stop [--pid-file <pid-file>]>
Minimal Example:
# Starts the demo-server at http://0.0.0.0:8000
shl server start
# Stops the demo-server -- only needed if you started the server with the `-q` flag
shl server stop
EXPAND: Argument Descriptions
| Argument | Description | Default |
| --start | Starts the demo-server. | false |
| --stop | Stop the demo-server. | false |
| --upload-url | URL or IP address of receiving server | 0.0.0.0 |
| --upload-port | Port number of receiving server | 8000 |
| -q | --quiet | Launch server in background and exit | false |
| --workers | Number of worker processes | 1 |
| --pid-file | File to store the process ID | uvicorn.pid |
| --api-key | API key for authentication | super-secret-api-key |
2.1.2 upload-run
Uploads a log file to the specified endpoint.
shl upload-run [--run-dir <run-dir>] [--api-key <api-key>] [--upload-url <upload-url>] [--upload-port <upload-port>]
Minimal Example:
# Uploads example_log to the demo-server at http://0.0.0.0:8000
shl upload-run
EXPAND: Argument Descriptions
| Argument | Description | Default |
| --run-dir | Path to run directory | example_log |
| --api-key | API key for authentication | super-secret-api-key |
| --upload-url | URL or IP address of receiving server | 0.0.0.0 |
| --upload-port | Port number of receiving server | 8000 |
2.1.3 build-dataset-example
Builds an example dataset from the English-German portion of the WMT14 dataset. By default, a jsonl that is 1.44GB will be created. If you want something smaller to work with, you can specify a number of samples to save (try ~1000-10,000).
shl build-dataset-example [--save-dir <save-dir>] [--num-samples <num-samples>]
Minimal Example:
shl build-dataset-example
EXPAND: Argument Descriptions
| Argument | Description | Default |
| --save-dir | Path to save the example dataset | example_dataset |
| --num-samples | Number of samples to save | -1 |
2.1.4 train
🚧 I'll add details here if you find you need to run the training script. 🚧
3. Metadata File Contents
The metadata file contains all of the information about the run.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file software_hut_logger-0.2.2.tar.gz.
File metadata
- Download URL: software_hut_logger-0.2.2.tar.gz
- Upload date:
- Size: 176.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c8bfd0f707c7c9d3b556db54d2effbf12ce3c543e1645f3fac32a0288a867f
|
|
| MD5 |
51f70c9f524f0a06c4f07a87be1687b5
|
|
| BLAKE2b-256 |
7e6dffb70c9a9702202c3166a6f7beb5d4522019e5092342dca09c01ee402107
|
File details
Details for the file software_hut_logger-0.2.2-py3-none-any.whl.
File metadata
- Download URL: software_hut_logger-0.2.2-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
202d561710a30834a077cf1b31c5a1da660a1438f90dae12c046973fafc8e622
|
|
| MD5 |
0c2d21c690b90754c2ecea99e93c2ed9
|
|
| BLAKE2b-256 |
f15e18459462ab926dd128cf7792cdfbe5b1fcb3cb8f992cb61682c3b891dd5e
|