Giter Site home page Giter Site logo

sagemaker-debugger-rulesconfig's Introduction

Amazon SageMaker Debugger RulesConfig

Amazon SageMaker Debugger is designed to be a debugger for machine learning models. It lets you go beyond just looking at scalars like losses and accuracies during training and gives you full visibility into all tensors 'flowing through the graph' during training or inference.

Amazon SageMaker Debugger RulesConfig provides a mapping of builtin rules with default configurations. These configurations will affect both DebugHookConfig and DebugRuleConfigurations in the Amazon SageMaker Python SDK.

This library, intended to be used with Amazon SageMaker Python SDK, helps you specify builtin rules without worrying about any details or tweak the configuration of builtin rules. These builtin rules are available in Amazon SageMaker.

Amazon SageMaker Debugger Rulesconfig package can be used with Amazon SageMaker Debugger or as stand-alone rule config retriever. In addition to retrieving builtin rules, configuration for common collections can be retrieved as well.

Example: Vanilla builtin rule without customization

from sagemaker.debugger import Rule, rule_configs

my_estimator = Estimator(
    ...
    rules=[Rule.sagemaker(rule_configs.vanishing_gradient())]
)

Example: Builtin rule with customization. For more details please refer to Amazon SageMaker Python SDK documentation.

from sagemaker.debugger import Rule, CollectionConfig, rule_configs

my_estimator = Estimator(
    ...
    rules= [
        Rule.sagemaker(
            base_config=rule_configs.weight_update_ratio(),
            name="my_wup_rule_name",            # Optional
            container_local_path="/local/path", # Optional
            s3_output_path="s3://uri",          # Optional
            rule_parameters={
                "param1": "value1",
                "param2": "value2"
            }, # Optional
            collections_to_save=[
                CollectionConfig(
                    name="my_name",  # Required. If specified, debugger will collect tensors for this collection. Users may have to update rule_parameters above to run the rule on right tensors.
                    parameters= {
                        "param1": "value1",
                        "param2": "value2"
                    }  # Optional
                )
            ],
        )
    ]
)

License

This project is licensed under the Apache-2.0 License.

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.