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

experiments: support local parallel execution in temp directories #4257

Merged
merged 17 commits into from Jul 29, 2020

Conversation

pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Jul 22, 2020

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Related to #2799.

  • Adds local temp directory executor and support for running experiments in parallel.
    • Only dvc repro is currently supported
    • Individual dvc run stages within a single repro command cannot be run in parallel
  • dvc repro --experiment --queue can be used to add an experiment to the execution queue
  • dvc repro --run-all will run all experiments currently in the queue
    • -j/--jobs can be used to run experiments in parallel, currently defaults to 1 (run sequentially), will need to decide if we should default to cpu count for this?
  • Queued experiments are listed in dvc exp show and denoted with *

Next steps:

  • Reorganize executor output collection (currently collection is done manually in the experiments classes rather than reading output from an executor's tree)
  • Clean up executor classes so that they can be more easily extended to support other types of executors

@pmrowla
Copy link
Contributor Author

pmrowla commented Jul 28, 2020

asciicast

@pmrowla pmrowla added this to In progress in DVC 14 - 28 July 2020 via automation Jul 28, 2020
@pmrowla pmrowla marked this pull request as ready for review July 28, 2020 09:23
@pmrowla pmrowla changed the title [WIP] experiments: support local parallel execution in temp directories experiments: support local parallel execution in temp directories Jul 28, 2020
@pmrowla pmrowla moved this from In progress to Review in progress in DVC 14 - 28 July 2020 Jul 28, 2020
@pmrowla pmrowla requested a review from efiop July 28, 2020 09:24
@pmrowla pmrowla added the A: experiments Related to dvc exp label Jul 28, 2020
@pmrowla
Copy link
Contributor Author

pmrowla commented Jul 28, 2020

Looks like there's a windows issue w/cleaning up the executor temp directories, I'll have to take a look into it tomorrow

@pmrowla
Copy link
Contributor Author

pmrowla commented Jul 29, 2020

The windows CI issue is resolved and this should be mergable.

Not sure what's going on with the lint build step, check_patch/pylint passes for me locally and in the travis build.
For some reason pylint in the lint step is reporting errors for pytest imports that I think are normally ignored:

pylint...................................................................Failed
- hook id: pylint
- exit code: 2

Registered custom plugin. Some checks will be disabled for tests.
************* Module tests.unit.repo.test_repo
tests/unit/repo/test_repo.py:15:1: E1102: pytest.mark.parametrize is not callable (not-callable)
tests/unit/repo/test_repo.py:33:1: E1102: pytest.mark.parametrize is not callable (not-callable)
************* Module tests.unit.remote.ssh.test_connection
tests/unit/remote/ssh/test_connection.py:87:1: E1102: pytest.mark.skipif is not callable (not-callable)
tests/unit/remote/ssh/test_connection.py:100:1: E1102: pytest.mark.skipif is not callable (not-callable)
...

@skshetry
Copy link
Member

@pmrowla, could be related to pytest-dev/pytest#7558.
Pinning pytest to <6.0.0 should do. Let me create a PR.

skshetry added a commit that referenced this pull request Jul 29, 2020
pytest-dev/pytest#7558
pylint throws error for `pytest.mark.*` functions in pytest6.

```
tests/unit/repo/test_repo.py:15:1: E1102: pytest.mark.parametrize is not callable (not-callable)
tests/unit/repo/test_repo.py:33:1: E1102: pytest.mark.parametrize is not callable (not-callable)
************* Module tests.unit.remote.ssh.test_connection
tests/unit/remote/ssh/test_connection.py:87:1: E1102: pytest.mark.skipif is not callable (not-callable)
tests/unit/remote/ssh/test_connection.py:100:1: E1102: pytest.mark.skipif is not callable (not-callable)
```
#4257 (comment)
@skshetry skshetry mentioned this pull request Jul 29, 2020
2 tasks
skshetry added a commit that referenced this pull request Jul 29, 2020
pytest-dev/pytest#7558
pylint throws error for `pytest.mark.*` functions in pytest6.

```
tests/unit/repo/test_repo.py:15:1: E1102: pytest.mark.parametrize is not callable (not-callable)
tests/unit/repo/test_repo.py:33:1: E1102: pytest.mark.parametrize is not callable (not-callable)
************* Module tests.unit.remote.ssh.test_connection
tests/unit/remote/ssh/test_connection.py:87:1: E1102: pytest.mark.skipif is not callable (not-callable)
tests/unit/remote/ssh/test_connection.py:100:1: E1102: pytest.mark.skipif is not callable (not-callable)
```
#4257 (comment)
@efiop efiop merged commit c8d2f4f into iterative:master Jul 29, 2020
@pmrowla pmrowla deleted the experiments-parallel branch July 29, 2020 12:15
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Aug 6, 2020

Hi! Wow, this looks cool πŸ‘ πŸ‘

Docs-wise though, We have this section in the repro cmd ref, https://dvc.org/doc/command-reference/repro#parallel-stage-execution, reading:

Currently, dvc repro is not able to parallelize stage execution automatically. If you need to do this, you can launch dvc repro multiple times manually. For example...

Sounds like it needs an update?

dvc repro --experiment --queue can be used to add an experiment to the execution queue

In fact all this seems like several new options have been added, so def. needs docs ticket, I think.

Thanks

@pmrowla
Copy link
Contributor Author

pmrowla commented Aug 6, 2020

@jorgeorpinel yeah there will be docs tickets once behavior is finalized, but for now since everything is expected to continue to change before the feature is released (and since it's currently an experimental feature and disabled by default) I haven't submitted any docs PRs yet.

@jorgeorpinel
Copy link
Contributor

Kk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp
Projects
No open projects
DVC 14 - 28 July 2020
  
Review in progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants