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

Pipeline Response Changes #282

Open
wants to merge 9 commits into
base: development
Choose a base branch
from

Conversation

xainaz
Copy link
Collaborator

@xainaz xainaz commented Oct 25, 2024

No description provided.

fields.extend([f"{k}={repr(v)}" for k, v in self.additional_fields.items()])
return f"PipelineResponse({', '.join(fields)})"

def __contains__(self, key: str) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above my comment regarding making this dict like object also applies here.

pipeline_test2.ipynb Outdated Show resolved Hide resolved
from aixplain.enums.asset_status import AssetStatus


# def test_list_pipelines():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these tests are disabled somehow. Is that by purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data is not being returned properly, so I commented some out to debug. Any idea why I could be getting success status, while no data is being returned?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have really no idea on that.

start = time.time()
try:
response = self.run_async(data, data_asset=data_asset, name=name, **kwargs)
if response["status"] == "FAILED":
if response["status"] == Status.FAILED:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, are we sure the value of "status" in the matching enum type or a string only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum makes sure that if it's passed in as string it turns it into enum object

end = time.time()
response = self.__polling(poll_url, name=name, timeout=timeout, wait_time=wait_time)
status = Status(polling_response["status"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding above my comment, for example here the value of "status" not seems to a be enum. Best to make sure of it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I'll check again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants