Releases: Substra/substra
0.8.0
Although the API only slightly changes (compute_plan_id
renamed into compute_plan_key
, hash
into checksum
and dataset.keys
into dataset.data_sample_keys
), this new version of substra
is designed to work with a new release of the backend that introduces these very important changes:
- asset keys are not content hashes anymore but uuids,
- the unicity of asset content is not enforced anymore (no more
exist_ok=True
, no more AlreadyExists exceptions) - data samples will now be read by the opener in the order they were specified in the tuple.
Changed
- Switch from content hash to uuid for asset keys (#235)
- Renamed attributes (#240)
- Use substra-tools 0.7.0 in examples (#244)
- Added support for multi-node in debug mode (#238 and #239)
Removed
- Removed the run-local command that has been deprecated for a while now and replaced by the debug mode (#242 )
0.7.1
0.7.0
Features
-
Auto batching: when adding or updating a compute plan, the tuples are uploaded by batch to avoid server errors. This can be configured from SDK:
client.add_compute_plan(data, auto_batching=True, batch_size=20)
or the CLI:
substra add compute_plan --batch-size 20 data.json substra add compute_plan --no-auto-batching data.json
-
New method to retry a call in case of server error, e.g. a timeout:
retry_on_exception
-
Client initialisation: see the API changes
-
Output of the
get
methods: see the API changes -
Output of the
create
methods: see the API changes
API - breaking changes
Client initialisation
- Define the "profile" during the initialisation, whether by giving parameters or the path to a config file
- Remove the version argument at initialisation
- New debug mode argument at initialisation (False by default)
Previous API:
c = Client()
c.add_profile(profile_name, url, version, insecure)
c.login(username, password)
New API:
c = Client(url, token, retry_timeout, insecure, debug)
c.login(username, password)
or
c = Client.from_config_file(profile_name, config_path, tokens_path, token, retry_timeout, debug)
c.login(username, password)
The get
methods return a Python object whose attribute are in snake_case
Instead of a dictionnary, the returned object is now a class instance, as described in the documentation and its attributes are in snake_case instead of camelCase.
Previous API:
traintuple = client.get_traintuple(traintuple_key)
in_models = traintuple['inModels']
New API:
traintuple = client.get_traintuple(traintuple_key)
in_models = traintuple.in_models
The create
methods return a key
The creation methods now return the key of the created object, apart from the create_compute_plan
method that returns the whole object.
Previous API:
traintuple = client.create_traintuple(data)
traintuple_key = traintuple['key']
New API:
traintuple_key = client.create_traintuple(data)
traintuple = client.get_traintuple(traintuple_key)
pkhash
has been replaced by key
The objects in Substra are now identified by their key
instead of pkhash
.
Fixes
0.7.0-alpha.1
Support new objects and methods in the local backend:
- aggregate tuples
- composite traintuples
- create a compute plan directly with the add_compute_plan and update_compute_plan methods
This depends on the version 0.6.0 of susbtra-tools, the examples use the new 'n_samples' argument for fake data generation.
0.7.0-alpha
API changes
Define the "profile" for the client at initialization. Initialise it by passing parameters or directly from a config file.
Previous API:
c = Client()
c.add_profile(profile_name, url, version, insecure)
c.login(username, password)
New API:
c = Client(url, token, retry_timeout, backend, version, insecure)
c.login(username, password)
or
c = Client.from_config_file(profile_name, config-path, user_path, token, retry_timeout, backend)
c.login(username, password)
Features
- local debugging: run everything locally using the
local
backend in the client.
c = Client(..., backend='local')
0.6.0
API changes
The login method and command now need a username and password to work.
Previous API:
c = Client()
c.add_profile(profile_name, username, password, url, version, insecure)
c.login()
New API:
c = Client()
c.add_profile(profile_name, url, version, insecure)
c.login(username, password)
Features
- Better error messages both in SDK and CLI
- New metadata field for all assets
- Remove dependency on keyring. This introduces a breaking API change: the login method and command now expect to have login and password as input.
Fixes
- Fixed missing permissions in examples
- Removed unnecessary logins in example scripts
0.5.0
0.4.0
Features
- Improve documentation
- CLI: update run-local (train method does not return predictions)
- CLI: change
--yaml/--json
option to--output yaml/json
- CLI: add
--log-level
option - Various small improvements in sdk, cli and tests
Updating from 0.3.0 to 0.4.0 should not cause any compatibility issue.
0.4.0-alpha.5
Merge pull request #153 from SubstraFoundation/common_output_option Common output option
0.4.0-alpha.4
Merge pull request #122 from SubstraFoundation/fix-profile-name Fix profile name set missing