Skip to content

Commit

Permalink
merge changes from main branch
Browse files Browse the repository at this point in the history
Signed-off-by: Anh-Uong <[email protected]>
  • Loading branch information
anhuong committed May 14, 2024
2 parents e647586 + 762be59 commit 0ff6da3
Show file tree
Hide file tree
Showing 103 changed files with 6,602 additions and 241 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

## Describe the bug

A clear and concise description of what the bug is.

## Platform

Please provide details about the environment you are using, including the following:

- Interpreter version:
- Library version:

## Sample Code

Please include a minimal sample of the code that will (if possible) reproduce the bug in isolation

## Expected behavior

A clear and concise description of what you expected to happen.

## Observed behavior

What you see happening (error messages, stack traces, etc...)

## Additional context

Add any other context about the problem here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

## Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context about the feature request here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/user_story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: User story
about: A user-oriented story describing a piece of work to do
title: ""
labels: ""
assignees: ""
---

## Description

As a <user type>, I want to <do something>, so that I can <accomplish something>

## Discussion

Provide detailed discussion here

## Acceptance Criteria

<!-- Remove any that don't apply -->

- [ ] Unit tests cover new/changed code
- [ ] Examples build against new/changed code
- [ ] READMEs are updated
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Thank you for the contribution! -->

### Description of the change

<!-- Please summarize the changes -->

### Related issue number

<!-- For example: "Closes #1234" -->

### How to verify the PR

<!-- Please provide instruction or screenshots on how to verify the PR.-->

### Was the PR tested

<!-- Describe how PR was tested -->
- [ ] I have added >=1 unit test(s) for every new method I have added.
- [ ] I have ensured all unit tests pass
52 changes: 52 additions & 0 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright The FMS HF Tuning Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build and Publish FMS-hf-tuning Library

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- setup: "3.11"
tox: "py311"

environment:
name: pypi
url: https://pypi.org/p/fms-hf-tuning
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version.setup }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version.setup }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Build and test with tox
run: tox -e ${{ matrix.python-version.tox }}
- name: Build and check wheel package
run:
tox -e build,twinecheck
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
11 changes: 6 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ on:
branches: [ "main" ]

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r setup_requirements.txt
- name: Check Formatting
python -m pip install tox
- name: Check formatting
run: tox -e fmt

- name: Run pylint
run: tox -e lint
15 changes: 15 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Image
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: |
docker build -t fms-hf-tuning:dev . -f build/Dockerfile
27 changes: 27 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- setup: "3.9"
tox: "py39"
- setup: "3.10"
tox: "py310"
- setup: "3.11"
tox: "py311"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run unit tests
run: tox -e py
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ durations/*
coverage*.xml
dist
htmlcov
build
test

# IDEs
.vscode/
.idea/

# AIM files
.aim

# Env files
.env

Expand All @@ -26,3 +28,17 @@ venv/

# Tox envs
.tox

# Aim
.aim

# Backup files and folders
*.bkp
*.bkp.*
*bkp*

# Build output
/build/lib/

# Auto-generated file
/tuning/_version.py
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ disable=raw-checker-failed,
attribute-defined-outside-init,
abstract-method,
pointless-statement,
wrong-import-order
wrong-import-order,
duplicate-code,
unbalanced-tuple-unpacking

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
11 changes: 11 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#####################################################
#
# List of approvers for fms-hf-tuning repository
#
#####################################################
#
# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
#

* @anhuong @Ssukriti @alex-jw-brooks
Loading

0 comments on commit 0ff6da3

Please sign in to comment.