From f2146e3c9cd1a9950df25c2518f3680ccabb5c9e Mon Sep 17 00:00:00 2001 From: Abhishek Thakur Date: Thu, 7 Dec 2023 14:01:05 +0100 Subject: [PATCH] remove endpoints runner --- src/autotrain/cli/run_llm.py | 12 +----------- src/autotrain/cli/run_seq2seq.py | 12 +----------- src/autotrain/cli/run_tabular.py | 12 +----------- src/autotrain/cli/run_text_classification.py | 12 +----------- 4 files changed, 4 insertions(+), 44 deletions(-) diff --git a/src/autotrain/cli/run_llm.py b/src/autotrain/cli/run_llm.py index 53bb2cb985..975fd13516 100644 --- a/src/autotrain/cli/run_llm.py +++ b/src/autotrain/cli/run_llm.py @@ -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 @@ -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: diff --git a/src/autotrain/cli/run_seq2seq.py b/src/autotrain/cli/run_seq2seq.py index e961589acd..697ca87000 100644 --- a/src/autotrain/cli/run_seq2seq.py +++ b/src/autotrain/cli/run_seq2seq.py @@ -6,7 +6,7 @@ import torch from autotrain import logger -from autotrain.backend import EndpointsRunner, SpaceRunner +from autotrain.backend import SpaceRunner from . import BaseAutoTrainCommand @@ -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) diff --git a/src/autotrain/cli/run_tabular.py b/src/autotrain/cli/run_tabular.py index e724d29495..b1151bb3dd 100644 --- a/src/autotrain/cli/run_tabular.py +++ b/src/autotrain/cli/run_tabular.py @@ -5,7 +5,7 @@ import torch from autotrain import logger -from autotrain.backend import EndpointsRunner, SpaceRunner +from autotrain.backend import SpaceRunner from . import BaseAutoTrainCommand @@ -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) diff --git a/src/autotrain/cli/run_text_classification.py b/src/autotrain/cli/run_text_classification.py index e700c772af..82e1f03f29 100644 --- a/src/autotrain/cli/run_text_classification.py +++ b/src/autotrain/cli/run_text_classification.py @@ -6,7 +6,7 @@ import torch from autotrain import logger -from autotrain.backend import EndpointsRunner, SpaceRunner +from autotrain.backend import SpaceRunner from . import BaseAutoTrainCommand @@ -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)