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

Error: cml comment create report.md #1424

Closed
b00nw33 opened this issue Sep 11, 2023 · 9 comments
Closed

Error: cml comment create report.md #1424

b00nw33 opened this issue Sep 11, 2023 · 9 comments
Labels
question User requesting support

Comments

@b00nw33
Copy link

b00nw33 commented Sep 11, 2023

I was able to get example repo working properly, but when I try to replicate it in my work, I encounter the following error with cml comment create report.md in cml.yaml.

{"level":"error","message":"token not found","stack":"Error: token not found\n at new Github (/usr/lib/node_modules/@dvcorg/cml/src/drivers/github.js:91:23)\n at CML.getDriver (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:161:35)\n at CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:184:22)\n at Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/comment/create.js:11:25)\n at /usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:8993\n at /usr/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:4949"}

@b00nw33 b00nw33 added the epic Collection of sub-issues label Sep 11, 2023
@0x2b3bfa0
Copy link
Member

Hello, @b00nw33! Can you please share a copy of your workflow?

@b00nw33
Copy link
Author

b00nw33 commented Sep 11, 2023

@0x2b3bfa0 Sure, thanks for reaching out!

example_cml - working

wine - error

mycaret - error

@0x2b3bfa0
Copy link
Member

On https://github.com/b00nw33/mycaret/actions/runs/6143774135/workflow, you're passing the token to the wrong step.

  name: Auto mycaret
  on: [push]
  jobs:
    train-and-report:
      runs-on: ubuntu-latest
      container: docker://ghcr.io/iterative/cml:0-dvc2-base1
      steps:
        - name: Checkout code
          uses: actions/checkout@v4
        - name: Install dependencies
-         env:
-           REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          run: |
            python -m pip install --upgrade pip
            pip install -r requirements.txt
            pip install pycaret[full]
        - name: Run app.py
+         env:
+           REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          run: |
            python app.py  # generate plot.png
            # Create CML report
            cat metrics.txt >> report.md
            # echo '![](./plot.png "Confusion Matrix")' >> report.md
            cml comment create report.md
        - name: Finalising
          run: |
            echo "Done!"

@0x2b3bfa0
Copy link
Member

On https://github.com/b00nw33/wine/actions/runs/6148077199/job/16680984239#step:5:14, it can't find results.txt, probably because it doesn't exist.

@0x2b3bfa0 0x2b3bfa0 added question User requesting support and removed epic Collection of sub-issues labels Sep 20, 2023
@b00nw33
Copy link
Author

b00nw33 commented Sep 21, 2023

Thanks @0x2b3bfa0 , made changes accordingly.

Now I'm getting this error from the following line:

echo "![](./feature_importance.png)" >> report.md

@0x2b3bfa0
Copy link
Member

Can you please try renaming your image files so they don't contain underscores? I believe there might be some parsing issue with underscores, also on the GitHub flavor of CML.

#1347

@b00nw33
Copy link
Author

b00nw33 commented Sep 22, 2023

Renamed to features.png, and got this error.

@dacbd
Copy link
Contributor

dacbd commented Sep 25, 2023

Renamed to features.png, and got this error.

@b00nw33 sorry for the inconvenience, can you try with the actions/setup-node that you have commented out.

@b00nw33
Copy link
Author

b00nw33 commented Sep 26, 2023

Renamed to features.png, and got this error.

@b00nw33 sorry for the inconvenience, can you try with the actions/setup-node that you have commented out.

@dacbd Thanks, working now. Looks like it needs either uses: actions/setup-node@v3 or container: ghcr.io/iterative/cml:0-dvc2-base1 to work.

@b00nw33 b00nw33 closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User requesting support
Projects
None yet
Development

No branches or pull requests

3 participants