Changelog
Recommendation
Release notes for aice-recommendation and @aiceafrica/recommendation.
Python: aice-recommendation
0.1.0 (unreleased)
Rebuilt on aice-core, the shared transport every AICE SDK uses.
Changed (breaking)
- Clients authenticate with the console project key, whose scopes must include
reco, and takemax_retries,user_idanduser_role. Retries, request ids and error mapping come fromaice-core. - Clients take
vertical=(for example"ecommerce"), and every data call needs it: the engine serves users, items, ingest, recommend, train and config under/{vertical}/…. Pass the bare host asbase_url; abase_urlending with the vertical is refused. Withoutvertical, data calls raiseValueErrorbefore sending anything.list_verticals/get_verticalwork with or without one. - Errors subclass both
RecommendationErrorand the matchingaice-coreerror, soexcept aice_core.AuthenticationErroralso catches this SDK's.ForbiddenErroris removed: a 403 raisesRecommendationErrorwithstatus_code == 403. recommend()no longer takespersist.
Added
delete_itemandanonymise_user(right to erasure).- Training:
train(run_after=…),reschedule_job,cancel_job, andget_schedule/set_schedule/delete_schedule(TrainSchedule;get_schedulereturnsNonewhen there is no schedule). get_config_schema().TrainJob.run_after,TrainJobStatus.epochsandTrainJobStatus.run_after, each with a default, so existing constructor calls still work.
Notes
- Requires
aice-core>=0.3.0,<0.5.
0.0.2
For the engine currently running at https://reco.aiceafrica.com.
Changed (breaking)
- Renamed from
reco-sdk(from reco import RecoClient) toaice-recommendation(from aice_recommendation import RecommendationClient). Errors are renamed to match:RecoError→RecommendationError,AuthError→AuthenticationError. Item.organization_idis nowItem.project_id, matching what the server returns.
Fixed
create_item,get_itemandupdate_itemraisedTypeErroron every call, because the server returnsproject_id. The item was still created on the server.- Responses are parsed field by field, so new server fields no longer break parsing.
- Ids are escaped as one path segment, so an id containing
/,?or#can't call a different route.
Added
AsyncRecommendationClient, with the same methods as the sync client.track_batch(events)(POST /ingest/batch), with theEventandBatchIngestResulttypes.recommend(..., persist=True).get_config()/update_config()(ProjectConfig),list_verticals()/get_vertical()(VerticalSummary,Vertical).ValidationError(400/422),ForbiddenError(403) andConflictError(409). Every error carriesstatus_codeand the server'sdetail, and its message comes fromdetail.py.typed.
TypeScript: @aiceafrica/recommendation
0.3.0 (unreleased)
Changed BREAKING
RecommendationClienttakes averticaloption (e.g."ecommerce"), and every data call needs it. The engine serves users, items, ingest, recommend, train and config under/{vertical}/…. In 0.2.x the only way to reach those routes was to endbaseUrlwith the vertical, which brokelistVerticals/getVertical. To upgrade: take the vertical offbaseUrland pass it asvertical. AbaseUrlthat still ends with the vertical throws at construction. Withoutvertical, data calls reject before sending anything.- Ids are escaped with
encodeURIComponent.
Added
deleteItem,anonymiseUser, andtrackBatch(events)(up to 10 000TrackEvents; returnsBatchIngestResult).- Training:
train({ runAfter }),rescheduleJob,cancelJob, andgetSchedule/setSchedule/deleteSchedule(TrainSchedule;getScheduleresolvesnullwhen there is no schedule). getConfigSchema().TrainJob.runAfter,TrainJobStatus.epochsandTrainJobStatus.runAfter.- Exports
RecoError,AiceError,APIConnectionError,AiceForbiddenError,InsufficientScopeErrorandRateLimitErroralongside the existing error classes, andVERSION.
Fixed
ConflictErrorwas an alias ofAiceError, soinstanceof ConflictErrormatched every error. It is now its own class, raised only for a 409, as in the Python SDK.
Changed
- Needs
@aiceafrica/core0.4.
0.2.2
Not recorded at the time; the version number matches the Python package.
0.2.1
Changed
- Updated
errors.ts's internal import/re-export for@aiceafrica/core0.3.0'sPermissionError→AiceForbiddenErrorrename. This symbol was never re-exported from this package's own publicindex.ts(onlyRecommendationError,AuthenticationError,ValidationError,NotFoundError,ConflictError,ServerErrorare), so this is not a breaking change for consumers of@aiceafrica/recommendation.
0.2.0 and earlier
Not tracked this changelog starts from the point this package was folded
into the aice-sdk monorepo.