You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
],
"name": "bestbuy-category-prediction",
} Proposal:
Features = fc.Category(["manufacturer"])+fc.Text(["description"])+ fc.Number(["price])
Labels = fc.Category(["level1_category,level2_category,level3_category"])
Schema = Features+Labels
^
less code, easy to read, easy to change
Enums for templates: Current:
model_template_id="d7810207-ca31-4d4d-9b5a-841a644fd81f" Proposal:
model_template = 0
One class for rule them all: Current:
ModelManager, ModelCreator, InferenceClient, etc. Proposal:
DARModel
DARModel.create()
DARModel.deploy()
DARModel.inference()
DARModel.templates
DARModel.deployments
etc...
The text was updated successfully, but these errors were encountered:
DBusAI
changed the title
API sinplification
API simplification
Nov 16, 2020
Hi @DBusAI, thanks for bringing some great ideas. I have been thinking about some of the same things, such as the API simplification. That should be easily doable.
Regarding your point 2, there is a method ModelCreator. construct_from_service_key. I could overload this to also take a file name, that should do the trick. I have to admit that the construction of the objects is not particular well documented. There is issue #45 to address that.
When I have some more time, I will create individual issues from your five proposal to track them better.
What do you think about API simplification?
Too long import:
Current:
from sap.aibus.dar.client.model_manager_client import ModelManagerClient
Proposal:
'from sap.dar import MMClient'
Code cutting for model creation:
Current:
with open('dar_test.txt', 'r') as sk_file: sk_data = sk_file.read() json_data = json.loads(sk_data) creator = ModelCreator.construct_from_credentials( dar_url=json_data['url'], clientid=json_data['uaa']['clientid'], clientsecret=json_data['uaa']['clientsecret'], uaa_url=json_data['uaa']['url'], )
Proposal:
creator = ModelCreator(filekey='dar_test.txt')
Config proposal:
Current:
new_schema = {
"features": [
{"label": "manufacturer", "type": "CATEGORY"},
{"label": "description", "type": "TEXT"},
{"label": "price", "type": "NUMBER"},
],
"labels": [
{"label": "level1_category", "type": "CATEGORY"},
{"label": "level2_category", "type": "CATEGORY"},
{"label": "level3_category", "type": "CATEGORY"},
],
"name": "bestbuy-category-prediction",
}
Proposal:
Features = fc.Category(["manufacturer"])+fc.Text(["description"])+ fc.Number(["price])
Labels = fc.Category(["level1_category,level2_category,level3_category"])
Schema = Features+Labels
^
less code, easy to read, easy to change
Enums for templates:
Current:
model_template_id="d7810207-ca31-4d4d-9b5a-841a644fd81f"
Proposal:
model_template = 0
One class for rule them all:
Current:
ModelManager, ModelCreator, InferenceClient, etc.
Proposal:
DARModel
DARModel.create()
DARModel.deploy()
DARModel.inference()
DARModel.templates
DARModel.deployments
etc...
The text was updated successfully, but these errors were encountered: