cli
add(path, name)
¶
Import user-defined function annotations into Lineapy.
This command copies the yaml file whose path is provided by the user into the user's .lineapy directory to allow Lineapy to manage it.
Source code in lineapy/cli/cli.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
|
annotations()
¶
The annotate command can be used to import custom annotation sources into LineaPy. It can be used to add a source, list all sources, delete a source, and validate all sources.
Source code in lineapy/cli/cli.py
577 578 579 580 581 582 583 584 |
|
benchmark(path, n, skip_baseline)
¶
Benchmarks running the notebook at PATH with lineapy versus with pure Python. Runs with and without lineapy REPETITIONS times.
Prints the length of each run, and some statistics if they are meaningfully different.
Source code in lineapy/cli/cli.py
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
|
delete(name)
¶
Deletes imported annotation source.
Source code in lineapy/cli/cli.py
695 696 697 698 699 700 701 702 703 704 705 706 707 708 |
|
file(path, artifact_name, artifact_value, visualize_slice)
¶
Executes python at PATH, saves the value ARTIFACT_VALUE with name ARTIFACT_NAME, and prints the sliced code.
Source code in lineapy/cli/cli.py
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
init(output_file)
¶
Create config file based on your desired output file path.
If the file path is not specified, it will be at LINEAPY_HOME_DIR/CONFIG_FILE_NAME
For example,
lineapy --home-dir=/lineapy init
will generate a config file with home_dir='/lineapy'
Source code in lineapy/cli/cli.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
linea_cli(verbose, home_dir, database_url, artifact_storage_dir, customized_annotation_dir, do_not_track, logging_level, logging_file, mlflow_registry_uri, mlflow_tracking_uri, default_ml_models_storage_backend)
¶
Pass all configuration to lineapy_config
Source code in lineapy/cli/cli.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
list()
¶
Lists full paths to all imported annotation sources.
Source code in lineapy/cli/cli.py
672 673 674 675 676 677 |
|
notebook(file, artifact_name, artifact_value, visualize_slice)
¶
Executes the notebook FILE, saves the value ARTIFACT_VALUE with name ARTIFACT_NAME, and prints the sliced code.
For example, if your notebooks as dataframe with value df
, then this will print the slice for it:
lineapy notebook my_notebook.ipynb my_df df
You can also reference side effect values, like file_system
lineapy notebook my_notebook.ipynb notebook_file_system lineapy.file_system
Source code in lineapy/cli/cli.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
remove_annotations_file_extension(filename)
¶
Remove '.annotations.yaml' or '.yaml'.
Source code in lineapy/cli/cli.py
600 601 602 603 604 605 606 607 608 609 |
|
setup_ipython_dir()
¶
Set the ipython directory to include the lineapy extension.
If IPython configure files exist, we copy them to temp the folder and append
a line to add lineapy into extra_extensions
. If they do not exist, we create
new config files in the temp folder and add a line to specify extra_extensions
.
Source code in lineapy/cli/cli.py
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
|