All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-10-14
- Drop Python 3.9 support. (#428)
0.54.0 - 2024-09-12
- Python 3.12 support (#418)
description.md
are nowOptional
inDatasampleSpec
. If no description file is given,Substra
will generate a template indicating how to add a custom description file during dataset registration. (#417)
0.53.0 - 2024-06-03
- A warning indicates when a
Client
is set in hybrid mode (#413)
- Exclude
requests
2.32.* due to bug introduction in these version. (#415)
0.52.0 - 2024-03-27
-
- BREAKING: Remove
type
fromDatasetSpec
(#405)
- BREAKING: Remove
-
- Depreciate
setup.py
in favour ofpyproject.toml
(#407)
- Depreciate
0.51.0 - 2024-03-07
- Dropped Python 3.8 support (#404)
- Compute task status
DOING
is renamedEXECUTING
(#401) - Compute plan statuses
EMPTY
,WAITING
ansdTODO
are merged into new statusCREATED
(#401)
0.50.0 - 2024-02-26
- BREAKING: Renamed
function
field of the Function pydantic model toarchive
(#393) - BREAKING: Renamed ComputeTask status values (#397)
download_logs
uses the new endpoint (#398)- BREAKING: Renamed Status to ComputeTaskStatus (#399)
- Paths are now resolved on DatasampleSpec objects. Which means that users can pass relative paths (#392)
- Added FunctionStatus (#399)
0.49.0 - 2023-10-18
- Support on Python 3.11 (#388)
0.48.1 - 2023-10-06
- Use substra-tools base docker image (not minimal) in tests (#389)
- Convert
round_idx
from metadata toint
when creatingPerformances
to fix Pydantic warning (#387)
0.48.0 - 2023-09-08
- Update to pydantic 2.3.0 (#375)
0.47.0 - 2023-09-07
-
wait_completion
param onget_performances
,list_task_output_assets
andget_task_output_asset
to block execution until execution is over (#368) -
list_task_output_assets
andget_task_output_asset
wait that the compute task is over before getting assets (#369) -
warning and help message when logging in with username/password rather than token (#378)
-
new
Client.logout
function, mirroringClient.login
(#381) -
Client
can now be used within a context manager (#381)with Client( client_name="org-1", backend_type="remote", url="http://substra-backend.org-1.com:8000", username="org-1", password="p@sswr0d44", ) as client: pass
- change how API responses are parsed to match server changes (#379)
Client
will now terminate the sessions it starts when given username & password (#381)
- typo in exception (#377)
- Client.login breaking when Client was instanciated with
insecure=True
(#384)
0.46.0 - 2023-07-25
wait_task
andwait_compute_plan
to block execution until execution is over (#368)- Configuration file path can be set with env var
SUBSTRA_CLIENTS_CONFIGURATION_FILE_PATH
(#370)
- Remove
model
andmodels
for input and output identifiers in tests. Replace byshared
instead. (#367) - Remove pagination on
get_performances
to remove limitation on 1000 first points (#372)
- Pin
pydantic
to>=1.9.0
&<2.0.0
aspydantic
v2.0.0
has been released with a lot of non backward compatible changes. (#371)
0.45.0 - 2023-06-12
- Concepts
InputAsset
andOutputAsset
have been introduced, mirroring concept insubstra-backend
(#361) - Utils to get
input / output assets
for a specific task (get_task_output_asset
,list_task_output_assets
,list_task_input_assets
) (#361)
Task
(includinginputs
andoutputs
without linked assets) replaceSummaryTask
(#361)- Fix the ordering when filtering on a remote client (#363)
SummaryTask
(#361)
0.44.0 - 2023-05-11
- Client can now be configured using environment variables or a configuration Yaml file (#353)
- BREAKING: default backend type for Client is now "subprocess" (#353)
- Add identifier to performance view when calling
client.get_performances
(#357)
- Function name from the Performance model (#358)
- BREAKING:
substra.cli
module (#362) - BREAKING:
Client.from_config_file()
. The recommended way is to use the new config file format or env vars (#362)
0.43.0 - 2023-03-31
- Add
SummaryTask
Pydantic validator to match the new API behavior (returning compute tasks without details in list view) (#350)
- Permissions inconsistency in local mode (#348)
0.42.0 - 2023-02-20
- Creator field in Compute Plan model (#331)
- Contributing, contributors & code of conduct files (#333)
- BREAKING CHANGE: failed task category (#309)
- BREAKING: DataSampleSpec don't have a
test_only
field anymore (#332)
- BREAKING: rename tuple to task (#337)
0.41.0 - 2022-12-19
- Adapt hybrid mode to pass the rank in a task property argument to match backend behavior (#329)
- Pass the Python Github Actions on ubuntu 20.04 to be compatible with docker rootless mode (#325)
0.40.0 - 2022-11-22
- BREAKING CHANGE: replace the tasks
traintuple
,aggregatetuple
,predicttuple
,testtuple
,composite_traintuple
with a singletask
(#299)
task_key = client.add_task(
substra.schemas.TaskSpec(
algo_key=algo_key,
worker=client.organization_info().organization_id, # org on which the task is executed
inputs=[
{
'identifier': 'datasamples',
'asset_key': datasample_key
},
{
'identifier': 'opener',
'asset_key': dataset_key
}
],
outputs= {
'example_output': {
'permissions': {
'public': False,
'authorized_ids': ['org1'],
},
'is_transient': True,
}
}
)
)
task = client.get_task(task_key)
tasks = client.list_task()
# Compute plan changes
compute_plan = client.add_compute_plan(
substra.schemas.ComputePlanSpec(
name = 'my compute plan',
tasks = [
schemas.ComputePlanTaskSpec(
task_id=uuid.uuid4(),
algo_key=algo_key,
worker=client.organization_info().organization_id, # org on which the task is executed
inputs=[
{
'identifier': 'datasamples',
'asset_key': datasample_key
},
{
'identifier': 'opener',
'asset_key': dataset_key
}
],
outputs= {
'example_output': {
'permissions': {
'public': False,
'authorized_ids': ['org1'],
},
'is_transient': True,
}
}
)
]
)
)
- Update substratools Docker image name (#316)
- Remove depreciated
pytest-runner
from setup.py (#320) - link_dataset_with_data_samples return value in remote mode
- Fix the compute plan rank calculation in local mode (#299)
- Windows compatibility on
pathlib
usage for a Docker argument (#317)
- Apply changes from algo to function in substratools (#303)
- Register functions in substratools using decorator
@tools.register
(#310) - Update README image (#318)
0.39.0 - 2022-10-03
- BREAKING CHANGE: remove category from substra.schema.AlgoSpec and substra.models.Algo
- Remove '# substra.sdk' from sdk documentation (#315)
- Prevent use of
__
in asset metadata keys in local mode - docker: add build logs to container image build exception messages
- At compute plan submission by batch, continue the submission after a timeout error
0.38.0 - 2022-09-26
- used openers within the library only exposes
get_data
andfake_data
methods due to breaking changes within substra-tools - a third argument
task_properties
(containing therank
of a task) has been added to all algo methods relying on substra-tools - substra tools metrics
tools.Metrics
becometools.MetricAlgo
andtools.metrics.execute
becomestools.algo.execute
(#290)
- Algo categories are not checked anymore in local mode. Validations based on inputs and outputs are sufficient.
- BREAKING CHANGE: the backend type is now set in the Client, the env variable
DEBUG_SPAWNER
is not used anymore. Default value is deployed (#287)
API before
export DEBUG_SPAWNER=subprocess
client = substra.Client(debug=True)
API after
client = substra.Client(backend_type=substra.BackendType.LOCAL_SUBPROCESS)
- Pass substra-tools arguments via a file instead of the command line
- internal change: the metrics algo CLI is the same as the other algos (#290)
- BREAKING CHANGE: Model.category field
0.37.0 - 2022-09-19
tests: fix algo inputs and task code consistency
- BREAKING CHANGE:
schemas.ComputePlanSpec
clean_models
property is now removed, the transient property on tasks outputs should be used instead.
0.36.0 - 2022-09-12
- input multiplicity within the cli in debug mode
list_model
to the SDK client
- chore: remove the
examples
section, and references to them
- BREAKING CHANGE: opener input identifier must be
opener
- BREAKING CHANGE: datasample input identifier must be
datasamples
- BREAKING CHANGE:
chainkeys
,opener
anddatasamples
are forbidden identifier for inputs and outputs of kindartifact
andperformance
- BREAKING CHANGE: pass the algo method to execute under the
--method-name
argument within the CLI. If the interface between substra and the backend is handled via substratools, there are no changes to apply within the thesubstra
code but algo and metric Dockerfiles should expose a--method-name
argument in theENTRYPOINT
(#266) - test tasks now have an higher rank than their parent train task
- chore: remove close source for CHANGELOG, README and cyclic-example
- chore: rename connect-tools to substra-tools.
- BREAKING CHANGE: remove the shared local folder of the compute plan
- feat: download function of the client return the path of downloaded file.
- Local mode: add a check, a task output of type performance must have public permissions
- Filters: Fix the filters on status for compute plans and tasks
This fix also introduces some changes: the value for the filters on status must now be a list (like for other filters, there is a OR condition between elements of the list) and its value must be
substra.models.ComputePlanStatus.{name of the status}.value
for compute plans and substra.models.Status.{name of the status}.value
for tasks.
Example:
# Return all the compute plans that are not finished
client.list_compute_plan(filters={'status':[substra.models.ComputePlanStatus.todo.value, substra.models.ComputePlanStatus.waiting.value, substra.models.ComputePlanStatus.doing.value]})
# Return all the composite traintuples with the status "doing"
client.list_composite_traintuple(filters={"status": [substra.models.Status.doing.value]})
- Add the filters documentation to the references
0.35.0 - 2022-08-29
- chore: change the
metrics
andalgo
definition relying on substra tools. All the methods of those objects now takesinputs
andoutputs
as arguments; which areTypedDict
.
0.34.0 - 2022-08-22
- BREAKING CHANGE:in local mode, each client has its own
organization_id
. Removed theDEBUG_OWNER
mechanism.
Instead of:
client = substra.Client(debug=True)
clients = [client] * 2
do:
clients = [substra.Client(debug=True) for _ in range(2)]
client1_org_id = clients[0].organization_info().organization_id
- The
Client.organization_info
function now returns a modelOrganizationInfo
instead of a dict
0.33.0 - 2022-08-17
- New update_compute_plan, update_algo and update_dataset methods that allow editing names
- The local mode now uses the inputs/outputs fields to execute the tasks. The other fields are still kept up-to-date
- Support for the
transient
flag on tasks outputs
- BREAKING CHANGE: rename
schemas.ComputeTaskOutput
toschemas.ComputeTaskOutputSpec
- BREAKING CHANGE: remove the chainkey feature
0.32.0 - 2022-08-09
- BREAKING CHANGE: drop Python 3.7 support
- add
inputs
andoutputs
fields to the Algo model
- BREAKING CHANGE CLI: keep only the cancel, profile, login and organization commands
- BREAKING CHANGE: Stop using legacy
_permissions
fields
0.31.0 - 2022-08-01
- "inputs" field to substra.sdk.schemas.*tupleSpec
- "inputs" field to *tuple models
- embed models/performances in output fields of tasks
0.30.1 - 2022-07-26
- revert: fix:
get_performances
works again in remote
0.30.0 - 2022-07-25
- fix:
get_performances
works again in remote
- feat: change DEFAULT_BATCH_SIZE to 500
- "outputs" field to substra.sdk.schemas.*tupleSpec
- feat: add "outputs" field to *tuple models
- BREAKING: "out_trunk_model_permissions" field from substra.sdk.schemas.CompositeTraintupleSpec (superseded by "outputs")
0.29.0 - 2022-07-11
- feat: support two composite as input of a composite in local mode
- feat: support metadata filters in local mode
- BREAKING: convert (test task) to (predict task + test task)
- fix: add mandatory cp name in cyclic strategy example
0.28.0 - 2022-07-05
- BREAKING CHANGE: Client.update_compute_plan renamed Client.add_compute_plan_tuples
- CLI commands
add
,get
andlist
- BREAKING: Removed metrics APIs and types; use algo APIs and types instead
0.27.0 - 2022-06-27
-
BREAKING: implement filtering and ordering for list methods in SDK
-
Removed filtering syntax
asset::key::value
in SDK and CLI -
New filtering syntax in SDK
filters={key:["value1", "value2"]}
and ordering possibility:- list_***(self, filters=None) -> List[substra.sdk.models.***] + list_***(self, filters: dict = None, order_by: str = 'creation_date', ascending: bool = False) -> List[substra.sdk.models.***]
-
0.26.0 - 2022-06-20
- fix: get_performance test tuples filter on local dal
0.25.0 - 2022-06-14
-
cancel_compute_plan should return nothing
SDK:
- cancel_compute_plan(self, key: str) -> substra.sdk.models.ComputePlan + cancel_compute_plan(self, key: str) -> None - Cancel execution of compute plan, the returned object is described in the [models.ComputePlan](sdk_models.md#ComputePlan) model + Cancel execution of compute plan. Nothing is returned by this method
CLI:
substra cancel compute_plan [OPTIONS] COMPUTE_PLAN_KEY - Cancel execution of a compute plan. + Cancel execution of a compute plan. Nothing is printed, you can check again the compute plan status with `substra get compute_plan`.
- BREAKING CHANGE (rename node to organization)
- SDK:
client.list_node
renamed toclient.list_organization
- SDK:
client.node_info
renamed toclient.organization_info
- CLI: the command
substra node info
is nowsubstra organization info
- CLI: the command
substra list node
is nowsubstra list organization
- local mode: when using chainkeys, the chainkey file is renamed from
node_name_id.json
toorganization_name_id.json
- SDK:
0.24.0 - 2022-06-07
- feat: add predict algo category
- BREAKING CHANGE (UpdateComputePlanSpec key field): Use new register tasks endpoint
0.23.0 - 2022-05-31
- feat: add empty compute plan status
- feat: in debug mode, subprocess errors are now caught and raised as
ExecutionError
0.22.0 - 2022-05-22
- feat: add round_idx to get_performance()
- feat: Add algo named inputs and outputs for existing task in remote mode
- feat: log level set to warning for substra-tools
0.21.0 - 2022-05-16
- BREAKING CHANGE: add mandatory name field to compute plan
- doc: update orchestrator compatibility table for the Substra release 0.11.0
- feat: save performances in live for local mode on a json file
0.20.0 - 2022-05-09
- BREAKING CHANGE: use algo spec for metric
- BREAKING CHANGE: Cancel CP returns nothing
- BREAKING CHANGE: the user must give the key of the compute plan when creating a new compute plan
0.19.0 - 2022-05-03
- feat(sdk): add
get_datasample
method - feat: add the get_performances(compute_plan.key) function to the client
- BREAKING CHANGE: local mode - arguments of each train, test, composite and aggregate task are passed as named inputs and outputs in a json format. Those changes are compatible with substra-tools
0.12.0
. - Rest client supports default backend pagination, list will automatically fetch all pages
- BREAKING CHANGE: local mode - the format of the asset ids is now
uuid.UUID
, e.g.3da0075f-360b-446d-902f-af60a38d9594
and not the hex representation. - update substra-tools version in examples Dockerfiles
0.18.0 - 2022-04-11
- Local mode - in a compute plan, the testtuples are executed at the same time as the other tasks instead of after all of them
- Examples now use the substra-tools base Docker image 0.10.0
- Local mode works with data on another disk partition than the one the code is executed on
- In subprocess mode: the data samples are linked via a symbolic link to a temporary folder
- In Docker mode: the data samples are copied at the task execution time to a temporary folder
- Be able to use pdb in subprocess mode
0.17.0 - 2022-03-01
- Speed and disk space usage improvement as datasamples are not copied to local backend folders anymore
- Documentation: Fix the display of the API reference
- CLI: Add the
logs
command to display and download the logs of a failed tuple - SDK: Add the
get_logs
anddownload_logs
methods - doc: add DEBUG_SPAWNER doc
- doc: add
AlgoSpec
to documentation - SDK: add
get_model
method
- Local mode should not accept test data samples for train tuples
0.16.0 - 2022-01-14
- (BREAKING) Add a
logs_permission
field to Dataset schema and model
- CLI: Fix the display of metric key and perfs for 'substra get testtuple'
- (BREAKING) Remove the download permissions
0.15.0 - 2022-01-10
- (BREAKING) Remove the datasample.validated field as it's deprecated
- CLI: fix the display of the assets in yaml and json format
- No more crash when running a script in local subprocess mode from a path with spaces
- Examples: add dataset logs_permission field
- Error type to traintuple, testtuple, aggregatetuple and composite_traintuple
- Expose the backend type
0.14.0 - 2021-12-01
- Cyclic strategy example
- Local mode - the substra specific assets are now saved in
/substra_internal
instead of the work dir - Fix the display of the composite traintuple if it has no input models
- Properly prevent path traversal in archives and don't allow symbolic links
0.13.0 - 2021-11-02
- traintuple can take aggregatetuple as in_tuple
- Pretty print for Model and Spec
- Display orchestrator and chaincode versions in node info command
- Accept full datamanager, metrics and parent_tasks objects in get_*_tuple responses
- Add task extra information related to start_date and end_date
- Ignore extra fields in API response
- (BREAKING) Replace objective by metric
- (BREAKING) Multiple metrics and performances per test task
- Local mode, execution in Docker: re-use the Docker images so that the execution is faster
0.11.0 - 2021-10-04
- Display backend version in node info command
- Internal: backend now serves paginated lists of asset. Client still returns simple lists as before.
- (BREAKING CHANGE) All algos are now one single object with a category property.
- (BREAKING CHANGE) Various API changes due to the architecture change introduced by the orchestrator.