Coder Social home page Coder Social logo

jacobhepkema / pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytorch/pytorch

0.0 1.0 0.0 442.98 MB

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Home Page: https://pytorch.org

License: Other

CMake 1.04% Python 36.86% Shell 0.39% C++ 53.14% C 2.88% Objective-C 0.02% Cuda 4.40% Batchfile 0.03% Makefile 0.01% Metal 0.05% Objective-C++ 0.52% CSS 0.01% HTML 0.01% Dockerfile 0.02% PowerShell 0.01% PureBasic 0.14% LLVM 0.01% Yacc 0.01% Java 0.16% Assembly 0.31%

pytorch's Introduction

pytorch/.github

This directory contains workflows and scripts to support our CI infrastructure that runs on Github Actions.

Workflows / Templates

Our current Github Actions setup uses templates written in Jinja that are located in the .github/templates directory to generate workflow files found in the .github/workflows/ directory.

These templates contain a couple of utility templates used to discern common utilities that can be used amongst different templates.

(Re)Generating workflow files

You will need jinja2 in order to regenerate the workflow files which can be installed using:

pip install -r .github/requirements.txt

Workflows can be generated / regenerated using the following command:

.github/regenerate.sh

Adding a new generated workflow

New generated workflows can be added in the .github/scripts/generate_ci_workflows.py script. You can reference examples from that script in order to add the workflow to the stream that is relevant to what you particularly care about.

Different parameters can be used to acheive different goals, i.e. running jobs on a cron, running only on trunk, etc.

ciflow (specific)

ciflow is the way we can get non-default workflows to run on specific PRs. Within the generate_ci_workflows.py script you will notice a multitude of LABEL_CIFLOW_<NAME> variables which correspond to labels on Github. Workflows that do not run on ``LABEL_CIFLOW_DEFAULTcan be triggered on PRs by applying the label found ingenerate_ci_workflows.py`

Example:

    CIWorkflow(
        arch="linux",
        build_environment="periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck",
        docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7",
        test_runner_type=LINUX_CUDA_TEST_RUNNER,
        num_test_shards=2,
        distributed_test=False,
        timeout_after=360,
        # Only run this on master 4 times per day since it does take a while
        is_scheduled="0 */4 * * *",
        ciflow_config=CIFlowConfig(
            labels={LABEL_CIFLOW_LINUX, LABEL_CIFLOW_CUDA, LABEL_CIFLOW_SLOW_GRADCHECK, LABEL_CIFLOW_SLOW, LABEL_CIFLOW_SCHEDULED},
        ),
    ),

This workflow does not get triggered by default since it does not contain the LABEL_CIFLOW_DEFAULT label in its CIFlowConfig but applying the LABEL_CIFLOW_SLOW_GRADCHECK on your PR will trigger this specific workflow to run.

ciflow (trunk)

The label ciflow/trunk can be used to run trunk only workflows. This is especially useful if trying to re-land a PR that was reverted for failing a non-default workflow.

Infra

Currently most of our self hosted runners are hosted on AWS, for a comprehensive list of available runner types you can reference .github/scale-config.yml.

Exceptions to AWS for self hosted:

  • ROCM runners

Adding new runner types

New runner types can be added by committing changes to .github/scale-config.yml. Example: pytorch#70474

NOTE: New runner types can only be used once the changes to .github/scale-config.yml have made their way into the default branch

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.