Skip to main content

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

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.

Metadata

Release files for software-hut-logger 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for software-hut-logger 0.2.2
File Size Uploaded
software_hut_logger-0.2.2.tar.gz 176.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for software-hut-logger 0.2.2
File Interpreter ABI Platform
software_hut_logger-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 189.4 kB

Release files / software_hut_logger-0.2.2.tar.gz

Download URL software_hut_logger-0.2.2.tar.gz
Size 176.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f4c8bfd0f707c7c9d3b556db54d2effbf12ce3c543e1645f3fac32a0288a867f
BLAKE2b-256 checksum
How to use checksums
7e6dffb70c9a9702202c3166a6f7beb5d4522019e5092342dca09c01ee402107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / software_hut_logger-0.2.2-py3-none-any.whl

Download URL software_hut_logger-0.2.2-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
202d561710a30834a077cf1b31c5a1da660a1438f90dae12c046973fafc8e622
BLAKE2b-256 checksum
How to use checksums
f15e18459462ab926dd128cf7792cdfbe5b1fcb3cb8f992cb61682c3b891dd5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page