From df2627cb07a68548502902b5371fd774b6ef240f Mon Sep 17 00:00:00 2001 From: Peter Pan Date: Sat, 5 Sep 2020 16:54:57 +0800 Subject: [PATCH] build: setup github actions (#792) * feat: restore selected model when navigating back to graph page * build: setup github actions * build: create lint status check --- .github/workflows/build.yml | 34 +++++++++++++++++++++++++++++ .github/workflows/lint.yml | 43 +++++++++++++++++++++++++++++++++++++ .travis.yml | 38 -------------------------------- README-en.md | 16 +++++++------- README.md | 2 +- frontend/README.md | 2 +- frontend/README_cn.md | 2 +- 7 files changed, 88 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/lint.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..81a8c435 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build +on: [push, pull_request] +jobs: + build: + name: build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + python-version: ['3.6', '3.7', '3.8'] + node-version: ['12', '14'] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install requirements + run: | + pip install wheel + pip install -r requirements.txt + - name: Build whl + run: | + python setup.py bdist_wheel + - name: Upload whl + uses: actions/upload-artifact@v2 + with: + name: VisualDL + path: dist/*.whl diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..c5ac0c84 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,43 @@ +name: Lint +on: pull_request +jobs: + lint_fe: + name: Lint FE + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '14' + - name: Install dependencies + run: | + cd frontend + ./scripts/install.sh + yarn + - name: Run linters + uses: wearerequired/lint-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + eslint: true + prettier: true + eslint_dir: frontend/ + eslint_extensions: js,ts,jsx,tsx + eslint_args: "--max-warnings 0 --ignore-path .gitignore" + lint_be: + name: Lint BE + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install requirements + run: | + echo "TODO" + - name: Lint + run: | + echo: "TODO" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a3e84cbb..00000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: python -python: - - "3.8.3" - -jobs: - include: - - name: "Bionic Linux" - dist: bionic - before_install: - - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash - - name: "MacOS" - osx_image: xcode11.5 - before_install: - - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash -# - name: "Windows" -# os: windows -# language: shell -# before_install: -# - choco install nvm.portable -# - choco install python --version 3.8.3 -# - python -m pip install --upgrade pip -# env: PATH=/c/Python38:/c/Python38/Scripts:$PATH - -install: - - nvm install 12.18.0 - - pip3 install --upgrade pip - - pip3 install -r requirements.txt - -before_script: - - nvm use 12.18.0 - -script: - - python3 setup.py bdist_wheel || python setup.py bdist_wheel - -notifications: - email: - on_success: change - on_failure: always diff --git a/README-en.md b/README-en.md index 26f0893a..614ab798 100644 --- a/README-en.md +++ b/README-en.md @@ -6,7 +6,7 @@

-Build Status +Build Status PyPI Downloads License @@ -21,7 +21,7 @@ VisualDL, a visualization analysis tool of PaddlePaddle, provides a variety of c VisualDL provides various visualization functions, including tracking metrics in real-time, visualizing the model structure, displaying the data sample, presenting the changes of distributions of tensors, showing the pr curves, projecting high-dimensional data to a lower dimensional space and more. For specific guidelines of each function, please refer to [**VisualDL User Guide**](./docs/components/UserGuide-en.md). Currently, VisualDL iterates rapidly and new functions will be continously added. -VisualDL natively supports the use of Python. Developers can retrieve plentiful visualization results by simply adding a few lines of Python code into the model before training. +VisualDL natively supports the use of Python. Developers can retrieve plentiful visualization results by simply adding a few lines of Python code into the model before training. ## Contents @@ -41,11 +41,11 @@ VisualDL natively supports the use of Python. Developers can retrieve plentiful The high-level design of API makes it easy to use. Only one click can initiate the visualization of model structures. -### Various Functions +### Various Functions The function contains the visualization of training parameters, data samples, graph structures, histograms of tensors, PR curves and high-dimensional data. -### High Compatibility +### High Compatibility VisualDL provides the visualization of the mainstream model structures such as Paddle, ONNX, Caffe, widely supporting visual analysis for diverse users. @@ -71,7 +71,7 @@ pip install --upgrade dist/visualdl-*.whl ``` Please note that Python 2 is no longer maintained officially since January 1, 2020. VisualDL now only supports Python 3 in order to ensure the usability of codes. -## Usage Guideline +## Usage Guideline VisualDL stores the data, parameters and other information of the training process in a log file. Users can launch the panel to observe the visualization results. @@ -148,7 +148,7 @@ visualdl --logdir ./log #### Launch in Python Script -Developers can start the VisualDL panel in Python script as follows: +Developers can start the VisualDL panel in Python script as follows: ```python visualdl.server.app.run(logdir, @@ -216,7 +216,7 @@ Developers can compare with multiple experiments by specifying and uploading the ### Image -**Image** provides real-time visualizations of the image data during the training process, allowing developers to observe the changes of images in different training stages and to deeply understand the effects of the training process. +**Image** provides real-time visualizations of the image data during the training process, allowing developers to observe the changes of images in different training stages and to deeply understand the effects of the training process.

@@ -256,7 +256,7 @@ Histogram displays how the trend of tensors (weight, bias, gradient, etc.) chang ### High Dimensional -**High Dimensional** provides two approaches--T-SNE and PCA--to do the dimensionality reduction, allowing developers to have an in-depth analysis of the relationship between high-dimensional data and to optimize algorithms based on the analysis. +**High Dimensional** provides two approaches--T-SNE and PCA--to do the dimensionality reduction, allowing developers to have an in-depth analysis of the relationship between high-dimensional data and to optimize algorithms based on the analysis.

diff --git a/README.md b/README.md index 2450dfba..d8a4854d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

-Build Status +Build Status PyPI Downloads License diff --git a/frontend/README.md b/frontend/README.md index 63e3a544..4e9c54a2 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -4,7 +4,7 @@

- Build Status + Build Status GitHub top language code style: prettier lerna diff --git a/frontend/README_cn.md b/frontend/README_cn.md index 0dd1f417..f2071d91 100644 --- a/frontend/README_cn.md +++ b/frontend/README_cn.md @@ -4,7 +4,7 @@

- Build Status + Build Status GitHub top language code style: prettier lerna -- GitLab