Skip to content

Commit 91dfb94

Browse files
authored
Fix device assignment for transformers (#607)
1 parent 4d83910 commit 91dfb94

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

pgml-extension/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pgml-extension/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pgml"
3-
version = "2.4.2"
3+
version = "2.4.3"
44
edition = "2021"
55

66
[lib]

pgml-extension/sql/pgml--2.4.2--2.4.3.sql

Whitespace-only changes.

pgml-extension/src/bindings/transformers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ def default(self, obj):
5353
def transform(task, args, inputs, cache):
5454
task = json.loads(task)
5555
args = json.loads(args)
56-
args["device"] = assign_device(args.get("device"))
5756
inputs = json.loads(inputs)
5857

58+
task["device"] = assign_device(task.get("device"))
59+
5960
if cache:
6061
key = ",".join([f"{key}:{val}" for (key, val) in sorted(task.items())])
6162
if key not in __cache_transform_pipeline_by_task:

0 commit comments

Comments
 (0)