-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service abstraction #171
Service abstraction #171
Conversation
c36662a
to
8907da8
Compare
I'll have a look at this tomorrow @wgifford, thanks. |
To do items:
|
from .hfutil import load_config, load_model, register_config | ||
from .inference_payloads import ForecastingInferenceInput, PredictOutput | ||
from .inference_payloads import ForecastingInferenceInput, ForecastingMetadataInput, PredictOutput | ||
from .service_handler import ServiceHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected to see an import of tsfm_service_handler here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need the base service handler -- it will be used to load the right handler class.
LOGGER = logging.getLogger(__file__) | ||
|
||
|
||
class ServiceHandler(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that there's a fair amount of implementation on this object, is it really an "abstract" base class, it seems to be just a run of the mill base class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NM, I guess since you do have @abstractmethod
decorators for some of the methods, you have no choice but to make it an ABC and I guess this makes it clearer that one is not to create an instance of a ServiceHandler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though, I suppose this line: handler, e = ServiceHandler.load(model_path)
is a bit odd, given ServiceHandler
is abstract?
…tsfm into service_abstraction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sensible.
This reverts commit 02ff3e5.
Initial service abstraction