mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-27 06:28:50 +00:00
fix: lazy import training recipe
currently we import the recipe at the top level of `post_training.py` instead lazily import it inside of the `handler` to speed up runtime Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
8125743212
commit
49fa26949a
1 changed files with 4 additions and 3 deletions
|
@ -22,9 +22,6 @@ from llama_stack.apis.post_training import (
|
||||||
from llama_stack.providers.inline.post_training.huggingface.config import (
|
from llama_stack.providers.inline.post_training.huggingface.config import (
|
||||||
HuggingFacePostTrainingConfig,
|
HuggingFacePostTrainingConfig,
|
||||||
)
|
)
|
||||||
from llama_stack.providers.inline.post_training.huggingface.recipes.finetune_single_device import (
|
|
||||||
HFFinetuningSingleDevice,
|
|
||||||
)
|
|
||||||
from llama_stack.providers.utils.scheduler import JobArtifact, Scheduler
|
from llama_stack.providers.utils.scheduler import JobArtifact, Scheduler
|
||||||
from llama_stack.providers.utils.scheduler import JobStatus as SchedulerJobStatus
|
from llama_stack.providers.utils.scheduler import JobStatus as SchedulerJobStatus
|
||||||
from llama_stack.schema_utils import webmethod
|
from llama_stack.schema_utils import webmethod
|
||||||
|
@ -83,6 +80,10 @@ class HuggingFacePostTrainingImpl:
|
||||||
async def handler(on_log_message_cb, on_status_change_cb, on_artifact_collected_cb):
|
async def handler(on_log_message_cb, on_status_change_cb, on_artifact_collected_cb):
|
||||||
on_log_message_cb("Starting HF finetuning")
|
on_log_message_cb("Starting HF finetuning")
|
||||||
|
|
||||||
|
from llama_stack.providers.inline.post_training.huggingface.recipes.finetune_single_device import (
|
||||||
|
HFFinetuningSingleDevice,
|
||||||
|
)
|
||||||
|
|
||||||
recipe = HFFinetuningSingleDevice(
|
recipe = HFFinetuningSingleDevice(
|
||||||
job_uuid=job_uuid,
|
job_uuid=job_uuid,
|
||||||
datasetio_api=self.datasetio_api,
|
datasetio_api=self.datasetio_api,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue