mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Fix jsonargparse support (#403)
This commit is contained in:
15
examples/frameworks/jsonargparse/jsonargparse_command.py
Normal file
15
examples/frameworks/jsonargparse/jsonargparse_command.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from jsonargparse import CLI
|
||||
from clearml import Task
|
||||
|
||||
|
||||
class Main:
|
||||
def __init__(self, prize: int = 100):
|
||||
self.prize = prize
|
||||
|
||||
def person(self, name: str):
|
||||
return "{} won {}!".format(name, self.prize)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Task.init(project_name="examples", task_name="jsonargparse command")
|
||||
print(CLI(Main))
|
||||
Reference in New Issue
Block a user