Giter Club home page Giter Club logo

driverlessai-recipes's Introduction

Recipes for H2O Driverless AI

About Driverless AI

H2O Driverless AI is Automatic Machine Learning for the Enterprise. Driverless AI automates feature engineering, model building, visualization and interpretability.

About BYOR

BYOR stands for Bring Your Own Recipe and is a key feature of Driverless AI. It allows domain scientists to solve their problems faster and with more precision.

What are Custom Recipes?

Custom recipes are Python code snippets that can be uploaded into Driverless AI at runtime, like plugins. No need to restart Driverless AI. Custom recipes can be provided for transformers, models and scorers. During training of a supervised machine learning modeling pipeline (aka experiment), Driverless AI can then use these code snippets as building blocks, in combination with all built-in code pieces (or instead of). By providing your own custom recipes, you can gain control over the optimization choices that Driverless AI makes to best solve your machine learning problems.

Best Practices for Recipes

Security

  • Recipes are meant to be built by people you trust and each recipe should be code-reviewed before going to production.

  • Assume that a user with access to Driverless AI has access to the data inside that instance.

    • Apart from securing access to the instance via private networks, various methods of authentication are possible. Local authentication provides the most control over which users have access to Driverless AI.
    • Unless the config.toml setting enable_dataset_downloading=false is set, an authenticated user can download all imported datasets as .csv via direct APIs.
  • When recipes are enabled (enable_custom_recipes=true, the default), be aware that:

    • The code for the recipes runs as the same native Linux user that runs the Driverless AI application.
      • Recipes have explicit access to all data passing through the transformer/model/scorer API
      • Recipes have implicit access to system resources such as disk, memory, CPUs, GPUs, network, etc.
    • A H2O-3 Java process is started in the background, for use by all recipes using H2O-3. Anyone with access to the Driverless AI instance can browse the file system, see models and data through the H2O-3 interface.
  • Enable automatic detection of forbidden or dangerous code constructs in a custom recipe with custom_recipe_security_analysis_enabled = tr ue. Note the following:

    • When custom_recipe_security_analysis_enabled is enabled, do not use modules specified in the banlist. Specify the banlist with the cu stom_recipe_import_banlist config option.
      • For example: custom_recipe_import_banlist = ["shlex", "plumbum", "pexpect", "envoy", "commands", "fabric", "subprocess", "os.system", "system"] (default)
    • When custom_recipe_security_analysis_enabled is enabled, code is also checked for dangerous calls like eval(), exec() and other in secure calls (regex patterns) defined in custom_recipe_method_call_banlist. Code is also checked for other dangerous constructs defined as regex patterns in the custom_recipe_dangerous_patterns config setting.
    • Security analysis is only performed on recipes that are uploaded after the custom_recipe_security_analysis_enabled config option is en abled.
    • To specify a list of modules that can be imported in custom recipes, use the custom_recipe_import_allowlist config option.
    • The custom_recipe_security_analysis_enabled config option is disabled by default.
  • Best ways to control access to Driverless AI and custom recipes:

    • Control access to the Driverless AI instance
    • Use local authentication to specify exactly which users are allowed to access Driverless AI
    • Run Driverless AI in a Docker container, as a certain user, with only certain ports exposed, and only certain mount points mapped
    • To disable all recipes: Set enable_custom_recipes=false in the config.toml, or add the environment variable DRIVERLESS_AI_ENABLE_CUSTOM_RECIPES=0 at startup of Driverless AI. This will disable all custom transformers, models and scorers.
    • To disable new recipes: To keep all previously uploaded recipes enabled and disable the upload of any new recipes, set enable_custom_recipes_upload=false or DRIVERLESS_AI_ENABLE_CUSTOM_RECIPES_UPLOAD=0 at startup of Driverless AI.

Safety

  • Driverless AI automatically performs basic acceptance tests for all custom recipes unless disabled
  • More information in the FAQ

Performance

  • Use fast and efficient data manipulation tools like data.table, sklearn, numpy or pandas instead of Python lists, for-loops etc.
  • Use disk sparingly, delete temporary files as soon as possible
  • Use memory sparingly, delete objects when no longer needed

Reference Guide

Sample Recipes

Go to Recipes for Driverless 1.7.0 1.7.1 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.8.10 1.9.0 1.9.1 1.9.2 1.9.3 1.10.0 1.10.1

Count: 244

driverlessai-recipes's People

Contributors

abigail-cha avatar achraf-mer avatar arnocandel avatar ashrith avatar badrc avatar dhiyaneshwar avatar dvorka avatar far0n avatar goldentom42 avatar grigory93 avatar izuit avatar kaz-anova avatar kguruswamy avatar kmontgom2400 avatar maxjeblick avatar mmalohlava avatar mtanco avatar navdeep-g avatar nkpng2k avatar pseudotensor avatar shivam5992 avatar stexyz avatar sudalairajkumar avatar thirdwing avatar tkmaker avatar tomott12345 avatar tunguz avatar vopani avatar ybabakhin avatar zainhaq-h2o avatar

Watchers

 avatar

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.