Package: torch-tutor
Torch-TutorGOALS of the Project1. Reduces implementation time upto 50%.2. Presents Eye-catching Training Job Monitor.3. Stores training data efficiently.4. Integrated with W&B.Visit atPyPIPrimary ReleaseInstallationPrimary Requirements :a) Python >= 3.9b) Torch >= 1.11.0 + cu113VisitCustom Installation PyTorchto install the latest version(Date : 07-09-2022)Install thetorch_tutorpackage.Package Installationa) From PyPi :pipinstalltorch_tutorb) From Repository :Install the reporsitory :gitclonehttps://github.com/sagnik1511/Torch-Tutor.gitGo to the directory.cdTorch_TutorInstall from the local repository.pipinstall-v-e.Usagefromtorch_tutor.core.trainerimportTrainerfromtorch_tutor.core.callbacksimportCallBackcallback=CallBack(tracker="accuracy",stop_epoch=5,save_weights=True,on="training",save_directory="../weight_directory")trainer=Trainer(train_dataset="<add your train_dataset_here>",model="<add your model here>",device="cpu")optimizer_hyperparameter_dict={"lr":0.0001}trainer.compile(optimizer="<add your optimizer here>",loss_fn="<add your los function here>",metrics=["accuracy","precision",...],optimizer_hparams=optimizer_hyperparameter_dict)trainer.train(batch_size=32,num_epochs=50,training_steps=100,validation_set="<add your validation dataset here>",validation_steps=50,logging_index=10,shuffle=True,drop_last_batches=True,callback=callback,connect_wandb=True,exp_name="New Experiment")Check inGoogle ColabFeature DescriptionCallBackfromtorch_tutor.core.callbacksimportCallBacktracker[type: list] : On which metric the model will be tested. Currently, supporting"accuracy","precision","recall","f1_score"and"mean_squared_error".stop_epoch[type: int] : Number of epochs of continuous degradation after training stops.save_weights[type: bool] : Flag to save best model.on[type: str] : On which dataset the best results will be tracked. Takes either"training"or"validation".save_directory[type: Path] : On which directory the best model will be saved.Trainerfromtorch_tutor.core.trainerimportTrainertrain_dataset[type: torch.utils.data.Dataset] : The dataset used for training.model[type: torch.nn.Module] : The model used for training.device[type: str] : The device used for training . Currently supportingcpuandcuda.compileoptimizer: The optimizer which will be used for training, e.g.Adam,Adagradloss_fn: The loss function that is used for backpropagation, e.g.CrossEntropyLoss,MSELossmetrics[type: str] :  On which metric the model will be tested. Currently, supporting"accuracy","precision","recall","f1_score"and"mean_squared_error".optimizer_hparams[type: dict] : The parameters that are used inside Optimizer e.elearning_rate,weight_decay.trainbatch_size[type: int] : Batch size of the training and validation set.num_epochs[type: int] : Number of epoch on which the model will be trained.training_steps[type: int] : Number of batches per epoch on which model will be trained.validation_set[type: None or torch.utils.data.Dataset] : On which the model will be validated.validation_steps[type : int] : Number of batches per epoch on which model will be validated.logging_index[type: int] : Number of indexes after which results will be shown.shuffle[type: bool] : Flag to shuffle data indexes.drop_last_batches[type: bool] : Flag on which the last small batches will be cut.callback[type: torch_tutor.core.callback.callBack] : CallBack function.connect_wandb[type: bool] : Flag to connect W&B loggers.exp_name[type: str] : Name of the experiment.Module Functionalities AchievedTraining through CPU / GPU / TPU.Basic Loggings & Reports.W&B Integration.MLFlow Integration.Distributed Training.Multi-Model Training.Effective Web-platform UI.If you get any errors while running the code, please make a PR.Thanks for Visiting!!!If you like the project, do ⭐Also follow me onGitHub,Kaggle,LinkedIn