Code Monkey home page Code Monkey logo

ml-code-base's People

Contributors

adrianjav avatar

ml-code-base's Issues

Create global arguments module

Create a class to read, write and acces arguments in a global way.

Design choices:

  • Modifing the type of an argument in run time is not allowed (although it is allow to change non-leaf nodes)
  • As changing leaf-nodes as args.leaf = smth may lead to ask whether this is a global or local change, it is not allow. Instead one should write args.load({'leaf': smth}, scope='global') and args.load({'leaf': smth}, scope='local') instead.

Features:

  • Change arguments locally and globally.
  • Global access.
  • Load from strings, dictionaries and yaml files.
  • Write the (global) settings in a file after the run has finished (transparently + configurable).
  • Choose whether or not remove the file after completion (folder?)

Closed Questions:

  • How do we mix the guard class with the arguments? Sometimes saving might not be desired.
    • A. Globally configurable.

Open Questions:

Create directory system

Write a module for automaticly create the directory system for the experiments. Those directories will be accesed via a global variable called dirs.

Configurable options:

  • Structure of the folders. Default: root -> logs, plots, checkpoints

Create fallback/checkpoint system

Create a module that allow to save checkpoints of certain objects if some kind of exception happens.

Functionalities:

  • Declare classes that have to be saved using decorators (@failsafe)
  • Declare classes that have to be saved by inherating from a metaclass.
    • There you will say which loader/savers use (or take the default from the class methods)
  • Allow instances to modify their behaviour on the fly. on instance creation.
  • Declare which functions are prone to suffer this, e.g., the train method when using a Pytorch's model (we don't care if it crashes after training).
  • There we will put the try/catch
  • Specify whether or not save at the end? Change the destructors?
  • How can we allow it to save using a different criteria? (best model)
  • If we tell the library to load a checkpoint, no other code should change (transparency).
  • Modify the constructor functions.
  • There should be no difference between the model when it was saved and after being loaded.
  • How can we distinguish different instances of the same object on the code? This methods should be used for special classes only. We use a counter of objects.

Open questions:

  • Should this module take care of changes in the code after crashing?

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.