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

Fix prompt file paths for an installed library #67

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

russellb
Copy link
Member

@russellb russellb commented Jul 2, 2024

2debc77 default_flows: Move sdg_base into base Flow class
3e01b18 Fix remaining prompt file paths

commit 2debc77
Author: Russell Bryant [email protected]
Date: Tue Jul 2 16:36:28 2024 -0400

default_flows: Move sdg_base into base Flow class

Each subclass was calculating the root directory of the python package
for finding prompt templates that are embedded in the package. Move
this to the base `Flow` class so we're only doing it in one place.

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

commit 3e01b18112fbabd418f028697288366d1c3f8ae5
Author: Russell Bryant [email protected]
Date: Tue Jul 2 16:42:21 2024 -0400

Fix remaining prompt file paths

Special handling is required to find these prompt files from an
installed version of the instructlab-sdg package. This updates the
rest of this file to make use of `self.sdg_base` from the base `Flow`
class which will work from an installed library.

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

Each subclass was calculating the root directory of the python package
for finding prompt templates that are embedded in the package. Move
this to the base `Flow` class so we're only doing it in one place.

Signed-off-by: Russell Bryant <[email protected]>
@russellb russellb force-pushed the prompt-file-paths branch from 3e01b18 to 3c6123f Compare July 2, 2024 20:45
Special handling is required to find these prompt files from an
installed version of the instructlab-sdg package. This updates the
rest of this file to make use of `self.sdg_base` from the base `Flow`
class which will work from an installed library.

Signed-off-by: Russell Bryant <[email protected]>
@russellb russellb force-pushed the prompt-file-paths branch from 3c6123f to a906660 Compare July 2, 2024 20:45
Copy link
Member

@aakankshaduggal aakankshaduggal left a comment

Choose a reason for hiding this comment

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

Thanks @russellb

@markmc
Copy link
Contributor

markmc commented Jul 3, 2024

Nice catch, thanks for separating the no-op refactor and bugfix into separate commits - lgtm

@aakankshaduggal aakankshaduggal merged commit afbea4c into instructlab:main Jul 3, 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants