cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with machine learning in trial cloud account - cf sapml fs init initialization not working

danieldi
Explorer
0 Kudos

Dear colleagues and experts,

I am evaluating the Leonardo Machine Learning services on the trial account first. I followed the described steps in You Tube tutorial channel of SAP HANA ACADEMY:

https://www.youtube.com/watch?v=2x5hGl5Bvmg&list=PLkzo92owKnVzGkWq8Ge2q1lOWeYcBoK0q∈dex=6

I am stuck at the point to initialize the fs via sapml:

>> cf sapml fs init

this command gives sometimes me an error as a return (that initialization is not possible and to contact administrator) and sometimes initialization lasts simply too long, and I do not get response at all. It looks like it is a problem with AWS infrastructure (s3 file system) for SCF.

Please advice how can I can proceed with this problem.

P.S. Interesting is that, that two months before I did initialize file system and I didn't have a problem with this step, and now it looks like that something was changed and now initialization doesn't work.

Thanks in advance and kind regards,

Daniel Divjakovic

0 Kudos

Hi all,

I am having the same issue. Is there any workaround for this?

The command that I'm executing is:

cf sapml fs init

The message that I receive is:

"Initialization finished. (status=Error) The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again"

I've checked all the service urls and it seems they are ok.

Regards,

Sebastián

rabel1992
Discoverer

Hi Sebastián,

I have the same problem. And the recommended solutions in this topic doesn't work.

Maybe someone can help us.

Regards,

Robin

Accepted Solutions (1)

Accepted Solutions (1)

gabor_molnar
Advisor
Advisor

SAP Development made a fix in Trial landscape. Could you please check it now, if the issue still happens?

helpmesap
Explorer

Hello Gabor,

I tried again and after an initial failure it worked the second time. Thank you very much.

Kind regards,
Stanislaw Hüll

danieldi
Explorer
0 Kudos

Hi Gabor,

like Stanislaw said, finally we can initialize file system. Many thanks for the fast solution. Do you know more details what was the problem with initialization? Is this solution now stable?

Regards,

Daniel Divjakovic

younghwan_kim
Active Participant
0 Kudos

Hi Garbor,

[ cf sapml fs init ] command works fine, but I got error message with [ cf sapml fs list] command.
The error message is [The specifed bucket does not exist], so I assume there is some initialization trouble on AWS file system.

Some other guys also has the same problem, can you plz check ?

Answers (6)

Answers (6)

gabor_molnar
Advisor
Advisor

Hi Daniel,

tested it in my trial system. At first I logged in:

cf login -a https://api.cf.eu10.hana.ondemand.com ... XXX

Then I run the command:

C:\Program Files\Cloud Foundry>cf sapml fs init

For me the output looks like this:

Attempting automatic login using Cloud Foundry service "ml-foundation-trial-beta" ... Successfully logged in using "ml-foundation-trial-beta". Initializing. Please wait.... Initialization finished successfully.

So for you it seems even the login to CF Service "ml-foundation-trial-beta" does not happen.

Can you confirm that you can still logon to the SAP Cloud Platform Cockpit -> Cloud Foundry Trial and you still have the ML Service Instance? It is documented in the tutorial:

https://developers.sap.com/tutorials/cp-mlf-create-instance.html

Regards,

Gábor

gabor_molnar
Advisor
Advisor
0 Kudos

One more thing to try: reset the command line utility by removing the .cf/sapml folder and logging in again with cf login.

helpmesap
Explorer

Hi Gabor,

I am Daniel's colleague and can second his observation: I do not get past the filesystem intialization.

I tried re-doing everything from scratch by deleting my subaccount and following the instructions as shown in the video tutorials at the SAP HANA Academy YouTube channel's 'SAP Leonardo Machine Learning Foundation' playlist - to no avail, unfortunately.

The exact commands I ran using a vanilla installation of the Clound Foundry CLI and its SAPML plugin are listed below including their respones.

> cf login

API endpoint> https://api.cf.eu10.hana.ondemand.com

EMail> forename.surname@my-company.com

Password> {my password goes here} Authenticating... OK Targeted org S0020493644org Targeted space trial-space

API endpoint: https://api.cf.eu10.hana.ondemand.com (API version: 2.133.0) User: forename.surname@my-company.com Org: S0020493644org Space: trial-space
> cf services
Getting services in org S0020493644org / space trial-space as forename.surname@my-company.com... name service plan bound apps last operation broker ml-trial-instance ml-foundation-trial-beta standard create succeeded ml-foundation-trial-beta
> cf sapml config set ml_foundation_service_name ml-foundation-trial-beta
> cf sapml config get KEY VALUE auth_server job_api resourceplan_api ml_foundation_service_name ml-foundation-trial-beta retraining_image_api retraining_text_api retraining_od_api
> cf sapml fs config
The filesystem is uninitialized. Please run cf sapml fs init.
> cf sapml fs init
Attempting automatic login using Cloud Foundry service "ml-foundation-trial-beta" ...
Successfully logged in using "ml-foundation-trial-beta".
Initializing. Please wait....

