expr_tracker 0.1.1__tar.gz → 0.1.2__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.
@@ -10,3 +10,4 @@ wandb/
10
10
  .env
11
11
  # Virtual environments
12
12
  .venv
13
+ test.ipynb
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: expr_tracker
3
+ Version: 0.1.2
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,14 @@ dependencies = [
11
10
  "slark>=0.1.28",
12
11
  "wandb>=0.21.0",
13
12
  ]
13
+ dynamic = ["version"]
14
+
15
+ [dependency-groups]
16
+ dev = ["ipykernel>=6.30.1"]
14
17
 
15
18
  [build-system]
16
- requires = ["hatchling"]
19
+ requires = ["hatchling", "uv-dynamic-versioning"]
17
20
  build-backend = "hatchling.build"
18
21
 
19
- [dependency-groups]
20
- dev = ["ipykernel>=6.30.1"]
22
+ [tool.hatch.version]
23
+ 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,
@@ -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
File without changes
File without changes