-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into git_ignore_fix
- Loading branch information
Showing
910 changed files
with
95,693 additions
and
60,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version = 1 | ||
|
||
test_patterns = ["tests/**"] | ||
|
||
exclude_patterns = ["docs/**"] | ||
|
||
[[analyzers]] | ||
name = "python" | ||
enabled = true | ||
|
||
[analyzers.meta] | ||
runtime_version = "3.x.x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ docs | |
.git* | ||
**/*.pyc | ||
**/__pycache__ | ||
|
||
!docker/configs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question | ||
url: https://forum.rasa.com/ | ||
about: If you have a "How do I?" question please ask in the forum https://forum.rasa.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Example configuration | ||
#################### syntax ################# | ||
## include: | ||
## - dataset: ["<dataset_name>"] | ||
## config: ["<configuration_name>"] | ||
# | ||
## Example: | ||
## include: | ||
## - dataset: ["Carbon Bot"] | ||
## config: ["Sparse + DIET(bow) + ResponseSelector(bow)"] | ||
# | ||
## Shortcut: | ||
## You can use the "all" shortcut to include all available configurations or datasets | ||
# | ||
## Example: Use the "Sparse + EmbeddingIntent + ResponseSelector(bow)" configuration | ||
## for all available datasets | ||
## include: | ||
## - dataset: ["all"] | ||
## config: ["Sparse + DIET(bow) + ResponseSelector(bow)"] | ||
# | ||
## Example: Use all available configurations for the "Carbon Bot" and "Sara" datasets | ||
## and for the "Hermit" dataset use the "Sparse + DIET + ResponseSelector(T2T)" and | ||
## "Sparse + ConveRT + DIET + ResponseSelector(T2T)" configurations: | ||
## include: | ||
## - dataset: ["Carbon Bot", "Sara"] | ||
## config: ["all"] | ||
## - dataset: ["Hermit"] | ||
## config: ["Sparse + DIET(seq) + ResponseSelector(t2t)", "Sparse + ConveRT + DIET(seq) + ResponseSelector(t2t)"] | ||
|
||
include: | ||
- dataset: ["Carbon Bot"] | ||
config: ["Sparse + DIET(bow) + ResponseSelector(bow)"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
########## | ||
## Available datasets | ||
########## | ||
# - "Carbon Bot" | ||
# - "Hermit" | ||
# - "Private 1" | ||
# - "Private 2" | ||
# - "Private 3" | ||
# - "Sara" | ||
|
||
########## | ||
## Available configurations | ||
########## | ||
# - "BERT + DIET(bow) + ResponseSelector(bow)" | ||
# - "BERT + DIET(seq) + ResponseSelector(t2t)" | ||
# - "ConveRT + DIET(bow) + ResponseSelector(bow)" | ||
# - "ConveRT + DIET(seq) + ResponseSelector(t2t)" | ||
# - "Spacy + DIET(bow) + ResponseSelector(bow)" | ||
# - "Spacy + DIET(seq) + ResponseSelector(t2t)" | ||
# - "Sparse + ConveRT + DIET(bow) + ResponseSelector(bow)" | ||
# - "Sparse + ConveRT + DIET(seq) + ResponseSelector(t2t)" | ||
# - "Sparse + DIET(bow) + ResponseSelector(bow)" | ||
# - "Sparse + DIET(seq) + ResponseSelector(t2t)" | ||
# - "Sparse + Spacy + DIET(bow) + ResponseSelector(bow)" | ||
# - "Sparse + Spacy + DIET(seq) + ResponseSelector(t2t)" | ||
|
||
## Example configuration | ||
#################### syntax ################# | ||
## include: | ||
## - dataset: <dataset_name> | ||
## config: <configuration_name> | ||
# | ||
#include: | ||
# - dataset: "Carbon Bot" | ||
# config: "Sparse + EmbeddingIntent + ResponseSelector(bow)" | ||
### | ||
# matrix | ||
### | ||
# dataset: [<dataset>] | ||
# config: [<config>] | ||
|
||
|
||
dataset: | ||
- "Carbon Bot" | ||
- "Sara" | ||
- "Hermit" | ||
- "Private 1" | ||
- "Private 2" | ||
- "Private 3" | ||
|
||
config: | ||
- "BERT + DIET(bow) + ResponseSelector(bow)" | ||
- "BERT + DIET(seq) + ResponseSelector(t2t)" | ||
- "ConveRT + DIET(bow) + ResponseSelector(bow)" | ||
- "ConveRT + DIET(seq) + ResponseSelector(t2t)" | ||
- "Spacy + DIET(bow) + ResponseSelector(bow)" | ||
- "Spacy + DIET(seq) + ResponseSelector(t2t)" | ||
- "Sparse + ConveRT + DIET(bow) + ResponseSelector(bow)" | ||
- "Sparse + ConveRT + DIET(seq) + ResponseSelector(t2t)" | ||
- "Sparse + DIET(bow) + ResponseSelector(bow)" | ||
- "Sparse + DIET(seq) + ResponseSelector(t2t)" | ||
- "Sparse + Spacy + DIET(bow) + ResponseSelector(bow)" | ||
- "Sparse + Spacy + DIET(seq) + ResponseSelector(t2t)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
time: '13:00' | ||
pull-request-branch-name: | ||
separator: "-" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- alwx | ||
labels: | ||
- type:dependencies | ||
ignore: | ||
- dependency-name: prompt-toolkit | ||
versions: | ||
- "> 2.0.10" | ||
- dependency-name: pytest-asyncio | ||
versions: | ||
- "> 0.10.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# GitHub Runner deployment - uses to deploy a github runner | ||
# which is used by the CI for model regression tests | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: github-runner-{{getenv "GITHUB_RUN_ID"}} | ||
namespace: github-runner | ||
labels: | ||
app: github-runner | ||
pod: github-runner-{{getenv "GITHUB_RUN_ID"}} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: github-runner | ||
pod: github-runner-{{getenv "GITHUB_RUN_ID"}} | ||
template: | ||
metadata: | ||
labels: | ||
app: github-runner | ||
pod: github-runner-{{getenv "GITHUB_RUN_ID"}} | ||
spec: | ||
priorityClassName: high-priority | ||
automountServiceAccountToken: false | ||
terminationGracePeriodSeconds: 180 | ||
containers: | ||
- name: github-runner | ||
image: us.gcr.io/rasa-platform/github-runner:latest | ||
imagePullPolicy: Always | ||
livenessProbe: | ||
initialDelaySeconds: 30 | ||
periodSeconds: 15 | ||
failureThreshold: 3 | ||
exec: | ||
command: | ||
- /bin/bash | ||
- -c | ||
- "if [[ `curl -sX GET -H \"Authorization: token ${GITHUB_PAT}\" \ | ||
https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPOSITORY}/actions/runners | \ | ||
jq -r '.runners[] | select(.name == \"'${POD_NAME}'\") | .status'` == \"offline\" ]]; then \ | ||
echo \"The GitHub API returns offline status for the ${POD_NAME} runner\" && exit 1; fi" | ||
resources: | ||
limits: | ||
nvidia.com/gpu: 1 | ||
requests: | ||
nvidia.com/gpu: 1 | ||
memory: 10Gi | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
# RUNNER_LABELS - defines labels | ||
# with which a github-runner will be registered | ||
- name: RUNNER_LABELS | ||
value: "self-hosted,gpu,kubernetes" | ||
# GITHUB_OWNER - a name of the repository owner | ||
- name: GITHUB_OWNER | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-rasa | ||
key: owner | ||
# GITHUB_REPOSITORY - a name of the repository | ||
- name: GITHUB_REPOSITORY | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-rasa | ||
key: repository | ||
# GITHUB_PAT - Personal Access Token | ||
- name: GITHUB_PAT | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-rasa | ||
key: pat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Collect the results of the various model test runs which are done as part of | ||
# The model regression CI pipeline and dump them as a single file artifact.This artifact will the then be published at the end of the tests. | ||
import json | ||
import os | ||
|
||
SUMMARY_FILE = os.environ["SUMMARY_FILE"] | ||
CONFIG = os.environ["CONFIG"] | ||
DATASET = os.environ["DATASET_NAME"] | ||
task_mapping = { | ||
"intent_report.json": "intent_classification", | ||
"CRFEntityExtractor_report.json": "entity_prediction", | ||
"DIETClassifier_report.json": "entity_prediction", | ||
"response_selection_report.json": "response_selection", | ||
} | ||
|
||
|
||
def generate_json(file, task, data): | ||
if not DATASET in data: | ||
data = {DATASET: {CONFIG: {}}, **data} | ||
elif not CONFIG in data[DATASET]: | ||
data[DATASET] = {CONFIG: {}, **data[DATASET]} | ||
|
||
data[DATASET][CONFIG] = { | ||
"accelerator_type": os.environ["ACCELERATOR_TYPE"], | ||
"test_run_time": os.environ["TEST_RUN_TIME"], | ||
"train_run_time": os.environ["TRAIN_RUN_TIME"], | ||
"total_run_time": os.environ["TOTAL_RUN_TIME"], | ||
**data[DATASET][CONFIG], | ||
} | ||
|
||
data[DATASET][CONFIG][task] = {**read_results(file)} | ||
|
||
return data | ||
|
||
|
||
def read_results(file): | ||
with open(file) as json_file: | ||
data = json.load(json_file) | ||
|
||
keys = ["accuracy", "weighted avg", "macro avg", "micro avg"] | ||
result = {key: data[key] for key in keys if key in data} | ||
|
||
return result | ||
|
||
|
||
if __name__ == "__main__": | ||
data = {} | ||
if os.path.exists(SUMMARY_FILE): | ||
with open(SUMMARY_FILE) as json_file: | ||
data = json.load(json_file) | ||
|
||
for dirpath, dirnames, files in os.walk(os.environ["RESULT_DIR"]): | ||
for f in files: | ||
if f not in task_mapping.keys(): | ||
continue | ||
|
||
data = generate_json(os.path.join(dirpath, f), task_mapping[f], data) | ||
|
||
with open(SUMMARY_FILE, "w") as f: | ||
json.dump(data, f, sort_keys=True, indent=2) |
Oops, something went wrong.