API simplification
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- api, developer-experience
Research direction
No files or tests are named. Start by reviewing the existing ModelManager, ModelCreator, and InferenceClient interfaces and the import and configuration examples in the issue. Clarify which API changes are in scope with maintainers; done should mean an agreed, tested replacement for the selected interfaces without breaking documented usage.
Written by the indexing model from the issue text.
Description
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...
- Dominant language
- Jupyter Notebook
- Stars
- 20
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SAP/data-attribute-recommendation-python-sdk
-
Update Dependencies Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Ensure thread safety Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in SAP/data-attribute-recommendation-python-sdk
Similar issues
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100