Skip to main content

Select module classes and functions using yaml, without any if-statements.

Project description

easy_module_attribute_getter

Installation:

pip install easy_module_attribute_getter

Example usage:

1. Specify class names and arguments in your yaml config file:

models:
  modelA:
    densenet121:
      pretrained: True
      memory_efficient: True
  modelB:
    resnext50_32x4d:
      pretrained: True

2. Setup your argparser:

import argparse
from easy_module_attribute_getter import YamlReader

parser = argparse.ArgumentParser()
# (optional) add arguments to your argparser
YR = YamlReader(argparser=parser)

...

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

easy_module_attribute_getter-0.9.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

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