Skip to content

Commit

Permalink
build(deps): Bump dvclive from 0.3.0 to 0.4.0 (iterative#6753)
Browse files Browse the repository at this point in the history
* build(deps): Bump dvclive from 0.3.0 to 0.4.0

Bumps [dvclive](https://github.com/iterative/dvclive) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/iterative/dvclive/releases)
- [Commits](iterative/dvclive@0.3.0...0.4.0)

---
updated-dependencies:
- dependency-name: dvclive
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* live: adjust tests to dvclive==0.4.0

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paweł Redzyński <[email protected]>
  • Loading branch information
dependabot[bot] and pared authored Oct 8, 2021
1 parent c541534 commit d33df60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ tests =
xmltodict==0.12.0
google-compute-engine==2.8.13
google-cloud-storage==1.42.3
dvclive==0.3.0
dvclive==0.4.0
pywin32>=225; sys_platform == 'win32' and python_version < '3.10'
hdfs==2.6.0
# required by collective.checkdocs
Expand Down
27 changes: 15 additions & 12 deletions tests/func/test_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@

LIVE_SCRIPT = dedent(
"""
import dvclive
from dvclive import Live
import sys
r = 2
metrics_logger = Live()
for i in range(r):
dvclive.log("loss", 1-i/r)
dvclive.log("accuracy", i/r)
dvclive.next_step()"""
metrics_logger.log("loss", 1-i/r)
metrics_logger.log("accuracy", i/r)
metrics_logger.next_step()"""
)

LIVE_CHECKPOINT_SCRIPT = dedent(
"""
import os
import dvclive
from dvclive import Live
def read(path):
value=0
Expand All @@ -40,15 +41,16 @@ def dump(value, path):
r = 3
checkpoint_file = "checkpoint"
metrics_logger = Live()
value = read(checkpoint_file)
for i in range(1,r):
m = i + value
dump(m, checkpoint_file)
dvclive.log("metric1", m)
dvclive.log("metric2", m * 2)
dvclive.next_step()"""
metrics_logger.log("metric1", m)
metrics_logger.log("metric2", m * 2)
metrics_logger.next_step()"""
)


Expand Down Expand Up @@ -242,12 +244,13 @@ def test_dvc_generates_html_during_run(tmp_dir, dvc, mocker, live_stage):

script = dedent(
"""
import dvclive
from dvclive import Live
import sys
import time
dvclive.log("loss", 1/2)
dvclive.log("accuracy", 1/2)
dvclive.next_step()
metrics_logger = Live()
metrics_logger.log("loss", 1/2)
metrics_logger.log("accuracy", 1/2)
metrics_logger.next_step()
time.sleep({})""".format(
str(monitor_await_time * 10)
)
Expand Down

0 comments on commit d33df60

Please sign in to comment.