Skip to main content

Run Torch With A Simple Miner

Project description

Published on pypi

Packaged Using Poetry

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

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,  
    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(),
        # 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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TorchMiner-0.4.10.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

TorchMiner-0.4.10-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file TorchMiner-0.4.10.tar.gz.

File metadata

  • Download URL: TorchMiner-0.4.10.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.3 Windows/10

File hashes

Hashes for TorchMiner-0.4.10.tar.gz
Algorithm Hash digest
SHA256 607f9e56fea71e264f172cd4502b7f99dd3e4c7ed898d2951ce5d6851825ee97
MD5 bace2f736a1034a265aacd0c3867431c
BLAKE2b-256 a499742961ea708dcb04cb9212cb92522880ec91e611c006a2bbb25e47dc0f96

See more details on using hashes here.

File details

Details for the file TorchMiner-0.4.10-py3-none-any.whl.

File metadata

  • Download URL: TorchMiner-0.4.10-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.3 Windows/10

File hashes

Hashes for TorchMiner-0.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0da17748e85cb860d127cdcb5aa0a207ef347a9b43a40705f32adcac5d720ace
MD5 cd45ee65b4606b047d6b30a2387ddfc2
BLAKE2b-256 0654729e87f61d1d98c2fca9bbedb9d954eeb9d6bb1ecec3576c20b810cd1c77

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page