[PATCH] D139370: [mlgo] Dependency-free training mode logger
Jacob Hegna via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 15:08:41 PST 2022
jacobhegna added inline comments.
================
Comment at: llvm/lib/Analysis/models/log_reader.py:34
+ @classmethod
+ def from_dict(d: dict):
+ name = d['name']
----------------
this won't work, no? if it's a `classmethod` the first argument could be `cls`, and the point is you could return `cls(name=...)` instead of `TensorSpec(name=...)`, it's essentially the same but follows the convention I see people using for factory methods in python
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139370/new/
https://reviews.llvm.org/D139370
More information about the llvm-commits
mailing list