Add Python Fire support (#550)

This commit is contained in:
eugen-ajechiloae-clearml
2022-02-07 13:38:11 +02:00
committed by GitHub
parent 9794135aed
commit 296cb7d899
9 changed files with 443 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
# ClearML - Example of Python Fire integration, with commands derived from an object
#
from clearml import Task
import fire
class Calculator(object):
def add(self, x, y):
return x + y
def multiply(self, x, y):
return x * y
if __name__ == "__main__":
Task.init(project_name="examples", task_name="fire object command")
calculator = Calculator()
fire.Fire(calculator)