Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNIST Example Doesn't Work #578

Closed
Tabrizian opened this issue Jun 25, 2019 · 29 comments
Closed

MNIST Example Doesn't Work #578

Tabrizian opened this issue Jun 25, 2019 · 29 comments
Labels

Comments

@Tabrizian
Copy link
Member

I tried the local version of MNIST example and kustomize fails with the error below:

Error: var '{batchSize ~G_~V_ConfigMap {data.batchSize}}' cannot be mapped to a field in the set of known resources
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label kind/bug to this issue, with a confidence of 0.88. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@jinchihe
Copy link
Member

Could you please provide more information, such as kustomize version? k8s version, and which step the problem happened? @Tabrizian

@jinchihe
Copy link
Member

You can try to check the batchSize is set by running, or list the training/local/kustomization.yaml file here.

# grep -i batchSize kustomization.yaml
  - batchSize=100

@davidtwomey
Copy link

davidtwomey commented Jun 26, 2019

@Tabrizian @jinchihe
Was having the same issue using kustomization latest release (v3.0.0 pre) as per tutorial:
https://codelabs.developers.google.com/codelabs/kubeflow-introduction/#0

Got kustomization build . to work (for GCS) by

  • Switching to explicit kustomization v2.0.0
  • Changing from kustomize edit set image training-image=$TRAIN_PATH to
    kustomize edit set image training-image=$TRAIN_PATH:latest
    i.e. appending image tag

I tried the local version of MNIST example and kustomize fails with the error below:

Error: var '{batchSize ~G_~V_ConfigMap {data.batchSize}}' cannot be mapped to a field in the set of known resources

@jinchihe
Copy link
Member

@davidtwomey Yes, I tested kustomization 2.0.3, that should work fine. And for you mentioned "$TRAIN_PATH:latest" , In the readme file, the $TRAIN_PATH should include tag as below description:

DOCKER_URL=docker.io/reponame/mytfmodel:tag

@davidtwomey
Copy link

@jinchihe
Yep - the $TRAIN_PATH was just a heads up for those following via the Google colabs tutorial
where train path did not have a tag
GCP TRAIN_PATH=us.gcr.io/$PROJECT_ID/kubeflow-train

@Tabrizian
Copy link
Member Author

Tabrizian commented Jun 27, 2019

kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}                            Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"} 
kustomize version
Version: {KustomizeVersion:3.0.0-pre GitCommit:ae5ebccec77a8691017e11b9b67cd167f0e27856 BuildDate:2019-06-24T01:14:40Z GoOs:linux GoArch:amd64}

The problem happened when I tried to kustomize build ..

@Tabrizian
Copy link
Member Author

Tabrizian commented Jun 27, 2019

@jinchihe

grep -i batchSize kustomization.yaml
  - batchSize=100

outputs the batchSize=100 value.

@jinchihe
Copy link
Member

@jinchihe

grep -i batchSize kustomization.yaml
  - batchSize=100

outputs the batchSize=100 value.

So I guess that should be caused your too old kustomize, what's kustomize version?

@Tabrizian
Copy link
Member Author

v3.0.0-pre1

@Tabrizian
Copy link
Member Author

I tried version 2.1.0 and it works. Probably it is kustomize problem.

@Tabrizian Tabrizian reopened this Jun 27, 2019
@Tabrizian
Copy link
Member Author

Sorry, it didn't work. In version 2.1.0 generates the same error.

Error: var '{batchSize ~G_~V_ConfigMap {data.batchSize}}' cannot be mapped to a field in the set of known resources

@parallelo
Copy link

I was hitting the same errors earlier today.

I don't have a root cause yet, but here are some observations:

  • seems to work with kustomize v2.0.3 and before
  • seems to fail with kustomize v2.1.0 and later

@jinchihe
Copy link
Member

@parallelo Oh.. Thanks! so seems that's kustomize issue? Need to check what's changed by new kustomze.
@Tabrizian You can try with kustomize v2.0.3, I'm sure that work fine with v2.0.3

