This is my code if anyone wants to take a look at it, maybe you'll have some ideas ;)
So I gathered some questions regarding the working principles of MLDB. I hope you can help me answer them :)
1) What is (DecodeJpeg/contents) node?
2) The fetcher function downloads an image from a URL and turns it into a blob. What is a blob exactly?
3) The procedure 'imageneLabels' reads the labels from a .txt file and puts them in a dataset. What kind of dataset is this?
4) Is the function 'lookupLabels' only used to assign the probabilities of the predictions to the correct labels?
5) In the main function 'imageEmbedding' there are two things that I don't quite understand:
a) What does ('fetch({url})[content] AS "DecodeJpeg/contents"') mean exactly? I mean, we are turning an
image into a blob using the fetch function but what does the second part (AS "DecodeJpeg/contents)
do exaclty?
b) In the output we are using a function called 'flatten', what is it doing?
Fetcher
function returns a blob which is the full contents (HTTP body) of the URL that is fetched
GET /v1/datasets/imagenetLabels
to MLDB. The default dataset type is sparse.mutable
which is a very general purpose dataset that can hold any data type, but is not particularly efficient at any operations.
lookupLabels
function as you suggests associates labels with predictions based upon the index in the prediction vector.
DecodeJpeg/contents
variable of the Tensorflow graph. In other words, we're taking something which looks like { content: <BLOB>, error: null } and turning it into { 'DecodeJpeg/contents': <BLOB> }. The AS
operator is just like SQL: it renames columns from their default name into another name.
@jeremybarnes , your second suggestion seems like an easy way out. I have ssh access to the remote host, I have installed docker in it. I believe you are talking about establishing a tunnel using ssh. Like on mldb website :
ssh -f -o ExitOnForwardFailure=yes <user>@<remotehost> -L <localport>:127.0.0.1:<mldbport> -N
So, now someone who has access to the remote host will also have access to mldb image that is on my local machine right ?
Now, that I have established a tunnel using ssh, should I use just :
docker run --rm=true \
-v </absolute/path/to/mldb_data>:/mldb_data \
-e MLDB_IDS="id
" \
-p 127.0.0.1:<mldbport>:80 \
quay.io/mldb/mldb:latest
To access the container from the remote host?
-p <mldbport>:80
instead
I did exactly that (I even allowed anyone to connect) and I got the following on my shell prompt :
Aborting boot: directory mapped to /mldb_data owned by root
Expected owner uid from MLDB_IDS is: 1001
If the directory mapped to /mldb_data did not exist before launching MLDB,
it is automatically created and owned by root. If this is what happened,
please change the owner of the directory and relaunch.
* /etc/my_init.d/05-mldb-id-mapping.sh failed with status 1
sudo chown $UID.$UID mldb_data
in the current directory
KDNuggets Transfer Learning Blog Post
with my own set of images.inception
seems that one of the images fails.try()
SQL statement. check the "Handling errors line by line" section here: https://docs.mldb.ai/doc/#builtin/sql/ValueExpression.md.html
Yeah something is definitely not right, when i git checkout v2017.01.24.0 and build MLDB, it runs with no issues: docker run --rm=true -v /home/ubuntu/mldb_data:/mldb_data -e MLDB_IDS="id
" -p 8080:80 quay.io/mldb/mldb:ubuntu-HEAD-5b8653bc2828f1a89e23876e2d05c9a21dd2ed6a
MLDB (version 2017.06.20.dev-5b8653b) is starting up
reading configuration from file: '/etc/mldb.conf'
MLDB ready