-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from mystic-ai/ph/pc-1094-tags-on-push
PC-1094 Tags on push
- Loading branch information
Showing
6 changed files
with
169 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# {pipeline_name} | ||
|
||
## Description | ||
|
||
This is a new pipeline created using the `pipeline-ai` CLI. | ||
|
||
### Configuration | ||
|
||
This pipeline uses the following `pipeline.yaml`: | ||
|
||
{pipeline_yaml} | ||
|
||
## Usage | ||
|
||
_Put usage information here_ | ||
|
||
## Code | ||
|
||
{pipeline_code} | ||
|
||
## License | ||
|
||
_Put license information here_ | ||
|
||
## Author | ||
|
||
_Put author information here_ | ||
|
||
--- | ||
|
||
_This is an autogenerated README file for the pipeline `{pipeline_name}`. Please read more information about this [here on our docs](https://docs.mystic.ai/docs/using-the-readmemd)_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from pipeline import Pipeline, Variable, entity, pipe | ||
|
||
|
||
# Put your model inside of the below entity class | ||
@entity | ||
class MyModelClass: | ||
@pipe(run_once=True, on_startup=True) | ||
def load(self) -> None: | ||
# Perform any operations needed to load your model here | ||
print("Loading model...") | ||
|
||
... | ||
|
||
print("Model loaded!") | ||
|
||
@pipe | ||
def predict(self, output_number: int) -> str: | ||
# Perform any operations needed to predict with your model here | ||
print("Predicting...") | ||
|
||
... | ||
|
||
print("Prediction complete!") | ||
|
||
return f"Your number: {output_number}" | ||
|
||
|
||
with Pipeline() as builder: | ||
input_var = Variable( | ||
int, | ||
description="A basic input number to do things with", | ||
title="Input number", | ||
) | ||
|
||
my_model = MyModelClass() | ||
my_model.load() | ||
|
||
output_var = my_model.predict(input_var) | ||
|
||
builder.output(output_var) | ||
|
||
my_new_pipeline = builder.get_pipeline() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
runtime: | ||
container_commands: | ||
- apt-get update | ||
- apt-get install -y git | ||
python: | ||
version: '3.10' | ||
requirements: | ||
- pipeline-ai | ||
accelerators: [] | ||
accelerator_memory: null | ||
pipeline_graph: new_pipeline:my_new_pipeline | ||
pipeline_name: basic | ||
description: null | ||
readme: README.md | ||
extras: {} | ||
cluster: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters