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

Cannot publish plot images #28

Open
Asad-Ismail opened this issue Jun 25, 2023 · 0 comments
Open

Cannot publish plot images #28

Asad-Ismail opened this issue Jun 25, 2023 · 0 comments

Comments

@Asad-Ismail
Copy link

Asad-Ismail commented Jun 25, 2023

Hello,

I am trying to reproduce the test case but I am unable to include plot images in my report it throws this error

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

400 Bad Requestcloudflare\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 0)\n at async publishLocalFiles (/usr/local/lib/node_modules/@dvcorg/cml/src/cml.js:261:7)"}
"
"""

Without images the report looks good, here is my cml.yaml file

name: train-my-model
on: [push]

jobs:
run:
runs-on: [ubuntu-latest]

  steps:
    - uses: actions/checkout@v3
      with:
        ref: ${{ github.event.pull_request.head.sha }}

    - uses: iterative/setup-cml@v1

    - uses: iterative/setup-dvc@v1

    - uses: actions/setup-python@v2
      with:
        python-version: '3.x'

    - name: cml
      env:
        repo_token: ${{ secrets.REPO_SECRET }}
      run: |
        pip install -r requirements.txt

        # Pull dataset with DVC
        #dvc pull data

        # Reproduce pipeline if any changes detected in dependencies
        #dvc repro

        # Use DVC metrics diff to compare metrics to master
        git fetch --prune --unshallow
        dvc metrics diff master >> report.md

        # Add figure to report
        dvc plots diff --target loss.csv --show-vega master > vega.json
        vl2png vega.json -s 1.3 > vega.png
        echo '![](./vega.png)' >> report.md
        cml comment create --pr --publish report.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant