• muenzpraeger
  • NEWBIE
  • 85 Points
  • Member since 2016
  • Principal Developer Evangelist
  • Salesforce.com


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 17
    Replies
Hi,

I am stuck at the Create and Train the Dataset step on the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead module.

I have successfully created the lightning component, uploaded the zip file and clicked on the train button but when I try to Verifiy I get the following error message:
"Challenge Not yet complete... here's what's wrong: 
Could not find a successful cat dataset training. The training may take a couple of minutes after the model is created."

Could you please advise ?

Thanks for your help.

Hello,

I'm trying to set up a Lightning app that will allow a user to provide a url to a zip file, have that zip file loaded as a dataset into the predictive vision service, then specify the newly created dataset to be trained into a datamodel. I'm able to load the data model from the menu, and get back a dataset id.

But I'm stuck on how to call the training service. I modified the provided VisionController code as follows:

    @AuraEnabled
    public static String postDatasetTrain(string datasetId, string datasetName) {
        // Get a new token
        JWT jwt = new JWT('RS256');
        jwt.cert = 'SelfSignedCert_18Jul2016_235259';
        jwt.iss = 'developer.force.com';
        jwt.sub = 'joseph.daily@careerbuilder.com';
        jwt.aud = 'https://api.metamind.io/v1/oauth2/token';
        jwt.exp = '3600';
        String access_token = JWTBearerFlow.getAccessToken('https://api.metamind.io/v1/oauth2/token', jwt);      
        
        String VISION_API = 'https://api.metamind.io/v1/vision';
        String DATA_TRAIN = VISION_API + '/train';
        string contentType = HttpFormBuilder.GetContentType();
        //  Compose the form
        string form64 = '';      
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('name', datasetName);
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('datasetId', datasetId);        
        form64 += HttpFormBuilder.WriteBoundary(HttpFormBuilder.EndingType.CrLf);
        
        blob formBlob = EncodingUtil.base64Decode(form64);
        string contentLength = string.valueOf(formBlob.size());
        //  Compose the http request
        HttpRequest httpRequest = new HttpRequest();
        
        httpRequest.setBodyAsBlob(formBlob);
        httpRequest.setHeader('Connection', 'keep-alive');
        httpRequest.setHeader('Content-Length', contentLength);
        httpRequest.setHeader('Content-Type', contentType);
        httpRequest.setMethod('POST');
        httpRequest.setTimeout(120000);
        httpRequest.setHeader('Authorization','Bearer ' + access_token);
        httpRequest.setEndpoint(DATA_TRAIN);
        
        Http http = new Http();
        HTTPResponse res = http.send(httpRequest);
        system.debug('res: ' + res);
        system.debug('res.getBody(): ' + res.getBody());
        return res.getBody();
    }    

 

But the response that comes back is always a 403 : forbidden message.

Is there anything obvious causing this in my code?

Hello,
I am trying to learn about SFDX and have installed Visual Studio Code + Salesforce Extensions.
I skiped the step that says "Make sure you have the latest version of the Salesforce CLI installed, and that your system meets the necessary requirements." because, before installing VS Code + the SF Extensions, I reviewed the list of extensions includeded in SF Extensions and saw that it included CLI.
It was a confusion moment and... I think I also read out there that it was better to installed CLI as part of SF Extension (which includes a set of extensions).

Eventually, because I was not able to create new Project from VS Code (Ctrl+Shift+P), I decided to revisite the steps to set up SF DX with VS Code, and decided to intall SF CLI by downloading a file (win64) from here (https://developer.salesforce.com/tools/sfdxcli ) and execute installation of that file.

Right now, my laptop has the following installed:
- Visual Studio Code + Salesforce Extensions (look at screenshot below)
- Salesforce CLI (win64) dowloaded from the above link

User-added image

How can I verify if Salesforce CLI works fine? I have tried executing cmd.exe the following command: sfdx --version
... but I am getting this error message:
User-added image

Do you think that the fact that I installed SF CLI after installing VS Code is the reason for the above command line not being recognized?

How can I make sure that I have all the SFDX tools correctly installed?

Thank you very much.

 
  • December 09, 2018
  • Like
  • 0
I need Guest users in my Community to be able to give their details, to create the corresponding Contact. I gave the Guest profile Create (and even Read, even if it should not be needed) rights on the Contact object.
In terms of permissions, it works, because my Guest Users can now use a Quick Create action on Contact, which they could not see before.
However, lightning:recordEditForm fails displaying at all, even for creating a Contact.
I consider this as a bug of the component. Am I right?
Hi,

I am stuck at the Create and Train the Dataset step on the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead module.

I have successfully created the lightning component, uploaded the zip file and clicked on the train button but when I try to Verifiy I get the following error message:
"Challenge Not yet complete... here's what's wrong: 
Could not find a successful cat dataset training. The training may take a couple of minutes after the model is created."

Could you please advise ?

Thanks for your help.

Hello,

I'm trying to set up a Lightning app that will allow a user to provide a url to a zip file, have that zip file loaded as a dataset into the predictive vision service, then specify the newly created dataset to be trained into a datamodel. I'm able to load the data model from the menu, and get back a dataset id.

But I'm stuck on how to call the training service. I modified the provided VisionController code as follows:

    @AuraEnabled
    public static String postDatasetTrain(string datasetId, string datasetName) {
        // Get a new token
        JWT jwt = new JWT('RS256');
        jwt.cert = 'SelfSignedCert_18Jul2016_235259';
        jwt.iss = 'developer.force.com';
        jwt.sub = 'joseph.daily@careerbuilder.com';
        jwt.aud = 'https://api.metamind.io/v1/oauth2/token';
        jwt.exp = '3600';
        String access_token = JWTBearerFlow.getAccessToken('https://api.metamind.io/v1/oauth2/token', jwt);      
        
        String VISION_API = 'https://api.metamind.io/v1/vision';
        String DATA_TRAIN = VISION_API + '/train';
        string contentType = HttpFormBuilder.GetContentType();
        //  Compose the form
        string form64 = '';      
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('name', datasetName);
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('datasetId', datasetId);        
        form64 += HttpFormBuilder.WriteBoundary(HttpFormBuilder.EndingType.CrLf);
        
        blob formBlob = EncodingUtil.base64Decode(form64);
        string contentLength = string.valueOf(formBlob.size());
        //  Compose the http request
        HttpRequest httpRequest = new HttpRequest();
        
        httpRequest.setBodyAsBlob(formBlob);
        httpRequest.setHeader('Connection', 'keep-alive');
        httpRequest.setHeader('Content-Length', contentLength);
        httpRequest.setHeader('Content-Type', contentType);
        httpRequest.setMethod('POST');
        httpRequest.setTimeout(120000);
        httpRequest.setHeader('Authorization','Bearer ' + access_token);
        httpRequest.setEndpoint(DATA_TRAIN);
        
        Http http = new Http();
        HTTPResponse res = http.send(httpRequest);
        system.debug('res: ' + res);
        system.debug('res.getBody(): ' + res.getBody());
        return res.getBody();
    }    

 

But the response that comes back is always a 403 : forbidden message.

Is there anything obvious causing this in my code?