expr_tracker 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/.gitignore +1 -0
- expr_tracker-0.1.3/PKG-INFO +39 -0
- expr_tracker-0.1.3/README.md +27 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/pyproject.toml +10 -4
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/src/expr_tracker/alert.py +12 -0
- expr_tracker-0.1.3/src/expr_tracker/cli.py +15 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/uv.lock +1 -2
- expr_tracker-0.1.1/PKG-INFO +0 -10
- expr_tracker-0.1.1/README.md +0 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/src/expr_tracker/__init__.py +0 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/src/expr_tracker/jsonl.py +0 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/src/expr_tracker/tracker.py +0 -0
- {expr_tracker-0.1.1 → expr_tracker-0.1.3}/tests/test_tracker.py +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: expr_tracker
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Author-email: HSPK <whxway@whu.edu.cn>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: jsonlines>=4.0.0
|
|
8
|
+
Requires-Dist: loguru>=0.7.3
|
|
9
|
+
Requires-Dist: slark>=0.1.28
|
|
10
|
+
Requires-Dist: wandb>=0.21.0
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Experiment Tracker
|
|
14
|
+
|
|
15
|
+
A simple experiment tracker that supports `wandb`, `trackio` and local `jsonl` storage. Features include:
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
1. **Multi-Backend Support**: Compatible with `wandb`, `trackio`, and local `jsonl` storage.
|
|
19
|
+
2. **Alert System**: Send alerts via Lark, with email and other platforms to be added.
|
|
20
|
+
3. **Resume Functionality**: Allows resuming experiments using project and name as unique identifiers.
|
|
21
|
+
4. **Simple API**: Provides a straightforward API similar to `wandb`, making it easy to integrate into existing workflows.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Add dependency to your project:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv add expr_tracker
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Simple usage example:
|
|
32
|
+
```python
|
|
33
|
+
import expr_tracker as et
|
|
34
|
+
|
|
35
|
+
et.init(project="my_project", name="my_experiment", backends=["wandb", "jsonl"])
|
|
36
|
+
et.log({"accuracy": 0.95, "loss": 0.05})
|
|
37
|
+
et.alert("Experiment completed!", text="Your experiment has finished successfully.", subtitle="Experiment Status")
|
|
38
|
+
et.finish()
|
|
39
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Experiment Tracker
|
|
2
|
+
|
|
3
|
+
A simple experiment tracker that supports `wandb`, `trackio` and local `jsonl` storage. Features include:
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
1. **Multi-Backend Support**: Compatible with `wandb`, `trackio`, and local `jsonl` storage.
|
|
7
|
+
2. **Alert System**: Send alerts via Lark, with email and other platforms to be added.
|
|
8
|
+
3. **Resume Functionality**: Allows resuming experiments using project and name as unique identifiers.
|
|
9
|
+
4. **Simple API**: Provides a straightforward API similar to `wandb`, making it easy to integrate into existing workflows.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Add dependency to your project:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv add expr_tracker
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Simple usage example:
|
|
20
|
+
```python
|
|
21
|
+
import expr_tracker as et
|
|
22
|
+
|
|
23
|
+
et.init(project="my_project", name="my_experiment", backends=["wandb", "jsonl"])
|
|
24
|
+
et.log({"accuracy": 0.95, "loss": 0.05})
|
|
25
|
+
et.alert("Experiment completed!", text="Your experiment has finished successfully.", subtitle="Experiment Status")
|
|
26
|
+
et.finish()
|
|
27
|
+
```
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "expr_tracker"
|
|
3
|
-
version = "0.1.1"
|
|
4
3
|
description = "Add your description here"
|
|
5
4
|
readme = "README.md"
|
|
6
5
|
authors = [{ name = "HSPK", email = "whxway@whu.edu.cn" }]
|
|
@@ -11,10 +10,17 @@ dependencies = [
|
|
|
11
10
|
"slark>=0.1.28",
|
|
12
11
|
"wandb>=0.21.0",
|
|
13
12
|
]
|
|
13
|
+
dynamic = ["version"]
|
|
14
14
|
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
build-backend = "hatchling.build"
|
|
15
|
+
[project.scripts]
|
|
16
|
+
et = "expr_tracker.cli:main"
|
|
18
17
|
|
|
19
18
|
[dependency-groups]
|
|
20
19
|
dev = ["ipykernel>=6.30.1"]
|
|
20
|
+
|
|
21
|
+
[build-system]
|
|
22
|
+
requires = ["hatchling", "uv-dynamic-versioning"]
|
|
23
|
+
build-backend = "hatchling.build"
|
|
24
|
+
|
|
25
|
+
[tool.hatch.version]
|
|
26
|
+
source = "uv-dynamic-versioning"
|
|
@@ -2,6 +2,17 @@ from typing import Literal
|
|
|
2
2
|
from loguru import logger
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
def ignore_exception(func):
|
|
6
|
+
def wrapper(*args, **kwargs):
|
|
7
|
+
try:
|
|
8
|
+
return func(*args, **kwargs)
|
|
9
|
+
except Exception as e:
|
|
10
|
+
logger.warning(f"Error occurred in {func.__name__}: {e}")
|
|
11
|
+
return None
|
|
12
|
+
|
|
13
|
+
return wrapper
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
class LarkBackend:
|
|
6
17
|
def __init__(self, **kwargs):
|
|
7
18
|
from slark import Lark
|
|
@@ -30,6 +41,7 @@ class LarkBackend:
|
|
|
30
41
|
)
|
|
31
42
|
|
|
32
43
|
|
|
44
|
+
@ignore_exception
|
|
33
45
|
def alert(
|
|
34
46
|
title: str,
|
|
35
47
|
text: str,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import expr_tracker as et
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@click.group()
|
|
6
|
+
def main():
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@main.command()
|
|
11
|
+
@click.argument("msg")
|
|
12
|
+
@click.option("--title", default="Alert", help="Title of the alert")
|
|
13
|
+
@click.option("--level", default="info", help="Level of the alert")
|
|
14
|
+
def alert(msg: str, title: str = "Alert", level: str = "info"):
|
|
15
|
+
et.alert(title=title, text=msg, level=level)
|
|
@@ -288,7 +288,6 @@ wheels = [
|
|
|
288
288
|
|
|
289
289
|
[[package]]
|
|
290
290
|
name = "expr-tracker"
|
|
291
|
-
version = "0.1.0"
|
|
292
291
|
source = { editable = "." }
|
|
293
292
|
dependencies = [
|
|
294
293
|
{ name = "jsonlines" },
|
|
@@ -306,7 +305,7 @@ dev = [
|
|
|
306
305
|
requires-dist = [
|
|
307
306
|
{ name = "jsonlines", specifier = ">=4.0.0" },
|
|
308
307
|
{ name = "loguru", specifier = ">=0.7.3" },
|
|
309
|
-
{ name = "slark", specifier = ">=0.1.
|
|
308
|
+
{ name = "slark", specifier = ">=0.1.28" },
|
|
310
309
|
{ name = "wandb", specifier = ">=0.21.0" },
|
|
311
310
|
]
|
|
312
311
|
|
expr_tracker-0.1.1/PKG-INFO
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: expr_tracker
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Add your description here
|
|
5
|
-
Author-email: HSPK <whxway@whu.edu.cn>
|
|
6
|
-
Requires-Python: >=3.10
|
|
7
|
-
Requires-Dist: jsonlines>=4.0.0
|
|
8
|
-
Requires-Dist: loguru>=0.7.3
|
|
9
|
-
Requires-Dist: slark>=0.1.28
|
|
10
|
-
Requires-Dist: wandb>=0.21.0
|
expr_tracker-0.1.1/README.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|