# qdvis (Quick Data Visualizer)
This is a tool to easily visualize the logs when long time processing is required by simply starting up a local server.
## Installation
```
pip install qdvis
```
## Usage
1. Exmaple of code. Let the log be added to the writer object anywhere in the code (e.g., loop).
```python
from qdvis.writer import LogWriter
writer = LogWriter()
num_epochs = 10
for epoch in range(num_epochs):
for inputs, targets in data_loader:
outputs = model(inputs)
loss = criterion(outputs, targets)
optimizer.zero_grad()
loss.backward()
optimizer.step()
print(f"Epoch {epoch+1}/{num_epochs}, Loss: {loss.item()}")
writer.add_scalar(x_value=epoch, y_value=loss.item())
```
2. You can start a terminal and launch a local server for visualization with the `qdvis` command.
```
qdvis --logpath ./logs/log.json --port 8000
```
- --logpath: path for log file.
- --port: port of local server.
## Methods
gpu utilization can be added to the log
```
add_scaler(x_value, y_value)
```
Parameters
- x_value(float): x scaler value of 2D chart.
- y_value(float): y scaler value of 2D chart.
2D chart can be added to the log
```
add_gpu_status()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ta-ke-inf/qdvis/tree/main",
"name": "qdvis",
"maintainer": "Takeguchi",
"docs_url": null,
"requires_python": "",
"maintainer_email": "hirotake.stu@gmail.com",
"keywords": "visualization ml",
"author": "Takeguchi",
"author_email": "hirotake.stu@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ec/80/b80a5a922106e8ba91cc9634ab30f8e078431a6f7a4555f29958c34d5c3c/qdvis-0.1.2.tar.gz",
"platform": null,
"description": "# qdvis (Quick Data Visualizer)\nThis is a tool to easily visualize the logs when long time processing is required by simply starting up a local server.\n## Installation\n```\npip install qdvis\n```\n## Usage\n1. Exmaple of code. Let the log be added to the writer object anywhere in the code (e.g., loop).\n```python\nfrom qdvis.writer import LogWriter\n\nwriter = LogWriter()\n\nnum_epochs = 10\nfor epoch in range(num_epochs):\n for inputs, targets in data_loader:\n outputs = model(inputs)\n loss = criterion(outputs, targets)\n optimizer.zero_grad()\n loss.backward()\n optimizer.step()\n \n print(f\"Epoch {epoch+1}/{num_epochs}, Loss: {loss.item()}\")\n\n writer.add_scalar(x_value=epoch, y_value=loss.item())\n```\n2. You can start a terminal and launch a local server for visualization with the `qdvis` command.\n```\nqdvis --logpath ./logs/log.json --port 8000\n```\n- --logpath: path for log file.\n- --port: port of local server.\n\n\n## Methods\ngpu utilization can be added to the log\n```\nadd_scaler(x_value, y_value)\n```\nParameters\n- x_value(float): x scaler value of 2D chart.\n- y_value(float): y scaler value of 2D chart.\n\n\n\n\n2D chart can be added to the log\n```\nadd_gpu_status()\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "qdvis: Quick data visualizer.",
"version": "0.1.2",
"project_urls": {
"Download": "https://github.com/ta-ke-inf/qdvis/tree/main",
"Homepage": "https://github.com/ta-ke-inf/qdvis/tree/main"
},
"split_keywords": [
"visualization",
"ml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "643211b200e2625605fd384024acd6e7595c246262bc523b93ccb3fb95b2ee5d",
"md5": "51c09f5ca3a9c9343e0225a09523dceb",
"sha256": "3cc3af196683ab68e4f3511deff444ffaf640c4bdf20115be1d721bb50327745"
},
"downloads": -1,
"filename": "qdvis-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51c09f5ca3a9c9343e0225a09523dceb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 521806,
"upload_time": "2024-01-03T08:27:21",
"upload_time_iso_8601": "2024-01-03T08:27:21.590686Z",
"url": "https://files.pythonhosted.org/packages/64/32/11b200e2625605fd384024acd6e7595c246262bc523b93ccb3fb95b2ee5d/qdvis-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ec80b80a5a922106e8ba91cc9634ab30f8e078431a6f7a4555f29958c34d5c3c",
"md5": "d8680264872d36405ff9eb05af47e832",
"sha256": "fe334e5f0a3815fd6b0e175ac8e2586947ec961a17efe489d1459baa1298e85d"
},
"downloads": -1,
"filename": "qdvis-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d8680264872d36405ff9eb05af47e832",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 514466,
"upload_time": "2024-01-03T08:27:23",
"upload_time_iso_8601": "2024-01-03T08:27:23.465702Z",
"url": "https://files.pythonhosted.org/packages/ec/80/b80a5a922106e8ba91cc9634ab30f8e078431a6f7a4555f29958c34d5c3c/qdvis-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-03 08:27:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ta-ke-inf",
"github_project": "qdvis",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "djangorestframework",
"specs": [
[
">=",
"3.14.0"
]
]
},
{
"name": "wheel",
"specs": [
[
">=",
"0.42.0"
]
]
}
],
"lcname": "qdvis"
}