iterative / iterative/cml_dvc_case

Cannot publish plot images

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
51
PR merge metrics
No merged PRs in 30d

Description

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\n400 Bad Request\r\n\r\n400 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.