Giter Site home page Giter Site logo

grok-ai / nn-template Goto Github PK

View Code? Open in Web Editor NEW
615.0 14.0 65.0 2.74 MB

Generic template to bootstrap your PyTorch project.

Home Page: https://grok-ai.github.io/nn-template

License: MIT License

Python 99.48% HTML 0.52%
pytorch template pytorch-lightning wandb dvc hydra research deep-learning best-practices reproducibility

nn-template's People

Contributors

crisostomi avatar flegyas avatar leonardoemili avatar lorenzo-delsignore avatar lucmos avatar mikcnt avatar rtaiello avatar valahaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nn-template's Issues

Curious if you checked out DAGsHub

Hi @lucmos, this looks like an awesome repo. I stumbled on it while doing some research on project templates for ML projects. I'm one of the creators of DAGsHub which is a platform built on Git, DVC, and MLflow. It integrates with GitHub and provides a free DVC remote and MLflow server so that you can track experiments and share your data & models in one UI.

Here's an example project to showcase the abilities:
https://dagshub.com/OperationSavta/SavtaDepth

It seems really in line with what you're creating here, and I would love to hear your thoughts about it.

Streamlit UI - Weights and Biases login

The template is really awesome.

I had a small issue. When I run the Streamlit UI without being logged in in Weights and Biases. The UI just hanged with the loading status without giving me any feedback about what was happening, so that I have to log in first in wandb.
I had to login manually from the console. Is there any way to solve this issue? For example to have feedback from the UI if I'm not logged in.

Thanks!

Update LightningDataModule example usage

I believe L217 in datamodule.py should be changed from

_: pl.LightningDataModule = hydra.utils.instantiate(cfg.data.datamodule, _recursive_=False)

to

_: pl.LightningDataModule = hydra.utils.instantiate(cfg.nn.data, _recursive_=False)

Thanks for the great project, keep up with the good work! @lucmos

load_model

Hi,
This issue concerns the function from nn_core.serialization import load_model
Suppose i train a pytorch model with class MyLightningModule, and that I saved the checkpoint in model_path.
Suppose now that the class MyLightningModule has received some minor changes, like a new class variable has been added.
Let's call this version MyLightningModuleV2.
When I load a model using this function, like:

self.model = load_model(module_class=MyLightningModuleOld, checkpoint_path=Path(model_path), map_location=self.device).to(self.device).eval()

I get an error because the chekpoint refers to the model of class MyLightningModule and therefore the new variable is (obviously) missing.
To make it work, i need to load the model with the old version of the class, that is, MyLightningModule, and then manually setting "model.new_variable" to the value i want to get, like the following:

self.model = load_model(module_class=MyLightningModuleOld, checkpoint_path=Path(model_path), map_location=self.device).to(self.device).eval()
self.model.new_variable = False

It would be nice to have this option in the load_model function to avoid creating multiple versions of the same class.

PyTorch Lightning EcoCI integration to check for compatibility with latest & upcoming releases

Hey Valentino & Luca,

I am just catching up with some bookmarks and remembered your repo here :). As someone who constantly fuzzes about the ideal project structure, that's actually pretty cool. I have been using an adapted version of the data science cookiecutter for generic ML projects, but nothing sophisticated like this here with code stubs.

Haven't thoroughly played with it yet, though, besides creating an example folder and looking at the pl_module.py and datamodule.py files, which look good to me!

In any case, long story short, I was wondering if you'd be interested in the PyTorch Lightning's ecosystem CI to make sure that it stays fresh and relevant wrt to upcoming version releases (comes with free CPU and multi-GPU CI tests): https://devblog.pytorchlightning.ai/stay-ahead-of-breaking-changes-with-the-new-lightning-ecosystem-ci-b7e1cf78a6c7

If you are interested in that, I am sure my colleague @Borda would be happy to assist with questions & technical details -- he built this thing, so he probably knows best :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.