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

Implement initial CI configuration #31

Merged
merged 11 commits into from
Jun 17, 2024
Merged

Conversation

nathan-weinberg
Copy link
Member

Supersedes #7

This PR adds the following CI jobs:

  • Dependabot
  • GitHub Action linting
  • Markdown Linting (with fixes)
  • Spellcheck (with fixes)
  • Code Linting (with some fixes - see note below)

As well as a Makefile for local running of the checks.

Additional Notes

  • I will do a followup for PyPI packaging but I want to work directly with the folks from Training Squad on that to keep them in the loop
  • WRT the Python checks - @RobotSail @Maxusmusti @JamesKunstle I didn't go through all the failures (the fixes I did were auto-format fixes that have no functional impact) because I don't want to hamper y'alls velocity and break things currently working - so the checks remain but are non-blocking for now - I would encourage y'all to address these when it makes sense

@russellb
Copy link
Member

know why the jobs aren't running on this PR? I'd prefer to see them run green before merging.

@bjhargrave
Copy link

know why the jobs aren't running on this PR?

I don't think github will run new actions in a PR since that is a security risk.

@cdoern
Copy link
Contributor

cdoern commented Jun 17, 2024

I will do a followup for PyPI packaging but I want to work directly with the folks from Training Squad on that to keep them in the loop

any chance we can do this today @nathan-weinberg ? I'd really like to test this out

@nathan-weinberg
Copy link
Member Author

know why the jobs aren't running on this PR? I'd prefer to see them run green before merging.

They won't run until they are merged - we saw this in instructlab/eval#1 - but these are a carbon-copy from the current eval config so I'm confident in them

@nathan-weinberg
Copy link
Member Author

I will do a followup for PyPI packaging but I want to work directly with the folks from Training Squad on that to keep them in the loop

any chance we can do this today @nathan-weinberg ? I'd really like to test this out

Let's chat offline

@russellb
Copy link
Member

for the Python linting issues you call out -- can you just update the linter config so that it passes? The typical approach I'd prefer is always have a config that runs green, but work over time to improve the config so more rules can be enforced.

@cdoern
Copy link
Contributor

cdoern commented Jun 17, 2024

ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement dolomite-engine (from instructlab-training) (from versions: none)
ERROR: No matching distribution found for dolomite-engine

Found this when pip installing, I think this will fail the linter as well

.github/workflows/matchers/actionlint.dockerfile Outdated Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
@nathan-weinberg
Copy link
Member Author

ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement dolomite-engine (from instructlab-training) (from versions: none)
ERROR: No matching distribution found for dolomite-engine

Found this when pip installing, I think this will fail the linter as well

@RobotSail @Maxusmusti @JamesKunstle any idea why this is happening? I'm hitting the same issue

@russellb
Copy link
Member

ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement dolomite-engine (from instructlab-training) (from versions: none)
ERROR: No matching distribution found for dolomite-engine

Found this when pip installing, I think this will fail the linter as well

@RobotSail @Maxusmusti @JamesKunstle any idea why this is happening? I'm hitting the same issue

ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement dolomite-engine (from instructlab-training) (from versions: none)
ERROR: No matching distribution found for dolomite-engine

Found this when pip installing, I think this will fail the linter as well

@RobotSail @Maxusmusti @JamesKunstle any idea why this is happening? I'm hitting the same issue

dolomite_engine does not appear to be a valid package that exists on pypi

@cdoern
Copy link
Contributor

cdoern commented Jun 17, 2024

also when bringing this into the cli:

ERROR: Cannot install instructlab, instructlab-training==0.1.dev22 and instructlab==0.16.1.dev140 because these package versions have conflicting dependencies.

The conflict is caused by:
    instructlab 0.16.1.dev140 depends on transformers<=4.38.2 and >=4.30.0
    peft 0.9.0 depends on transformers
    trl 0.7.11 depends on transformers>=4.31.0
    instructlab-training 0.1.dev22 depends on transformers==4.41.2

have these versions been vetted as ok to bump in the cli?

@nathan-weinberg
Copy link
Member Author

also when bringing this into the cli:

ERROR: Cannot install instructlab, instructlab-training==0.1.dev22 and instructlab==0.16.1.dev140 because these package versions have conflicting dependencies.

The conflict is caused by:
    instructlab 0.16.1.dev140 depends on transformers<=4.38.2 and >=4.30.0
    peft 0.9.0 depends on transformers
    trl 0.7.11 depends on transformers>=4.31.0
    instructlab-training 0.1.dev22 depends on transformers==4.41.2

have these versions been vetted as ok to bump in the cli?

Can this be a separate issue/convo than the linting introduction?

@@ -9,7 +9,7 @@ datasets
numba
numpy
rich
dolomite_engine
git+https://github.com/ibm-granite/dolomite-engine.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I didn't know we could do this!

Copy link
Member

@RobotSail RobotSail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, LGTM

Copy link
Member

@russellb russellb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @nathan-weinberg !

nathan-weinberg and others added 5 commits June 17, 2024 17:27
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
nathan-weinberg and others added 5 commits June 17, 2024 17:29
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
This depdency does not exist on pypi. It has to be installed from git.
Update requirements.txt accordingly.

Closes instructlab#33

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Now I get a green run with `tox -e lint`.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
@russellb
Copy link
Member

Well, I thought we were good. Most stuff works, but tox -e mypy is busted on the requirements.txt change made for dolomite_engine.

❯ tox -e mypy
.pkg: _optional_hooks> python /Users/rbryant/src/instructlab/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /Users/rbryant/src/instructlab/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
mypy: packaging backend failed (code=1), with InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
    git+https://github.com/ibm-granite/dolomite-engine.git

Signed-off-by: Russell Bryant <rbryant@redhat.com>
@russellb
Copy link
Member

Well, I thought we were good. Most stuff works, but tox -e mypy is busted on the requirements.txt change made for dolomite_engine.

❯ tox -e mypy
.pkg: _optional_hooks> python /Users/rbryant/src/instructlab/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /Users/rbryant/src/instructlab/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
mypy: packaging backend failed (code=1), with InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
    git+https://github.com/ibm-granite/dolomite-engine.git

I got this working and pushed it to the branch

@russellb
Copy link
Member

I'm going to merge and we'll keep working on this if anything doesn't pass right away

@russellb russellb merged commit 4b6dda9 into instructlab:main Jun 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants