Add empty causal and counterfactual projects (#444)

* add empty causality and counterfactuals projects

Signed-off-by: Roman Lutz <rolutz@microsoft.com>

* add blank components

Signed-off-by: Roman Lutz <rolutz@microsoft.com>

* return null instead of <></>

Signed-off-by: Roman Lutz <rolutz@microsoft.com>

* return empty

Signed-off-by: Roman Lutz <rolutz@microsoft.com>
This commit is contained in:
Roman Lutz 2021-04-13 13:08:24 -07:00 коммит произвёл GitHub
Родитель da5dcde1b0
Коммит fb5ac51483
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
30 изменённых файлов: 402 добавлений и 1 удалений

2
.github/workflows/CD.yml поставляемый
Просмотреть файл

@ -110,6 +110,8 @@ jobs:
core-ui,
mlchartlib,
dataset-explorer,
causality,
counterfactuals,
fairness,
interpret,
localization,

Просмотреть файл

@ -24,6 +24,7 @@ this file to understand what changed.
- bug fixes
- other
- moved dataset explorer into a new project `dataset-explorer`
- created new projects `causality` and `counterfactuals`
## v0.3.1

Просмотреть файл

@ -1,4 +1,4 @@
![Responsible AI Widgets Python Build](https://github.com/microsoft/responsible-ai-widgets/workflows/Responsible%20AI%20Widgets/badge.svg) ![CD](https://github.com/microsoft/responsible-ai-widgets/workflows/CD/badge.svg) ![MIT license](https://img.shields.io/badge/License-MIT-blue.svg) ![PyPI raiwidgets](https://img.shields.io/pypi/v/raiwidgets?color=blue) ![PyPI rai_core_flask](https://img.shields.io/pypi/v/rai_core_flask?color=blue) ![npm fairness](https://img.shields.io/npm/v/@responsible-ai/fairness?label=npm%20%40responsible-ai%2Ffairness) ![npm interpret](https://img.shields.io/npm/v/@responsible-ai/interpret?label=npm%20%40responsible-ai%2Finterpret) ![npm mlchartlib](https://img.shields.io/npm/v/@responsible-ai/mlchartlib?label=npm%20%40responsible-ai%2Fmlchartlib) ![npm core-ui](https://img.shields.io/npm/v/@responsible-ai/core-ui?label=npm%20%40responsible-ai%2Fcore-ui) ![npm dataset-explorer](https://img.shields.io/npm/v/@responsible-ai/dataset-explorer?label=npm%20%40responsible-ai%2Fdataset-explorer)
![Responsible AI Widgets Python Build](https://github.com/microsoft/responsible-ai-widgets/workflows/Responsible%20AI%20Widgets/badge.svg) ![CD](https://github.com/microsoft/responsible-ai-widgets/workflows/CD/badge.svg) ![MIT license](https://img.shields.io/badge/License-MIT-blue.svg) ![PyPI raiwidgets](https://img.shields.io/pypi/v/raiwidgets?color=blue) ![PyPI rai_core_flask](https://img.shields.io/pypi/v/rai_core_flask?color=blue) ![npm fairness](https://img.shields.io/npm/v/@responsible-ai/fairness?label=npm%20%40responsible-ai%2Ffairness) ![npm interpret](https://img.shields.io/npm/v/@responsible-ai/interpret?label=npm%20%40responsible-ai%2Finterpret) ![npm mlchartlib](https://img.shields.io/npm/v/@responsible-ai/mlchartlib?label=npm%20%40responsible-ai%2Fmlchartlib) ![npm core-ui](https://img.shields.io/npm/v/@responsible-ai/core-ui?label=npm%20%40responsible-ai%2Fcore-ui) ![npm dataset-explorer](https://img.shields.io/npm/v/@responsible-ai/dataset-explorer?label=npm%20%40responsible-ai%2Fdataset-explorer) ![npm causality](https://img.shields.io/npm/v/@responsible-ai/causality?label=npm%20%40responsible-ai%2Fcausality) ![npm counterfactuals](https://img.shields.io/npm/v/@responsible-ai/counterfactuals?label=npm%20%40responsible-ai%2Fcounterfactuals)
# Responsible-AI-Widgets

Просмотреть файл

@ -4,6 +4,8 @@ module.exports = {
"<rootDir>/libs/fairness",
"<rootDir>/libs/core-ui",
"<rootDir>/libs/dataset-explorer",
"<rootDir>/libs/causality",
"<rootDir>/libs/counterfactuals",
"<rootDir>/libs/mlchartlib",
"<rootDir>/apps/dashboard",
"<rootDir>/libs/localization",

4
libs/causality/.babelrc Normal file
Просмотреть файл

@ -0,0 +1,4 @@
{
"presets": ["@nrwl/react/babel"],
"plugins": []
}

Просмотреть файл

@ -0,0 +1,4 @@
{
"extends": ["../../.eslintrc"],
"ignorePatterns": ["!**/*"]
}

7
libs/causality/README.md Normal file
Просмотреть файл

@ -0,0 +1,7 @@
# causality
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test causality` to execute the unit tests via [Jest](https://jestjs.io).

Просмотреть файл

@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
]
}

Просмотреть файл

@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
module.exports = {
coverageDirectory: "../../coverage/libs/causality",
displayName: "causality",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "html"],
preset: "../../jest.preset.js",
transform: {
"^.+\\.[tj]sx?$": [
"babel-jest",
{ configFile: "./babel-jest.config.json", cwd: __dirname }
]
}
};

Просмотреть файл

@ -0,0 +1,5 @@
{
"name": "@responsible-ai/causality",
"version": "0.0.0",
"license": "MIT"
}

Просмотреть файл

@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export * from "./lib/CausalInsightsTab";

Просмотреть файл

@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
defaultModelAssessmentContext,
ModelAssessmentContext
} from "@responsible-ai/core-ui";
import React from "react";
export class CausalInsightsTab extends React.PureComponent {
public static contextType = ModelAssessmentContext;
public context: React.ContextType<
typeof ModelAssessmentContext
> = defaultModelAssessmentContext;
public constructor() {
super({});
}
public render(): React.ReactNode {
return;
}
}

Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

Просмотреть файл

@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}

Просмотреть файл

@ -0,0 +1,19 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.test.js",
"**/*.test.jsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.d.ts"
]
}

Просмотреть файл

@ -0,0 +1,4 @@
{
"presets": ["@nrwl/react/babel"],
"plugins": []
}

Просмотреть файл

@ -0,0 +1,4 @@
{
"extends": ["../../.eslintrc"],
"ignorePatterns": ["!**/*"]
}

Просмотреть файл

@ -0,0 +1,7 @@
# counterfactuals
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test counterfactuals` to execute the unit tests via [Jest](https://jestjs.io).

Просмотреть файл

@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
]
}

Просмотреть файл

@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
module.exports = {
coverageDirectory: "../../coverage/libs/counterfactuals",
displayName: "counterfactuals",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "html"],
preset: "../../jest.preset.js",
transform: {
"^.+\\.[tj]sx?$": [
"babel-jest",
{ configFile: "./babel-jest.config.json", cwd: __dirname }
]
}
};

Просмотреть файл

@ -0,0 +1,5 @@
{
"name": "@responsible-ai/counterfactuals",
"version": "0.0.0",
"license": "MIT"
}

Просмотреть файл

@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export * from "./lib/CounterfactualsTab";

Просмотреть файл

@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
defaultModelAssessmentContext,
ModelAssessmentContext
} from "@responsible-ai/core-ui";
import React from "react";
export class CounterfactualsTab extends React.PureComponent {
public static contextType = ModelAssessmentContext;
public context: React.ContextType<
typeof ModelAssessmentContext
> = defaultModelAssessmentContext;
public constructor() {
super({});
}
public render(): React.ReactNode {
return;
}
}

Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

Просмотреть файл

@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}

