Code Monkey home page Code Monkey logo

utilsd's Introduction

Common utils for deep learning

build codecov Documentation Status

Documentation: https://utilsd.readthedocs.io/en/stable/

pip install utilsd

What is utilsd?

I'm collecting common utils that are used in at least 2 of the projects I have been working on. I expect most of the utils are in the corner of logging, experiment setup, config management, log analysis, and etc. As I almost always use PyTorch and most of the projects are featuring vision tasks, it will be built upon PyTorch.

Why it is named utilsd?

To join the D-universe that is powered by several ambitious system researchers.

Is it a stable toolkit I can use?

Not really. It is still a draft and being tested against multiple internal projects. I will try to write documentation for this project within a couple of months (or give up on it forever).

utilsd's People

Contributors

arthur-null avatar ultmaster avatar victorywys avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

utilsd's Issues

type check failed with typeguard 3.0

typeguard 3.0 changed the function signature and cause the following error
utilsd.config.exception.ValidationError: Object can not be loaded. Cause: check_type() takes 2 positional arguments but 3 were given

Roadmap

v0.1

The following items shall be completed before v0.1 release.

Analysis

  • Redesign

Config

  • Deprecated the usage of inheriting PythonConfig
  • Usage documentation
  • Support args and kwargs in ClassConfig

Experiment

  • Merge earlystop in experiment

Logging

  • Merge avgmeter into logging

Search

  • Merge search branch into master

Azure

  • Documentation

Bugs for override in PythonConfig

(base) ➜  test_case cat bad1.yml
# python test.py bad1.yml --test.a 2 would give error
test:
  type: TestModule
  b: test
(base) ➜  test_case cat bad2.yml
# python main.py bad2.yml --test.b test would give error
test:
  a: 1
  b: null
(base) ➜  test_case cat main.py
from typing import Optional
from utilsd.config import PythonConfig, configclass, Registry, RegistryConfig


class TEST(metaclass=Registry, name="test"):
    pass


@TEST.register_module()
class TestModule:
    def __init__(self, a: int = 1, b: Optional[str] = None):
        self.a = a
        self.b = b


@configclass
class TestConfig(PythonConfig):
    test: RegistryConfig[TEST]


if __name__ == "__main__":
    config = TestConfig.fromcli()
    print(config)
(base) ➜  test_case cat README.md
`python main.py bad1.yml --test.a 2` would give error because test.a is not in bad1.yml even if a has a default value.
`python main.py bad2.yml --test.b test` would give error because test.b is set to null in bad2.yml.

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.