Skip to content

Commit

Permalink
Merge branch 'master' into f/dsg-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bdattoma authored Oct 19, 2023
2 parents 3b1e293 + 579571a commit dcca8de
Show file tree
Hide file tree
Showing 12 changed files with 376 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ods_ci/libs/Helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,7 @@ def process_resource_list(self, filename_in, filename_out=None):
filename_out = filename_in.split(".")[0] + "_processed.txt"
with open(filename_out, "w") as outfile:
outfile.write("".join(str(l) for l in out))

@keyword
def escape_forward_slashes(self, string_to_escape):
return string_to_escape.replace('/','\/')
7 changes: 5 additions & 2 deletions ods_ci/tasks/Resources/RHODS_OLM/uninstall/uninstall.robot
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ Uninstall RHODS V2
Should Be Equal As Integers ${return_code} 0 msg=Error deleting RHODS subscription
END

${return_code} ${output} Run And Return Rc And Output
... oc delete subscription $(oc get subscription -n redhat-ods-operator --no-headers | awk '{print $1}') -n ${OPERATOR_NAMESPACE} # robocop: disable
Should Be Equal As Integers ${return_code} 0 msg=Error deleting RHODS subscription
${return_code} ${output} Run And Return Rc And Output
... oc delete operatorgroup --all -n redhat-ods-operator --ignore-not-found
Should Be Equal As Integers ${return_code} 0 msg=Error deleting operatorgroup
${return_code} ${output} Run And Return Rc And Output oc delete ns -l opendatahub.io/generated-namespace --ignore-not-found
Verify Project Does Not Exists redhat-ods-applications
Verify Project Does Not Exists redhat-ods-monitoring
Verify Project Does Not Exists rhods-notebooks
${return_code} ${output} Run And Return Rc And Output oc delete namespace redhat-ods-operator --ignore-not-found
Verify Project Does Not Exists redhat-ods-operator
${return_code} ${output} Run And Return Rc And Output oc delete namespace ${OPERATOR_NAMESPACE} --ignore-not-found
Verify Project Does Not Exists ${OPERATOR_NAMESPACE}
15 changes: 15 additions & 0 deletions ods_ci/tests/Resources/Files/llm/model_expected_responses.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,24 @@
"bloom-560m-caikit": {
"generatedTokenCount": 20,
"response_text": "The temperature of water boiling depends on the temperature of the water. The boiling point of water is the"
},
"flan-t5-large": {
"generatedTokenCount": 7,
"response_text": "212 ° f",
"streamed_response_text": "{ 'details': { 'input_token_count': '8' }}{ 'tokens': [ { 'text': '▁', 'logprob': -1.2747352123260498 } ], 'details': { 'generated_tokens': 1 }}{ 'generated_text': '212', 'tokens': [ { 'text': '212', 'logprob': -1.0382558107376099 } ], 'details': { 'generated_tokens': 2 }}{ 'generated_text': ' ', 'tokens': [ { 'text': '▁', 'logprob': -0.8835393786430359 } ], 'details': { 'generated_tokens': 3 }}{ 'generated_text': '°', 'tokens': [ { 'text': '°', 'logprob': -0.6830151677131653 } ], 'details': { 'generated_tokens': 4 }}{ 'generated_text': ' ', 'tokens': [ { 'text': '▁', 'logprob': -0.8991543650627136 } ], 'details': { 'generated_tokens': 5 }}{ 'generated_text': 'f', 'tokens': [ { 'text': 'f', 'logprob': -0.44153422117233276 } ], 'details': { 'generated_tokens': 6 }}{ 'tokens': [ { 'text': '\u003c/s\u003e', 'logprob': -0.015602776780724525 } ], 'details': { 'finish_reason': 'EOS_TOKEN', 'generated_tokens': 7 }}"
}
}

},
{
"query_text": "This are an very wrong phraxe",
"models": {
"flan-t5-large-grammar-synthesis-caikit": {
"generatedTokenCount": 9,
"response_text": "This is a very wrong phrase.",
"streamed_response_text": "{'details':{'input_token_count':'10'}}{'generated_text':'This','tokens':[{'text':'▁This','logprob':<logprob_removed>}],'details':{'generated_tokens':1}}{'generated_text':'is','tokens':[{'text':'▁is','logprob':<logprob_removed>}],'details':{'generated_tokens':2}}{'generated_text':'','tokens':[{'text':'▁','logprob':<logprob_removed>}],'details':{'generated_tokens':3}}{'generated_text':'a','tokens':[{'text':'a','logprob':<logprob_removed>}],'details':{'generated_tokens':4}}{'generated_text':'very','tokens':[{'text':'▁very','logprob':<logprob_removed>}],'details':{'generated_tokens':5}}{'generated_text':'wrong','tokens':[{'text':'▁wrong','logprob':<logprob_removed>}],'details':{'generated_tokens':6}}{'generated_text':'phrase','tokens':[{'text':'▁phrase','logprob':<logprob_removed>}],'details':{'generated_tokens':7}}{'generated_text':'.','tokens':[{'text':'.','logprob':<logprob_removed>}],'details':{'generated_tokens':8}}{'tokens':[{'text':'</s>','logprob':<logprob_removed>}],'details':{'finish_reason':'EOS_TOKEN','generated_tokens':9}}"
}
}
}
]
}
10 changes: 10 additions & 0 deletions ods_ci/tests/Resources/Files/operatorV2/cs_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: rhods-catalog-dev
namespace: <OPERATOR_NAMESPACE>
spec:
sourceType: grpc
image: <IMAGE_URL>
displayName: Red Hat OpenShift Data Science
publisher: RHODS Development Catalog
40 changes: 40 additions & 0 deletions ods_ci/tests/Resources/Files/operatorV2/embedded.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
ConfigMap kube-root-ca.crt
ConfigMap openshift-service-ca.crt
ConfigMap redhat-ods-operator-manager-config
Deployment rhods-operator
EndpointSlice redhat-ods-operator-controller-manager-metrics-service-jz6l7
Endpoints redhat-ods-operator-controller-manager-metrics-service
InstallPlan install-tpnlw
KIND NAME
OperatorCondition rhods-operator.2.1.0
OperatorGroup rhods-operator-dev
Pod rhods-operator-59cfcbb47d-85dfj
ReplicaSet rhods-operator-59cfcbb47d
Role rhods-operator.2.1.0
Role rhods-operator.2.1.0
Role rhods-operator.2.1.0-redhat-ods-operator-controller--655d59d697
Role rhods-operator.2.1.0-redhat-ods-operator-controller--655d59d697
RoleBinding rhods-operator.2.1.0
RoleBinding rhods-operator.2.1.0
RoleBinding rhods-operator.2.1.0-redhat-ods-operator-controller--655d59d697
RoleBinding rhods-operator.2.1.0-redhat-ods-operator-controller--655d59d697
RoleBinding system:deployers
RoleBinding system:deployers
RoleBinding system:image-builders
RoleBinding system:image-builders
RoleBinding system:image-pullers
RoleBinding system:image-pullers
Secret builder-dockercfg-r4djd
Secret builder-token-jzwg8
Secret default-dockercfg-qd9lt
Secret default-token-rdxn7
Secret deployer-dockercfg-tvp8x
Secret deployer-token-6th7d
Secret redhat-ods-operator-controller-manager-dockercfg-pvx2b
Secret redhat-ods-operator-controller-manager-token-2qh6c
Service redhat-ods-operator-controller-manager-metrics-service
ServiceAccount builder
ServiceAccount default
ServiceAccount deployer
ServiceAccount redhat-ods-operator-controller-manager
Subscription rhods-operator
56 changes: 56 additions & 0 deletions ods_ci/tests/Resources/Files/operatorV2/embedded_cs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
CatalogSource rhods-catalog-dev
ConfigMap c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
ConfigMap kube-root-ca.crt
ConfigMap openshift-service-ca.crt
ConfigMap redhat-ods-operator-manager-config
Deployment rhods-operator
EndpointSlice redhat-ods-operator-controller-manager-metrics-service
EndpointSlice rhods-catalog-dev
Endpoints redhat-ods-operator-controller-manager-metrics-service
Endpoints rhods-catalog-dev
InstallPlan install
Job c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
KIND NAME
OperatorCondition rhods-operator.2.1.0
OperatorGroup rhods-operator-dev
Pod c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b3vbpr4
Pod rhods-catalog-dev
Pod rhods-operator
PodMetrics rhods-catalog-dev
ReplicaSet rhods-operator
Role c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
Role c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
Role rhods-operator.2.1.0
Role rhods-operator.2.1.0
Role rhods-operator.2.1.0-redhat-ods-operator-controller-
Role rhods-operator.2.1.0-redhat-ods-operator-controller-
RoleBinding c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
RoleBinding c831fa3421fa182ed3dd44418173698c8f1bc0581981d4ced92d2708b38cb67
RoleBinding rhods-operator.2.1.0
RoleBinding rhods-operator.2.1.0
RoleBinding rhods-operator.2.1.0-redhat-ods-operator-controller-
RoleBinding rhods-operator.2.1.0-redhat-ods-operator-controller-
RoleBinding system:deployers
RoleBinding system:deployers
RoleBinding system:image-builders
RoleBinding system:image-builders
RoleBinding system:image-pullers
RoleBinding system:image-pullers
Secret builder-dockercfg
Secret builder-token
Secret default-dockercfg
Secret default-token
Secret deployer-dockercfg
Secret deployer-token
Secret redhat-ods-operator-controller-manager-dockercfg
Secret redhat-ods-operator-controller-manager-token
Secret rhods-catalog-dev-dockercfg
Secret rhods-catalog-dev-token
Service redhat-ods-operator-controller-manager-metrics-service
Service rhods-catalog-dev
ServiceAccount builder
ServiceAccount default
ServiceAccount deployer
ServiceAccount redhat-ods-operator-controller-manager
ServiceAccount rhods-catalog-dev
Subscription rhods-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: rhods-operator-dev
namespace: <OPERATOR_NAMESPACE>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: rhods-operator
namespace: <OPERATOR_NAMESPACE>
spec:
channel: embedded
installPlanApproval: Manual
name: rhods-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: rhods-operator.2.1.0
config:
env:
- name: "DISABLE_DSC_CONFIG"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: rhods-operator
namespace: <OPERATOR_NAMESPACE>
spec:
channel: embedded
name: rhods-operator
source: <CS_NAME>
sourceNamespace: <CS_NAMESPACE>
config:
env:
- name: "DISABLE_DSC_CONFIG"
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Documentation Tasks related to the operator rearchitecture
Library String
Library OperatingSystem
Library ../../libs/Helpers.py
Library Collections
Library ../../../../../libs/Helpers.py
Library Collections
Resource ../../../../../tasks/Resources/RHODS_OLM/install/oc_install.robot
Suite Setup Get Original Configuration
Suite Teardown Patch DataScienceCluster CustomResource To Original Configuration
Expand Down
Loading

0 comments on commit dcca8de

Please sign in to comment.