GithubHelp home page GithubHelp logo

iterative / example-get-started-experiments Goto Github PK

View Code? Open in Web Editor NEW
41.0 11.0 62.0 164 KB

Get started DVC project

Home Page: https://dvc.org/doc/start/experiment-management/experiments

Jupyter Notebook 41.77% Python 58.23%
computer-vision dvc example machine-learning python reproducibility reproducible-research

example-get-started-experiments's Introduction

DVC DVC-metrics

Train Report - Evaluation Report

DVC Get Started: Experiments

This is an auto-generated repository for use in DVC Get Started: Experiments.

This is a Computer Vision (CV) project that solves the problem of segmenting out swimming pools from satellite images.

Example results

We use a slightly modified version of the BH-Pools dataset: we split the original 4k images into tiles of 1024x1024 pixels.

๐Ÿ› Please report any issues found in this project here - example-repos-dev.

Installation

Python 3.8+ is required to run code from this repo.

$ git clone https://github.com/iterative/example-get-started-experiments
$ cd example-get-started-experiments

Now let's install the requirements. But before we do that, we strongly recommend creating a virtual environment with a tool such as virtualenv:

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

This DVC project comes with a preconfigured DVC remote storage that holds raw data (input), intermediate, and final results that are produced. This is a read-only HTTP remote.

$ dvc remote list
storage  https://remote.dvc.org/get-started-pools

You can run dvc pull to download the data:

$ dvc pull

Running in your environment

Run dvc exp run to reproduce the pipeline:

$ dvc exp run
Data and pipelines are up to date.

If you'd like to test commands like dvc push, that require write access to the remote storage, the easiest way would be to set up a "local remote" on your file system:

This kind of remote is located in the local file system, but is external to the DVC project.

$ mkdir -p /tmp/dvc-storage
$ dvc remote add local /tmp/dvc-storage

You should now be able to run:

$ dvc push -r local

Existing stages

There is a couple of git tags in this project :

Contains an end-to-end Jupyter notebook that loads data, trains a model and reports model performance. DVCLive is used for experiment tracking. See this blog post for more details.

Contains a DVC pipeline dvc.yaml that was created by refactoring the above notebook into individual pipeline stages.

The pipeline artifacts (processed data, model file, etc) are automatically versioned.

This tag also contains a GitHub Actions workflow that reruns the pipeline if any changes are introduced to the pipeline-related files. CML is used in this workflow to provision a cloud-based GPU machine as well as report model performance results in Pull Requests.

Model Deployment

Check out the GitHub Workflow that uses the Iterative Studio Model Registry. to deploy the model to AWS Sagemaker whenever a new version is registered.

Project structure

The data files, DVC files, and results change as stages are created one by one. After cloning and using dvc pull to download data, models, and plots tracked by DVC, the workspace should look like this:

$ tree -L 2
.
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ data.            # <-- Directory with raw and intermediate data
โ”‚   โ”œโ”€โ”€ pool_data    # <-- Raw image data
โ”‚   โ”œโ”€โ”€ pool_data.dvc # <-- .dvc file - a placeholder/pointer to raw data
โ”‚   โ”œโ”€โ”€ test_data    # <-- Processed test data
โ”‚   โ””โ”€โ”€ train_data   # <-- Processed train data
โ”œโ”€โ”€ dvc.lock
โ”œโ”€โ”€ dvc.yaml         # <-- DVC pipeline file
โ”œโ”€โ”€ models
โ”‚   โ””โ”€โ”€ model.pkl    # <-- Trained model file
โ”œโ”€โ”€ notebooks
โ”‚   โ””โ”€โ”€ TrainSegModel.ipynb # <-- Initial notebook (refactored into `dvc.yaml`) 
โ”œโ”€โ”€ params.yaml      # <-- Parameters file
โ”œโ”€โ”€ requirements.txt # <-- Python dependencies needed in the project
โ”œโ”€โ”€ results          # <-- DVCLive reports and plots
โ”‚   โ”œโ”€โ”€ evaluate
โ”‚   โ””โ”€โ”€ train
โ””โ”€โ”€ src              # <-- Source code to run the pipeline stages
    โ”œโ”€โ”€ data_split.py
    โ”œโ”€โ”€ evaluate.py
    โ””โ”€โ”€ train.py

example-get-started-experiments's People

Contributors

alex000kim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.