Skip to content

Instantly share code, notes, and snippets.

View shcheklein's full-sized avatar
🐙

Ivan Shcheklein shcheklein

🐙
View GitHub Profile
@shcheklein
shcheklein / repro.md
Created February 22, 2019 07:41
Repro command reference

repro

Rerun commands recorded in the pipeline stages in the same order. Commands to rerun are determined by recursively analyzing which stages and changes in their dependencies to find only those that have to be rerun.

Synopsis

 usage: dvc repro [-h] [-q] [-v] [-f] [-s]
@shcheklein
shcheklein / main.py
Last active May 9, 2019 22:43
DVC Main by Ruslan
"DVC CORE CONTRIBUTOR"
import os
from stat import ST_INO, ST_DEV
from dvc.command.base import CmdBase, DvcLock
from dvc.logger import Logger
from dvc.system import System
class CmdCheckout(CmdBase):
@shcheklein
shcheklein / heartbeat-dvc-metrics-2019-05.json
Created May 17, 2019 04:35
heartbeat-dvc-metrics-2019-05
{
"AUC_RATIO": {
"train": 0.8922748258797667,
"valid": 0.8561602726251776,
"xval": 0.8843431199314923
}
}
who = "DVC TEAM"
def write_dot(self, target, commands, outs, filename):
import networkx
from networkx.drawing.nx_pydot import write_dot
_, edges = self.__build_graph(target, commands, outs)
edges = [edge[::-1] for edge in edges]
simple_g = networkx.DiGraph()
simple_g.add_edges_from(edges)
@shcheklein
shcheklein / remote.py
Created May 21, 2019 00:56
remote.py
who = "DVC TEAM"
def download(
self,
from_infos,
to_infos,
no_progress_bar=False,
names=None,
resume=False,
):
names = self._verify_path_args(to_infos, from_infos, names)
@shcheklein
shcheklein / villas.py
Last active May 30, 2019 01:42
villas.py
who = "@villasv - DVC CONTRIBUTOR"
try:
from google.cloud import storage
except ImportError:
storage = None
@classmethod
def supported(cls, config):
url_ok = cls.match(config[Config.SECTION_REMOTE_URL])
deps_ok = all(cls.REQUIRES)
if url_ok and not deps_ok:
@shcheklein
shcheklein / output.out
Created September 11, 2019 17:05
2483 test
(.env) [ivan@ivan ~/Projects/test]$ ./test.sh
+ set -e
+ pip uninstall -y dvc
Uninstalling dvc-0.59.2:
Successfully uninstalled dvc-0.59.2
+ pip install dvc==0.59.2
Collecting dvc==0.59.2
Using cached https://files.pythonhosted.org/packages/78/fa/5d9fc54fbf99c75efd9cfbd81b479b2e3d0572b59694523d24c280cad018/dvc-0.59.2-py2.py3-none-any.whl
Requirement already satisfied: future>=0.16.0 in ./.env/lib/python3.7/site-packages (from dvc==0.59.2) (0.17.1)
Requirement already satisfied: asciimatics>=1.10.0 in ./.env/lib/python3.7/site-packages (from dvc==0.59.2) (1.11.0)
@shcheklein
shcheklein / gist:1113cab8d976453814e7e65a376f3a0c
Created November 9, 2019 05:07
casper-locking-imagenet-linux.prof
1325068 2.830 0.000 10.061 0.000 /mnt/ivan/dvc/dvc/utils/__init__.py:336(current_timestamp)
7 0.001 0.000 10.499 1.500 /mnt/ivan/dvc/dvc/utils/__init__.py:112(dict_md5)
443471 0.972 0.000 10.666 0.000 /mnt/ivan/dvc/dvc/state.py:307(_update_state_record_timestamp_for_inode)
2650131 2.835 0.000 10.669 0.000 /mnt/ivan/dvc/.env/lib/python3.6/site-packages/nanotime/__init__.py:123(seconds)
440796 1.904 0.000 10.949 0.000 /mnt/ivan/dvc/dvc/system.py:26(hardlink)
1325069 4.983 0.000 11.126 0.000 /mnt/ivan/dvc/dvc/system.py:193(inode)
18550649 6.868 0.000 11.130 0.000 /mnt/ivan/dvc/.env/lib/python3.6/posixpath.py:41(_get_sep)
1325070 2.359 0.000 11.638 0.000 /mnt/ivan/dvc/dvc/state.py:145(_fetchall)
6184578 3.550 0.000 11.854 0.000 /usr/lib/python3.6/logging/__init__.py:1286(debug)
2 1.319 0.660 12.023 6.011 /usr/lib/python3.6/json/__init__.py:120(dump)
@shcheklein
shcheklein / console.log
Created June 11, 2020 01:16
dvc run stage order not preserved
(.env) √ ~/Projects % dvc run -n a echo
(.env) √ ~/Projects % dvc run -n b echo
(.env) √ ~/Projects % cat dvc.yaml
stages:
a:
cmd: echo
b:
cmd: echo
@shcheklein
shcheklein / cml.yaml
Last active August 9, 2020 19:35
Metrics report
name: report-status
on: [push, pull_request]
jobs:
run:
runs-on: [ubuntu-latest]
container: docker://dvcorg/cml-py3:latest
steps:
- uses: actions/checkout@v2