1

this is the .yaml I'm using to run and output a comment with cml

name: CNN
on: [push]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v2
    - uses: iterative/setup-cml@v1
    - name: Train model
    env:
      REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    run: |
        python -m pip install --upgrade pip
        pip install -r require.txt
        ipynb-py-convert CNN.ipynb CNN.py
        python CNN.py 
        
        #echo "## Metrics"
        #cat metrics.txt
        
        echo "## Metrics" >> report.md
        #cat metrics.txt >> report.md
        
        #echo "## CM" >> report.md
        #cml publish cm.png --md >> report.md
        
        cml send-comment report.md

and this is the error that I get every time I commit with cml send comment uncommented. I've tried many different angles but I can't seem to find a solution

  • Please copy/paste error messages instead of linking/screenshots. This helps people with the same problem in the future to find your question. – rethab May 11 '22 at 07:21

2 Answers2

1

I know this was posted a while ago, but I ran into the same issue recently, and the solution I found might help someone else.

In my case, the issue was related to the workflow permissions on my repo. To change that, you can follow the steps:

  • On GitHub.com, navigate to the main page of your repository.
  • Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.
  • In the left sidebar, click Actions, then click General.
  • Under Workflow permissions, choose read and write permissions to the GITHUB_TOKEN to have read and write access for all scopes. Then save it. enter image description here

After that, you should be good to rerun the workflow.

psaboia
  • 41
  • 4
0

Does the workflow have write access to the repository?

Domas
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 19 '22 at 01:45