@Tabrizian
Copy link
Member Author

Very very strange! It works with v2.0.3.

@jinchihe
Copy link
Member

jinchihe commented Jul 2, 2019

I think that may be a bug in new kustomize, logged one issue the kustomize to trace: kubernetes-sigs/kustomize#1295

@aginpatrick
Copy link

I'm having the same issue with kustomize version 2.1.0. Can you tell me how to downgrade to 2.0.3? (kubectl version is 1.8.6). Thanks

@Tabrizian
Copy link
Member Author

Tabrizian commented Jul 4, 2019

Download it from here and copy it to your $PATH.

@aginpatrick
Copy link

Thanks for your help @Tabrizian! Sorry I'm not very familiar with this process. I don't see any download button on the page. Do you mean download the binary that I see at the bottom of the page? Isn't it possible to do something like brew install kustomize@2.0.3? (I'm on MacOS)

@Tabrizian
Copy link
Member Author

Download from this link https://github.com/kubernetes-sigs/kustomize/releases/download/v2.0.3/kustomize_2.0.3_darwin_amd64.
mv kustomize_2.0.3_darwin_amd64 /usr/bin/kustomize

@aginpatrick
Copy link

Thank you @Tabrizian. Unfortunately I get now the following error with version 2.0.3:

`Error: rawResources failed to read Resources: Load from path ../base failed: '../base' must be a file (got d='/Users/me/repos/examples/mnist/training/base') 

@aginpatrick
Copy link

Reading this: kubernetes-sigs/kustomize#766
Changed resources for bases in kustomization.yaml
build is working now
(but I get another error later when I try to get the web-ui service with `kubectl get service web-ui: service is not found, I don't know yet if it's related or not to the kustomize downgrading)

@Tabrizian
Copy link
Member Author

I had similar problem. It was fixed with a fresh clone of the repository. Try it and let me know if it was not fixed.

@jinchihe
Copy link
Member

jinchihe commented Jul 5, 2019

@Tabrizian I just send a PR #584 to recommand user to usr kustomize v2.0.3 to avoid the problem. marked fixes the problem, but the ticket is not closed automatically, that's strange... Suggest close the ticket now if you agree. Thanks.

@Tabrizian
Copy link
Member Author

Thanks! Sure, I will close the issue.

@aginpatrick
Copy link

@Tabrizian, what repo exactly? If it's https://github.com/kubeflow/examples.git, I cloned it two days ago so I would be surprised if it is the solution to my problem. Anyway, I will try it again and let you know. Thank you again.

@vahidtz
Copy link

vahidtz commented Sep 23, 2019

@jinchihe
Yep - the $TRAIN_PATH was just a heads up for those following via the Google colabs tutorial
where train path did not have a tag
GCP TRAIN_PATH=us.gcr.io/$PROJECT_ID/kubeflow-train

I used kustomize version 2.0.3 and included the tag for the training image but still have the base folder issue, do you any other hint?
kustomize edit set image training-image=$TRAIN_PATH:latest
kustomize build .

Error: rawResources failed to read Resources: Load from path ../base failed: '../base' must be a file (got d='/h
/examples/mnist/training/base')

kustomize version
Version: {KustomizeVersion:2.0.3 GitCommit:a6f65144121d1955266b0cd836ce954c04122dc8 BuildDate:2019-03-05T20:37:4
2Z GoOs:linux GoArch:amd64}

@ptone
Copy link

ptone commented Jan 11, 2020

still getting this with v3.5.3
{Version:kustomize/v3.5.3 GitCommit:5ba90fe5ef1dc4599e359edd41d1d0e6373b247d BuildDate:2019-12-17T21:57:37Z GoOs:linux GoArch:amd64}

@Geoyi
Copy link

Geoyi commented Feb 1, 2020

still getting the same error mentioned above with version 3.5.4

{Version:3.5.4 GitCommit:3af514fa9f85430f0c1557c4a0291e62112ab026 BuildDate:2020-01-17T14:23:25+00:00 GoOs:darwin GoArch:amd64}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants