Metadata-Version: 2.1
Name: torchminer
Version: 0.4.12
Summary: Run Torch With A Simple Miner
Author: InEase
Author-email: inease28@gmail.com
Requires-Python: >=3.7.1,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Pillow (>=8.4.0,<9.0.0)
Requires-Dist: google-api-python-client (>=2.31.0,<3.0.0)
Requires-Dist: ipython (>=7.18.0,<8.0.0)
Requires-Dist: matplotlib (>=3.5.0,<4.0.0)
Requires-Dist: pandas (>=1.3.4,<2.0.0)
Requires-Dist: pylint (>=2.12.1,<3.0.0)
Requires-Dist: seaborn (>=0.11.2,<0.12.0)
Requires-Dist: sklearn (>=0.0,<0.1)
Requires-Dist: tensorboardX (>=2.4.1,<3.0.0)
Requires-Dist: torch (>=1.8.0,<2.0.0)
Requires-Dist: tqdm (>=4.50.0,<5.0.0)
Description-Content-Type: text/markdown

Published on [pypi](https://pypi.org/project/torchminer/)

Packaged Using [Poetry](https://python-poetry.org/)

# Description

TorchMiner is designed to automatic process the training ,evaluating and testing process for PyTorch DeepLearning,with a
simple API.

You can access all Functions of MineTorch simply use `Miner`.

## Quick Start

```python
import TorchMiner
from TorchMiner import Miner
from TorchMiner.plugins.Logger.Jupyter import JupyterLogger, JupyterTqdm
from TorchMiner.plugins.Metrics import MultiClassesClassificationMetric
from TorchMiner.plugins.Recorder import TensorboardDrawer

miner = Miner(
    alchemy_directory='/the/route/to/log', 
    train_dataloader=train_dataloader, 
    val_dataloader=val_dataloader,  

    model=model, 
    loss_func=MSELoss,  
    optimizer=optimizer,  
    # or, by passing a function to optimizer, TorchMiner can auto cuda the params of optimizer
    # optimizer=lambda x: optim.SGD(x.parameters(), lr=0.01)，
    experiment="the-name-of-experiment",  # Subdistribution in the experimental directory
    resume=True,  # Whether to automatically load the previous model
    eval_epoch=1,  # How many rounds are evaluated
    persist_epoch=2,  # How many rounds are saved once a checkpoint
    accumulated_iter=1,  # How many times iterates the parameter update after accumulation
    in_notebook=True,
    amp=True,  # Whether to use amp
    plugins=[
        # Use the plugins to extend the function of miner
        JupyterLogger(),
        JupyterTqdm(),
        # or, you can use the below one to auto enable the above two
        # *JupyterEnvironmentAutoEnable(),
        # The two above plugins are designed to get better output in Jupyter Enviroment
        MultiClassesClassificationMetric(),
        # This Plugin can automaticly calculate Accuracy, kappa score and Confusion Matrix in Classification problems.
        TensorboardDrawer(input_to_model),
        # This Plugin can record the informations generate by training process or by other plugins in Tensorboard.
    ],
)

# And then, trigger the training process by
miner.train()
