Skip to content

Instantly share code, notes, and snippets.

View joannapurosto's full-sized avatar
🐜

Joanna Purosto joannapurosto

🐜
View GitHub Profile
@joannapurosto
joannapurosto / valohai.yaml
Last active September 24, 2019 05:41
How to do deep learning for java on the Valohai platform? -blog | Valohai
---
- step:
name: Build-dl4j-mnist-single-layer-java-app
image: neomatrix369/dl4j-mnist-single-layer:v0.5
command:
- cd ${VH_REPOSITORY_DIR}
- ./buildUberJar.sh
- echo "~~~ Copying the build jar file into ${VH_OUTPUTS_DIR}"
- cp target/MLPMnist-1.0.0-bin.jar ${VH_OUTPUTS_DIR}/MLPMnist-1.0.0.jar
@joannapurosto
joannapurosto / runmlpmnist_input.sh
Created August 29, 2019 09:07
How to do deep learning for java on the Valohai platform? -blog | Valohai
./runMLPMnist.sh --action evaluate --input-dir ${VH_INPUTS_DIR}/model
or
java -Djava.library.path="" \
-jar target/MLPMnist-1.0.0-bin.jar \
--action evaluate --input-dir ${VH_INPUTS_DIR}/model
@joannapurosto
joannapurosto / runmlpmnist.sh
Created August 29, 2019 09:03
How to do deep learning for java on the Valohai platform? -blog | Valohai
./runMLPMnist.sh --action train --output-dir ${VH_OUTPUTS_DIR}
or
java -Djava.library.path="" \
-jar target/MLPMnist-1.0.0-bin.jar \
--action train --output-dir ${VH_OUTPUTS_DIR}
@joannapurosto
joannapurosto / mlpmnist.sh
Created August 29, 2019 08:53
How to do deep learning for java on the Valohai platform? -blog | Valohai
public static void main(String[] args) throws Exception {
MLPMnistSingleLayerRunner mlpMnistRunner = new MLPMnistSingleLayerRunner();
JCommander.newBuilder()
.addObject(mlpMnistRunner)
.build()
.parse(args);
mlpMnistRunner.execute();
}
@joannapurosto
joannapurosto / request-project-list.sh
Created August 22, 2019 12:18
Effective ML workflows with Azure pipelines blog
<script src="https://gist.github.com/joannapurosto/75747d1852c95b17bbfacef25f147fdc.js"></script>
@joannapurosto
joannapurosto / receive-token.sh
Created August 22, 2019 12:17
Effective ML workflows with Azure pipelines blog
{"token":"a-very-secret-value-here"}
@joannapurosto
joannapurosto / call-api-endpoint.sh
Created August 22, 2019 12:16
Effective ML workflows with Azure pipelines blog
curl -H 'Content-Type: application/json' -X POST -d '{"username":"alexey", "password":"password"}' 'https://app.valohai.com/api/v0/get-token/'
@joannapurosto
joannapurosto / execution-outputs.sh
Created August 22, 2019 07:11
Effective ML workflows with Azure pipelines blog
[
{
"name": "mnist-train-images.gz",
"ctime": "2019-08-06T10:30:33.766038Z",
"size": 9630629,
"url": "https://valohaidataprod.blob.core.windows.net/valohaidataprod/data/01DH1/key/output-19/mnist-train-images.gz?se=2019-08-25T12%3A29%3A36Z&sp=r&sv=2018-11-09...",
"id": "016c667b-0425-413c-2746-9597e2140e6d"
}
...
]
@joannapurosto
joannapurosto / get-execution-data.sh
Created August 22, 2019 07:10
Effective ML workflows with Azure pipelines blog
#!/bin/bash
execution_id="$1"
function get_execution_data() {
curl -L \
-H 'Content-Type: application/json' \
-H "Authorization: Token $VALOHAI_API_TOKEN" \
"https://app.valohai.com/api/v0/executions/$execution_id"
}
@joannapurosto
joannapurosto / wait_for_valohai_execution.sh
Created August 22, 2019 07:07
Effective ML workflows with Azure pipelines blog
#!/bin/bash
set -o pipefail
# shellcheck disable=SC2153
execution_id="$1"
function get_execution_data() {
curl -L \
-H 'Content-Type: application/json' \
-H "Authorization: Token $VALOHAI_API_TOKEN" \
"https://app.valohai.com/api/v0/executions/$execution_id"