Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dps-unit-test
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brian
dps-unit-test
Commits
4699b1b9
Commit
4699b1b9
authored
3 years ago
by
Sujen Shah
Browse files
Options
Downloads
Patches
Plain Diff
Add test notebook
parent
5eb62083
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DPSUnitTest.ipynb
+131
-0
131 additions, 0 deletions
DPSUnitTest.ipynb
with
131 additions
and
0 deletions
DPSUnitTest.ipynb
0 → 100644
+
131
−
0
View file @
4699b1b9
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "b83e0e2f",
"metadata": {},
"outputs": [],
"source": [
"from maap.maap import MAAP\n",
"maap = MAAP(maap_host='api.ops.maap-project.org')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "69ad563c",
"metadata": {},
"outputs": [],
"source": [
"maap.listAlgorithms().text"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eb28870f",
"metadata": {},
"outputs": [],
"source": [
"dir(maap)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2cc54436",
"metadata": {},
"outputs": [],
"source": [
"maap.describeAlgorithm(algoid=\"run-dps-test_ubuntu:main\").text"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "13996097",
"metadata": {},
"outputs": [],
"source": [
"params = {\"input_file\": \"https://raw.githubusercontent.com/MAAP-Project/maap-jupyter-ide/master/README.md\"}"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "977d8c34",
"metadata": {},
"outputs": [],
"source": [
"\n",
"submit_job_result = maap.submitJob(identifier=\"dps-unit-test\",\n",
" algo_id=\"run-dps-test_ubuntu\",\n",
" version=\"main\",\n",
" username=\"sshah\",\n",
" queue=\"maap-dps-worker-8gb\",\n",
" # Args that match yaml\n",
" **params)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "03045725",
"metadata": {},
"outputs": [],
"source": [
"submit_job_result"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4bf4bf0b",
"metadata": {},
"outputs": [],
"source": [
"maap.getJobStatus(submit_job_result.get(\"job_id\")).text"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9263f7ad",
"metadata": {},
"outputs": [],
"source": [
"maap.getJobResult(submit_job_result.get(\"job_id\")).text"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "78e69d58",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:root] *",
"language": "python",
"name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
%% Cell type:code id:b83e0e2f tags:
```
python
from
maap.maap
import
MAAP
maap
=
MAAP
(
maap_host
=
'
api.ops.maap-project.org
'
)
```
%% Cell type:code id:69ad563c tags:
```
python
maap
.
listAlgorithms
().
text
```
%% Cell type:code id:eb28870f tags:
```
python
dir
(
maap
)
```
%% Cell type:code id:2cc54436 tags:
```
python
maap
.
describeAlgorithm
(
algoid
=
"
run-dps-test_ubuntu:main
"
).
text
```
%% Cell type:code id:13996097 tags:
```
python
params
=
{
"
input_file
"
:
"
https://raw.githubusercontent.com/MAAP-Project/maap-jupyter-ide/master/README.md
"
}
```
%% Cell type:code id:977d8c34 tags:
```
python
submit_job_result
=
maap
.
submitJob
(
identifier
=
"
dps-unit-test
"
,
algo_id
=
"
run-dps-test_ubuntu
"
,
version
=
"
main
"
,
username
=
"
sshah
"
,
queue
=
"
maap-dps-worker-8gb
"
,
# Args that match yaml
**
params
)
```
%% Cell type:code id:03045725 tags:
```
python
submit_job_result
```
%% Cell type:code id:4bf4bf0b tags:
```
python
maap
.
getJobStatus
(
submit_job_result
.
get
(
"
job_id
"
)).
text
```
%% Cell type:code id:9263f7ad tags:
```
python
maap
.
getJobResult
(
submit_job_result
.
get
(
"
job_id
"
)).
text
```
%% Cell type:code id:78e69d58 tags:
```
python
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment