Skip to content

Commit

Permalink
remove legacy environments commands and run black
Browse files Browse the repository at this point in the history
  • Loading branch information
rossgray committed Jul 26, 2024
1 parent 85e6a03 commit 4b8ea10
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 40 deletions.
2 changes: 0 additions & 2 deletions examples/audio-to-text/whisper-large/new_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class ModelKwargs(InputSchema):

@entity
class WhisperModel:
def __init__(self):
...

@pipe(on_startup=True, run_once=True)
def load(self):
Expand Down
2 changes: 0 additions & 2 deletions examples/image-to-image/t2i-adapter-sketch/new_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ class ModelKwargs(InputSchema):

@entity
class DiffusionWithAdapter:
def __init__(self) -> None:
...

def apply_style(
self, style_name: str, positive: str, negative: str = ""
Expand Down
2 changes: 0 additions & 2 deletions examples/text-to-audio/musicgen-large/new_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

@entity
class MusicgenModel:
def __init__(self):
...

@pipe(on_startup=True, run_once=True)
def load(self):
Expand Down
2 changes: 1 addition & 1 deletion pipeline/console/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def use_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:


def remove_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
...
pass


def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
Expand Down
5 changes: 0 additions & 5 deletions pipeline/console/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from pipeline.console import cluster, container, logs
from pipeline.console.targets import (
environments,
files,
pipelines,
pointers,
Expand All @@ -23,7 +22,6 @@ def create_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
dest="target",
)

environments.create_parser(create_sub_parser)
pointers.create_parser(create_sub_parser)
resources.create_parser(create_sub_parser)
files.create_parser(create_sub_parser)
Expand All @@ -42,7 +40,6 @@ def edit_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
dest="target",
)

environments.edit_parser(edit_sub_parser)
pipelines.edit_parser(edit_sub_parser)
pointers.edit_parser(edit_sub_parser)
files.edit_parser(edit_sub_parser)
Expand All @@ -61,7 +58,6 @@ def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
dest="target",
)

environments.get_parser(get_sub_parser)
pipelines.get_parser(get_sub_parser)
pointers.get_parser(get_sub_parser)
resources.get_parser(get_sub_parser)
Expand All @@ -82,7 +78,6 @@ def delete_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
dest="target",
)

environments.delete_parser(delete_sub_parser)
pipelines.delete_parser(delete_sub_parser)
pointers.delete_parser(delete_sub_parser)
resources.delete_parser(delete_sub_parser)
Expand Down
17 changes: 0 additions & 17 deletions pipeline/console/targets/environments.py

This file was deleted.

5 changes: 2 additions & 3 deletions pipeline/console/targets/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:


def edit_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
...
pass


def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
Expand Down Expand Up @@ -72,8 +72,7 @@ def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
)


def delete_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
...
def delete_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None: ...


def _create_file(args: Namespace) -> None:
Expand Down
4 changes: 2 additions & 2 deletions pipeline/console/targets/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def create_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
...
pass


def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
Expand All @@ -21,7 +21,7 @@ def get_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:


def delete_parser(command_parser: "_SubParsersAction[ArgumentParser]") -> None:
...
pass


# Functions
Expand Down
5 changes: 0 additions & 5 deletions pipeline/objects/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ class Pipeline:
_current_pipeline: Graph
_pipeline_context_active: bool = False

def __init__(
self,
):
...

def __enter__(self):
Pipeline._pipeline_context_active = True

Expand Down
2 changes: 1 addition & 1 deletion tests/test_pipeline_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_function() -> Tuple[str, int]:

@pipe
def test_function_2(input_1: str):
...
pass

with pytest.raises(Exception):
with Pipeline() as builder:
Expand Down

0 comments on commit 4b8ea10

Please sign in to comment.