mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Add Python Fire support (#550)
This commit is contained in:
committed by
GitHub
parent
9794135aed
commit
296cb7d899
15
examples/frameworks/fire/fire_single_cmd.py
Normal file
15
examples/frameworks/fire/fire_single_cmd.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# ClearML - Example of Python Fire integration, with a single command passed to Fire
|
||||
#
|
||||
from clearml import Task
|
||||
|
||||
import fire
|
||||
|
||||
|
||||
def hello(count, name="clearml", prefix="prefix_", suffix="_suffix", **kwargs):
|
||||
for _ in range(count):
|
||||
print("Hello %s%s%s!" % (prefix, name, suffix))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Task.init(project_name="examples", task_name="fire single command")
|
||||
fire.Fire(hello)
|
||||
Reference in New Issue
Block a user