Просмотреть файл

@ -0,0 +1,19 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.test.js",
"**/*.test.jsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.d.ts"
]
}

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { CausalInsightsTab } from "@responsible-ai/causality";
import {
WeightVectorOption,
getDatasetSummary,
@ -14,6 +15,7 @@ import {
IGenericChartProps,
ModelAssessmentContext
} from "@responsible-ai/core-ui";
import { CounterfactualsTab } from "@responsible-ai/counterfactuals";
import { DatasetExplorerTab } from "@responsible-ai/dataset-explorer";
import {
ErrorAnalysisOptions,
@ -382,6 +384,8 @@ export class ModelAssessmentDashboard extends CohortBasedComponent<
theme={this.props.theme}
/>
)}
<CausalInsightsTab />
<CounterfactualsTab />
</div>
</Stack>
<CohortInfo

Просмотреть файл

@ -33,6 +33,12 @@
"dataset-explorer": {
"tags": []
},
"causality": {
"tags": []
},
"counterfactuals": {
"tags": []
},
"mlchartlib": {
"tags": []
},

Просмотреть файл

@ -41,6 +41,8 @@
"@responsible-ai/dataset-explorer": [
"libs/dataset-explorer/src/index.ts"
],
"@responsible-ai/causality": ["libs/causality/src/index.ts"],
"@responsible-ai/counterfactuals": ["libs/counterfactuals/src/index.ts"],
"@responsible-ai/mlchartlib": ["libs/mlchartlib/src/index.ts"],
"@responsible-ai/localization": ["libs/localization/src/index.ts"],
"@responsible-ai/error-analysis": ["libs/error-analysis/src/index.ts"],

