vertex AI batch prediction problem, got error for jsonl file - google-cloud-vertex-ai

i just trained a video classification model on vertex AI. When i do batch prediction, i got the following error from vertex AI:
BatchPrediction could not start because no valid instances were found in the input file.
Error: On line 1 of gs://cloud-ai-platform-b65d18b2-d59a-4c4b-884b-d1e9bbbcb8a0/output.jsonl: The line cannot be parsed.
The following is the content of my output.jsonl file.
{"videoGcsUri":"gs://cloud-ai-platform-b65d18b2-d59a-4c4b-884b-d1e9bbbcb8a0/1.avi","timeSegmentAnnotations":[{"displayName":"align","startTime":"0.0s","endTime":"1.0s"}],"dataItemResourceLabels":{"aiplatform.googleapis.com/ml_use":"test"}}
I am a bit confused which part in my output.jsonl causes this error, as the message from vertex AI is not that helpful. Thank you in advance.:)

Related

Does Reed-Solomon Error algorithm allow correction only if error occur on input data part?

Reed-Solomon algorithm is adding an additional data to the input, so potential errors (of particular size/quantity) on such damaged input can be corrected back to the original state. Correct? Does this algorithm protects also such added data not being part of the input, but used by the algorithm? If not, what happened if the error occurs in such non-input data part?
An important aspect is that Reed-Solomon (RS) codes are cyclic: the set of codewords is stable by cyclic shift.
A consequence is that no particular part of a code word is more protected or less protected.
A RS code has a error correction capability equal to t = (n-k)/2, where n is the code length (generally expressed in bytes) and k is the information part length.
If the total number of errors (in both parts) is less than t, the RS decoder will be able to correct the errors (more precisely, the t erroneous bytes in the general case). If it is higher, the errors cannot be corrected (but could be detected, another story).
The emplacement of the errors, either in the information part or the added part, has no influence on the error correction capability.
EDIT: the rule t = (n-k)/2 that I mentioned is valid for Reed-Solomon codes. This rule is not generally correct for BCH codes: t <= (n-k)/2. However, with respect to your question, this does not change the answer: these families of code have a given capacity correction, corresponding to the minimum distance between codewords, the decoders can then correct t errors, whatever the position of the errors in the codeword
As long as only half or less of the added data is in error, then errors that are only in the added data can be corrected.
With the appended data, the data + appended data form what is called a codeword, one that meets the rules for a codeword. Note there are two basic types of Reed Solomon code, the "original view" and the "BCH view". What constitutes a valid codeword depends which type of Reed Solomon code is being used. Link to Wiki article that explains this:
https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction
For an erasure only code, the location of all errors is determined by other means, and this case, even if all of the appended data is known to be bad, it can be corrected (or regenerated).

What does "Length of label vector does not match # of instances." sentence mean in GA of Matlab? What should I do?

I'm using Genetic Algorithm & because my dataset is a little bad, It does not converge to the minimum & I receive this error:
(***Note: Before the error, I see this comment on command window:
Length of label vector does not match # of instances.
***Note:
When I run it for linear kernel function in SVM it's OK. but when I run it for RBF,Polynomial,Sigmoid kernel function, it happens.)
Matlab System Error:
Matlab has encountered an internal problem and needs to close.
my code is like this:
(GA part):
x = ga(#(nu) nu_svm_rbf( nu,train_classset,train_dataset,test_classset,test_dataset ),1,[],[],[],[],lb,ub);
nu_optimum_svd_rbf(1,i) = x;
What should I do by this sentence:
Length of label vector does not match # of instances.
What does it mean? it occurs before running the GA.
Would you please help me?
Thanks
Note: I'm using libSVM & my dataset size is 1000 points with 10 features.
Use the options argument.
You probably want gaoptimset('Generations', 1000)

Bayesian Networks

I am working on following bayesian graph
Graph
Here I am trying to calculate probability of the following
P(W,f)=?
I started as follow
P(w,f)=P(W/f).p(F)
P(W/f)=P(W/R,S,f).P(R.S/F)+P(W/-R,s,f).P(-R.S/F)+P(W/R,-S,F).P(R.-S/F)+P(W/-R,-S,F).P(-R.-S/F)
Since W is independent of F given R,S so
P(W/f)=P(W/R,S).P(R.S/F)+P(W/-R,s).P(-R.S/F)+P(W/R,-S).P(R.-S/F)+P(W/-R,-S).P(-R.-S/F)
Here next I don't know what is the probability of
P(R,s/F)???
Please any suggestion
Don't start like that. The method is:
Add in all other variables to get the full joint, e.g., just with S: P(W,F)=\sum_x P(W,F,S=x)
Simplify your full joint with conditional independences: P(W,F)=\sum_x P(F)P(W|S=x)P(S=x)
Add in all your variables, not just S.

Image processing (Matlab): index exceeds the matrix dimensions

well, I am new to matlab programming and I have been battling on the indexing issues. I am currently working on image processing which so far drive me crazy. anyways, lets jump to the questions.
I have the following code
perm=randperm(size(X,2));
CX=X(:,perm(1:nclus));
I tried to run the code but it triggers an error saying " Index exceeds the matrix dimensions. To my humble knowledge I think it is because the (:,perm(1:nclus)) is higher than the matrix dimensions. I would like to know how can i solve this problem.
Note that X: is the input points in the columns
nclus: number of clusters.
I highly appreciate if you guys clarify to me the error cause and the possible solution for it.
Thank you
Sami
Guessing that you just want to get nclus random columns from a 2 dimensional matrix X, try this:
perm=randperm(size(X,2));
CX=X(:,perm<=nclus);
The error that you experience should not come from X being called with too many dimensions, it is probably because the dimensions of perm are exceeded. Try running this line by line:
perm = randperm(size(X,2)); %Should be ok
idx = perm(1:nclus); %Probably fails
X(:,idx)

Running Sudoku Solver Example in hadoop

I am trying to run sudoku solver provided with hadoop example jar file. I am not sure the format in which input is supposed to be given. Can anybody guide?
Thanks,
Tapan
From the documentation:
The sudoku solver is so fast, I didn't bother making a distributed
version. (All of the puzzles that I've tried, including a 42x42 have
taken around a second to solve.) On the command line, give the solver
a list of puzzle files to solve. Puzzle files have a line per a row
and columns separated by spaces. The squares either have numbers or
'?' to mean unknown.

Resources