After waiting multiple hours the script reports an error and quits the process (unfortunately I did not make a note of the error's exact wording so I cannot quote it right now). Note that if I let the initialization process run and open a second terminal I can display the SAPML plugin's config which seems to have been changed by the initialization:

> cf sapml config get
KEY VALUE resourceplan_api retraining_image_api https://mlftrial-retrain-image-api.cfapps.eu10.hana.ondemand.com/api/v2/image/retraining retraining_text_api https://mlftrial-retrain-text-linear-api.cfapps.eu10.hana.ondemand.com/api/v2/text/retraining job_api https://training.trial.eu-central-1.aws.ml.hana.ondemand.com auth_server https://s0020493644.authentication.eu10.hana.ondemand.com ml_foundation_service_name ml-foundation-trial-beta retraining_od_api deployment_api https://mlftrial-deployment-api.cfapps.eu10.hana.ondemand.com model_repo_api https://mlftrial-model-api.cfapps.eu10.hana.ondemand.com

I hope that these details will help you in finding out what the underlying problem might be. We were able to reproduce this error for a total of three different S-User accounts belonging to the same organization (including another mutual colleague of ours).

If there's any further information I can provide to help you please let me know.

Kind regards
Stanislaw Hüll

helpmesap
Explorer
0 Kudos

The error is

Initialization had issues. (status=ERROR) Unexpected Error: "Something went wrong. Please contact your system administrator".
0 Kudos

Hi all:

In my case, i found that my sapml plugin version was too old. I downloaded the plugin again from https://tools.hana.ondemand.com/#mlfoundation directly, then I reinstalled it, and it worked.

Regards,

Sebastián

0 Kudos

However, I have an error when trying to upload the images. A bucket error appears...

0 Kudos

Hi Sebastian,

I also got this error where I am unable to upload any images. I am just wondering if you manage to get it working.

C:\Program Files\Cloud Foundry>mc cp C:\Users\Documents\ML_DATA\test ml/data --recursive
mc: <ERROR> Failed to copy `C:\Users\Documents\ML_DATA\test\test.PNG`. Bucket `data` does not exist.

C:\Program Files\Cloud Foundry>cf sapml fs list
The specified bucket does not exist.

<br>
younghwan_kim
Active Participant
0 Kudos

I also got the same problem,

The specified bucket does not exist.

I hope SAP will work on this.

gabor_molnar
Advisor
Advisor
0 Kudos

Guys,

please check it again. SAP Development has just reset a flag. Run these commands now and it should work again:

cf sapml fs init

and

cf sapml fs config

Regards,

Gábor

mzahid0071
Participant
0 Kudos

Dear expert abdel.dadouche

For your reference I attached this image .

Thanks in advance.

capture.png

abdel_dadouche
Active Contributor
0 Kudos

Hi

Which service are trying to use? I know for example that the Object Detection uses file and not files .

Regards

@bdel

mzahid0071
Participant
mzahid0071
Participant

abdel.dadouche RESOLVED !!! all error resolved and I am now successfully train and deploy my model and getting results in my PoC

Things which I notice is important are -

1. In postmand - while giving Image classification URL we do not need to add " Content -type " as Application/json in header and " Accept as " application/ json and only "Authorization" - {{Token}} will be enough

2. service can be deployed only 1 model and if you need another model . you have to delete your existing model( tho it will be there in account and trained ) but you can not deploy 2 models at a time.

I will figure out more cases now 🙂

Happy learning

mzahid0071
Participant
0 Kudos

Hi expert,

I am also getting the same error now .

If you see below image -

When i give command " cf sapml fs init "

Not sure why ? I am successfully logged In and my service is also working and i logged in via CLI successfully .

Thanks in advance

abdel.dadouche

abdel_dadouche
Active Contributor
0 Kudos

Hi mzahid0071

Have you set the environment variables properly as described in step 3 of https://developers.sap.com/tutorials/cp-mlf-retrain-image-classification-01.html:

cf sapml config set auth_server <authentication URL>
cf sapml config set job_api <JOB_SUBMISSION_API_URL>
cf sapml config set retraining_image_api <IMAGE_RETRAIN_API_URL>
cf sapml config set ml_foundation_service_name  ml-foundation-trial-beta

The values in between "<" and ">" must adjusted based on you service key.

Be aware that the ml_foundation_service_name might defere if you are using something different from the CF trial.

Hope this helps

mzahid0071
Participant
0 Kudos

Dear Expert

Yes , it is working now .

I found that system is not taking " ml-foundation-trail-beta" but it is accepting " SAP Leonardo Machine learning foundation" as a service.

Later which I rename it back to "ml-foundation-trail-beta" This might be because now the service name is different than the earlier one.

Now back to the PoC - I have reached till the stage of retraining ( Uploading the data set successfully via Minio Ui )

But now my postman is giving weird error as below -

PLEASE NOTE : My swagger is working perfectly and I have tested it with few images and getting good scores .

But now postman is showing some error

Would be great if you can help me out here abdel.dadouche

{
    "error": {
        "code": "400",
        "message": "Invalid request: This service requires at least 1 file. Please put your file(s) into the `files` field of the POST request",
        "requestId": "919fde48-fa9e-4396-4711-3f3331289999"
    }
}



mzahid0071
Participant
0 Kudos

I can not see the Ml-foundation application now 😞 . can anyone tell me where I can see ? I am in Europe region and also tried with US Region

abdel_dadouche
Active Contributor
0 Kudos

Hi mzahid0071 ,

The SAP Leonardo ML Foundation is only available in Europe (Frankfurt) & US East (VA) under the Cloud Foundry Trial available at https://account.hanatrial.ondemand.com.

It should be visible as ML Foundation Trial in your entitlements https://account.hanatrial.ondemand.com/cockpit/#/region/cf-eu10/globalaccount/quota (for EU) or https://account.hanatrial.ondemand.com/cockpit/#/region/cf-us10/globalaccount/quota (for US).

Hope this helps

mzahid0071
Participant

I got my mistake,

Entitlement was missing and ml plugin . now things are working fine , getting back to my PoC. abdel.dadouche

0 Kudos

I'm also having the same issue for some days now!

It seems that everyone is having the same issue as you can see on the comments of this video : https://www.youtube.com/watch?v=2x5hGl5Bvmg&lc=z22vi1nhuxz5zb0bq04t1aokgbpiof5dtpqhqt2vyvt2bk0h00410...