iterative/cml

Error cml writing metrics to md file with Github Actions

Bwan109 opened this issue · 4 comments

Hi, I'm facing this issue when running cat metrics.txt >> report.md

{"code":"ERR_INVALID_URL","input":"\r\n<title>400 Bad Request</title>\r\n\r\n

400 Bad Request

\r\n
cloudflare\r\n\r\n\r\n","level":"error","message":"Invalid URL","stack":"TypeError [ERR_INVALID_URL]: Invalid URL\n at new NodeError (node:internal/errors:399:5)\n at new URL (node:internal/url:560:13)\n at uriParam (/usr/local/lib/node_modules/@dvcorg/cml/src/utils.js:149:15)\n at watermarkUri (/usr/local/lib/node_modules/@dvcorg/cml/src/utils.js:140:10)\n at CML.publish (/usr/local/lib/node_modules/@dvcorg/cml/src/cml.js:349:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async visitor (/usr/local/lib/node_modules/@dvcorg/cml/src/cml.js:247:26)\n at async Promise.all (index 1)\n at async publishLocalFiles (/usr/local/lib/node_modules/@dvcorg/cml/src/cml.js:261:7)"}

Tasks

No tasks being tracked yet.
dacbd commented

Hi, actually I have tried using Node V16 too. You can view the workflow file. However, still facing the same issue

image

dacbd commented

@Bwan109 how you have that workflow wont work, try something like this please:

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - uses: iterative/setup-dvc@v1
      - uses: iterative/setup-cml@v1
      ...

you can also use the latest container image we build:

jobs:
  run:
    runs-on: ubuntu-latest
    container: ghcr.io/iterative/cml:0-dvc3-base1
    steps:
      - uses: actions/checkout@v3
      ...

Thanks, it's able to work now