Giter Site home page Giter Site logo

whylabs / whylogs_action Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 193 KB

Repo for running Whylogs as part of a CI workflow using github actions.

Home Page: http://whylogs.readthedocs.io/

Dockerfile 28.87% Python 67.54% Shell 3.59%
ml-ops github-actions logging

whylogs_action's Introduction

Whylogs constraint validation docker action

This action runs Whylog constraints on a static dataset.

Inputs

constraintsfile

Required Name of file holding JSON-encoded constraints. Constraints assert that a logged value or summary statistic is within an expected range. Each constraint is bound to a column in the data, and each column may have multiple constraints. The standard boolean comparison operators are supported -- LT, LE, EQ, NE, GE, GT

For example,

{
  "valueConstraints": {
    "loan_amnt": {
      "constraints": [
        {
          "value": 548250.0,
          "op": "LT"
        },
        {
          "value": 2500.0,
          "op": "LT",
          "verbose": true
        }
      ]
    }
  },
  "summaryConstraints": {
    "annual_inc": {
      "constraints": [
        {
          "firstField": "min",
          "value": 0.0,
          "op": "GE"
        }
      ]
    }
  }
}

Constraints may have an optional name to make them easier to identify.
The name has no significance beyond labelling the constraint for reporting. If not provided, a label is automatically constructed.

Constraints may also be marked 'verbose' which will log every failure.

INFO - value constraint value GT 2500.0 failed on value 2500.0

Verbose logging helps identify why a constraint is failing to validate, but can be very chatty if there are a lot of failures.

Constraints are divided into two categories; value constraints and summary constraints. Value constraints are applied to every value that is logged for a feature. At a minimum, Value constraints must specify a comparison operator and a literal value. e.g.

        {
          "op": "GT",
          "value": 4000.0
        },
        {
          "op": "LT",
          "value": 50000.0,
          "name": "Must not exceed",
          "verbose": true 
        },
        

Summary constraints are applied to Whylogs feature summaries, They compare fields of the summary to static literals or to another field in the summary, e.g.

datafile

Required File holding feature data. Format is anything that pandas package can load, but CSV works well.

Example usage

uses: whylogs-actions/action@v1 with: constraintsfile: 'constraints.json' datafile: 'lending_club_1000.csv'

whylogs_action's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

zmacks

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.