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

Add SDG library code #42

Merged
merged 7 commits into from
Jun 26, 2024
Merged

Conversation

aakankshaduggal
Copy link
Member

@aakankshaduggal aakankshaduggal commented Jun 25, 2024

This PR adds the code for the SDG library #41

In order to test the code, you can run the tests/test_knowledge.py, specify the model endpoint and run the file from the root like such - python3 -m tests.test_knowledge.py


Corresponding design doc: https://github.com/instructlab/dev-docs/blob/main/docs/sdg/sdg-api-interface.md

@russellb
Copy link
Member

This PR adds the code for the SDG library #41

In order to test the code, you can run the tests/test_knowledge.py, specify the model endpoint and run the file from the root like such - python3 -m tests.test_knowledge.py

You'll need to move the test script to a different directory. It's getting picked up by the automation that runs unit tests. If you move it, it shouldn't run.

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.

One comment but otherwise LGTM

@mergify mergify bot added ci-failure and removed ci-failure labels Jun 26, 2024
@russellb russellb force-pushed the redesign-dev branch 2 times, most recently from 304ff47 to 7b27b9c Compare June 26, 2024 01:12
@mergify mergify bot added ci-failure and removed ci-failure labels Jun 26, 2024
@mergify mergify bot removed the ci-failure label Jun 26, 2024
@aakankshaduggal aakankshaduggal force-pushed the redesign-dev branch 4 times, most recently from ec0cb76 to 6bf7e14 Compare June 26, 2024 17:20
@mergify mergify bot added the CI/CD Affects CI/CD configuration label Jun 26, 2024
aakankshaduggal and others added 7 commits June 26, 2024 13:25
Signed-off-by: Aakanksha Duggal <[email protected]>
Co-authored-by: Oindrilla Chatterjee <[email protected]>
Co-authored-by: Shiv <[email protected]>
Signed-off-by: Russell Bryant <[email protected]>

Move test_knowledge.py out of unit tests dir

Move this script so it's not run in unit test automation.

Signed-off-by: Russell Bryant <[email protected]>

Ensure configs get included in Python package

We need to have `__init__.py` in this directory for it to get picked
up and included in the Python package so the files are present after
it gets installed.

Signed-off-by: Russell Bryant <[email protected]>

Add SPDX-License-Identifier headers to new source files

Signed-off-by: Russell Bryant <[email protected]>
Signed-off-by: shiv <[email protected]>
Co-authored-by: Oindrilla Chatterjee <[email protected]>

:recycle: refactoring sdg class

Signed-off-by: shiv <[email protected]>

:sparkles: adding freeform skills gen capability

Signed-off-by: shiv <[email protected]>

added iterative wrapper block

Signed-off-by: Oindrilla Chatterjee <[email protected]>

added iterative wrapper block

Signed-off-by: Oindrilla Chatterjee <[email protected]>
The previous code assumed using the library in a script running out of
the source tree as the current working directory. This change makes
the code expect to find these files wherever the python library is
located. This is necessary for loading these files from an installed
version of this package.

Signed-off-by: Russell Bryant <[email protected]>
Signed-off-by: Aakanksha Duggal <[email protected]>
Signed-off-by: Russell Bryant <[email protected]>

Ignore new sdg lib files in mypy checks

Signed-off-by: Russell Bryant <[email protected]>

Remove unused python imports

Signed-off-by: Russell Bryant <[email protected]>

Remove duplicate definition of SynthGroundedSkillsFlow

Signed-off-by: Russell Bryant <[email protected]>

Add missing calls to parent class init methods

Signed-off-by: Russell Bryant <[email protected]>

Ignore the last couple of lint warnings

Signed-off-by: Russell Bryant <[email protected]>
Signed-off-by: Aakanksha Duggal <[email protected]>
@russellb
Copy link
Member

As of right now, none of this new code is being used, so it will not break the CLI (as confirmed by the e2e CI job).

Since this is so big, we're going to merge and keep working on it in tree.

@russellb russellb merged commit 44ab07d into instructlab:main Jun 26, 2024
11 checks passed
@russellb russellb added this to the 0.1.0 milestone Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Affects CI/CD configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants