Skip to content

Fix missing f-string - #4150

Merged
phoenix-meadowlark merged 1 commit into
iree-org:mainfrom
phoenix-meadowlark:fix-f-string
Dec 9, 2020
Merged

phoenix-meadowlark merged 1 commit into
iree-org:mainfrom
phoenix-meadowlark:fix-f-string

Conversation

@phoenix-meadowlark

Copy link
Copy Markdown
Contributor

No description provided.

@phoenix-meadowlark phoenix-meadowlark added the bindings/python Python wrapping IREE's C API label Dec 9, 2020
@google-cla google-cla Bot added the cla: yes label Dec 9, 2020
@phoenix-meadowlark
phoenix-meadowlark merged commit 0590b3c into iree-org:main Dec 9, 2020
@hanhanW

hanhanW commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

hmm, I think this breaks cmake_linux_x86-swiftshader and cmake_linux_x86-turing? They start failing from this PR.

phoenix-meadowlark added a commit that referenced this pull request Dec 9, 2020
@phoenix-meadowlark

Copy link
Copy Markdown
Contributor Author

hmm, I think this breaks cmake_linux_x86-swiftshader and cmake_linux_x86-turing? They start failing from this PR.

Ah, I need to wrap the driver in repr instead of using :!r. Honestly not sure why those aren't identical :/

stellaraccident added a commit that referenced this pull request Dec 9, 2020
This reverts commit 0590b3c.

Error when running test:

```
  File "/usr/local/google/home/laurenzo/src/iree-build/bindings/python/pyiree/rt/system_api.py", line 88, in _create_default_iree_driver
    print(f"Created IREE driver {driver_name}: {driver:!r}", file=sys.stderr)
TypeError: unsupported format string passed to pyiree.rt.binding.HalDriver.__format__
```
@stellaraccident

Copy link
Copy Markdown
Collaborator

I rolled back the commit out of band (independently hit and then found this discussion): d889ac1

@phoenix-meadowlark

Copy link
Copy Markdown
Contributor Author

Thanks. Do you have any idea why f"{thing_to_repr:!r}" isn't always identical to f"{repr(thing_to_repr)}"? The latter works here (as did "%r" % (thing_to_repr,)). Seems like a sharp edge to have in the language.

@stellaraccident

stellaraccident commented Dec 9, 2020 via email

Copy link
Copy Markdown
Collaborator

@phoenix-meadowlark

Copy link
Copy Markdown
Contributor Author

I've only ever seen in in the python bindings (though I don't use !r too often), so it might be c-api related. I'll see if I can create a minimal reproducer sometime.

This was referenced Dec 10, 2020
@hanhanW hanhanW mentioned this pull request Dec 10, 2020
copybara-service Bot pushed a commit that referenced this pull request Dec 10, 2020
* 1b71cac Adding hal.interface.workgroup.* ops. (#4149)
* 04b7c37 Add ctests for the tensorflow/e2e directory.
* c3fc9a1 Remove all !r from python f-strings (#4157)
* fdb88b9 improve tracy docs (#4117)
* 204f652 Write the doc page on profiling cpu events (#4126)
* 613efa8 Add build instructions to python getting started (#4153)
* d889ac1 Revert "Fix missing f-string (#4150)"
* aaa08b1 Enable dylib-llvm-aot tests and switch from testing JIT to AOT. (#3928)
* cb1e46e Refactor and normalization of mhlo convolutions (#4113)
* 0590b3c Fix missing f-string (#4150)
* 2f7cab5 Check in BuildKite pipeline for android tests (#4137)
* c195ae9 Fix types for std::min on MSVC. (#4148)
* 5fefe30 Integrate MLIR-EmitC at iml130/mlir-emitc@a438d3b (#4145)
* f03307d Fix ImGui function in iree-run-module-vulkan-gui-main. (#4147)

COPYBARA_INTEGRATE_REVIEW=#4168 from hanhanW:main-to-google 7c443d3
PiperOrigin-RevId: 346812805
hanhanW added a commit that referenced this pull request Dec 10, 2020
* 1b71cac Adding hal.interface.workgroup.* ops. (#4149)
* 04b7c37 Add ctests for the tensorflow/e2e directory.
* c3fc9a1 Remove all !r from python f-strings (#4157)
* fdb88b9 improve tracy docs (#4117)
* 204f652 Write the doc page on profiling cpu events (#4126)
* 613efa8 Add build instructions to python getting started (#4153)
* d889ac1 Revert "Fix missing f-string (#4150)"
* aaa08b1 Enable dylib-llvm-aot tests and switch from testing JIT to AOT. (#3928)
* cb1e46e Refactor and normalization of mhlo convolutions (#4113)
* 0590b3c Fix missing f-string (#4150)
* 2f7cab5 Check in BuildKite pipeline for android tests (#4137)
* c195ae9 Fix types for std::min on MSVC. (#4148)
* 5fefe30 Integrate MLIR-EmitC at iml130/mlir-emitc@a438d3b (#4145)
* f03307d Fix ImGui function in iree-run-module-vulkan-gui-main. (#4147)

COPYBARA_INTEGRATE_REVIEW=#4168 from hanhanW:main-to-google 7c443d3
PiperOrigin-RevId: 346812805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bindings/python Python wrapping IREE's C API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants