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

fix: synthesizer status depending on report status #55

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/ydata/sdk/synthesizers/synthesizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ydata.sdk.datasources._models.metadata.data_types import DataType
from ydata.sdk.datasources._models.metadata.metadata import Metadata
from ydata.sdk.datasources._models.status import Status as dsStatus
from ydata.sdk.synthesizers._models.status import PrepareState, ReportState, Status, TrainingState
from ydata.sdk.synthesizers._models.status import PrepareState, Status, TrainingState
from ydata.sdk.synthesizers._models.synthesizer import Synthesizer as mSynthesizer
from ydata.sdk.synthesizers._models.synthesizer_type import SynthesizerType
from ydata.sdk.synthesizers._models.synthesizers_list import SynthesizersList
Expand Down Expand Up @@ -403,7 +403,5 @@ def _resolve_api_status(api_status: Dict) -> Status:
'state', TrainingState.UNKNOWN.name)) == TrainingState.FAILED:
return Status.FAILED
elif status == Status.REPORT:
if ReportState(api_status.get('report', {}).get(
'state', ReportState.UNKNOWN.name)) == ReportState.FAILED:
return Status.FAILED
return Status.READY
return status