diff --git a/ai-verify-portal/.env.development b/ai-verify-portal/.env.development deleted file mode 100644 index d6b80b337..000000000 --- a/ai-verify-portal/.env.development +++ /dev/null @@ -1,3 +0,0 @@ -APIGW_URL=http://localhost:4000 -REDIS_URI=redis://localhost:6379 -TEST_ENGINE_URL=http://localhost:8080 \ No newline at end of file diff --git a/ai-verify-portal/.eslintignore b/ai-verify-portal/.eslintignore deleted file mode 100644 index 01a88cadb..000000000 --- a/ai-verify-portal/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules -/plugins -/__mocks__ -/__tests__ \ No newline at end of file diff --git a/ai-verify-portal/.eslintrc.json b/ai-verify-portal/.eslintrc.json deleted file mode 100644 index ba39a4a54..000000000 --- a/ai-verify-portal/.eslintrc.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "extends": [ - "next/core-web-vitals", - "plugin:@typescript-eslint/recommended", - "prettier" - ], // prettier - ensure eslint lint does not do formatting-related rules - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "root": true, - "rules": { - "react-hooks/rules-of-hooks": "warn", - "react-hooks/exhaustive-deps": 0, - // "react/self-closing-comp": "error", TODO: Enable and fix below lint errors in separate PR - "prefer-const": "error", - "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-unused-vars": [ - "warn", - { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } - ] - // TODO: Enable and fix below lint errors in separate PR - // "import/order": [ - // "warn", - // { - // "groups": [ - // "builtin", - // "external", - // "parent", - // "sibling", - // "index", - // "object", - // "type" - // ], - // "pathGroups": [ - // { - // "pattern": "@/**/**", - // "group": "parent", - // "position": "before" - // } - // ], - // "alphabetize": { "order": "asc" } - // } - // ], - // "no-restricted-imports": ["error", - // { - // "patterns": ["../"] - // } - // ] - } -} diff --git a/ai-verify-portal/.gitignore b/ai-verify-portal/.gitignore deleted file mode 100644 index 1e1249e6f..000000000 --- a/ai-verify-portal/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage -test-report.html -test-results.json - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo - -# plugins -/temp \ No newline at end of file diff --git a/ai-verify-portal/.prettierignore b/ai-verify-portal/.prettierignore deleted file mode 100644 index e61594134..000000000 --- a/ai-verify-portal/.prettierignore +++ /dev/null @@ -1,38 +0,0 @@ -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage -test-report.html -test-results.json - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo - -# plugins -/temp -/plugins \ No newline at end of file diff --git a/ai-verify-portal/.prettierrc.json b/ai-verify-portal/.prettierrc.json deleted file mode 100644 index 29a6c36a1..000000000 --- a/ai-verify-portal/.prettierrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "trailingComma": "es5", - "printWidth": 80, - "tabWidth": 2, - "semi": true, - "singleQuote": true, - "bracketSameLine": true -} diff --git a/ai-verify-portal/.vscode/extensions.json b/ai-verify-portal/.vscode/extensions.json deleted file mode 100644 index 1d7ac851e..000000000 --- a/ai-verify-portal/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] -} diff --git a/ai-verify-portal/.vscode/launch.json b/ai-verify-portal/.vscode/launch.json deleted file mode 100644 index cbb9f4a4a..000000000 --- a/ai-verify-portal/.vscode/launch.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Next.js: debug server-side", - "type": "node-terminal", - "request": "launch", - "command": "npm run dev" - }, - { - "name": "Next.js: debug client-side", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3000" - }, - { - "name": "Next.js: debug full stack", - "type": "node-terminal", - "request": "launch", - "command": "npm run dev", - "serverReadyAction": { - "pattern": "started server on .+, url: (https?://.+)", - "uriFormat": "%s", - "action": "debugWithChrome" - } - } - ] -} diff --git a/ai-verify-portal/README.md b/ai-verify-portal/README.md deleted file mode 100644 index 8b02ea75e..000000000 --- a/ai-verify-portal/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Installation Guide - -## Software Requirements - -### Operation System Supported - -- Linux - -### Prerequisites - -- nodejs >= 16.x -- mongodb >= 5.0 -- redis >= 5.0 - -## Installing NodeJS 16.x - -### Using Ubuntu - -```sh -curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - -sudo apt-get install -y nodejs -``` - -### Using Debian, as root - -```sh -curl -fsSL https://deb.nodesource.com/setup_16.x | bash - -apt-get install -y nodejs -``` - -## Installing and Setting up mongodb - -Install mongodb. See [MongoDB Installation Guides](https://www.mongodb.com/docs/manual/installation/) - -Create a new user - -```sh -use aiverify -db.createUser({user:"aiverify",pwd:"aiverify",roles:["readWrite"]}) -``` - -## Install Redis - -Install redis server. See [Redis Installation Guide](https://redis.io/docs/getting-started/installation/install-redis-on-linux/) - -```sh -curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list -sudo apt-get update -sudo apt-get install redis -``` - -Update /etc/redis/redis.conf and set notify-keyspace-events to Kh - -```text -notify-keyspace-events Kh -``` - -## Customize the environment variable - -To customize the default environment, you can create a **.env.local** file in the project root directory. This will override the **.env** defaults set. - -# Running the Application - -Make sure that mongodb and redis server are running before starting the application. - -## Run NodeJS in development mode - -```sh -npm run dev -``` - -## Run NodeJS in production mode - -```sh -npm run start -``` - -## Run NodeJS unit tests - -```sh -npm run test -``` - -## API UIs - -- [A.I Verify Portal](http://localhost:3000/) -- [GraphQL](http://localhost:3000/api/graphql/) diff --git a/ai-verify-portal/__mocks__/ai-verify-shared-library/lib.ts b/ai-verify-portal/__mocks__/ai-verify-shared-library/lib.ts deleted file mode 100644 index 5cab34a31..000000000 --- a/ai-verify-portal/__mocks__/ai-verify-shared-library/lib.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { createContext } from 'react'; - -export function getComponents() { - return {}; -} - -export function parseRJSFSchema() { - return { - sensitive_feature: { - items: {}, - }, - }; -} - -export type InputDataContextType = { - meta: any; - data: any; - onChangeData?: (key: string, value: any) => void; -}; - -export const InputDataContext = createContext({ - meta: {}, - data: {}, -}); diff --git a/ai-verify-portal/__mocks__/mockGlobals.ts b/ai-verify-portal/__mocks__/mockGlobals.ts deleted file mode 100644 index abca9048f..000000000 --- a/ai-verify-portal/__mocks__/mockGlobals.ts +++ /dev/null @@ -1,40 +0,0 @@ -function silentConsoleLogs() { - jest.spyOn(console, 'log').mockImplementation(jest.fn()); - jest.spyOn(console, 'debug').mockImplementation(jest.fn()); - jest.spyOn(console, 'warn').mockImplementation(jest.fn()); - jest.spyOn(console, 'error').mockImplementation(jest.fn()); -} - -function mockDomMatrix() { - global.DOMMatrixReadOnly = jest.fn(() => ({ - a: 1, - b: 0, - c: 0, - d: 1, - e: 194, - f: 120, - m11: 1, - m12: 0, - m13: 0, - m14: 0, - m21: 0, - m22: 1, - m23: 0, - m24: 0, - m31: 0, - m32: 0, - m33: 1, - m34: 0, - m41: 194, - m42: 120, - m43: 0, - m44: 1, - is2D: true, - isIdentity: false, - })) as any; - - global.getComputedStyle = jest.fn(() => ({ - getPropertyValue: jest.fn(), - })) as jest.Mock; -} -export { silentConsoleLogs, mockDomMatrix }; diff --git a/ai-verify-portal/__mocks__/mockGqlResponse.ts b/ai-verify-portal/__mocks__/mockGqlResponse.ts deleted file mode 100644 index 691b8d0f7..000000000 --- a/ai-verify-portal/__mocks__/mockGqlResponse.ts +++ /dev/null @@ -1,410 +0,0 @@ -import { - CREATE_PROJECT, - GENERATE_REPORT, - UPDATE_PROJECT, -} from 'src/lib/projectService'; -import { GET_PROJECT_TEMPLATES } from 'src/lib/projectTemplateService'; -import { GET_DATASETS } from 'src/modules/assets/datasetList'; -import { GET_MODELS } from 'src/modules/assets/modelList'; - -const MOCK_PROJECTID = '64c82da4c99adb254a4203ad'; -const MOCK_MODELID = '647d8c0514ae095e2e890af4'; -const MOCK_DATASETID = '647d8bf214ae095e2e890add'; -export const MOCK_ALGO_ID = 'aiverify.test.mock_test_plugin1:mock_algo1'; -export const MOCK_IBLOCK_ID = 'aiverify.test.mock_test_plugin1:mock_iblock1'; -export const MOCK_DATE_WIDGET_1 = 1695202143375; - -export const mockGqlDataE2E = [ - { - request: { - query: GET_PROJECT_TEMPLATES, - }, - result: { - data: { - projectTemplates: [], - }, - }, - }, - - { - request: { - query: CREATE_PROJECT, - variables: { - project: { - projectInfo: { name: 'Test Project' }, - pages: [], - }, - }, - }, - result: { - data: { - createProject: { - id: MOCK_PROJECTID, - }, - }, - }, - }, - - { - request: { - query: CREATE_PROJECT, - variables: { - project: { - projectInfo: { - name: 'Test Project', - description: 'Test Description', - reportTitle: 'Test Report Name', - company: 'Test Company Pte Ltd', - }, - pages: [], - }, - }, - }, - result: { - data: { - createProject: { - id: MOCK_PROJECTID, - }, - }, - }, - }, - - { - request: { - query: GET_DATASETS, - }, - result: { - data: { - datasets: [ - { - __typename: 'Dataset', - id: '647d8bf214ae095e2e890add', - name: 'pickle_pandas_tabular_compas_testing.sav', - filename: 'pickle_pandas_tabular_compas_testing.sav', - filePath: - '/uploads/data/pickle_pandas_tabular_compas_testing.sav', - ctime: '2023-06-05T07:17:06.360Z', - size: '68.33 KB', - status: 'Valid', - description: '', - dataColumns: [ - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734a', - name: 'age_cat_cat', - datatype: 'int64', - label: 'age_cat_cat', - }, - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734b', - name: 'sex_code', - datatype: 'int64', - label: 'sex_code', - }, - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734c', - name: 'race_code', - datatype: 'int64', - label: 'race_code', - }, - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734d', - name: 'priors_count', - datatype: 'int64', - label: 'priors_count', - }, - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734e', - name: 'c_charge_degree_cat', - datatype: 'int64', - label: 'c_charge_degree_cat', - }, - { - __typename: 'DatasetColumn', - id: '647d8bf3ef104c4da904734f', - name: 'two_year_recid', - datatype: 'int64', - label: 'two_year_recid', - }, - ], - numRows: 1235, - numCols: 6, - serializer: 'pickle', - dataFormat: 'pandas', - errorMessages: '', - type: 'File', - }, - { - __typename: 'Dataset', - id: '64cb013aad81d1d5d0227bf5', - name: 'image-test.png', - filename: 'aiv-homescreen-v1.png', - filePath: '../aiverify/uploads/data/image-test.png', - ctime: '2023-08-03T01:22:02.814Z', - size: '71.09 KB', - status: 'Invalid', - description: '', - dataColumns: [], - numRows: null, - numCols: null, - serializer: '', - dataFormat: '', - errorMessages: - 'The dataset ../aiverify/uploads/data/aiv-homescreen-v1.png is not supported. Please upload a supported dataset: Unable to get data instance: ', - type: 'File', - }, - ], - }, - }, - }, - - { - request: { - query: GET_MODELS, - }, - result: { - data: { - modelFiles: [ - { - id: `${MOCK_MODELID}`, - name: 'pickle_scikit_bc_compas.sav', - filename: 'pickle_scikit_bc_compas.sav', - filePath: - '../aiverify/uploads/model/pickle_scikit_bc_compas.sav', - ctime: '2023-06-05T07:17:25.132Z', - size: '502.71 KB', - status: 'Valid', - description: '', - serializer: 'pickle', - modelFormat: 'sklearn', - modelType: 'Classification', - errorMessages: '', - type: 'File', - __typename: 'ModelFile', - }, - ], - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - pages: [ - { - layouts: [], - reportWidgets: [], - }, - ], - }, - }, - }, - result: { - data: { - updateProject: { - id: `${MOCK_PROJECTID}`, - // Note: the actual result actually might or might not have below properties and they should contain sub properties. In unit test, we can just omit them. These returned properties are not used in the UI. - projectInfo: {}, - globalVars: {}, - inpuBlockData: {}, - testInformation: {}, - pages: [], - modelAndDatasets: {}, - }, - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - pages: [ - { - layouts: [ - { - h: 3, - i: `${MOCK_DATE_WIDGET_1}`, - maxH: 36, - maxW: 12, - minH: 3, - minW: 6, - static: false, - w: 6, - x: 1, - y: 1, - }, - ], - reportWidgets: [ - { - widgetGID: 'aiverify.test.mock_test_plugin1:widget_cid_1', - key: `${MOCK_DATE_WIDGET_1}`, - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - }, - properties: {}, - }, - ], - }, - ], - }, - }, - }, - result: { - data: { - updateProject: { - id: `${MOCK_PROJECTID}`, - // Note: the actual result actually might or might not have below properties and they should contain sub properties. In unit test, we can just omit them. These returned properties are not used in the UI. - projectInfo: {}, - globalVars: {}, - inpuBlockData: {}, - testInformation: {}, - pages: [], - modelAndDatasets: {}, - }, - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - modelAndDatasets: { - modelId: `${MOCK_MODELID}`, - testDatasetId: `${MOCK_DATASETID}`, - groundTruthDatasetId: `${MOCK_DATASETID}`, - groundTruthColumn: 'two_year_recid', - }, - }, - }, - }, - result: { - data: { - updateProject: { - id: `${MOCK_PROJECTID}`, // Note: the actual result actually has many more properties than just `id`. In unit test, we do not need them so omitting in this mock - }, - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - testInformationData: [ - { - algorithmGID: `${MOCK_ALGO_ID}`, - testArguments: { sensitive_feature: ['race_code'] }, - }, - ], - }, - }, - }, - result: { - data: { - updateProject: { - id: `${MOCK_PROJECTID}`, - // Note: the actual result actually might or might not have below properties and they should contain sub properties. In unit test, we can just omit them. These returned properties are not used in the UI. - projectInfo: {}, - globalVars: {}, - inpuBlockData: {}, - testInformation: {}, - pages: [], - modelAndDatasets: {}, - }, - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - inputBlockData: { - 'aiverify.test.mock_test_plugin1:mock_iblock1': {}, - }, - }, - }, - }, - result: { - data: { - updateProject: { - id: `${MOCK_PROJECTID}`, - // Note: the actual result actually might or might not have below properties and they should contain sub properties. In unit test, we can just omit them. These returned properties are not used in the UI. - projectInfo: {}, - globalVars: {}, - inpuBlockData: {}, - testInformation: {}, - pages: [], - modelAndDatasets: {}, - }, - }, - }, - }, - - { - request: { - query: UPDATE_PROJECT, - variables: { - id: `${MOCK_PROJECTID}`, - project: { - inputBlockData: { - 'aiverify.test.mock_test_plugin1:mock_iblock1': { - fname: 'John', - lname: 'Doe', - bio: 'Test input block', - }, - }, - }, - }, - }, - result: { - data: { - updateProject: { - updateProject: { - id: `${MOCK_PROJECTID}`, - // Note: the actual result actually might or might not have below properties and they should contain sub properties. In unit test, we can just omit them. These returned properties are not used in the UI. - projectInfo: {}, - globalVars: {}, - inpuBlockData: {}, - testInformation: {}, - pages: [], - modelAndDatasets: {}, - }, - }, - }, - }, - }, - - { - request: { - query: GENERATE_REPORT, - variables: { - projectID: MOCK_PROJECTID, - algorithms: [`${MOCK_ALGO_ID}`], - }, - }, - result: { - generateReport: { - status: 'RunningTests', - }, - }, - }, -]; diff --git a/ai-verify-portal/__mocks__/mockNewApiModelGqlVars.ts b/ai-verify-portal/__mocks__/mockNewApiModelGqlVars.ts deleted file mode 100644 index 55efd6cb3..000000000 --- a/ai-verify-portal/__mocks__/mockNewApiModelGqlVars.ts +++ /dev/null @@ -1,913 +0,0 @@ -export const saveConfigVariables_tc000 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc001', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc001 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc001', - method: 'POST', - authType: 'Bearer Token', - authTypeConfig: { - token: - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMmY4MTJiNmJlM2IzMjEyMTQzMjBjZiIsImlhdCI6MTY2MDE5Nzg3MCwiZXhwIjoxNjYyNzg5ODcwfQ.cebsoHVMzV4GGwX-QjHFc5CcTkEy7jLQQLaaHlvN2JU', - }, - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc002 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc001', - method: 'POST', - authType: 'Basic Auth', - authTypeConfig: { - username: 'test', - password: 'p@ssword', - }, - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc003 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc003', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc004 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc004', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'multipart/form-data', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc005 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc005', - method: 'GET', - authType: 'No Auth', - parameters: { - queries: { - mediaType: 'none', - isArray: false, - queryParams: [ - { - name: 'age', - type: 'integer', - }, - { - name: 'gender', - type: 'integer', - }, - { - name: 'race', - type: 'integer', - }, - { - name: 'income', - type: 'integer', - }, - { - name: 'employment', - type: 'integer', - }, - { - name: 'employment_length', - type: 'integer', - }, - { - name: 'total_donated', - type: 'integer', - }, - { - name: 'num_donation', - type: 'integer', - }, - ], - }, - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc006 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc006', - urlParams: - '/{age}/{gender}/{race}/{income}/{employment}/{employment_length}/{total_donated}/{num_donation}', - method: 'GET', - authType: 'No Auth', - parameters: { - paths: { - mediaType: 'none', - isArray: false, - pathParams: [ - { - name: 'age', - type: 'integer', - }, - { - name: 'gender', - type: 'integer', - }, - { - name: 'race', - type: 'integer', - }, - { - name: 'income', - type: 'integer', - }, - { - name: 'employment', - type: 'integer', - }, - { - name: 'employment_length', - type: 'integer', - }, - { - name: 'total_donated', - type: 'integer', - }, - { - name: 'num_donation', - type: 'integer', - }, - ], - }, - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc007 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc007', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'application/json', - schema: { - type: 'object', - properties: { - data: { - type: 'integer', - }, - }, - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc008 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc008', - method: 'POST', - authType: 'No Auth', - additionalHeaders: [ - { - name: 'foo', - type: 'string', - value: 'bar', - }, - ], - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -// we are testing connection settings UI using this one. Not really following the confluence doc -export const saveConfigVariables_tc009 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc009', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/x-www-form-urlencoded', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'text/plain', - schema: { - type: 'integer', - }, - }, - requestConfig: { - sslVerify: true, - connectionTimeout: 4, - rateLimit: 5, - rateLimitTimeout: 10, - connectionRetries: 5, - batchStrategy: 'none', - batchLimit: -1, - maxConnections: 3, - }, - }, -}; - -export const saveConfigVariables_tc013 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc013', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/json', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'application/json', - schema: { - type: 'array', - items: { - type: 'integer', - }, - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'multipart', - batchLimit: 100, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc014 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc014', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/json', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'application/json', - schema: { - type: 'array', - items: { - type: 'object', - properties: { - data: { - type: 'integer', - }, - }, - }, - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'multipart', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_tc015 = { - name: 'My test API', - description: 'My test API description', - modelType: 'Regression', - modelAPI: { - url: 'https://localhost:5000/predict/tc015', - method: 'POST', - authType: 'No Auth', - requestBody: { - mediaType: 'application/json', - isArray: false, - properties: [ - { - field: 'age', - type: 'integer', - }, - { - field: 'gender', - type: 'integer', - }, - { - field: 'race', - type: 'integer', - }, - { - field: 'income', - type: 'integer', - }, - { - field: 'employment', - type: 'integer', - }, - { - field: 'employment_length', - type: 'integer', - }, - { - field: 'total_donated', - type: 'integer', - }, - { - field: 'num_donation', - type: 'integer', - }, - ], - }, - response: { - statusCode: 200, - mediaType: 'application/json', - schema: { - type: 'object', - properties: { - data: { - type: 'array', - items: { - type: 'integer', - }, - }, - }, - }, - }, - requestConfig: { - sslVerify: false, - connectionTimeout: -1, - rateLimit: -1, - rateLimitTimeout: -1, - connectionRetries: 3, - batchStrategy: 'multipart', - batchLimit: -1, - maxConnections: -1, - }, - }, -}; - -export const saveConfigVariables_result = { - createModelAPI: { - id: '64d5a78656d3605a78346770', - name: 'My test API', - description: 'My test API description', - modelType: 'Classification', - __typename: 'ModelFile', - }, -}; diff --git a/ai-verify-portal/__mocks__/mockPlugins.ts b/ai-verify-portal/__mocks__/mockPlugins.ts deleted file mode 100644 index 44efc605a..000000000 --- a/ai-verify-portal/__mocks__/mockPlugins.ts +++ /dev/null @@ -1,3774 +0,0 @@ -import PluginManagerType from 'src/types/pluginManager.interface'; -import { ApiResult } from '../src/modules/plugins/api/plugins'; -import AIFPlugin from 'src/types/plugin.interface'; -import { DependencyStatusResult } from 'src/modules/plugins/api/algorithms'; -import { MOCK_ALGO_ID, MOCK_IBLOCK_ID } from './mockGqlResponse'; - -const managePluginsTests_pluginsList: ApiResult = { - status: 200, - data: { - plugins: [ - { - gid: 'aiverify.stock.algorithms.partial_dependence_plot', - version: '0.1.0', - name: 'Partial Dependence Plot', - author: 'Test User', - description: - 'Partial dependence plot (PDP) depicts the relationship between a small number of input variable and target. They show how predictions partially depend on values of the input variables of interests.', - algorithms: [ - { - cid: 'partial_dependence_plot', - name: 'Partial Dependence Plot', - modelType: ['classification', 'regression'], - version: '0.1.0', - author: 'Test User', - description: - 'Partial dependence plot (PDP) depicts the relationship between a small number of input variable and target. They show how predictions partially depend on values of the input variables of interests.', - tags: ['Partial Dependence Plot', 'classification', 'regression'], - requireGroundTruth: false, - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.partial_dependence_plot:partial_dependence_plot', - pluginGID: 'aiverify.stock.algorithms.partial_dependence_plot', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.partial_dependence_plot/algorithms/partial_dependence_plot', - requirements: [ - 'numpy==1.24.1 ; python_version >= "3.10" and python_version < "3.12"', - 'scipy==1.10.0 ; python_version >= "3.10" and python_version < "3.12"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: [ - 'target_feature_name', - 'percentiles', - 'grid_resolution', - ], - properties: { - target_feature_name: { - title: 'Target Feature Name', - description: 'Target Feature Name (e.g. Interest_Rate)', - type: 'string', - }, - percentiles: { - title: 'Cut-off percentiles', - description: 'Cut-off percentiles (e.g. [0.01, 0.99])', - type: 'array', - minItems: 2, - maxItems: 2, - items: { - type: 'number', - }, - }, - grid_resolution: { - title: 'Grid Resolution', - description: 'Grid Resolution (e.g. 25)', - type: 'number', - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['feature_names', 'output_classes', 'results'], - minProperties: 1, - properties: { - feature_names: { - type: 'array', - description: 'Array of feature names', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - type: 'array', - description: 'Array of output classes', - minItems: 1, - items: { - type: 'string', - }, - }, - results: { - description: 'Matrix of feature values (# feature names)', - type: 'array', - minItems: 1, - items: { - description: 'Matrix of PDP values (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'array', - description: 'Array of values for each PDP', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - }, - }, - }, - ], - isStock: false, - installedAt: 1678686862514, - }, - { - gid: 'aiverify.stock.decorators', - name: 'AI Verify Stock Decorators', - version: '1.0.0', - reportWidgets: [ - { - cid: 'divider', - name: 'Divider', - tags: ['stock', 'decorator'], - properties: [], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 1, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:divider', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/divider.mdx', - status: 'OK', - }, - { - cid: 'header1', - name: 'Header 1', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 2, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header1', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header1.mdx', - status: 'OK', - }, - { - cid: 'header2', - name: 'Header 2', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header2', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header2.mdx', - status: 'OK', - }, - { - cid: 'header3', - name: 'Header 3', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header3', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header3.mdx', - status: 'OK', - }, - { - cid: 'header4', - name: 'Header 4', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header4', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header4.mdx', - status: 'OK', - }, - { - cid: 'header5', - name: 'Header 5', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header5', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header5.mdx', - status: 'OK', - }, - { - cid: 'header6', - name: 'Header 6', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header6', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'aiverify.stock.decorators/widgets/header6.mdx', - status: 'OK', - }, - ], - isStock: true, - installedAt: 1679903556691, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets', - name: 'Widgets for Fairness Metrics Toolbox', - version: '0.1.0', - author: 'Leong Peck Yoke', - description: - 'Stock widgets to display results from Fairness Metrics Toolbox (FMT) algoritm', - reportWidgets: [ - { - cid: 'false-discovery-rate-chart', - name: 'Chart for False Discovery Rate metric', - description: 'Show bar chart for False Discovery Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:false-discovery-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/false-discovery-rate-chart.mdx', - status: 'OK', - }, - { - cid: 'false-negative-rate-chart', - name: 'Chart for False Negative Rate metric', - description: 'Show bar chart for False Negative Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:false-negative-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/false-negative-rate-chart.mdx', - status: 'OK', - }, - { - cid: 'false-omission-rate-chart', - name: 'Chart for False Omission Rate metric', - description: 'Show bar chart for False Omission Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:false-omission-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/false-omission-rate-chart.mdx', - status: 'OK', - }, - { - cid: 'false-positive-rate-chart', - name: 'Chart for False Positive Rate metric', - description: 'Show bar chart for False Positive Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:false-positive-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/false-positive-rate-chart.mdx', - status: 'OK', - }, - { - cid: 'introduction', - name: 'Introduction to the FMT Algorithm', - description: 'Widget to provide introduction for the FMT', - tags: [], - properties: [], - widgetSize: { - minW: 12, - minH: 9, - maxW: 12, - maxH: 10, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:introduction', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/introduction.mdx', - status: 'OK', - }, - { - cid: 'negative-predictive-value-parity-chart', - name: 'Chart for Negative Predictive Value Parity metric', - description: - 'Show bar chart for Negative Predictive Value Parity metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:negative-predictive-value-parity-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/negative-predictive-value-parity-chart.mdx', - status: 'OK', - }, - { - cid: 'positive-predictive-value-parity-chart', - name: 'Chart for Positive Predictive Value Parity metric', - description: - 'Show bar chart for Positive Predictive Value Parity metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:positive-predictive-value-parity-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/positive-predictive-value-parity-chart.mdx', - status: 'OK', - }, - { - cid: 'true-negative-rate-chart', - name: 'Chart for True Negative Rate metric', - description: 'Show bar chart for True Negative Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:true-negative-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/true-negative-rate-chart.mdx', - status: 'OK', - }, - { - cid: 'true-positive-rate-chart', - name: 'Chart for True Positive Rate metric', - description: 'Show bar chart for True Positive Rate metric', - tags: ['stock', 'chart', 'fairness'], - properties: [], - widgetSize: { - minW: 12, - minH: 12, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - version: '0.1.0', - valid: true, - }, - { - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:true-positive-rate-chart', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/widgets/true-positive-rate-chart.mdx', - status: 'OK', - }, - ], - inputBlocks: [ - { - cid: 'fairness-tree', - name: 'Fairness Tree', - description: - 'There are many fairness metrics, and it is impossible to fulfill all of them due to the Impossibility Theorem of Machine Fairness. Therefore, it is important to select and rank the relevant metrics to focus during the resolving of fairness issues (if any). The fairness tree guides the user to make this decision, and this section documents the decision-making process.', - fullScreen: true, - type: 'InputBlock', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - width: 'md', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/inputs/fairness-tree.mdx', - }, - ], - isStock: true, - installedAt: 1679903994465, - }, - { - gid: 'aiverify.stock.process-checklist', - name: 'AI Verify Process Checklist', - version: '0.1.0', - author: 'Leong Peck Yoke', - description: 'Process checklist for AI Verify framework', - reportWidgets: [ - { - cid: 'explainability-process-checklist-answers', - name: 'Explainability Process Checklist Answers', - tags: ['stock', 'process-checklist'], - properties: [ - { - key: 'section', - helper: 'Enter the section to display', - default: 'Explainability', - }, - { - key: 'startIndex', - helper: 'Enter the start index of the process check to display', - default: '0', - }, - ], - widgetSize: { - minW: 12, - minH: 3, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.process-checklist:explainability-process-checklist', - valid: true, - }, - ], - mockdata: [ - { - type: 'InputBlock', - gid: 'aiverify.stock.process-checklist:explainability-process-checklist', - datapath: 'explainability-mockdata.json', - data: { - 'elaboration-explainability-2': - "Documented as part of company's software development process", - 'completed-explainability-2': 'Yes', - }, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.stock.process-checklist:explainability-process-checklist-answers', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/widgets/explainability-process-checklist-answers.mdx', - status: 'OK', - }, - { - cid: 'fairness-process-checklist-answers', - name: 'Fairness Process Checklist Answers', - tags: ['stock', 'process-checklist'], - properties: [ - { - key: 'section', - helper: 'Enter the section to display', - default: 'Fairness', - }, - { - key: 'startIndex', - helper: 'Enter the start index of the process check to display', - default: '0', - }, - ], - widgetSize: { - minW: 12, - minH: 3, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.process-checklist:fairness-process-checklist', - valid: true, - }, - ], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.process-checklist:fairness-process-checklist-answers', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/widgets/fairness-process-checklist-answers.mdx', - status: 'OK', - }, - ], - inputBlocks: [ - { - cid: 'explainability-process-checklist', - name: 'Explainability Process Checklist', - description: 'Process checklist for Explainability principle', - group: 'AI Verify Process Checklists', - width: 'xl', - type: 'InputBlock', - gid: 'aiverify.stock.process-checklist:explainability-process-checklist', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/inputs/explainability-process-checklist.mdx', - }, - { - cid: 'fairness-process-checklist', - name: 'Fairness Process Checklist', - description: 'Process checklist for Fairness principle', - group: 'AI Verify Process Checklists', - width: 'xl', - type: 'InputBlock', - gid: 'aiverify.stock.process-checklist:fairness-process-checklist', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/inputs/fairness-process-checklist.mdx', - }, - ], - isStock: true, - installedAt: 1679904178330, - }, - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification', - version: '0.1.0', - name: 'fairness metrics toolbox for classification', - author: 'IMDA-T2E', - description: - 'The Fairness Metrics Toolbox (FMT) for Classification contains a list of fairness metrics to measure how resources (e.g. opportunities, food, loan, medical help) are allocated among the demographic groups (e.g. married male, married female) given a set of sensitive feature(s) (e.g. gender, marital status). This plugin is developed for classification models.', - algorithms: [ - { - cid: 'fairness_metrics_toolbox_for_classification', - name: 'fairness metrics toolbox for classification', - modelType: ['classification'], - version: '0.1.0', - author: 'IMDA-T2E', - description: - 'The Fairness Metrics Toolbox (FMT) for Classification contains a list of fairness metrics to measure how resources (e.g. opportunities, food, loan, medical help) are allocated among the demographic groups (e.g. married male, married female) given a set of sensitive feature(s) (e.g. gender, marital status). This plugin is developed for classification models.', - tags: [ - 'fairness metrics toolbox for classification', - 'classification', - ], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'fairness_metrics_toolbox_for_classification.meta.json', - 'fairness_metrics_toolbox_for_classification.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification:fairness_metrics_toolbox_for_classification', - pluginGID: - 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification/algorithms/fairness_metrics_toolbox_for_classification', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['sensitive_feature'], - properties: { - sensitive_feature: { - title: 'Sensitive Feature Names', - description: 'Array of Sensitive Feature Names (e.g. Gender)', - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['sensitive_feature', 'output_classes', 'results'], - properties: { - sensitive_feature: { - description: 'Array of sensitive feature names', - type: 'array', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - description: 'Array of output classes', - type: 'array', - minItems: 1, - items: { - type: ['string', 'number', 'integer', 'boolean'], - }, - }, - results: { - description: - 'Array of metrics by output classes (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'object', - description: 'Dictionary of metric values by group', - required: [ - 'True Positive Rate', - 'True Negative Rate', - 'Positive Predictive Value Parity', - 'Negative Predictive Value Parity', - 'False Positive Rate', - 'False Negative Rate', - 'False Discovery Rate', - 'False Omission Rate', - ], - properties: { - 'True Positive Rate': { - $ref: '#/$defs/metric', - }, - 'True Negative Rate': { - $ref: '#/$defs/metric', - }, - 'Positive Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'Negative Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'False Positive Rate': { - $ref: '#/$defs/metric', - }, - 'False Negative Rate': { - $ref: '#/$defs/metric', - }, - 'False Discovery Rate': { - $ref: '#/$defs/metric', - }, - 'False Omission Rate': { - $ref: '#/$defs/metric', - }, - }, - }, - }, - }, - $defs: { - metric: { - description: - 'Array of metric values for each group, e.g. [{group:[1,2], metric:0.122},...]', - type: 'array', - items: { - type: 'object', - required: ['group', 'metric'], - properties: { - group: { - type: 'array', - description: - 'Array of group values, one value for each feature, .e.g group: [1,4,7]', - }, - metric: { - type: 'number', - }, - }, - }, - minItems: 2, - }, - }, - }, - }, - ], - isStock: true, - installedAt: 1681953154295, - }, - { - gid: 'aiverify.stock.shap-toolbox-widgets', - version: '1.0.0', - name: 'Widgets for SHAP toolbox', - reportWidgets: [ - { - cid: 'global-explainability-chart', - widgetSize: { - minW: 12, - minH: 16, - maxW: 12, - maxH: 36, - }, - name: 'Global Explainability - Overall Feature Importance (Bar Graph)', - description: - 'Displays the overall feature importance in a barchart and summarized the results', - dependencies: [ - { - gid: 'aiverify.stock.algorithms.shap_toolbox:shap_toolbox', - valid: true, - }, - ], - mockdata: [], - properties: [ - { - key: 'topNFeatures', - helper: 'Show the top N features in the chart', - default: '20', - }, - ], - type: 'ReportWidget', - gid: 'aiverify.stock.shap-toolbox-widgets:global-explainability-chart', - version: '1.0.0', - pluginGID: 'aiverify.stock.shap-toolbox-widgets', - mdxPath: - 'aiverify.stock.shap-toolbox-widgets/widgets/global-explainability-chart.mdx', - status: 'OK', - }, - ], - isStock: false, - installedAt: 1682644230122, - }, - ], - inputBlocks: [ - { - cid: 'explainability-process-checklist', - name: 'Explainability Process Checklist', - description: 'Process checklist for Explainability principle', - group: 'AI Verify Process Checklists', - width: 'xl', - type: 'InputBlock', - gid: 'aiverify.stock.process-checklist:explainability-process-checklist', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/inputs/explainability-process-checklist.mdx', - }, - { - cid: 'fairness-process-checklist', - name: 'Fairness Process Checklist', - description: 'Process checklist for Fairness principle', - group: 'AI Verify Process Checklists', - width: 'xl', - type: 'InputBlock', - gid: 'aiverify.stock.process-checklist:fairness-process-checklist', - version: '0.1.0', - pluginGID: 'aiverify.stock.process-checklist', - mdxPath: - 'aiverify.stock.process-checklist/inputs/fairness-process-checklist.mdx', - }, - { - cid: 'fairness-tree', - name: 'Fairness Tree', - description: - 'There are many fairness metrics, and it is impossible to fulfill all of them due to the Impossibility Theorem of Machine Fairness. Therefore, it is important to select and rank the relevant metrics to focus during the resolving of fairness issues (if any). The fairness tree guides the user to make this decision, and this section documents the decision-making process.', - fullScreen: true, - type: 'InputBlock', - gid: 'aiverify.stock.fairness-metrics-toolbox-widgets:fairness-tree', - version: '0.1.0', - pluginGID: 'aiverify.stock.fairness-metrics-toolbox-widgets', - width: 'md', - mdxPath: - 'aiverify.stock.fairness-metrics-toolbox-widgets/inputs/fairness-tree.mdx', - }, - { - cid: 'testForm1', - name: 'Test Form 1', - description: 'Test Form 1 description blah blah', - type: 'InputBlock', - gid: 'aiverify.tests:testForm1', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - width: 'md', - mdxPath: 'aiverify.tests/inputs/testForm1.mdx', - }, - ], - algorithms: [ - { - cid: 'adversarial_examples_toolbox', - name: 'adversarial examples toolbox', - modelType: ['classification'], - version: '0.1.0', - author: 'IMDA-T2E', - description: 'My adversarial examples toolbox', - tags: ['adversarial examples toolbox', 'classification'], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'adversarial_examples_toolbox.meta.json', - 'adversarial_examples_toolbox.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.adversarial_examples_toolbox:adversarial_examples_toolbox', - pluginGID: 'aiverify.stock.algorithms.adversarial_examples_toolbox', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.adversarial_examples_toolbox/algorithms/adversarial_examples_toolbox', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/ai.verify.stock.algorithms.adversarial-examples-toolbox/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: [], - properties: {}, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/ai.verify.stock.algorithms.adversarial-examples-toolbox/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['results'], - minProperties: 1, - properties: { - results: { - description: 'Algorithm Output', - type: 'object', - required: [ - 'num_of_adversarial_samples', - 'org_accuracy', - 'adversarial_accuracy', - 'num_of_failed_adversarial_samples', - ], - properties: { - num_of_adversarial_samples: { - description: 'Number of final adversarial samples', - type: 'number', - }, - original_accuracy: { - description: 'Original Accuracy', - type: 'number', - }, - adversarial_accuracy: { - description: 'Adversarial accuracy', - type: 'number', - }, - num_of_failed_adversarial_samples: { - description: - 'Number of samples that failed to generate adversarial samples', - type: 'number', - }, - }, - }, - }, - }, - }, - { - cid: 'fairness_metrics_toolbox_for_classification', - name: 'fairness metrics toolbox for classification', - modelType: ['classification'], - version: '0.1.0', - author: 'IMDA-T2E', - description: - 'The Fairness Metrics Toolbox (FMT) for Classification contains a list of fairness metrics to measure how resources (e.g. opportunities, food, loan, medical help) are allocated among the demographic groups (e.g. married male, married female) given a set of sensitive feature(s) (e.g. gender, marital status). This plugin is developed for classification models.', - tags: ['fairness metrics toolbox for classification', 'classification'], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'fairness_metrics_toolbox_for_classification.meta.json', - 'fairness_metrics_toolbox_for_classification.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification:fairness_metrics_toolbox_for_classification', - pluginGID: - 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification/algorithms/fairness_metrics_toolbox_for_classification', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['sensitive_feature'], - properties: { - sensitive_feature: { - title: 'Sensitive Feature Names', - description: 'Array of Sensitive Feature Names (e.g. Gender)', - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['sensitive_feature', 'output_classes', 'results'], - properties: { - sensitive_feature: { - description: 'Array of sensitive feature names', - type: 'array', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - description: 'Array of output classes', - type: 'array', - minItems: 1, - items: { - type: ['string', 'number', 'integer', 'boolean'], - }, - }, - results: { - description: - 'Array of metrics by output classes (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'object', - description: 'Dictionary of metric values by group', - required: [ - 'True Positive Rate', - 'True Negative Rate', - 'Positive Predictive Value Parity', - 'Negative Predictive Value Parity', - 'False Positive Rate', - 'False Negative Rate', - 'False Discovery Rate', - 'False Omission Rate', - ], - properties: { - 'True Positive Rate': { - $ref: '#/$defs/metric', - }, - 'True Negative Rate': { - $ref: '#/$defs/metric', - }, - 'Positive Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'Negative Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'False Positive Rate': { - $ref: '#/$defs/metric', - }, - 'False Negative Rate': { - $ref: '#/$defs/metric', - }, - 'False Discovery Rate': { - $ref: '#/$defs/metric', - }, - 'False Omission Rate': { - $ref: '#/$defs/metric', - }, - }, - }, - }, - }, - $defs: { - metric: { - description: - 'Array of metric values for each group, e.g. [{group:[1,2], metric:0.122},...]', - type: 'array', - items: { - type: 'object', - required: ['group', 'metric'], - properties: { - group: { - type: 'array', - description: - 'Array of group values, one value for each feature, .e.g group: [1,4,7]', - }, - metric: { - type: 'number', - }, - }, - }, - minItems: 2, - }, - }, - }, - }, - { - cid: 'shap_toolbox', - name: 'shap toolbox', - modelType: ['classification', 'regression'], - version: '0.1.0', - author: 'IMDA-T2E', - description: - 'SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions (see papers for details and citations).', - tags: ['shap toolbox', 'classification', 'regression'], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'shap_toolbox.meta.json', - 'shap_toolbox.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - 'src', - ], - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.shap_toolbox:shap_toolbox', - pluginGID: 'aiverify.stock.algorithms.shap_toolbox', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.shap_toolbox/algorithms/shap_toolbox', - requirements: [ - 'cloudpickle==2.2.1 ; python_version >= "3.10" and python_version < "4.0"', - 'colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and platform_system == "Windows"', - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'llvmlite==0.39.1 ; python_version >= "3.10" and python_version < "4.0"', - 'numba==0.56.4 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'packaging==23.0 ; python_version >= "3.10" and python_version < "4.0"', - 'pandas==1.5.3 ; python_version >= "3.10" and python_version < "4.0"', - 'python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0"', - 'pytz==2023.3 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'setuptools==67.6.1 ; python_version >= "3.10" and python_version < "4.0"', - 'shap==0.41.0 ; python_version >= "3.10" and python_version < "4.0"', - 'six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"', - 'slicer==0.0.7 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - 'tqdm==4.65.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.shap_toolbox/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: [ - 'algo_type', - 'explain_type', - 'background_path', - 'background_samples', - 'data_samples', - ], - properties: { - algo_type: { - title: 'Algorithm Type', - description: 'Algorithm Type - [tree, linear, kernel (default)]', - type: 'string', - }, - explain_type: { - title: 'Explain Type', - description: 'Explain Type - [global, local (default)]', - type: 'string', - }, - background_path: { - title: 'Background data path', - description: 'Background data path', - type: 'string', - }, - background_samples: { - title: 'Background Samples', - description: 'Background Samples (e.g. 25)', - type: 'number', - }, - data_samples: { - title: 'Data Samples', - description: 'Data Samples (e.g. 25)', - type: 'number', - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.shap_toolbox/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['feature_names', 'results'], - properties: { - feature_names: { - type: 'array', - description: 'Array of feature names', - minItems: 1, - items: { - type: 'string', - }, - }, - results: { - description: 'Matrix of feature values (# feature names)', - type: 'object', - required: [ - 'num_local_classes', - 'local', - 'single_explainer_values', - 'single_shap_values', - 'global_shap_values', - 'global_samples', - 'num_global_classes', - 'global', - ], - properties: { - num_local_classes: { - description: 'Number of local classes', - type: 'number', - }, - local: { - description: '# of local classes', - type: 'array', - minItems: 1, - items: { - type: 'array', - minItems: 1, - items: { - type: 'array', - description: 'class values', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - single_explainer_values: { - description: 'array of single explainer values', - type: 'array', - minItems: 1, - items: { - type: 'number', - }, - }, - single_shap_values: { - description: 'array of single shap values', - type: 'array', - minItems: 1, - items: { - type: 'array', - description: 'class values', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - global_shap_values: { - description: 'global shap values', - type: 'array', - items: { - type: 'array', - description: - 'Matrix of SHAP values (# samples x # features)', - minItems: 1, - items: { - type: 'array', - description: 'Array of SHAP values for each feature', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - global_samples: { - description: - 'Matrix of feature values (# samples x # features)', - type: 'array', - items: { - type: 'array', - description: 'Array of sample values for each feature', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - num_global_classes: { - description: 'Number of global classes', - type: 'number', - }, - global: { - description: '# of global classes', - type: 'array', - items: { - type: 'array', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - }, - }, - }, - }, - { - cid: 'partial_dependence_plot', - name: 'Partial Dependence Plot', - modelType: ['classification', 'regression'], - version: '0.1.0', - author: 'Test User', - description: - 'Partial dependence plot (PDP) depicts the relationship between a small number of input variable and target. They show how predictions partially depend on values of the input variables of interests.', - tags: ['Partial Dependence Plot', 'classification', 'regression'], - requireGroundTruth: false, - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.partial_dependence_plot:partial_dependence_plot', - pluginGID: 'aiverify.stock.algorithms.partial_dependence_plot', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.partial_dependence_plot/algorithms/partial_dependence_plot', - requirements: [ - 'numpy==1.24.1 ; python_version >= "3.10" and python_version < "3.12"', - 'scipy==1.10.0 ; python_version >= "3.10" and python_version < "3.12"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['target_feature_name', 'percentiles', 'grid_resolution'], - properties: { - target_feature_name: { - title: 'Target Feature Name', - description: 'Target Feature Name (e.g. Interest_Rate)', - type: 'string', - }, - percentiles: { - title: 'Cut-off percentiles', - description: 'Cut-off percentiles (e.g. [0.01, 0.99])', - type: 'array', - minItems: 2, - maxItems: 2, - items: { - type: 'number', - }, - }, - grid_resolution: { - title: 'Grid Resolution', - description: 'Grid Resolution (e.g. 25)', - type: 'number', - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['feature_names', 'output_classes', 'results'], - minProperties: 1, - properties: { - feature_names: { - type: 'array', - description: 'Array of feature names', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - type: 'array', - description: 'Array of output classes', - minItems: 1, - items: { - type: 'string', - }, - }, - results: { - description: 'Matrix of feature values (# feature names)', - type: 'array', - minItems: 1, - items: { - description: 'Matrix of PDP values (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'array', - description: 'Array of values for each PDP', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - }, - }, - }, - { - cid: 'fairness_metrics_toolbox', - name: 'Fairness Metrics Toolbox', - modelType: ['classification'], - version: '0.1.0', - author: 'Kelvin Kok', - description: - 'The Fairness Metrics Toolbox (FMT) contains a list of fairness metrics to measure how resources (e.g. opportunities, food, loan, medical help) are allocated among the demographic groups (e.g. married male, married female) given a set of sensitive feature(s) (e.g. gender, marital status).', - tags: ['Fairness Metrics Toolbox', 'classification'], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'fairness_metrics_toolbox.meta.json', - 'fairness_metrics_toolbox.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox:fairness_metrics_toolbox', - pluginGID: 'aiverify.stock.algorithms.fairness_metrics_toolbox', - algoPath: - '../projects/ai-verify/ai-verify-portal/plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/algorithms/fairness_metrics_toolbox', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.24.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.1 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['sensitive_feature'], - properties: { - sensitive_feature: { - title: 'Sensitive Feature Names', - description: 'Array of Sensitive Feature Names (e.g. Gender)', - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.algorithms.fairness_metrics_toolbox/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['sensitive_feature', 'output_classes', 'results'], - properties: { - sensitive_feature: { - description: 'Array of sensitive feature names', - type: 'array', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - description: 'Array of output classes', - type: 'array', - minItems: 1, - items: { - type: ['string', 'number', 'integer', 'boolean'], - }, - }, - results: { - description: - 'Array of metrics by output classes (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'object', - description: 'Dictionary of metric values by group', - required: [ - 'True Positive Rate', - 'True Negative Rate', - 'Positive Predictive Value Parity', - 'Negative Predictive Value Parity', - 'False Positive Rate', - 'False Negative Rate', - 'False Discovery Rate', - 'False Omission Rate', - ], - properties: { - 'True Positive Rate': { - $ref: '#/$defs/metric', - }, - 'True Negative Rate': { - $ref: '#/$defs/metric', - }, - 'Positive Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'Negative Predictive Value Parity': { - $ref: '#/$defs/metric', - }, - 'False Positive Rate': { - $ref: '#/$defs/metric', - }, - 'False Negative Rate': { - $ref: '#/$defs/metric', - }, - 'False Discovery Rate': { - $ref: '#/$defs/metric', - }, - 'False Omission Rate': { - $ref: '#/$defs/metric', - }, - }, - }, - }, - }, - $defs: { - metric: { - description: - 'Array of metric values for each group, e.g. [{group:[1,2], metric:0.122},...]', - type: 'array', - items: { - type: 'object', - required: ['group', 'metric'], - properties: { - group: { - type: 'array', - description: - 'Array of group values, one value for each feature, .e.g group: [1,4,7]', - }, - metric: { - type: 'number', - }, - }, - }, - minItems: 2, - }, - }, - }, - }, - ], - templates: [ - { - cid: 'demo-2-mar-2023-template', - name: 'Demo 2 Mar 2023 Template', - description: 'template for demo on 2 Mar 2023', - type: 'Template', - gid: '046f18f4-9006-480f-9696-ad2ff65523c7:demo-2-mar-2023-template', - version: '1.0.0', - pluginGID: '046f18f4-9006-480f-9696-ad2ff65523c7', - data: { - pages: [ - { - layouts: [ - { - w: 12, - h: 2, - x: 0, - y: 0, - i: '1677654688094', - minW: 1, - maxW: 12, - minH: 2, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 15, - x: 0, - y: 2, - i: '1677654738248', - minW: 12, - maxW: 12, - minH: 12, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 17, - x: 0, - y: 17, - i: '1677654744924', - minW: 12, - maxW: 12, - minH: 12, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 1, - x: 0, - y: 35, - i: '_youcantseeme', - moved: false, - static: false, - }, - ], - reportWidgets: [ - { - layoutItemProperties: { - justifyContent: 'center', - alignItems: 'center', - color: null, - bgcolor: null, - }, - widgetGID: 'aiverify.stock.decorators:header1', - key: '1677654688094', - properties: { - title: '', - text: '{name}', - }, - }, - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - color: null, - bgcolor: null, - }, - widgetGID: - 'aiverify.stock.fairness-metrics-toolbox-widgets:false-discovery-rate-chart', - key: '1677654738248', - properties: null, - }, - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - color: null, - bgcolor: null, - }, - widgetGID: - 'aiverify.stock.fairness-metrics-toolbox-widgets:false-negative-rate-chart', - key: '1677654744924', - properties: null, - }, - ], - }, - { - layouts: [ - { - w: 12, - h: 35, - x: 0, - y: 0, - i: '1677654763640', - minW: 12, - maxW: 12, - minH: 12, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 1, - x: 0, - y: 35, - i: '_youcantseeme', - moved: false, - static: false, - }, - ], - reportWidgets: [ - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - color: null, - bgcolor: null, - }, - widgetGID: - 'aiverify.stock.fairness-metrics-toolbox-widgets:false-omission-rate-chart', - key: '1677654763640', - properties: null, - }, - ], - }, - { - layouts: [ - { - w: 12, - h: 29, - x: 0, - y: 2, - i: '1677656674885', - minW: 12, - maxW: 12, - minH: 3, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 2, - x: 0, - y: 0, - i: '1677656749854', - minW: 1, - maxW: 12, - minH: 2, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 1, - x: 0, - y: 35, - i: '_youcantseeme', - moved: false, - static: false, - }, - ], - reportWidgets: [ - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - }, - widgetGID: - 'aiverify.stock.process-checklist:fairness-process-checklist-answers', - key: '1677656674885', - properties: { - section: 'Fairness', - startIndex: '0', - }, - }, - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'center', - }, - widgetGID: 'aiverify.stock.decorators:header1', - key: '1677656749854', - properties: { - title: '', - text: 'Fairness Checklist', - }, - }, - ], - }, - { - layouts: [ - { - w: 12, - h: 35, - x: 0, - y: 0, - i: '1677656693173', - minW: 12, - maxW: 12, - minH: 3, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 1, - x: 0, - y: 35, - i: '_youcantseeme', - moved: false, - static: false, - }, - ], - reportWidgets: [ - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - }, - widgetGID: - 'aiverify.stock.process-checklist:fairness-process-checklist-answers', - key: '1677656693173', - properties: { - section: 'Fairness', - startIndex: '3', - }, - }, - ], - }, - { - layouts: [ - { - w: 12, - h: 14, - x: 0, - y: 2, - i: '1677656725405', - minW: 12, - maxW: 12, - minH: 3, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 2, - x: 0, - y: 0, - i: '1677656776114', - minW: 1, - maxW: 12, - minH: 2, - maxH: 36, - moved: false, - static: false, - }, - { - w: 12, - h: 1, - x: 0, - y: 35, - i: '_youcantseeme', - moved: false, - static: false, - }, - ], - reportWidgets: [ - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'top', - }, - widgetGID: - 'aiverify.stock.process-checklist:explainability-process-checklist-answers', - key: '1677656725405', - properties: { - section: 'Explainability', - startIndex: '0', - }, - }, - { - layoutItemProperties: { - justifyContent: 'left', - alignItems: 'center', - }, - widgetGID: 'aiverify.stock.decorators:header1', - key: '1677656776114', - properties: { - title: '', - text: 'Explainability Checklist', - }, - }, - ], - }, - ], - globalVars: [], - fromPlugin: true, - projectInfo: { - name: 'Demo 2 Mar 2023 Template', - description: 'template for demo on 2 Mar 2023', - }, - }, - id: '64536cac2285de1805dea945', - }, - ], - stockPlugins: [ - 'aiverify.stock.decorators', - 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification', - 'aiverify.stock.fairness-metrics-toolbox-widgets', - 'aiverify.stock.process-checklist', - ], - }, -}; - -const emptyListResponse: ApiResult = { - status: 200, - data: { - plugins: [], - inputBlocks: [], - algorithms: [], - templates: [], - stockPlugins: [], - }, -}; - -const installPluginResponse: ApiResult = { - status: 200, - data: { - gid: 'aiverify.stock.algorithms.partial_dependence_plot', - version: '0.1.0', - name: 'Partial Dependence Plot', - author: 'Test User', - description: - 'Partial dependence plot (PDP) depicts the relationship between a small number of input variable and target. They show how predictions partially depend on values of the input variables of interests.', - isStock: false, - reportWidgets: [], - inputBlocks: [], - templates: [], - algorithms: [ - { - cid: 'partial_dependence_plot', - name: 'Partial Dependence Plot', - modelType: ['classification', 'regression'], - version: '0.1.0', - author: 'Test User', - description: - 'Partial dependence plot (PDP) depicts the relationship between a small number of input variable and target. They show how predictions partially depend on values of the input variables of interests.', - tags: ['Partial Dependence Plot', 'classification', 'regression'], - requireGroundTruth: false, - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.partial_dependence_plot:partial_dependence_plot', - pluginGID: 'aiverify.stock.algorithms.partial_dependence_plot', - algoPath: - '../imda/projects/ai-verify-portal/plugins/aiverify.stock.algorithms.partial_dependence_plot/algorithms/partial_dependence_plot', - requirements: [ - 'numpy==1.24.1 ; python_version >= "3.10" and python_version < "3.12"', - 'scipy==1.10.0 ; python_version >= "3.10" and python_version < "3.12"', - ], - inputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/input.schema.json', - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['target_feature_name', 'percentiles', 'grid_resolution'], - properties: { - target_feature_name: { - title: 'Target Feature Name', - description: 'Target Feature Name (e.g. Interest_Rate)', - type: 'string', - }, - percentiles: { - title: 'Cut-off percentiles', - description: 'Cut-off percentiles (e.g. [0.01, 0.99])', - type: 'array', - minItems: 2, - maxItems: 2, - items: { - type: 'number', - }, - }, - grid_resolution: { - title: 'Grid Resolution', - description: 'Grid Resolution (e.g. 25)', - type: 'number', - }, - }, - }, - outputSchema: { - $schema: 'https://json-schema.org/draft/2020-12/schema', - $id: 'https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/partial_dependence_plot/output.schema.json', - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['feature_names', 'output_classes', 'results'], - minProperties: 1, - properties: { - feature_names: { - type: 'array', - description: 'Array of feature names', - minItems: 1, - items: { - type: 'string', - }, - }, - output_classes: { - type: 'array', - description: 'Array of output classes', - minItems: 1, - items: { - type: 'string', - }, - }, - results: { - description: 'Matrix of feature values (# feature names)', - type: 'array', - minItems: 1, - items: { - description: 'Matrix of PDP values (# output classes)', - type: 'array', - minItems: 1, - items: { - type: 'array', - description: 'Array of values for each PDP', - minItems: 1, - items: { - type: 'number', - }, - }, - }, - }, - }, - }, - }, - ], - }, -}; - -const algoPackageDependencyStatusResponse: ApiResult = - { - status: 200, - data: [ - { requirement: 'numpy==1.24.1', result: true, comment: 'Not compatible' }, - { requirement: 'scipy==1.10.0', result: false, comment: '' }, - ], - }; - -// mock used as response from server/PluginManager getPlugins -const projectFlow_mockPlugins: PluginManagerType = { - plugins: [ - { - gid: 'aiverify.test.mock_test_plugin1', - version: '0.9.0', - name: 'Mock Plugin for Unit Test', - author: 'AI Verify', - description: - 'This plugin computes and displays a list of fairness metrics to measure how correctly your regression model predicts among the given set of sensitive features.', - tags: ['regression', 'fairness'], - reportWidgets: [ - { - cid: 'widget_cid_1', - widgetSize: { - minW: 6, - minH: 3, - maxW: 12, - maxH: 36, - }, - name: 'Interpretation (MAE)', - description: 'To interpret the mean absolute error parity results', - dependencies: [ - { - cid: 'mock_algo1', - gid: `${MOCK_ALGO_ID}`, - valid: true, - }, - { - cid: 'mock_iblock1', - gid: `${MOCK_IBLOCK_ID}`, - }, - ], - mockdata: [ - { - type: 'Algorithm', - cid: 'mock_algo1', - datapath: 'mock_algo1.sample.json', - gid: `${MOCK_ALGO_ID}`, - data: { - results: [ - { - mae: 3216.4542620419, - r2: 0.0510932737, - mse: 19526356.681064513, - subgroup: '0,18', - }, - { - mae: 3348.2940108613, - r2: 0.8764356055, - mse: 20773382.56608977, - subgroup: '0,19', - }, - { - mae: 4277.3879485314, - r2: 0.4035191212, - mse: 33511316.737452578, - subgroup: '0,20', - }, - { - mae: 5823.7211983892, - r2: -0.1110011861, - mse: 94486288.88814631, - subgroup: '0,21', - }, - ], - sensitive_feature: ['gender', 'age'], - }, - }, - { - type: 'InputBlock', - cid: 'mock_iblock1', - datapath: './testform.mock.json', - gid: `${MOCK_IBLOCK_ID}`, - data: { lname: 'Doe', fname: 'John' }, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.test.mock_test_plugin1:widget_cid_1', - version: '0.9.0', - pluginGID: 'aiverify.test.mock_test_plugin1', - mdxPath: 'aiverify.test.mock_test_plugin1/widgets/widget_cid_1.mdx', - status: 'OK', - }, - ], - algorithms: [ - { - cid: 'mock_algo1', - name: 'Fairness Metrics Toolbox for Regression', - modelType: ['regression'], - version: '0.9.0', - author: 'AI Verify', - description: 'This is a mock description of mock algo 1', - tags: [ - 'Fairness Metrics Toolbox for Regression', - 'regression', - 'fairness', - ], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'mock_algo1.meta.json', - 'mock_algo1.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: `${MOCK_ALGO_ID}`, - pluginGID: 'aiverify.test.mock_test_plugin1', - algoPath: - '../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/algorithms/mock_algo1', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'pandas==1.5.3 ; python_version >= "3.10" and python_version < "4.0"', - 'python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0"', - 'pytz==2023.3 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['sensitive_feature'], - properties: { - sensitive_feature: { - title: 'Sensitive Feature Names', - description: 'Array of Sensitive Feature Names (e.g. Gender)', - type: 'array', - items: { - type: 'string', - }, - minItems: 1, - }, - }, - }, - outputSchema: { - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['results'], - minProperties: 1, - properties: { - results: { - type: 'array', - minItems: 1, - title: 'The results Schema', - items: { - type: 'object', - properties: { - mae: { - type: 'number', - }, - r2: { - type: ['number', 'null'], - }, - mse: { - type: 'number', - }, - subgroup: { - type: 'string', - }, - }, - }, - }, - sensitive_feature: { - description: 'Array of sensitive feature names', - type: 'array', - minItems: 1, - items: { - type: 'string', - }, - }, - }, - }, - }, - ], - isStock: true, - installedAt: 1690830700625, - }, - { - gid: 'aiverify.stock.decorators', - name: 'AI Verify Stock Decorators', - version: '1.0.0', - reportWidgets: [ - { - cid: 'divider', - name: 'Divider', - tags: ['stock', 'decorator'], - properties: [], - widgetSize: { - minW: 1, - minH: 1, - maxW: 12, - maxH: 1, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:divider', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'stock.decorators/widgets/divider.mdx', - status: 'OK', - }, - { - cid: 'header1', - name: 'Header 1', - tags: ['stock', 'decorator', 'header'], - properties: [ - { - key: 'title', - helper: 'Enter the header title', - default: '', - }, - { - key: 'text', - helper: 'Enter the text for paragraph below header', - default: '', - }, - ], - widgetSize: { - minW: 1, - minH: 2, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.stock.decorators:header1', - version: '1.0.0', - pluginGID: 'aiverify.stock.decorators', - mdxPath: 'stock.decorators/widgets/header1.mdx', - status: 'OK', - }, - ], - isStock: true, - installedAt: 1688098059192, - }, - { - gid: 'aiverify.tests', - version: '1.0.0-alpha', - name: 'Test Plugin', - author: 'Tester', - description: 'For testing', - reportWidgets: [ - { - cid: 'pdpOutput', - name: 'Test Algo Output', - description: 'JSON display for Algo', - tags: ['test'], - widgetSize: { - minW: 6, - minH: 4, - maxW: 12, - maxH: 36, - }, - dependencies: [ - { - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification:fairness_metrics_toolbox_for_classification', - cid: 'fairness_metrics_toolbox_for_classification', - version: '>=0.1.0', - valid: false, - }, - ], - mockdata: [ - { - type: 'Algorithm', - gid: 'aiverify.stock.algorithms.fairness_metrics_toolbox_for_classification:fairness_metrics_toolbox_for_classification', - cid: 'fairness_metrics_toolbox_for_classification', - datapath: 'mockpdp.sample.json', - data: { - feature_names: [ - 'Loan_Amount_Requested', - 'Length_Employed', - 'Home_Owner', - 'Annual_Income', - 'Income_Verified', - 'Purpose_Of_Loan', - 'Debt_To_Income', - 'Inquiries_Last_6Mo', - 'Months_Since_Deliquency', - 'Number_Open_Accounts', - 'Total_Accounts', - 'Gender', - ], - output_classes: ['0', '1', '2'], - results: [ - [ - [ - 0.25684793191388294, 0.25554849157085374, - 0.25424909865576073, 0.2529497946837637, - 0.25165062151619444, 0.250351621354826, - 0.24905283673593265, 0.24775431052421976, - 0.2464560859065813, 0.2451582063856715, - 0.24386071577332977, 0.2425636581838341, - 0.2412670780270115, 0.2399710200011615, - 0.23867552908583126, 0.2373806505344602, - 0.23608642986682288, 0.23479291286134804, - 0.2335001455472923, 0.23220817419676387, - 0.2309170453165482, 0.2296268056398914, - 0.22833750211804119, 0.22704918191171572, - 0.2257618923824025, 0.22447568108353297, - 0.22319059575154784, 0.22190668429679314, - 0.22062399479433414, 0.21934257547461383, - 0.2180624747140327, 0.2167837410253653, - 0.21550642304813022, 0.21423056953877723, - 0.212956229360842, 0.21168345147496864, - 0.21041228492882705, 0.20914277884696494, - 0.2078749824205544, 0.20660894489707113, - 0.20534471556987446, 0.20408234376774104, - 0.2028218788443043, 0.20156337016743928, - 0.20030686710857984, 0.19905241903201554, - 0.19780007528406382, 0.19654988518227354, - 0.19530189800453954, 0.19405616297820164, - 0.19281272926910142, 0.19157164597061163, - 0.19033296209265452, 0.18909672655069193, - 0.18786298815471644, 0.18663179559820792, - 0.18540319744713757, 0.1841772421289185, - 0.18295397792141668, 0.1817334529419294, - 0.18051571513622544, 0.179300812267579, - 0.1780887919058515, 0.17687970141659295, - 0.17567358795019847, 0.1744704984310938, - 0.17327047954700103, 0.17207357773820295, - 0.17087983918694338, 0.16968930980682354, - 0.1685020352323222, 0.1673180608083514, - 0.1661374315799153, 0.1649601922818611, - 0.1637863873286905, 0.16261606080450847, - 0.16144925645302083, 0.1602860176676952, - 0.15912638748197874, 0.1579704085596736, - 0.1568181231853864, 0.15566957325515482, - 0.15452480026714716, 0.15338384531253776, - 0.15224674906649127, 0.1511135517792948, - 0.14998429326764906, 0.14885901290607656, - 0.1477377496185213, 0.14662054187006565, - 0.14550742765883723, 0.14439844450805683, - 0.14329362945828122, 0.14219301905977494, - 0.1410966493650941, 0.14000455592182595, - 0.1389167737655158, 0.13783333741275958, - 0.13675428085452157, 0.13567963754958678, - ], - [ - 0.4614360107139594, 0.4605110286446398, - 0.45957603665440533, 0.4586310600785519, - 0.45767612558626997, 0.4567112611850967, - 0.45573649622508317, 0.454751861402479, - 0.45375738876311345, 0.4527531117053351, - 0.45173906498254507, 0.4507152847053745, - 0.44968180834339255, 0.448638674726472, - 0.44758592404567277, 0.4465235978537108, - 0.4454517390650577, 0.44437039195553546, - 0.4432796021615338, 0.4421794166787482, - 0.4410698838605167, 0.43995105341568086, - 0.43882297640601314, 0.4376857052431973, - 0.43653929368536465, 0.43538379683312445, - 0.43421927112524245, 0.43304577433376007, - 0.4318633655587115, 0.43067210522237154, - 0.42947205506301195, 0.42826327812825693, - 0.4270458387679452, 0.4258198026265092, - 0.42458523663492576, 0.4233422090022048, - 0.4220907892064204, 0.4208310479852433, - 0.41956305732608973, 0.41828689045574874, - 0.41700262182960673, 0.41571032712036776, - 0.4144100832063865, 0.4131019681595376, - 0.4117860612325791, 0.4104624428461966, - 0.4091311945755074, 0.4077923991361864, - 0.40644614037014815, 0.4050925032308333, - 0.40373157376804225, 0.40236343911235534, - 0.4009881874591991, 0.3996059080524555, - 0.39821669116769975, 0.39682062809504826, - 0.3954178111216124, 0.3940083335135905, - 0.3925922894980195, 0.39116977424406607, - 0.38974088384409034, 0.388305715294278, - 0.3868643664749477, 0.3854169361305654, - 0.3839635238493791, 0.38250423004279366, - 0.381039155924411, 0.37956840348875404, - 0.3780920754898146, 0.3766102754191149, - 0.3751231074837414, 0.37363067658392096, - 0.37213308829050307, 0.37063044882206714, - 0.36912286502193675, 0.3676104443348535, - 0.3660932947835171, 0.3645715249449317, - 0.3630452439265128, 0.3615145613420652, - 0.3599795872876034, 0.3584404323169793, - 0.3568972074173702, 0.35535002398470733, - 0.35379899379888574, 0.3522442289989505, - 0.3506858420581015, 0.34912394575871986, - 0.3475586531672365, 0.3459900776089632, - 0.34441833264285465, 0.34284353203632867, - 0.3412657897398899, 0.33968521986190586, - 0.33810193664326976, 0.3365160544321191, - 0.3349276876585515, 0.3333369508094069, - 0.33174395840303317, 0.3301488249641631, - ], - [ - 0.2817160573721509, 0.283940479784509, 0.2861748646898368, - 0.2884191452376876, 0.2906732528975371, - 0.2929371174600804, 0.2952106670389891, 0.2974938280733, - 0.29978652533029865, 0.3020886819089893, - 0.3044002192441223, 0.30672105711079295, - 0.3090511136295963, 0.31139030527236494, - 0.31373854686849584, 0.3160957516118266, - 0.31846183106812004, 0.3208366951831168, - 0.3232202522911721, 0.3256124091244938, - 0.3280130708229336, 0.3304221409444265, - 0.3328395214759405, 0.3352651128450837, - 0.33769881393223805, 0.3401405220833457, - 0.3425901331232124, 0.3450475413694469, - 0.34751263964695117, 0.34998531930302007, - 0.352465470222962, 0.3549529808463795, - 0.35744773818392517, 0.3599496278347179, - 0.3624585340042291, 0.36497433952282377, - 0.36749692586475224, 0.3700261731677928, - 0.37256196025335553, 0.3751041646471795, - 0.37765266260052005, 0.3802073291118872, - 0.38276803794930897, 0.38533466167302877, - 0.387907071658835, 0.390485138121785, 0.39306873014043137, - 0.3956577156815418, 0.39825196162531423, - 0.4008513337909646, 0.40345569696286165, - 0.4060649149170347, 0.4086788504481472, - 0.41129736539685186, 0.413920320677581, - 0.4165475763067465, 0.41917899143124876, - 0.4218144243574913, 0.4244537325805651, - 0.42709677281400477, 0.4297434010196821, - 0.4323934724381392, 0.43504684161919527, - 0.4377033624528396, 0.4403628882004295, - 0.4430252715261151, 0.44569036452859645, - 0.44835801877304315, 0.4510280853232426, - 0.4537004147740577, 0.45637485728394295, - 0.4590512626077355, 0.46172948012958703, - 0.4644093588960656, 0.4670907476493688, - 0.4697734948606411, 0.4724574487634616, - 0.47514245738737393, 0.4778283685915127, - 0.48051503009826185, 0.4832022895270076, - 0.4858899944278635, 0.48857799231548144, - 0.49126613070275527, 0.49395425713462415, - 0.49664221922175883, 0.4993298646742469, - 0.5020170413352069, 0.5047035972142415, 0.507389380520981, - 0.5100742396983048, 0.5127580234556188, - 0.5154405808018301, 0.5181217610783277, - 0.5208014139916376, 0.5234793896460564, - 0.5261555385759344, 0.5288297117778326, - 0.5315017607424479, 0.5341715374862542, - ], - ], - [ - [ - 0.20791461352081506, 0.20760444739496597, - 0.20729416802605688, 0.20698377698887827, - 0.2066732758611196, 0.20636266622335095, - 0.2060519496589754, 0.20574112775420306, - 0.20543020209802518, 0.2051191742821657, - 0.2048080459010725, 0.2044968185518556, - ], - [ - 0.4130702735067251, 0.4138887552723341, - 0.4147077060287561, 0.4155271215564005, - 0.4163469976258253, 0.4171673299978022, - 0.41798811442344125, 0.41880934664422903, - 0.4196310223921425, 0.42045313738971885, - 0.4212756873501272, 0.4220986679773003, - ], - [ - 0.3790151129724588, 0.3785067973327037, - 0.3779981259451858, 0.3774891014547208, - 0.37697972651304945, 0.37647000377884965, - 0.37595993591758353, 0.37544952560156436, - 0.3749387755098301, 0.37442768832811724, - 0.3739162667488009, 0.3734045134708373, - ], - ], - [ - [ - 0.20770887111267808, 0.20726646212011637, - 0.20682464055169508, 0.20638340689783957, - 0.20594276164419903, 0.2055027052716237, - ], - [ - 0.4151405323398443, 0.41566550163593713, - 0.4161904538858689, 0.41671538781866657, - 0.4172403021648884, 0.4177651956566585, - ], - [ - 0.3771505965474778, 0.3770680362439448, - 0.37698490556243386, 0.37690120528349763, - 0.37681693619091283, 0.37673209907171135, - ], - ], - [ - [ - 0.1708613216094513, 0.1716272782031934, - 0.1723952055730107, 0.17316509914964043, - 0.17393695430544132, 0.17471076635458496, - 0.17548653055321578, 0.1762642420996398, - 0.17704389613450036, 0.17782548774097923, - 0.1786090119449706, 0.17939446371530704, - 0.1801818379639282, 0.18097112954611902, - 0.18176233326067992, 0.18255544385018635, - 0.1833504560011743, 0.18414736434438375, - 0.18494616345495996, 0.18574684785271187, - 0.18654941200234285, 0.1873538503136559, - 0.1881601571418568, 0.18896832678774356, - 0.18977835349798858, 0.19059023146539703, - 0.19140395482914288, 0.1922195176750575, - 0.19303691403587114, 0.1938561378915066, - 0.19467718316933755, 0.19550004374448135, - 0.19632471344006666, 0.1971511860275314, - 0.19797945522690155, 0.19880951470708902, - 0.19964135808619538, 0.20047497893179683, - 0.20131037076126118, 0.2021475270420515, - 0.20298644119203824, 0.20382710657980563, - 0.2046695165249855, 0.20551366429855808, - 0.20635954312319252, 0.2072071461735673, - 0.20805646657670182, 0.20890749741230014, - 0.20976023171306618, 0.21061466246506746, - 0.21147078260806246, 0.2123285850358691, - 0.21318806259667564, 0.21404920809344188, - 0.21491201428421353, 0.21577647388249555, - 0.21664257955763375, 0.2175103239351369, - 0.21837969959708714, 0.2192506990824761, - 0.22012331488759226, 0.22099753946639883, - 0.22187336523090626, 0.22275078455155017, - 0.22362978975758102, 0.22451037313743197, - 0.22539252693913828, 0.2262762433706903, - 0.2271615146004572, 0.22804833275755199, - 0.22893668993226046, 0.2298265781764087, - 0.23071798950378808, 0.2316109158905362, - 0.23250534927557506, 0.2334012815609795, - 0.2342987046124044, 0.23519761025951208, - 0.2360979902963455, 0.23699983648178996, - 0.2379031405399394, 0.2388078941605616, - 0.23971408899948937, 0.24062171667904977, - 0.2415307687884784, 0.24244123688436667, - 0.24335311249106642, 0.24426638710112, - 0.24518105217569935, 0.24609709914502392, - 0.24701451940880192, 0.24793330433665553, - 0.2488534452685687, 0.2497749335152942, - 0.2506977603588247, 0.251621917052793, 0.2525473948229436, - 0.25347418486755124, 0.2544022783578713, - 0.2553316664385702, - ], - [ - 0.39520026051431273, 0.39575666853311203, - 0.39631059652637624, 0.39686203089753114, - 0.3974109581235669, 0.39795736475581756, - 0.39850123742072047, 0.3990425628206681, - 0.39958132773467864, 0.4001175190192797, - 0.4006511236091805, 0.40118212851808516, - 0.4017105208394123, 0.40223628774707487, - 0.40275941649618596, 0.4032798944238029, - 0.4037977089496808, 0.4043128475769458, - 0.40482529789286514, 0.40533504756949496, - 0.40584208436445357, 0.4063463961215452, - 0.4068479707714987, 0.4073467963326205, 0.407842860911495, - 0.4083361527036231, 0.40882665999411394, - 0.40931437115831776, 0.409799274662473, - 0.41028135906435814, 0.41076061301392747, - 0.4112370252539064, 0.4117105846204458, - 0.41218128004370747, 0.4126491005484873, - 0.4131140352547744, 0.41357607337839947, - 0.41403520423152684, 0.41449141722333716, - 0.4149447018604933, 0.41539504774775216, - 0.4158424445884852, 0.4162868821852358, - 0.4167283504402529, 0.4171668393560151, 0.417602339035716, - 0.41803483968382715, 0.4184643316065471, - 0.4188908052123417, 0.4193142510123705, - 0.4197346596210026, 0.420152021756288, 0.4205663282403904, - 0.4209775700000448, 0.4213857380670042, - 0.4217908235784774, 0.4221928177775351, - 0.42259171201355666, 0.42298749774258043, - 0.4233801665277822, 0.42376971003978564, - 0.4241561200571132, 0.4245393884664935, - 0.4249195072632786, 0.4252964685517638, 0.425670264545545, - 0.4260408875678585, 0.42640833005191553, - 0.42677258454119893, 0.4271336436897933, - 0.4274915002626815, 0.4278461471360347, - 0.4281975772974879, 0.4285457838464443, - 0.42889075999430065, 0.4292324990647251, - 0.4295709944939044, 0.4299062398307926, - 0.4302382287373108, 0.43056695498858755, - 0.43089241247318133, 0.4312145951932442, - 0.43153349726477125, 0.43184911291772266, - 0.4321614364962495, 0.43247046245882886, - 0.43277618537844975, 0.4330785999427194, - 0.43337770095403294, 0.43367348332971967, - 0.4339659421021029, 0.43425507241868117, - 0.43454086954219145, 0.43482332885071007, - 0.4351024458377222, 0.43537821611224775, - 0.43565063539886045, 0.4359196995377621, - 0.43618540448482807, 0.43644774631165106, - ], - [ - 0.4339384178762362, 0.43261605326369723, - 0.43129419790061413, 0.4299728699528325, - 0.42865208757098966, 0.42733186888960006, - 0.426012232026059, 0.42469319507969094, - 0.4233747761308189, 0.42205699323975016, - 0.4207398644458458, 0.4194234077666057, - 0.4181076411966542, 0.416792582706802, - 0.41547825024313434, 0.41416466172600935, - 0.4128518350491415, 0.4115397880786733, - 0.4102285386521792, 0.40891810457779154, - 0.407608503633207, 0.4062997535647956, 0.4049918720866467, - 0.4036848768796363, 0.4023787855905162, - 0.4010736158309811, 0.3997693851767444, - 0.39846611116662833, 0.3971638113016628, - 0.39586250304413506, 0.394562203816732, - 0.39326293100160686, 0.3919647019394806, - 0.3906675339287555, 0.38937144422460945, - 0.38807645003813646, 0.3867825685354136, - 0.38548981683667616, 0.3841982120154003, - 0.38290777109745594, 0.3816185110602131, - 0.3803304488317117, 0.379043601289782, 0.3777579852611915, - 0.3764736175207941, 0.3751905147907193, - 0.3739086937394704, 0.3726281709811496, - 0.37134896307459486, 0.37007108652256365, - 0.36879455777093006, 0.3675193932078412, - 0.3662456091629306, 0.3649732219065092, - 0.3637022476487824, 0.36243270253902304, - 0.3611646026648265, 0.35989796405130986, - 0.3586328026603336, 0.35736913438974605, - 0.3561069750726207, 0.35484634047649016, - 0.3535872463025955, 0.35232970818516907, - 0.3510737416906591, 0.3498193623170227, - 0.34856658549299796, 0.347315426577394, - 0.34606590085834815, 0.3448180235526531, - 0.3435718098050607, 0.3423272746875555, - 0.34108443319872506, 0.33984330026301995, - 0.338603890730129, 0.3373662193742981, - 0.33613030089368706, 0.33489614990969624, - 0.33366378096634586, 0.33243320852962843, - 0.33120444698688284, 0.3299775106461899, - 0.32875241373574365, 0.3275291704032286, - 0.326307794715275, 0.3250883006568003, - 0.32387070213048647, 0.32265501295616544, - 0.32144124687026504, 0.320229417525259, - 0.31901953848909625, 0.31781162324465667, - 0.3166056851892397, 0.31540173763400037, - 0.3141997938034565, 0.31299986683496045, - 0.3118019697781938, 0.31060611559468837, - 0.30941231715729994, 0.30822058724977863, - ], - ], - [ - [ - 0.2065757190254283, 0.2066627298896715, - 0.20674948681877142, - ], - [ - 0.4159340792841185, 0.41641454517778875, - 0.4168949658419619, - ], - [0.3774902016904549, 0.376922724932538, 0.3763555473392667], - ], - [ - [ - 0.2080710992506093, 0.20754382939474086, - 0.2070172488107076, 0.20649135900959695, - 0.20596616149499086, 0.2054416577629005, - 0.20491784930176338, 0.20439473759241877, - 0.2038723241080718, 0.2033506103142809, - 0.20282959766892464, 0.20230928762219655, - 0.20178968161655034, 0.2012707810867149, - ], - [ - 0.41699987684597817, 0.41675394333072024, - 0.416506881038836, 0.41625869216251166, - 0.4160093789077573, 0.41575894349438164, - 0.415507388155956, 0.41525471513974377, - 0.4150009267066793, 0.41474602513129855, - 0.4144900127016976, 0.41423289171951105, - 0.41397466449982184, 0.4137153333711433, - ], - [ - 0.3749290239034138, 0.37570222727454494, - 0.3764758701504559, 0.3772499488278907, - 0.37802445959725545, 0.37879939874271945, - 0.3795747625422816, 0.38035054726783457, - 0.38112674918525324, 0.3819033645544207, - 0.38268038962937573, 0.3834578206582914, - 0.3842356538836251, 0.3850138855421369, - ], - ], - [ - [ - 0.2408526263844874, 0.24006706894762941, - 0.23928314467119358, 0.23850085577364982, - 0.23772020443666983, 0.23694119280520748, - 0.2361638229875473, 0.23538809705537203, - 0.23461401704382887, 0.23384158495157237, - 0.23307080274086434, 0.23230167233761026, - 0.2315341956314393, 0.23076837447577633, - 0.23000421068791196, 0.22924170604907232, - 0.22848086230449943, 0.2277216811635104, - 0.22696416429959987, 0.22620831335050184, - 0.22545412991826383, 0.2247016155693353, - 0.2239507718346718, 0.2232016002097735, - 0.2224541021548047, 0.22170827909466648, - 0.22096413241909346, 0.22022166348273084, - 0.21948087360522667, 0.2187417640713401, - 0.21800433613100562, 0.2172685909994531, - 0.2165345298572853, 0.21580215385058443, - 0.2150714640909969, 0.2143424616558612, - 0.21361514758825678, 0.21288952289716706, - 0.21216558855752915, 0.21144334551036142, - 0.21072279466286914, 0.21000393688854882, - 0.209286773027274, 0.20857130388544393, - 0.20785753023604525, 0.20714545281880106, - 0.20643507234026304, 0.20572638947391164, - 0.20501940486030504, 0.20431411910715347, - 0.2036105327894646, 0.20290864644963674, - 0.20220846059759132, 0.20150997571087778, - 0.20081319223481406, 0.20011811058256987, - 0.19942473113533474, 0.1987330542423833, - 0.19804308022125555, 0.19735480935783853, - 0.19666824190650706, 0.1959833780902441, - 0.19530021810077428, 0.19461876209867937, - 0.19393901021353271, 0.19326096254402855, - 0.1925846191580973, 0.1919099800930629, - 0.1912370453557497, 0.1905658149226166, - 0.1898962887398967, 0.18922846672372842, - 0.18856234876028918, 0.18789793470592261, - 0.18723522438727896, 0.18657421760146004, - 0.18591491411613592, 0.18525731366969383, - 0.184601415971377, 0.18394722070141414, - 0.18329472751117007, 0.18264393602327242, - 0.18199484583176095, 0.1813474565022262, - 0.18070176757194692, 0.1800577785500342, - 0.17941548891757608, 0.1787748981277744, - 0.1781360056060878, 0.17749881075039178, - 0.1768633129311005, 0.17622951149131894, - 0.1755974057469953, 0.1749669949870558, - 0.17433827847357142, 0.17371125544187427, - 0.17308592510071982, 0.17246228663244367, - 0.17184033919308836, 0.17122008191258234, - ], - [ - 0.38698896438983676, 0.38762759478206, - 0.38826584133230835, 0.38890370107365485, - 0.3895411710557256, 0.39017824834479437, - 0.39081493002378653, 0.39145121319232407, - 0.39208709496676203, 0.3927225724802089, - 0.3933576428825554, 0.3939923033405086, - 0.3946265510376172, 0.3952603831743111, - 0.39589379696790794, 0.39652678965262367, - 0.3971593584796733, 0.3977915007171778, - 0.39842321365029143, 0.3990544945811671, - 0.39968534082899065, 0.4003157497299775, - 0.40094571863744966, 0.4015752449217954, - 0.4022043259704901, 0.402832959188172, 0.403461141996576, - 0.4040888718345977, 0.4047161461582929, - 0.40534296244089485, 0.40596931817281723, - 0.4065952108616711, 0.40722063803226294, - 0.4078455972266256, 0.40847008600399465, - 0.40909410194086054, 0.4097176426309192, - 0.4103407056851137, 0.4109632887316335, - 0.41158538941592476, 0.41220700540064725, - 0.41282813436574056, 0.41344877400840035, - 0.4140689220430424, 0.41468857620135785, - 0.4153077342322807, 0.4159263939019839, - 0.4165445529938843, 0.41716220930864306, - 0.4177793606641564, 0.41839600489552237, - 0.4190121398550995, 0.41962776341242664, - 0.42024287345427574, 0.42085746788458406, - 0.4214715446244934, 0.42208510161232504, - 0.4226981368035587, 0.42331064817082326, - 0.42392263370388444, 0.42453409140965526, - 0.42514501931211574, 0.42575541545239753, - 0.42636527788868905, 0.42697460469621334, - 0.4275833939672908, 0.42819164381123737, - 0.4287993523543805, 0.42940651774005684, - 0.4300131381285564, 0.43061921169711515, - 0.43122473663991623, 0.43182971116802327, - 0.43243413350939647, 0.43303800190886294, - 0.4336413146280655, 0.4342440699454634, - 0.43484626615628885, 0.4354479015725591, - 0.43604897452298963, 0.4366494833530135, - 0.4372494264247476, 0.4378488021169172, - 0.43844760882490263, 0.43904584496065713, - 0.43964350895266735, 0.44024059924597564, - 0.4408371143020832, 0.44143305259898125, - 0.4420284126310507, 0.44262319290909025, - 0.4432173919602397, 0.4438110083279737, - 0.44440404057202526, 0.4449964872684163, - 0.4455883470093441, 0.4461796184032051, - 0.44677030007452295, 0.4473603906639141, - 0.447949888828078, - ], - [ - 0.37215840922567545, 0.37230533627031476, - 0.3724510139964948, 0.37259544315269366, - 0.37273862450759837, 0.37288055884999854, - 0.37302124698866246, 0.37316068975230277, - 0.37329888798941, 0.37343584256822043, 0.3735715543765806, - 0.3737060243218815, 0.37383925333093976, - 0.3739712423499115, 0.3741019923441821, - 0.37423150429829666, 0.37435977921583347, - 0.3744868181193078, 0.3746126220501007, - 0.3747371920683283, 0.3748605292527466, - 0.3749826347006762, 0.3751035095278823, - 0.3752231548684374, 0.375341571874697, - 0.37545876171716097, 0.37557472558433547, - 0.3756894646826742, 0.37580298023647885, - 0.3759152734877613, 0.3760263456961699, - 0.3761361981388768, 0.376244832110453, 0.3763522489227972, - 0.3764584499050067, 0.3765634364032811, - 0.37666720978082113, 0.3767697714177205, - 0.3768711227108355, 0.3769712650737228, - 0.3770701999364875, 0.3771679287457115, - 0.3772644529643258, 0.3773597740715182, - 0.3774538935625934, 0.3775468129489145, - 0.37763853375775513, 0.3777290575322043, - 0.3778183858310477, 0.3779065202286929, - 0.3779934623150136, 0.3780792136952651, - 0.37816377598997847, 0.3782471508348398, - 0.37832933988060286, 0.37841034479293395, - 0.3784901672523418, 0.3785688089540577, - 0.37864627160792275, 0.37872255693827594, - 0.378797666683846, 0.37887160259763736, - 0.37894436644682133, 0.3790159600126355, - 0.37908638509025205, 0.3791556434886799, - 0.37922373703067047, 0.3792906675525583, - 0.3793564369041933, 0.37942104694883144, - 0.37948449956298996, 0.37954679663636104, - 0.3796079400716907, 0.379667931784682, 0.3797267737038534, - 0.37978446777047203, 0.37984101593840736, - 0.3798964201740115, 0.3799506824560645, - 0.3800038047755968, 0.3800557891358164, - 0.3801066375519867, 0.3801563520513169, - 0.3802049346728647, 0.38025238746740053, - 0.380298712497296, 0.38034391183644806, - 0.3803879875701403, 0.3804309417949327, - 0.3804727766185574, 0.38051349415981145, - 0.380553096548447, 0.38059158592504055, - 0.38062896444091815, 0.38066523425801424, - 0.38070039754878165, 0.38073445649607845, - 0.3807674132930364, 0.38079927014298853, - 0.38083002925934956, - ], - ], - [ - [ - 0.206898291038472, 0.2065879977623744, 0.2062778929159397, - 0.20596797697033437, 0.2056582503961193, - 0.20534871366325383, 0.20503936724109142, - 0.20473021159837923, 0.20442124720323826, - ], - [ - 0.41655689557440406, 0.4163351250201861, - 0.41611292026035235, 0.4158902819824381, - 0.4156672108765806, 0.41544370763547445, - 0.4152197729544039, 0.41499540753123393, - 0.4147706120663652, - ], - [ - 0.37654481338712087, 0.37707687721743716, - 0.37760918682370476, 0.3781417410472258, - 0.37867453872730505, 0.37920757870127464, - 0.3797408598045034, 0.38027438087039106, - 0.38080814073039687, - ], - ], - [ - [ - 0.24034756152291858, 0.23865186803465677, - 0.23696394277651742, 0.2352838048082408, - 0.23361147239592184, 0.2319469630159406, - 0.23029029335900938, 0.2286414793343495, - 0.22700053607399048, 0.2253674779371972, - 0.22374231851502838, 0.22212507063499604, - 0.22051574636584392, 0.21891435702245104, - 0.21732091317083643, 0.21573542463325643, - 0.21415790049343797, 0.21258834910189214, - 0.21102677808133105, 0.20947319433217054, - 0.20792760403815658, 0.20639001267204574, - 0.204860425001398, 0.2033388450944554, 0.2018252763260689, - 0.20031972138375706, 0.19882218227380544, - 0.1973326603274417, 0.19585115620711355, 0.19437766991277, - 0.19291220078830246, 0.19145474752796163, - 0.1900053081828802, 0.18856388016764886, - 0.18713046026693708, 0.18570504464217855, - 0.1842876288382931, 0.18287820779047378, - 0.1814767758309992, 0.18008332669610852, - 0.17869785353289594, 0.1773203489062634, - 0.17595080480588973, 0.17458921265325072, - 0.17323556330864134, 0.1718898470782657, - 0.17055205372132237, 0.16922217245710763, - 0.1679001919721778, 0.16658610042748473, - 0.16527988546555789, 0.16398153421769268, - 0.16269103331114035, 0.16140836887632773, - 0.16013352655405957, 0.15886649150275117, - 0.15760724840564647, 0.1563557814780527, - 0.15511207447455627, 0.15387611069624477, - 0.15264787299794336, 0.15142734379541073, - 0.15021450507254036, 0.14900933838857622, - 0.1478118248852689, 0.14662194529406727, - 0.14543967994325202, 0.1442650087650952, - 0.14309791130295585, 0.14193836671839033, - 0.14078635379822615, 0.1396418509616203, - 0.13850483626706908, 0.137375287419433, - 0.1362531817768928, 0.1351384963579045, - 0.13403120784810368, 0.13293129260719802, - 0.1318387266758072, 0.1307534857822846, - 0.12967554534948947, 0.1286048805015304, - 0.12754146607047367, 0.1264852766029977, - 0.12543628636703077, 0.12439446935832164, - 0.123359799306982, 0.12233224968399198, - 0.12131179370764068, 0.12029840434994038, - 0.11929205434298916, 0.1182927161852797, - 0.11730036214796662, 0.11631496428108859, - 0.11533649441973146, 0.11436492419014291, - 0.11340022501581082, 0.11244236812347032, - 0.1114913245490631, 0.1105470651436581, - ], - [ - 0.41255796032767783, 0.4129238833521428, - 0.41328295079433713, 0.41363517007180206, - 0.4139805491228309, 0.41431909640134423, - 0.4146508208718258, 0.4149757320040672, - 0.4152938397679206, 0.4156051546280114, - 0.4159096875383683, 0.41620744993698894, - 0.4164984537404531, 0.41678271133832145, - 0.41706023558766103, 0.4173310398074348, - 0.41759513777288176, 0.4178525437098292, - 0.41810327228903343, 0.41834733862040024, - 0.41858475824728564, 0.41881554714064984, - 0.41903972169324905, 0.4192572987138092, - 0.4194682954211644, 0.41967272943834283, - 0.4198706187866873, 0.4200619818799253, - 0.42024683751822417, 0.42042520488225754, - 0.4205971035272115, 0.4207625533768598, - 0.42092157471755265, 0.42107418819222153, - 0.42122041479442784, 0.42136027586234887, - 0.42149379307277474, 0.4216209884351447, - 0.4217418842855427, 0.42185650328069724, - 0.4219648683920493, 0.4220670028997258, - 0.42216293038662966, 0.42225267473245187, - 0.4223362601077329, 0.4224137109679779, - 0.42248505204769093, 0.4225503083545164, - 0.42260950516336554, 0.42266266801053204, - 0.42270982268788565, 0.4227509952370369, - 0.4227862119435344, 0.42281549933115903, - 0.42283888415608806, 0.4228563934012734, - 0.42286805427069696, 0.4228738941837075, - 0.4228739407694645, 0.42286822186122436, - 0.4228567654909181, 0.4228395998834696, - 0.42281675345143355, 0.42278825478945004, - 0.42275413266885103, 0.4227144160322714, - 0.422669133988266, 0.4226183158060556, - 0.42256199091021973, 0.42250018887546936, - 0.4224329394214486, 0.4223602724076055, - 0.4222822178280865, 0.42219880580664204, - 0.4221100665916403, 0.4220160305510916, - 0.4219167281677062, 0.42181219003401127, - 0.4217024468475221, 0.4215875294059512, - 0.4214674686024546, 0.421342295420972, 0.4212120409315037, - 0.4210767362856219, 0.4209364127118163, - 0.4207911015110555, 0.420640834052312, 0.4204856417682016, - 0.42032555615056444, 0.4201606087462254, - 0.4199908311527115, 0.4198162550141023, - 0.41963691201679165, 0.4194528338855108, - 0.41926405237919223, 0.4190705992870256, - 0.41887250642451024, 0.4186698056295584, - 0.4184625287586698, 0.41825070768315825, - ], - [ - 0.34709447814940336, 0.348424248613202, - 0.34975310642914215, 0.351081025119953, 0.352407978481253, - 0.35373394058271485, 0.3550588857691559, - 0.3563827886615802, 0.3577056241580895, - 0.3590273674347931, 0.36034799394660694, - 0.36166747942800853, 0.3629857998937016, - 0.364302931639223, 0.36561885124150173, 0.366933535559307, - 0.36824696173367705, 0.36955910718827806, - 0.3708699496296439, 0.37217946704742566, - 0.37348763771455573, 0.374794440187307, - 0.37609985330535584, 0.37740385619173894, - 0.3787064282527726, 0.38000754917790003, - 0.38130719893950693, 0.3826053577926296, - 0.3839020062746641, 0.3851971252049718, - 0.3864906956844877, 0.38778269909517726, - 0.38907311709957254, 0.390361931640134, - 0.3916491249386308, 0.39293467949547095, - 0.394218578088929, 0.39550080377437824, - 0.39678133988345954, 0.39806017002319505, - 0.39933727807505726, 0.400612648194008, - 0.40188626480747786, 0.40315811261430295, - 0.40442817658362035, 0.40569644195375587, - 0.40696289423099163, 0.40822751918837485, - 0.40949030286445254, 0.41075123156197757, - 0.41201029184655463, 0.41326747054527085, - 0.41452275474532224, 0.4157761317925126, - 0.4170275892898525, 0.4182771150959748, - 0.4195246973236562, 0.42077032433823663, - 0.42201398475598806, 0.42325566744252874, - 0.42449536151114414, 0.42573305632111985, - 0.4269687414760212, 0.4282024068219679, - 0.42943404244587363, 0.43066363867366647, - 0.4318911860684847, 0.4331166754288437, - 0.4343400977868262, 0.4355614444061455, - 0.43678070678032366, 0.43799787663076994, - 0.4392129459048464, 0.4404259067739285, - 0.4416367516314664, 0.4428454730910064, - 0.4440520639841875, 0.4452565173587895, - 0.44645882647667195, 0.4476589848117668, - 0.4488569860480512, 0.45005282407750213, - 0.45124649299802116, 0.4524379871113822, - 0.45362730092115644, 0.45481442913063264, - 0.4559993666407022, 0.4571821085478036, - 0.45836265014179206, 0.4595409869038359, - 0.46071711450429603, 0.4618910288006228, - 0.4630627258352437, 0.4642322018333992, - 0.46539945320108006, 0.46656447652283095, - 0.4677272685596812, 0.4688878262469693, - 0.47004614669226347, 0.4712022271731859, - ], - ], - [ - [ - 0.2099936878925835, 0.20967606573130357, - 0.20935746844040848, 0.20903790072002024, - 0.2087173673066827, 0.20839587297318135, - 0.20807342252832545, 0.2077500208167539, - 0.2074256727187131, 0.20710038314984866, - 0.20677415706098878, 0.20644699943791264, - 0.206118915301145, 0.2057899097057105, - 0.20545998774091645, 0.205129154530107, - 0.20479741523043585, 0.2044647750326326, - 0.20413123916073972, 0.20379681287187348, - 0.20346150145598743, 0.20312531023560973, - 0.20278824456557845, 0.2024503098328099, - 0.20211151145600192, 0.20177185488540011, - 0.2014313456025109, 0.20108998911984488, - 0.200747790980634, 0.20040475675855654, - 0.2000608920574651, 0.19971620251109445, - 0.19937069378279082, 0.19902437156520122, - 0.1986772415800209, 0.19832930957766065, - 0.19798058133697558, 0.1976310626649663, - 0.19728075939646478, 0.19692967739384523, - 0.19657782254671138, 0.1962252007715918, - 0.19587181801162792, 0.19551768023625538, - 0.1944507968999591, 0.19373587685973898, - 0.19337733578291416, 0.19301808218637187, - 0.19048387749801693, 0.1838235982714836, - ], - [ - 0.40312842915841846, 0.4044156508864695, - 0.40570412523202637, 0.40699383572064485, - 0.4082847658133704, 0.4095768989075359, - 0.4108702183375808, 0.4121647073758365, - 0.4134603492333444, 0.41475712706067763, - 0.41605502394880484, 0.4173540229298652, - 0.4186541069780655, 0.4199552590104909, - 0.4212574618879896, 0.42256069841601235, - 0.4238649513454819, 0.4251702033736844, - 0.42647643714511346, 0.4277836352523935, - 0.4290917802371696, 0.4304008545909456, - 0.4317108407560651, 0.4330217211265703, - 0.43433347804912237, 0.4356460938239408, - 0.43695955070570347, 0.4382738309044655, - 0.4395889165866356, 0.4409047898758839, 0.442221432854074, - 0.44353882756224766, 0.4448569560015495, - 0.44617580013418223, 0.4474953418844008, - 0.4488155631394358, 0.4501364457504751, - 0.4514579715336727, 0.4527801222710791, - 0.4541028797116459, 0.45542622557222245, - 0.4567501415385068, 0.45807460926609567, - 0.4593996103814108, 0.463377629902106, 0.4660319717859517, - 0.46735978587752086, 0.46868800401038446, - 0.47799528178497397, 0.5019701837698595, - ], - [ - 0.38687788294899195, 0.38590828338222316, - 0.38493840632756493, 0.3839682635593344, - 0.3829978668799507, 0.38202722811927986, - 0.38105635913409064, 0.3800852718074104, - 0.3791139780479462, 0.3781424897894688, - 0.3771708189902065, 0.37619897763222476, - 0.3752269777207907, 0.3742548312837986, - 0.37328255037109503, 0.37231014705388626, - 0.3713376334240748, 0.3703650215936825, 0.369392323694147, - 0.36841955187572933, 0.3674467183068473, - 0.36647383517344595, 0.36550091467835477, - 0.36452796904062446, 0.36355501049487554, - 0.36258205129065835, 0.36160910369178667, - 0.3606361799756938, 0.35966329243273293, - 0.35869045336556227, 0.3577176750884602, - 0.3567449699266567, 0.3557723502156655, - 0.3547998283006137, 0.35382741653557515, - 0.3528551272829103, 0.3518829729125527, - 0.35091096580136333, 0.34993911833245905, - 0.34896744289450515, 0.3479959518810659, - 0.3470246576898966, 0.3460535727222747, - 0.34508270938233093, 0.34217157319793756, - 0.3402321513543106, 0.3392628783395627, - 0.33829391380325236, 0.3315208407170077, - 0.3142062179586544, - ], - ], - [ - [ - 0.19854209796679984, 0.19899807589977223, - 0.19944725979958677, 0.1998896038897614, - 0.20032506364692826, 0.20075359581269175, - 0.20117515840497208, 0.20158971072873144, - 0.20199721338617946, 0.20239762828637045, - 0.2027909186542278, 0.2031770490389952, - 0.20355598532209107, 0.20392769472437447, - 0.20429214581282518, 0.20464930850660074, - 0.20499915408255118, 0.2053416551800857, - 0.20567678580544968, 0.20600452133542446, - 0.2063248385204227, 0.2066377154869622, - 0.20694313173956122, 0.20724106816205287, - 0.20753150701826525, 0.20781443195215996, - 0.20808982798734663, 0.20835768152601902, - 0.20861798034732223, 0.2088707136051508, - 0.20911587182533367, 0.20935344690230825, - 0.20958343209517927, 0.20980582202327236, - 0.2100206126610929, 0.21022780133278549, - 0.210427386706008, 0.21061936878532153, - 0.21080374890504897, 0.21098052972160086, - 0.21114971520530967, 0.2113113106317846, - 0.2114653225727468, 0.21161175888641146, - 0.2117506287073997, 0.21188194243617983, - 0.2120057117280659, 0.21212194948178292, - 0.21223066982761404, 0.21233188811508666, - 0.21242562090033243, 0.21251188593294773, - 0.21259070214258263, 0.2126620896250595, - 0.21272606962821095, 0.2127826645372978, - 0.21283189786015666, 0.2128737942119817, - 0.2129083792997977, 0.21293567990664966, - 0.2129557238754902, 0.21296854009279262, - 0.21297415847191115, 0.2129726099361721, - 0.21296392640175763, 0.21294814076032195, - 0.212925286861426, 0.21289539949476297, - 0.2128585143721802, 0.21281466810956126, - 0.21276389820850122, 0.2127062430378556, - 0.21264174181514664, 0.21257043458784522, - 0.21249236221452533, 0.21240756634592928, - 0.21231608940593863, 0.21221797457245273, - 0.21200200759161003, 0.21149239793464947, - 0.2113490861269691, 0.21119950668362344, - 0.21088174183794225, 0.21017319728924094, - 0.20998114917965202, 0.2093700561024279, - 0.20823830154419476, 0.18886035014444738, - ], - [ - 0.35600330022225324, 0.3585701118739213, - 0.3611409400734081, 0.36371561075809034, - 0.3662939492286206, 0.3688757801994858, - 0.3714609278497601, 0.3740492158741144, - 0.3766404675340063, 0.379234505709005, - 0.38183115294829445, 0.38443023152220146, - 0.387031563473858, 0.3896349706708359, 0.392240274856846, - 0.39484729770332994, 0.3974558608610685, - 0.4000657860116715, 0.40267689491889025, - 0.4052890094798965, 0.4079019517762356, - 0.4105155441247117, 0.41312960912789926, - 0.4157439697244677, 0.41835844923916465, - 0.4209728714324949, 0.4235870605499857, - 0.4262008413711509, 0.4288140392579534, - 0.43142648020288155, 0.43403799087649786, - 0.43664839867458516, 0.43925753176465315, - 0.44186521913200366, 0.4444712906251334, - 0.44707557700062345, 0.44967790996731977, - 0.4522781222299989, 0.45487604753216526, - 0.4574715206984025, 0.46006437767582886, - 0.4626544555749242, 0.4652415927095476, - 0.46782562863626287, 0.4704064041928124, - 0.47298376153579536, 0.47555754417757834, - 0.4781275970223249, 0.48069376640122136, - 0.4832559001067336, 0.4858138474261407, - 0.4883674591740714, 0.49091658772415925, - 0.49346108703982816, 0.49600081270410284, - 0.498535621948508, 0.5010653736810318, 0.503589928513175, - 0.5061091487859604, 0.5086228985950738, - 0.5111310438149695, 0.5136334521220485, - 0.5161299930168711, 0.5186205378453321, - 0.5211049598189184, 0.5235831340339802, - 0.5260549374899809, 0.5285202491067743, - 0.5309789497409999, 0.5334309222013423, - 0.5358760512629225, 0.5383142236807071, - 0.5407453282018932, 0.5431692555774172, - 0.5455858985723935, 0.5479951519757269, - 0.5503969126086816, 0.5527910793325402, - 0.5575562367377013, 0.5669912023637412, - 0.5693295523852048, 0.5716595734451625, - 0.5762943004103234, 0.5854603114447128, - 0.5877298329773175, 0.5944845434224636, - 0.6055591537011138, 0.7094827454850011, - ], - [ - 0.44545460181094126, 0.44243181222631844, - 0.4394118001270057, 0.4363947853521479, - 0.4333809871244529, 0.430370623987825, 0.4273639137452665, - 0.42436107339715423, 0.42136231907982186, - 0.4183678660046249, 0.4153779283974832, - 0.4123927194388058, 0.40941245120404796, - 0.4064373346047844, 0.40346757933033306, - 0.40050339379007416, 0.39754498505636876, - 0.39459255880824523, 0.3916463192756628, - 0.3887064691846829, 0.3857732097033432, - 0.38284674038832445, 0.37992725913254005, - 0.3770149621134784, 0.37411004374256496, - 0.3712126966153481, 0.36832311146266805, - 0.36544147710282826, 0.36256798039471955, - 0.35970280619196693, 0.35684613729816544, - 0.3539981544231071, 0.35115903614016747, - 0.348328958844724, 0.34550809671377053, - 0.3426966216665895, 0.33989470332666255, - 0.3371025089846817, 0.3343202035627851, - 0.33154794957999517, 0.3287859071188572, - 0.3260342337932919, 0.32329308471770624, - 0.32056261247732376, 0.31784296709979026, - 0.31513429602803167, 0.3124367440943627, - 0.30975045349588565, 0.3070755637711701, - 0.30441221177818106, 0.3017605316735263, - 0.2991206548929809, 0.2964927101332534, - 0.2938768233351047, 0.2912731176676857, - 0.28868171351420135, 0.2861027284588082, - 0.2835362772748443, 0.28098247191424014, - 0.2784414214982753, 0.2759132323095451, - 0.2733980077851614, 0.27089584851122284, - 0.2684068522184998, 0.2659311137793218, - 0.26346872520569464, 0.2610197756486022, - 0.2585843513984672, 0.2561625358868185, 0.253754409689098, - 0.25136005052857097, 0.24897953328143665, - 0.24661292998295775, 0.24426030983474364, - 0.24192173921308077, 0.23959728167834213, - 0.23728699798538203, 0.23499094609501325, - 0.2304417556706838, 0.22151639970161194, - 0.2193213614878295, 0.2171409198712155, - 0.21282395775173274, 0.2043664912660493, - 0.2022890178430272, 0.19614540047511556, - 0.18620254475469447, 0.10165690437054901, - ], - ], - [ - [0.2066920220919377, 0.20664238933344], - [0.4162918979192408, 0.4164220769996552], - [0.37701607998882264, 0.3769355336669062], - ], - ], - }, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.tests:pdpOutput', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/pdpOutput.mdx', - status: 'MissingDependencies', - }, - { - cid: 'test1', - name: 'Test widget 1', - description: 'Test Widget 1', - tags: ['test'], - widgetSize: { - minW: 1, - minH: 4, - maxW: 12, - maxH: 36, - }, - properties: [ - { - key: 'Name', - helper: 'Enter the name', - default: '', - }, - { - key: 'Misc', - helper: 'Enter the misc text', - default: '', - }, - ], - dependencies: [ - { - cid: 'ThisIsAnInvalidInputBlockGID', - gid: 'aiverify.tests:ThisIsAnInvalidInputBlockGID', - valid: false, - }, - { - gid: 'fakealgoplugin:fakealgo1', - cid: 'fakealgo1', - version: '>=0.2.0', - valid: false, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.tests:test1', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/test1.mdx', - status: 'MissingDependencies', - }, - { - cid: 'test2', - name: 'Test widget 2', - description: 'Test Widget 2', - tags: ['test'], - widgetSize: { - minW: 1, - maxW: 12, - minH: 4, - maxH: 36, - }, - dependencies: [ - { - cid: 'testib', - gid: 'aiverify.tests:testib', - valid: true, - }, - ], - mockdata: [ - { - type: 'InputBlock', - cid: 'testib', - datapath: './testform.mock.json', - gid: 'aiverify.tests:testib', - data: { - lname: 'Tan', - fname: 'Ah Kow', - }, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.tests:test2', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/test2.mdx', - status: 'OK', - }, - { - cid: 'test3', - name: 'Test widget 3', - description: 'Test Widget 3 description', - tags: ['test'], - widgetSize: { - minW: 1, - minH: 4, - maxW: 12, - maxH: 12, - }, - dependencies: [ - { - cid: 'testib', - gid: 'aiverify.tests:testib', - valid: true, - }, - { - gid: 'fakealgoplugin:fakealgo1', - cid: 'fakealgo1', - version: '>=0.1.0', - valid: false, - }, - ], - type: 'ReportWidget', - gid: 'aiverify.tests:test3', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/test3.mdx', - status: 'MissingDependencies', - }, - { - cid: 'testchart', - name: 'Test Chart', - description: 'For testing charts', - tags: ['test'], - widgetSize: { - minW: 12, - minH: 36, - maxW: 12, - maxH: 36, - }, - dependencies: [], - mockdata: [], - type: 'ReportWidget', - gid: 'aiverify.tests:testchart', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/testchart.mdx', - status: 'OK', - }, - { - cid: 'testdh', - widgetSize: { - minW: 12, - minH: 3, - maxW: 12, - maxH: 36, - }, - name: 'Test Dynamic Height', - dynamicHeight: true, - type: 'ReportWidget', - gid: 'aiverify.tests:testdh', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - mdxPath: 'aiverify.tests/widgets/testdh.mdx', - status: 'OK', - }, - ], - inputBlocks: [ - { - cid: 'testib', - name: 'testib', - type: 'InputBlock', - gid: 'aiverify.tests:testib', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - width: 'md', - mdxPath: 'aiverify.tests/inputs/testib.mdx', - summaryPath: 'aiverify.tests/inputs/testib.summary.mdx', - }, - ], - isStock: false, - installedAt: 1690831200573, - }, - ], - inputBlocks: [ - { - cid: 'mock_iblock1', - name: 'Mock Input Block 1', - type: 'InputBlock', - gid: `${MOCK_IBLOCK_ID}`, - version: '1.0.0', - pluginGID: 'aiverify.test.mock_test_plugin1', - width: 'md', - mdxPath: 'aiverify.mock_test_plugin1/inputs/mock_iblock1.mdx', - summaryPath: 'aiverify.mock_test_plugin1/inputs/mock_iblock1.summary.mdx', - }, - { - cid: 'testib', - name: 'testib', - type: 'InputBlock', - gid: 'aiverify.tests:testib', - version: '1.0.0-alpha', - pluginGID: 'aiverify.tests', - width: 'md', - mdxPath: 'aiverify.tests/inputs/testib.mdx', - summaryPath: 'aiverify.tests/inputs/testib.summary.mdx', - }, - ], - algorithms: [ - { - cid: 'mock_algo1', - name: 'Fairness Metrics Toolbox for Regression', - modelType: ['regression'], - version: '0.9.0', - author: 'AI Verify', - description: 'This is a mock description of mock algo 1', - tags: [ - 'Fairness Metrics Toolbox for Regression', - 'regression', - 'fairness', - ], - requireGroundTruth: true, - requiredFiles: [ - 'AUTHORS.rst', - 'CHANGELOG.md', - 'input.schema.json', - 'LICENSE', - 'output.schema.json', - 'mock_algo1.meta.json', - 'mock_algo1.py', - 'README.md', - 'requirements.txt', - 'syntax_checker.py', - ], - type: 'Algorithm', - gid: `${MOCK_ALGO_ID}`, - pluginGID: 'aiverify.test.mock_test_plugin1', - algoPath: - '../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/algorithms/mock_algo1', - requirements: [ - 'joblib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"', - 'numpy==1.23.5 ; python_version >= "3.10" and python_version < "4.0"', - 'pandas==1.5.3 ; python_version >= "3.10" and python_version < "4.0"', - 'python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0"', - 'pytz==2023.3 ; python_version >= "3.10" and python_version < "4.0"', - 'scikit-learn==1.2.2 ; python_version >= "3.10" and python_version < "4.0"', - 'scipy==1.9.3 ; python_version >= "3.10" and python_version < "4.0"', - 'six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"', - 'threadpoolctl==3.1.0 ; python_version >= "3.10" and python_version < "4.0"', - ], - inputSchema: { - title: 'Algorithm Plugin Input Arguments', - description: 'A schema for algorithm plugin input arguments', - type: 'object', - required: ['sensitive_feature'], - properties: { - sensitive_feature: { - title: 'Sensitive Feature Names', - description: 'Array of Sensitive Feature Names (e.g. Gender)', - type: 'array', - items: { - type: 'string', - }, - minItems: 1, - }, - }, - }, - outputSchema: { - title: 'Algorithm Plugin Output Arguments', - description: 'A schema for algorithm plugin output arguments', - type: 'object', - required: ['results'], - minProperties: 1, - properties: { - results: { - type: 'array', - minItems: 1, - title: 'The results Schema', - items: { - type: 'object', - properties: { - mae: { - type: 'number', - }, - r2: { - type: ['number', 'null'], - }, - mse: { - type: 'number', - }, - subgroup: { - type: 'string', - }, - }, - }, - }, - sensitive_feature: { - description: 'Array of sensitive feature names', - type: 'array', - minItems: 1, - items: { - type: 'string', - }, - }, - }, - }, - }, - ], - templates: [], - stockPlugins: [ - 'aiverify.stock.accumulated_local_effect', - 'aiverify.stock.partial_dependence_plot', - 'aiverify.stock.fairness_metrics_toolbox_for_classification', - 'aiverify.test.mock_test_plugin1', - 'aiverify.stock.shap_toolbox', - 'aiverify.stock.robustness_toolbox', - 'aiverify.stock.image_corruption_toolbox', - 'aiverify.stock.decorators', - 'aiverify.stock.process_checklist', - 'aiverify.stock.reports', - ], -}; - -const widgetMdxBundleResponse = { - code: 'var Component=(()=>{var mr=Object.create;var Y=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var gr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty;var Q=(s,u)=>()=>(u||s((u={exports:{}}).exports,u),u.exports),br=(s,u)=>{for(var g in u)Y(s,g,{get:u[g],enumerable:!0})},Oe=(s,u,g,h)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of pr(u))!hr.call(s,b)&&b!==g&&Y(s,b,{get:()=>u[b],enumerable:!(h=vr(u,b))||h.enumerable});return s};var ee=(s,u,g)=>(g=s!=null?mr(gr(s)):{},Oe(u||!s||!s.__esModule?Y(g,"default",{value:s,enumerable:!0}):g,s)),yr=s=>Oe(Y({},"__esModule",{value:!0}),s);var re=Q((wr,Pe)=>{Pe.exports=React});var Se=Q(te=>{"use strict";(function(){"use strict";var s=re(),u=Symbol.for("react.element"),g=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),U=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),C=Symbol.iterator,ae="@@iterator";function D(e){if(e===null||typeof e!="object")return null;var r=C&&e[C]||e[ae];return typeof r=="function"?r:null}var x=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i=1&&c>=0&&a[f]!==m[c];)c--;for(;f>=1&&c>=0;f--,c--)if(a[f]!==m[c]){if(f!==1||c!==1)do if(f--,c--,c<0||a[f]!==m[c]){var v=`\n`+a[f].replace(" at new "," at ");return e.displayName&&v.includes("")&&(v=v.replace("",e.displayName)),typeof e=="function"&&A.set(e,v),v}while(f>=1&&c>=0);break}}}finally{q=!1,X.current=l,Xe(),Error.prepareStackTrace=o}var P=e?e.displayName||e.name:"",Ce=P?F(P):"";return typeof e=="function"&&A.set(e,Ce),Ce}function qe(e,r,t){return pe(e,!1)}function ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function I(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,ze(e));if(typeof e=="string")return F(e);switch(e){case j:return F("Suspense");case R:return F("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case w:return qe(e.render);case y:return I(e.type,r,t);case S:{var i=e,o=i._payload,l=i._init;try{return I(l(o),r,t)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,ge={},he=x.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,t=I(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function Ke(e,r,t,i,o){{var l=Function.call.bind($);for(var n in e)if(l(e,n)){var a=void 0;try{if(typeof e[n]!="function"){var m=Error((i||"React class")+": "+t+" type `"+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[n]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}a=e[n](r,n,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(M(o),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",t,n,typeof a),M(null)),a instanceof Error&&!(a.message in ge)&&(ge[a.message]=!0,M(o),d("Failed %s type: %s",t,a.message),M(null))}}}var He=Array.isArray;function z(e){return He(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function ye(e){if(Ze(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),be(e)}var N=x.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,K;K={};function er(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=E(N.current.type);K[t]||(d(\'Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\',E(N.current.type),e.ref),K[t]=!0)}}function ir(e,r){{var t=function(){Ee||(Ee=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){_e||(_e=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var nr=function(e,r,t,i,o,l,n){var a={$$typeof:u,type:e,key:r,ref:t,props:n,_owner:l};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function or(e,r,t,i,o){{var l,n={},a=null,m=null;t!==void 0&&(ye(t),a=""+t),rr(r)&&(ye(r.key),a=""+r.key),er(r)&&(m=r.ref,tr(r,o));for(l in r)$.call(r,l)&&!Qe.hasOwnProperty(l)&&(n[l]=r[l]);if(e&&e.defaultProps){var f=e.defaultProps;for(l in f)n[l]===void 0&&(n[l]=f[l])}if(a||m){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(n,c),m&&ar(n,c)}return nr(e,a,m,o,i,N.current,n)}}var H=x.ReactCurrentOwner,Re=x.ReactDebugCurrentFrame;function O(e){if(e){var r=e._owner,t=I(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var J;J=!1;function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function xe(){{if(H.current){var e=E(H.current.type);if(e)return`\n\nCheck the render method of \\``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\\\\/]/,""),t=e.lineNumber;return`\n\nCheck your code at `+r+":"+t+"."}return""}}var we={};function lr(e){{var r=xe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`\n\nCheck the top-level render call using <`+t+">.")}return r}}function Te(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(we[t])return;we[t]=!0;var i="";e&&e._owner&&e._owner!==H.current&&(i=" It was passed a child from "+E(e._owner.type)+"."),O(e),d(\'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.\',t,i),O(null)}}function je(e,r){{if(typeof e!="object")return;if(z(e))for(var t=0;t",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var c=or(e,r,t,o,l);if(c==null)return c;if(n){var v=r.children;if(v!==void 0)if(i)if(z(v)){for(var P=0;P{"use strict";ke.exports=Se()});var Rr={};br(Rr,{cid:()=>Ae,default:()=>_r});var V=ee(ie());var p=ee(ie()),Ne=ee(re()),De=({metric:s,metric_name:u,container:g,data:h,parity:b})=>{let[W,L]=(0,Ne.useState)({data:[],bars:[]}),U="",w="",j="",R=0,y=0,S=h.sensitive_feature;for(let C of h.results){let ae=C,D=S.map((x,d)=>`${x}:${C.subgroup.split(",")[d]}`).join(",");local_metric=C[s],(y==0||local_metric=R)&&(R=local_metric,w=D)}let B=R-y;return(0,p.jsxDEV)("div",{style:{width:"100%"},children:[(0,p.jsxDEV)("p",{children:(0,p.jsxDEV)("b",{children:"Results"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:40,columnNumber:9},void 0)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:39,columnNumber:7},void 0),(0,p.jsxDEV)("p",{children:["The difference between ",(0,p.jsxDEV)("b",{children:(0,p.jsxDEV)("i",{children:w},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:35},void 0)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:32},void 0)," (group with highest value) and ",(0,p.jsxDEV)("b",{children:(0,p.jsxDEV)("i",{children:j},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:92},void 0)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:89},void 0)," (group with lowest value) is ",(0,p.jsxDEV)("b",{children:B},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:144},void 0)," for ",(0,p.jsxDEV)("i",{children:u},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:44,columnNumber:162},void 0),". In an ideal situation, the parity should be close to ",b,"."]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:43,columnNumber:7},void 0)]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/interpretation.mdx",lineNumber:38,columnNumber:5},void 0)};var Ae="mock_algo1";function Fe(s){return(0,V.jsxDEV)(De,{metric:"mae",metric_name:"Mean Absolute Error Parity",container:s.container,data:s.getResults(Ae),parity:"0"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/widget_cid_1.mdx",lineNumber:5,columnNumber:1},this)}function Er(s={}){let{wrapper:u}=s.components||{};return u?(0,V.jsxDEV)(u,Object.assign({},s,{children:(0,V.jsxDEV)(Fe,s,void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/widget_cid_1.mdx"},this)}),void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/stock.fairness-metrics-toolbox-for-regression/widgets/widget_cid_1.mdx"},this):Fe(s)}var _r=Er;return yr(Rr);})();\n/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n;return Component;', - frontmatter: {}, -}; - -const inputBlockMdxCompBundleResponse = { - code: 'var Component=(()=>{var lr=Object.create;var F=Object.defineProperty;var ur=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var cr=Object.getPrototypeOf,dr=Object.prototype.hasOwnProperty;var G=(s,a)=>()=>(a||s((a={exports:{}}).exports,a),a.exports),mr=(s,a)=>{for(var m in a)F(s,m,{get:a[m],enumerable:!0})},_e=(s,a,m,E)=>{if(a&&typeof a=="object"||typeof a=="function")for(let g of fr(a))!dr.call(s,g)&&g!==m&&F(s,g,{get:()=>a[g],enumerable:!(E=ur(a,g))||E.enumerable});return s};var vr=(s,a,m)=>(m=s!=null?lr(cr(s)):{},_e(a||!s||!s.__esModule?F(m,"default",{value:s,enumerable:!0}):m,s)),pr=s=>_e(F({},"__esModule",{value:!0}),s);var Ne=G((Er,Re)=>{Re.exports=React});var xe=G(X=>{"use strict";(function(){"use strict";var s=Ne(),a=Symbol.for("react.element"),m=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),K=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),J=Symbol.iterator,Oe="@@iterator";function Pe(e){if(e===null||typeof e!="object")return null;var r=J&&e[J]||e[Oe];return typeof r=="function"?r:null}var R=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,i=new Array(r>1?r-1:0),t=1;t=1&&d>=0&&n[c]!==p[d];)d--;for(;c>=1&&d>=0;c--,d--)if(n[c]!==p[d]){if(c!==1||d!==1)do if(c--,d--,d<0||n[c]!==p[d]){var h=`\n`+n[c].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),typeof e=="function"&&P.set(e,h),h}while(c>=1&&d>=0);break}}}finally{W=!1,V.current=u,We(),Error.prepareStackTrace=l}var x=e?e.displayName||e.name:"",Ee=x?O(x):"";return typeof e=="function"&&P.set(e,Ee),Ee}function Le(e,r,i){return le(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function S(e,r,i){if(e==null)return"";if(typeof e=="function")return le(e,Be(e));if(typeof e=="string")return O(e);switch(e){case A:return O("Suspense");case I:return O("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case C:return Le(e.render);case w:return S(e.type,r,i);case M:{var t=e,l=t._payload,u=t._init;try{return S(u(l),r,i)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ue={},fe=R.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,i=S(e.type,e._source,r?r.type:null);fe.setExtraStackFrame(i)}else fe.setExtraStackFrame(null)}function Ue(e,r,i,t,l){{var u=Function.call.bind(k);for(var o in e)if(u(e,o)){var n=void 0;try{if(typeof e[o]!="function"){var p=Error((t||"React class")+": "+i+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}n=e[o](r,o,t,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){n=c}n&&!(n instanceof Error)&&(D(l),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",t||"React class",i,o,typeof n),D(null)),n instanceof Error&&!(n.message in ue)&&(ue[n.message]=!0,D(l),v("Failed %s type: %s",i,n.message),D(null))}}}var ze=Array.isArray;function $(e){return ze(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,i=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function Xe(e){try{return ce(e),!1}catch{return!0}}function ce(e){return""+e}function de(e){if(Xe(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),ce(e)}var j=R.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},me,ve,L;L={};function He(e){if(k.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ke(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Je(e,r){if(typeof e.ref=="string"&&j.current&&r&&j.current.stateNode!==r){var i=b(j.current.type);L[i]||(v(\'Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\',b(j.current.type),e.ref),L[i]=!0)}}function Ze(e,r){{var i=function(){me||(me=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function Qe(e,r){{var i=function(){ve||(ve=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var er=function(e,r,i,t,l,u,o){var n={$$typeof:a,type:e,key:r,ref:i,props:o,_owner:u};return n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(n,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(n,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n};function rr(e,r,i,t,l){{var u,o={},n=null,p=null;i!==void 0&&(de(i),n=""+i),Ke(r)&&(de(r.key),n=""+r.key),He(r)&&(p=r.ref,Je(r,l));for(u in r)k.call(r,u)&&!qe.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var c=e.defaultProps;for(u in c)o[u]===void 0&&(o[u]=c[u])}if(n||p){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;n&&Ze(o,d),p&&Qe(o,d)}return er(e,n,p,l,t,j.current,o)}}var B=R.ReactCurrentOwner,pe=R.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,i=S(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(i)}else pe.setExtraStackFrame(null)}var U;U=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function he(){{if(B.current){var e=b(B.current.type);if(e)return`\n\nCheck the render method of \\``+e+"`."}return""}}function ir(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\\\\/]/,""),i=e.lineNumber;return`\n\nCheck your code at `+r+":"+i+"."}return""}}var be={};function tr(e){{var r=he();if(!r){var i=typeof e=="string"?e:e.displayName||e.name;i&&(r=`\n\nCheck the top-level render call using <`+i+">.")}return r}}function ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=tr(r);if(be[i])return;be[i]=!0;var t="";e&&e._owner&&e._owner!==B.current&&(t=" It was passed a child from "+b(e._owner.type)+"."),N(e),v(\'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.\',i,t),N(null)}}function ge(e,r){{if(typeof e!="object")return;if($(e))for(var i=0;i",n=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,n)}var d=rr(e,r,i,l,u);if(d==null)return d;if(o){var h=r.children;if(h!==void 0)if(t)if($(h)){for(var x=0;x{"use strict";Te.exports=xe()});var yr={};mr(yr,{default:()=>br});var f=vr(je());function Ce(s){let a=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",strong:"strong",em:"em"},s.components);return(0,f.jsxDEV)(f.Fragment,{children:[(0,f.jsxDEV)(a.h1,{children:"My MDX Input Block"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:1,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.p,{children:["Developers should modify this file to build their own Input Block. For more information on AI Verify Input Blocks, please refer to the ",(0,f.jsxDEV)(a.a,{href:"https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-portal/ai-verify-plugin/-/blob/main/docs/InputBlock.md",children:"AI Verify Input Block Page"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:3,columnNumber:136},this),"."]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:3,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.p,{children:"Below are some examples of how to create input blocks."},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:5,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.h2,{children:"Example HTML Form"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:7,columnNumber:1},this),`\n`,(0,f.jsxDEV)("div",{style:{display:"flex",flexDirection:"column",marginBottom:"10px"},children:[(0,f.jsxDEV)("label",{htmlFor:"fname",children:"First name:"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:10,columnNumber:3},this),(0,f.jsxDEV)("input",{type:"text",id:"fname",value:s.data.fname,onChange:m=>s.onChangeData("fname",m.target.value)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:11,columnNumber:3},this),(0,f.jsxDEV)("label",{htmlFor:"lname",children:"Last name:"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:12,columnNumber:3},this),(0,f.jsxDEV)("input",{type:"text",id:"lname",value:s.data.lname,onChange:m=>s.onChangeData("lname",m.target.value)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:13,columnNumber:3},this),(0,f.jsxDEV)("label",{htmlFor:"bio",children:"Bio:"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:14,columnNumber:3},this),(0,f.jsxDEV)("textarea",{rows:"4",style:{width:"100%",resize:"none"},value:s.data.bio,onChange:m=>s.onChangeData("bio",m.target.value)},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:15,columnNumber:3},this)]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:9,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.h2,{children:"Example use of Decision Tree Component"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:18,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.p,{children:["The ",(0,f.jsxDEV)(a.a,{href:"https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-portal/ai-verify-shared-library/-/tree/main/packages/graph",children:"AI Verify Shared Library DecisionTree"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:20,columnNumber:5},this)," allows user to build their own decision tree."]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:20,columnNumber:1},this),`\n`,(0,f.jsxDEV)(a.p,{children:["You can find an example of Decision Tree Input Block from the ",(0,f.jsxDEV)(a.a,{href:"https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.fairness-metrics-toolbox-widgets",children:"Widgets for Fairness Metrics Toolbox"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:22,columnNumber:63},this),` plugin.\nAn example use of the `,(0,f.jsxDEV)(a.strong,{children:"DecisionTree"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:23,columnNumber:23},this)," component can be found in the implementation for the ",(0,f.jsxDEV)(a.a,{href:"https://gitlab.com/imda_dsl/t2po/ai-verify/ai-verify-stock-plugins/aiverify.stock.fairness-metrics-toolbox-widgets/-/blob/main/inputs/fairness-tree.mdx",children:"AI Verify Fairness Tree"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:23,columnNumber:93},this)," is found under the ",(0,f.jsxDEV)(a.em,{children:"inputs"},void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:23,columnNumber:291},this)," folder."]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:22,columnNumber:1},this)]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx",lineNumber:1,columnNumber:1},this)}function hr(s={}){let{wrapper:a}=s.components||{};return a?(0,f.jsxDEV)(a,Object.assign({},s,{children:(0,f.jsxDEV)(Ce,s,void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx"},this)}),void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.mdx"},this):Ce(s)}var br=hr;return pr(yr);})();\n/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n;return Component;', - frontmatter: {}, -}; - -const inputBlockMdxSummaryBundleResponse = { - code: 'var Component=(()=>{var fr=Object.create;var A=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var dr=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty;var K=(o,f)=>()=>(f||o((f={exports:{}}).exports,f),f.exports),pr=(o,f)=>{for(var p in f)A(o,p,{get:f[p],enumerable:!0})},Re=(o,f,p,m)=>{if(f&&typeof f=="object"||typeof f=="function")for(let b of cr(f))!vr.call(o,b)&&b!==p&&A(o,b,{get:()=>f[b],enumerable:!(m=lr(f,b))||m.enumerable});return o};var gr=(o,f,p)=>(p=o!=null?fr(dr(o)):{},Re(f||!o||!o.__esModule?A(p,"default",{value:o,enumerable:!0}):p,o)),mr=o=>Re(A({},"__esModule",{value:!0}),o);var Te=K((Tr,_e)=>{_e.exports=React});var Ce=K(q=>{"use strict";(function(){"use strict";var o=Te(),f=Symbol.for("react.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),H=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),je=Symbol.for("react.offscreen"),J=Symbol.iterator,xe="@@iterator";function De(e){if(e===null||typeof e!="object")return null;var r=J&&e[J]||e[xe];return typeof r=="function"?r:null}var R=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=1&&c>=0&&a[l]!==v[c];)c--;for(;l>=1&&c>=0;l--,c--)if(a[l]!==v[c]){if(l!==1||c!==1)do if(l--,c--,c<0||a[l]!==v[c]){var g=`\n`+a[l].replace(" at new "," at ");return e.displayName&&g.includes("")&&(g=g.replace("",e.displayName)),typeof e=="function"&&x.set(e,g),g}while(l>=1&&c>=0);break}}}finally{M=!1,$.current=s,Ve(),Error.prepareStackTrace=u}var T=e?e.displayName||e.name:"",Ee=T?j(T):"";return typeof e=="function"&&x.set(e,Ee),Ee}function Ue(e,r,t){return se(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function D(e,r,t){if(e==null)return"";if(typeof e=="function")return se(e,Be(e));if(typeof e=="string")return j(e);switch(e){case I:return j("Suspense");case N:return j("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case P:return Ue(e.render);case S:return D(e.type,r,t);case Y:{var n=e,u=n._payload,s=n._init;try{return D(s(u),r,t)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,fe={},le=R.ReactDebugCurrentFrame;function F(e){if(e){var r=e._owner,t=D(e.type,e._source,r?r.type:null);le.setExtraStackFrame(t)}else le.setExtraStackFrame(null)}function Ge(e,r,t,n,u){{var s=Function.call.bind(k);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var v=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(F(u),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),F(null)),a instanceof Error&&!(a.message in fe)&&(fe[a.message]=!0,F(u),d("Failed %s type: %s",t,a.message),F(null))}}}var Ke=Array.isArray;function V(e){return Ke(e)}function qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return ce(e),!1}catch{return!0}}function ce(e){return""+e}function de(e){if(ze(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(e)),ce(e)}var w=R.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},ve,pe,L;L={};function He(e){if(k.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Je(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){if(typeof e.ref=="string"&&w.current&&r&&w.current.stateNode!==r){var t=h(w.current.type);L[t]||(d(\'Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\',h(w.current.type),e.ref),L[t]=!0)}}function Qe(e,r){{var t=function(){ve||(ve=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function er(e,r){{var t=function(){pe||(pe=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var rr=function(e,r,t,n,u,s,i){var a={$$typeof:f,type:e,key:r,ref:t,props:i,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function tr(e,r,t,n,u){{var s,i={},a=null,v=null;t!==void 0&&(de(t),a=""+t),Je(r)&&(de(r.key),a=""+r.key),He(r)&&(v=r.ref,Ze(r,u));for(s in r)k.call(r,s)&&!Xe.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var l=e.defaultProps;for(s in l)i[s]===void 0&&(i[s]=l[s])}if(a||v){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Qe(i,c),v&&er(i,c)}return rr(e,a,v,u,n,w.current,i)}}var U=R.ReactCurrentOwner,ge=R.ReactDebugCurrentFrame;function _(e){if(e){var r=e._owner,t=D(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}var B;B=!1;function G(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function me(){{if(U.current){var e=h(U.current.type);if(e)return`\n\nCheck the render method of \\``+e+"`."}return""}}function nr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\\\\/]/,""),t=e.lineNumber;return`\n\nCheck your code at `+r+":"+t+"."}return""}}var he={};function ar(e){{var r=me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`\n\nCheck the top-level render call using <`+t+">.")}return r}}function ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(he[t])return;he[t]=!0;var n="";e&&e._owner&&e._owner!==U.current&&(n=" It was passed a child from "+h(e._owner.type)+"."),_(e),d(\'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.\',t,n),_(null)}}function be(e,r){{if(typeof e!="object")return;if(V(e))for(var t=0;t",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var c=tr(e,r,t,u,s);if(c==null)return c;if(i){var g=r.children;if(g!==void 0)if(n)if(V(g)){for(var T=0;T{"use strict";Oe.exports=Ce()});var Rr={};pr(Rr,{default:()=>Er,progress:()=>Se,summary:()=>hr,validate:()=>yr});var C=gr(we()),hr=o=>o?JSON.stringify(o||{}):"No data",Se=o=>{if(!o)return 0;let f=3,p=Object.values(o).filter(m=>typeof m=="string"||Array.isArray(m)?m.length>0:!0).length;return Math.round(p/f*100)},yr=o=>Se(o)==100;function Pe(o){return(0,C.jsxDEV)(C.Fragment,{children:[`\n`,`\n`,`\n`,`\n`]},void 0,!0,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.summary.mdx",lineNumber:1,columnNumber:1},this)}function br(o={}){let{wrapper:f}=o.components||{};return f?(0,C.jsxDEV)(f,Object.assign({},o,{children:(0,C.jsxDEV)(Pe,o,void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.summary.mdx"},this)}),void 0,!1,{fileName:"../imda/projects/aiverify/ai-verify-portal/plugins/aiverify.tests/inputs/testib.summary.mdx"},this):Pe(o)}var Er=br;return mr(Rr);})();\n/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n;return Component;', - frontmatter: {}, -}; - -export { - managePluginsTests_pluginsList, - emptyListResponse, - installPluginResponse, - algoPackageDependencyStatusResponse, - projectFlow_mockPlugins, - widgetMdxBundleResponse, - inputBlockMdxCompBundleResponse, - inputBlockMdxSummaryBundleResponse, -}; diff --git a/ai-verify-portal/__mocks__/mockProviders.tsx b/ai-verify-portal/__mocks__/mockProviders.tsx deleted file mode 100644 index c22e17f57..000000000 --- a/ai-verify-portal/__mocks__/mockProviders.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { MockedProvider, MockedResponse } from '@apollo/client/testing'; -import { NotificationsProvider } from 'src/modules/notifications/providers/notificationsContext'; -import { PropsWithChildren } from 'react'; - -type MockProvidersProps = { - apolloMocks?: - | MockedResponse, Record>[] - | undefined; -}; - -function MockProviders(props: PropsWithChildren) { - const { apolloMocks, children } = props; - return ( - - {children} - - ); -} - -export { MockProviders }; diff --git a/ai-verify-portal/__mocks__/server/pluginManager.ts b/ai-verify-portal/__mocks__/server/pluginManager.ts deleted file mode 100644 index 531f95ad1..000000000 --- a/ai-verify-portal/__mocks__/server/pluginManager.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { projectFlow_mockPlugins } from '__mocks__/mockPlugins'; - -export function getPlugins() { - return projectFlow_mockPlugins; -} diff --git a/ai-verify-portal/__tests__/modules/__snapshots__/newModelApiConfig.test.tsx.snap b/ai-verify-portal/__tests__/modules/__snapshots__/newModelApiConfig.test.tsx.snap deleted file mode 100644 index 7d8a70c5f..000000000 --- a/ai-verify-portal/__tests__/modules/__snapshots__/newModelApiConfig.test.tsx.snap +++ /dev/null @@ -1,992 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`New Model API Config Initial Render should render with the correct defaults: New Model API Config Default 1`] = ` -
-
-
- - -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-

