Skip to content

Unify metrics behavior with dirs#3935

Merged
efiop merged 7 commits into
treeverse:masterfrom
nik123:UnifyMetricsBehaviorWithDirs
Jun 4, 2020
Merged

Unify metrics behavior with dirs#3935
efiop merged 7 commits into
treeverse:masterfrom
nik123:UnifyMetricsBehaviorWithDirs

Conversation

@nik123
Copy link
Copy Markdown
Contributor

@nik123 nik123 commented Jun 2, 2020

Fixes #3930

Comment thread dvc/output/base.py Outdated
Comment on lines +259 to +261
if self.metric:
self.verify_metric()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a

            if self.metric or self.plot:
                self.verify_metric()

a few lines above, under if not self.use_cache. How about we just move it outside of that if and check before that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@efiop
Copy link
Copy Markdown
Contributor

efiop commented Jun 2, 2020

For the record: partial fix for #3924

@efiop
Copy link
Copy Markdown
Contributor

efiop commented Jun 2, 2020

Looks great!

One more thing: could you please add a test for it?

@nik123
Copy link
Copy Markdown
Contributor Author

nik123 commented Jun 4, 2020

@efiop , should I fix latest DeepSource issues too?

BTW it seems that PyTest preferred over the UnitTest and all the future tests should be implemented via PyTests. Is it correct?

@pmrowla
Copy link
Copy Markdown
Contributor

pmrowla commented Jun 4, 2020

BTW it seems that PyTest preferred over the UnitTest and all the future tests should be implemented via PyTests. Is it correct?

Yes, this is correct

@efiop efiop merged commit 5bbaa28 into treeverse:master Jun 4, 2020
@efiop
Copy link
Copy Markdown
Contributor

efiop commented Jun 4, 2020

Thank you @nik123 ! 🙏

@efiop , should I fix latest DeepSource issues too?

It is advisory, but it is not required. I just did a quick-n-dirty conversion to pytest for now, no biggie 🙂

@nik123 nik123 deleted the UnifyMetricsBehaviorWithDirs branch June 5, 2020 00:07
efiop pushed a commit that referenced this pull request Jun 5, 2020
* change DvcParser to print subcommand help

* add tests for subcommand help

* docstring refactoring

* remote: finish separating RemoteTree methods (#3946)

* remote: move upload()/download() into tree

* remote: move path_info/path_cls into tree

* remote.azure: finish moving methods into tree

* remote.gs: finish moving methods into tree

* remote.hdfs: finish moving methods to tree

* remote.http: finish moving methods into tree

* remote.oss: finish moving methods into tree

* remote.s3: finish moving methods into tree

* remote.ssh: finish moving methods into tree

* remote.gdrive: finish moving methods into tree

* tests: update remote unit tests

* tests: update func tests

* remote: use walk_files() for all remotes

* list_cache_paths() now uses tree.walk_files() for all remotes except
  local/ssh

* fix DS warnings

* bugfixes

* Unify metrics behavior with dirs (#3935)

* run: disable directories for -m/-M flags

* run: reformatted string literals

* run: simplified metrics check

* tests: func: run: dirs as metrics outs

* tests: func: run: reformatted string literals

* tests: use pytest

Co-authored-by: Ruslan Kuprieiev <ruslan@iterative.ai>

* refactor/test multistage load for params and outputs (#3949)

* refactor multistage load for params and outputs

* tests: load params

* tests: output loading from pipeline file

* fix test

* fix typo in name

* split params load

* rename params func s/inject_values/fill_values

* fix tests

* simplify loads_params and output.load_from_pipeline

* address @pared's suggestions for tests

* remote: fix build errors (#3957)

* remote: fix remaining gdrive build issues (#3959)

* tests: fix gdrive build

* remote.gdrive: fix walk_files prefix relpath

* change DvcParser to print subcommand help

* add tests for subcommand help

* docstring refactoring

* change tests to pytest-style

* remove gettext

Co-authored-by: Peter Rowlands (변기호) <peter@pmrowla.com>
Co-authored-by: nik123 <kodenkonikita@gmail.com>
Co-authored-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Co-authored-by: Saugat Pachhai <suagatchhetri@outlook.com>
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

Successfully merging this pull request may close these issues.

dvc run -m/-M: inconsistent behavior with dirs

3 participants