traice


Nametraice JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/zeionara/traice
SummaryTiny yet useful tool for consistent model training logs generation
upload_time2022-12-19 20:17:59
maintainer
docs_urlNone
authorZeio Nara
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # traice

Tiny yet useful tool for consistent model training logs generation.

# Installation

To install through pip use the following command:

```sh
pip install traice
```

The tool requires only `pandas` package to be installed. However, there is `environment.yml` file which can be used for the same environment which is used for developing the tool:

```sh
conda env create -f environment.yml
```

# Usage

The tool may be used as follows (see `examples/dummy.py`):

```py
from random import seed, uniform
from time import time, sleep

from traice import Traicer

traicer = Traicer()


def train_step():
    sleep(uniform(0, 1))


seed(17)

init_timestamp = time()

for i in range(1, 5):
    start_timestamp = time()
    train_step()
    traicer.push(i, uniform(0, 1 / i), (time_ := time()) - start_timestamp, time_ - init_timestamp)

print(traicer.df)
```

Essentially, it accumulates all `push` arguments in a list which is then converted to a dataframe. The example produces the following log (the last two columns may differ a bit):

```sh
   epoch      loss      time  cumulative_time
0      1  0.806691  0.522609         0.522609
1      2  0.144813  0.961565         1.484184
2      3  0.234740  0.767061         2.251254
3      4  0.027541  0.661659         2.912921
```

# Testing

To run test execute the following statement in your terminal:

```sh
python -m unittest discover test
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zeionara/traice",
    "name": "traice",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Zeio Nara",
    "author_email": "zeionara@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1d/cb/c4a2a28634360e34a6bd1098841d5fcac2149d4c0874e3a8d9f14051c6c4/traice-0.2.0.tar.gz",
    "platform": null,
    "description": "# traice\n\nTiny yet useful tool for consistent model training logs generation.\n\n# Installation\n\nTo install through pip use the following command:\n\n```sh\npip install traice\n```\n\nThe tool requires only `pandas` package to be installed. However, there is `environment.yml` file which can be used for the same environment which is used for developing the tool:\n\n```sh\nconda env create -f environment.yml\n```\n\n# Usage\n\nThe tool may be used as follows (see `examples/dummy.py`):\n\n```py\nfrom random import seed, uniform\nfrom time import time, sleep\n\nfrom traice import Traicer\n\ntraicer = Traicer()\n\n\ndef train_step():\n    sleep(uniform(0, 1))\n\n\nseed(17)\n\ninit_timestamp = time()\n\nfor i in range(1, 5):\n    start_timestamp = time()\n    train_step()\n    traicer.push(i, uniform(0, 1 / i), (time_ := time()) - start_timestamp, time_ - init_timestamp)\n\nprint(traicer.df)\n```\n\nEssentially, it accumulates all `push` arguments in a list which is then converted to a dataframe. The example produces the following log (the last two columns may differ a bit):\n\n```sh\n   epoch      loss      time  cumulative_time\n0      1  0.806691  0.522609         0.522609\n1      2  0.144813  0.961565         1.484184\n2      3  0.234740  0.767061         2.251254\n3      4  0.027541  0.661659         2.912921\n```\n\n# Testing\n\nTo run test execute the following statement in your terminal:\n\n```sh\npython -m unittest discover test\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Tiny yet useful tool for consistent model training logs generation",
    "version": "0.2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "a7e712825e1bb182725e12a8255df5d1",
                "sha256": "239e0773dc5c88e36a178aac9a712949427a44780a6269530157395b5b6ed7eb"
            },
            "downloads": -1,
            "filename": "traice-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a7e712825e1bb182725e12a8255df5d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6356,
            "upload_time": "2022-12-19T20:17:59",
            "upload_time_iso_8601": "2022-12-19T20:17:59.938714Z",
            "url": "https://files.pythonhosted.org/packages/1d/cb/c4a2a28634360e34a6bd1098841d5fcac2149d4c0874e3a8d9f14051c6c4/traice-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-19 20:17:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zeionara",
    "github_project": "traice",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "traice"
}
        
Elapsed time: 0.06143s