-
Notifications
You must be signed in to change notification settings - Fork 301
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
update openai batch test and workflow #2440
Conversation
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]>
flytekit/remote/remote.py
Outdated
except TypeError: # cannot pickle errors | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, when will it happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the input is a generator, i'm seeing this error: Failed with Unknown Exception <class 'TypeError'> Reason: cannot pickle 'generator' object
def jsons():
for x in [
{
"custom_id": "request-1",
"method": "POST",
"url": "/v1/chat/completions",
"body": {
"model": "gpt-3.5-turbo",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is 2+2?"},
],
},
}
]:
yield x
@workflow
def json_iterator_wf(json_val: Iterator[JSON] = jsons()) -> BatchResult:
return batch(jsonl_in=json_val)
flytekit/remote/remote.py
Outdated
try: | ||
h.update(cloudpickle.dumps(default_inputs)) | ||
except TypeError: # cannot pickle errors | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should at the very least log this case, right?
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla <[email protected]> Signed-off-by: Jan Fiedler <[email protected]>
Tracking issue
flyteorg/flyte#5274
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link