forked from instructlab/instructlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.py
More file actions
31 lines (25 loc) · 813 Bytes
/
data.py
File metadata and controls
31 lines (25 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# SPDX-License-Identifier: Apache-2.0
# Standard
# Third Party
import click
# First Party
from instructlab import clickext
from instructlab.configuration import storage_dirs_exist
@click.group(
cls=clickext.LazyEntryPointGroup,
ep_group="instructlab.command.data",
)
@click.pass_context
def data(ctx):
"""Generate synthetic data.
If this is your first time running ilab, it's best to start with `ilab config init` to create the environment.
"""
ctx.obj = ctx.parent.obj
ctx.obj.ensure_config(ctx)
if not storage_dirs_exist():
click.secho(
"Some ilab storage directories do not exist yet. Please run `ilab config init` before continuing.",
fg="red",
)
raise click.exceptions.Exit(1)
ctx.default_map = ctx.parent.default_map