- Create API Configuration -

-

- Create a new API configuration needed to connect to the AI model server -

-
-
-
- -
-
-
-
-
-
-
- Configuration Name -
- -
-
-
- Description -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Enter the URL of the model prediction API -
-
-
-
-
-
- -
-
-
-
-
-
-
- HTTP Request and Connection Settings -
-
-
- Request Body -
-
- Response Properties -
-
- Additional Request Headers -
-
- Authentication Settings -
-
- Connection Settings -
-
-
-
-
-
-
- -
-
-
-
-
-
- Property Name -
-
- Data Type -
-
-
-
-
-
-
-
-
-
- Add all property names that will be added to request body data. Mapping of these properties to dataset columns will be done before generating report -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
-
- -
- -
-
- -
-
-
-
-
-
-
-`; diff --git a/ai-verify-portal/__tests__/modules/__snapshots__/project.canvas.test.tsx.snap b/ai-verify-portal/__tests__/modules/__snapshots__/project.canvas.test.tsx.snap deleted file mode 100644 index bdeb097aa..000000000 --- a/ai-verify-portal/__tests__/modules/__snapshots__/project.canvas.test.tsx.snap +++ /dev/null @@ -1,2906 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Project Flow Project Information Capture and Select Template screens should go to Select Report Template if Project Name is filled : Select Report Template Screen 1`] = ` -
-
-
-
-
-
-
- -
-

- Select Report Template -

-

- Select a template or start with an empty canvas. -

-
-
-
- - - No Templates Found. Select 'Blank Canvas' and click 'Next' - -
-
-
-
-
-
- Blank Canvas -
-
- Design your own report by dragging widgets onto a blank canvas -
-
-
-
-
-
-
-
-
-
-`; - -exports[`Project Flow Project Information Capture and Select Template screens should render Project Information Capture screen: Project Information Capture Screen 1`] = ` -
-
-
-
-
-
- -
- Home -
-
-
- -
-
-
-
-
-
-

- Create a new AI Testing Project -

-

- Create a new AI Testing Project to design the tests to be run on the AI Model -
- and document the test results in the report generated -

-
-
-
-

- General Information -

-

- Provide general information required for the report generation -

-
-
-
-
- -
-
-