Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ensure building order #740

Merged
merged 38 commits into from
Feb 12, 2024
Merged

Conversation

guilhem-barthes
Copy link
Contributor

@guilhem-barthes guilhem-barthes commented Sep 25, 2023

Description

Add some tests on the order the functions are built. Part of FL-1147

How has this been tested?

Checklist

  • changelog was updated with notable changes
  • documentation was updated

@guilhem-barthes guilhem-barthes changed the title Feat/ensure building order feat: ensure building order Sep 25, 2023
@github-actions github-actions bot added documentation Improvements or additions to documentation api compute-engine labels Sep 25, 2023
@github-actions github-actions bot removed documentation Improvements or additions to documentation api compute-engine labels Sep 26, 2023
@guilhem-barthes guilhem-barthes changed the title feat: ensure building order [sub]feat: ensure building order Sep 26, 2023
@github-actions github-actions bot added the api label Sep 26, 2023
@github-actions github-actions bot removed the api label Oct 6, 2023
@guilhem-barthes guilhem-barthes marked this pull request as ready for review October 6, 2023 18:13
@guilhem-barthes guilhem-barthes requested a review from a team as a code owner October 6, 2023 18:13
@github-actions github-actions bot added documentation Improvements or additions to documentation api compute-engine labels Oct 6, 2023
@linear
Copy link

linear bot commented Oct 6, 2023

FL-1147 Ensure images are built in the right (= rank) order

+ retry with the right prio

@github-actions github-actions bot removed documentation Improvements or additions to documentation api compute-engine labels Oct 6, 2023
Base automatically changed from poc-decoupled-builder to main October 25, 2023 13:11
guilhem-barthes and others added 25 commits February 12, 2024 12:12
## Description

Add a migration missing in the poc. 
This migration alters two things:

-  modify `ComputeTaskFailureReport.logs` 
-  modify `FunctionImage.file`

This migration has been generated automatically with `make migrations`

## How has this been tested?

<!-- Please describe the tests that you ran to verify your changes.  -->

## Checklist

- [ ] [changelog](../CHANGELOG.md) was updated with notable changes
- [ ] documentation was updated

Signed-off-by: Guilhem Barthes <[email protected]>
- Substra/orchestrator#263

Add function events, used now we decoupled the building of the function
with the execution of the compute task. For that it add a status field
on the Function. It also includes another PR (merged here), to have
functions build logs working again.

In a future PR, we will change the compute task execution to avoid
having to wait_for_function_built in compute_task()

Fixes FL-1160

As this is going to be merged on a branch that is going to be merged to
a POC branch, we use MNIST as a baseline of a working model. We will
deal with failing tests on the POC before merging on main.

- [x] [changelog](../CHANGELOG.md) was updated with notable changes
- [ ] documentation was updated

---------

Signed-off-by: SdgJlbl <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Co-authored-by: SdgJlbl <[email protected]>
…CREATED -> FunctionStatus.FUNCTION_STATUS_WAITING (#742)

# Issue

Backend FunctionStatus are not aligned with [orchestrator
definitions](https://github.com/Substra/orchestrator/blob/poc-decoupled-builder/lib/asset/function.proto#L29-L36).
In particular, `FunctionStatus.FUNCTION_STATUS_CREATED` leading to the
following error:

```txt
ValueError: 'FUNCTION_STATUS_WAITING' is not a valid FunctionStatus
```

## Description

FunctionStatus.FUNCTION_STATUS_CREATED ->
FunctionStatus.FUNCTION_STATUS_WAITING

## How has this been tested?

Running Camelyon benchmark on
[poc-builder-flpc](https://substra.org-1.poc-builder-flpc.cg.owkin.tech/compute_plans/a420306f-5719-412b-ab9c-688b7bed9c70/tasks?page=1&ordering=-rank)
environment.

## Checklist

- [ ] [changelog](../CHANGELOG.md) was updated with notable changes
- [ ] documentation was updated

---------

Signed-off-by: Thibault Camalon <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
<!-- Please reference issue if any. -->

<!-- Please include a summary of your changes. -->

<!-- Please describe the tests that you ran to verify your changes.  -->

- [ ] [changelog](../CHANGELOG.md) was updated with notable changes
- [ ] documentation was updated

---------

Signed-off-by: SdgJlbl <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Co-authored-by: SdgJlbl <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthes <[email protected]>
## Companion PR

- Substra/orchestrator#277
- Substra/substra-frontend#240

## Description

The aim is to allow registering failure reports not only for compute
task but for other kind of assets (for now, functions which are not
building as part of the execution of a compute task)

- Modifies `ComputeTaskFailureReport`:
    - renamed the model to `AssetFailureReport`
- renamed field `compute_task_key` to `asset_key` (as we can now have a
function key)
    - added field `asset_type` to provide 
- Updates protobuf reflecting the previous changes
- refactor `download_file` in `PermissionMixin` to provide mroe
flexibility (and decouple from DRF)
- create new `FailableTask` (Celery task):
  - centralize the logic to submit asset failure

## How has this been tested?

As this is going to be merged on a branch that is going to be merged to
a POC branch, we use MNIST as a baseline of a working model. We will
deal with failing tests on the POC before merging on main.

## Checklist

- [x] [changelog](../CHANGELOG.md) was updated with notable changes
- [ ] documentation was updated

---------

Signed-off-by: Guilhem Barthes <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
Signed-off-by: Guilhem Barthés <[email protected]>
@guilhem-barthes
Copy link
Contributor Author

/e2e

@Owlfred
Copy link

Owlfred commented Feb 12, 2024

End to end tests: ✔️ SUCCESS

“I love it when a plan comes together.” ― Colonel John “Hannibal” Smith, The A-Team

@guilhem-barthes guilhem-barthes merged commit e7aa3e7 into main Feb 12, 2024
6 checks passed
@guilhem-barthes guilhem-barthes deleted the feat/ensure-building-order branch February 12, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants