Skip to content

Commit

Permalink
remove endpoints runner
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Dec 7, 2023
1 parent addcbd9 commit f2146e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 44 deletions.
12 changes: 1 addition & 11 deletions src/autotrain/cli/run_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def __init__(self, args):
self.num_gpus = 1

def run(self):
from autotrain.backend import EndpointsRunner, SpaceRunner
from autotrain.backend import SpaceRunner
from autotrain.trainers.clm.__main__ import train as train_llm
from autotrain.trainers.clm.params import LLMTrainingParams

Expand Down Expand Up @@ -544,16 +544,6 @@ def run(self):
logger.info(f"Training Space created. Check progress at https://hf.co/spaces/{space_id}")
sys.exit(0)

if self.args.backend.startswith("ep-"):
logger.info("Creating training endpoint...")
sr = EndpointsRunner(
params=params,
backend=self.args.backend,
)
sr.prepare()
logger.info("Training endpoint created.")
sys.exit(0)

# local training
params.save(output_dir=self.args.project_name)
if self.num_gpus == 1:
Expand Down
12 changes: 1 addition & 11 deletions src/autotrain/cli/run_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import torch

from autotrain import logger
from autotrain.backend import EndpointsRunner, SpaceRunner
from autotrain.backend import SpaceRunner

from . import BaseAutoTrainCommand

Expand Down Expand Up @@ -397,16 +397,6 @@ def run(self):
logger.info(f"Training Space created. Check progress at https://hf.co/spaces/{space_id}")
sys.exit(0)

if self.args.backend.startswith("ep-"):
logger.info("Creating training endpoint...")
sr = EndpointsRunner(
params=params,
backend=self.args.backend,
)
sr.prepare()
logger.info("Training endpoint created.")
sys.exit(0)

params.save(output_dir=self.args.project_name)
if self.num_gpus == 1:
train_seq2seq(params)
Expand Down
12 changes: 1 addition & 11 deletions src/autotrain/cli/run_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import torch

from autotrain import logger
from autotrain.backend import EndpointsRunner, SpaceRunner
from autotrain.backend import SpaceRunner

from . import BaseAutoTrainCommand

Expand Down Expand Up @@ -265,15 +265,5 @@ def run(self):
logger.info(f"Training Space created. Check progress at https://hf.co/spaces/{space_id}")
sys.exit(0)

if self.args.backend.startswith("ep-"):
logger.info("Creating training endpoint...")
sr = EndpointsRunner(
params=params,
backend=self.args.backend,
)
sr.prepare()
logger.info("Training endpoint created.")
sys.exit(0)

params.save(output_dir=self.args.project_name)
train_tabular(params)
12 changes: 1 addition & 11 deletions src/autotrain/cli/run_text_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import torch

from autotrain import logger
from autotrain.backend import EndpointsRunner, SpaceRunner
from autotrain.backend import SpaceRunner

from . import BaseAutoTrainCommand

Expand Down Expand Up @@ -346,16 +346,6 @@ def run(self):
logger.info(f"Training Space created. Check progress at https://hf.co/spaces/{space_id}")
sys.exit(0)

if self.args.backend.startswith("ep-"):
logger.info("Creating training endpoint...")
sr = EndpointsRunner(
params=params,
backend=self.args.backend,
)
sr.prepare()
logger.info("Training endpoint created.")
sys.exit(0)

params.save(output_dir=self.args.project_name)
if self.num_gpus == 1:
train_text_classification(params)
Expand Down

0 comments on commit f2146e3

Please sign in to comment.