Просмотреть файл

@ -277,6 +277,144 @@
}
}
},
"causality": {
"root": "libs/causality",
"sourceRoot": "libs/causality/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"libs/causality/**/*.js",
"libs/causality/**/*.jsx",
"libs/causality/**/*.ts",
"libs/causality/**/*.tsx",
"libs/causality/**/*.test.ts",
"libs/causality/**/*.test.tsx",
"libs/causality/**/*.test.js",
"libs/causality/**/*.test.jsx",
"libs/causality/**/*.spec.ts",
"libs/causality/**/*.spec.tsx",
"libs/causality/**/*.spec.js",
"libs/causality/**/*.spec.jsx",
"libs/causality/**/*.d.ts"
]
}
},
"build": {
"builder": "@nrwl/web:package",
"options": {
"outputPath": "dist/libs/causality",
"tsConfig": "libs/causality/tsconfig.lib.json",
"project": "libs/causality/package.json",
"entryFile": "libs/causality/src/index.ts",
"external": [
"jmespath",
"localized-strings",
"lodash",
"memoize-one",
"moment",
"office-ui-fabric-react",
"plotly.js",
"react-plotly.js",
"react",
"react-dom",
"uuid"
],
"babelConfig": "@nrwl/react/plugins/bundle-babel",
"rollupConfig": "./rollup.config.js",
"assets": [
{
"glob": "README.md",
"input": ".",
"output": "."
}
],
"buildableProjectDepsInPackageJsonType": "dependencies"
},
"outputs": ["{options.outputPath}"]
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/causality/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/libs/causality"]
}
}
},
"counterfactuals": {
"root": "libs/counterfactuals",
"sourceRoot": "libs/counterfactuals/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"libs/counterfactuals/**/*.js",
"libs/counterfactuals/**/*.jsx",
"libs/counterfactuals/**/*.ts",
"libs/counterfactuals/**/*.tsx",
"libs/counterfactuals/**/*.test.ts",
"libs/counterfactuals/**/*.test.tsx",
"libs/counterfactuals/**/*.test.js",
"libs/counterfactuals/**/*.test.jsx",
"libs/counterfactuals/**/*.spec.ts",
"libs/counterfactuals/**/*.spec.tsx",
"libs/counterfactuals/**/*.spec.js",
"libs/counterfactuals/**/*.spec.jsx",
"libs/counterfactuals/**/*.d.ts"
]
}
},
"build": {
"builder": "@nrwl/web:package",
"options": {
"outputPath": "dist/libs/counterfactuals",
"tsConfig": "libs/counterfactuals/tsconfig.lib.json",
"project": "libs/counterfactuals/package.json",
"entryFile": "libs/counterfactuals/src/index.ts",
"external": [
"jmespath",
"localized-strings",
"lodash",
"memoize-one",
"moment",
"office-ui-fabric-react",
"plotly.js",
"react-plotly.js",
"react",
"react-dom",
"uuid"
],
"babelConfig": "@nrwl/react/plugins/bundle-babel",
"rollupConfig": "./rollup.config.js",
"assets": [
{
"glob": "README.md",
"input": ".",
"output": "."
}
],
"buildableProjectDepsInPackageJsonType": "dependencies"
},
"outputs": ["{options.outputPath}"]
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/counterfactuals/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/libs/counterfactuals"]
}
}
},
"mlchartlib": {
"root": "libs/mlchartlib",
"sourceRoot": "libs/mlchartlib/src",