From ef901b6cc230ca1c438fad30c9dc9217fbb7dac8 Mon Sep 17 00:00:00 2001 From: sshah <sujen.shah@jpl.nasa.gov> Date: Wed, 3 Mar 2021 04:53:24 +0000 Subject: [PATCH] EXample notebook --- Benchmark Example.ipynb | 92 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Benchmark Example.ipynb diff --git a/Benchmark Example.ipynb b/Benchmark Example.ipynb new file mode 100644 index 0000000..e1043c7 --- /dev/null +++ b/Benchmark Example.ipynb @@ -0,0 +1,92 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "under-egypt", + "metadata": {}, + "outputs": [], + "source": [ + "from maap.maap import MAAP\n", + "maap = MAAP(maap_host='api.uat.maap-project.org')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "piano-northern", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'code': 200,\n", + " 'message': 'success',\n", + " 'queues': ['maap-dps-worker-16gb',\n", + " 'maap-dps-worker-32gb',\n", + " 'maap-dps-worker-8gb']}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "maap.getQueues().json()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "brief-coalition", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'status': 'failed', 'http_status_code': 500, 'job_id': ''}\n" + ] + } + ], + "source": [ + "job = maap.submitJob(identifier=\"some\", algo_id=\"enchmark_ubuntu\",\n", + " version=\"master\",\n", + " username=\"sshah\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " num_jobs=100)\n", + "print(job)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "scientific-shakespeare", + "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.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} -- GitLab