mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Add Hydra example
Add artifacts retrieval example Rename LightGBM example
This commit is contained in:
8
examples/frameworks/hydra/config_files/config.yaml
Normal file
8
examples/frameworks/hydra/config_files/config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# data
|
||||
dataset:
|
||||
data: rawdata.csv
|
||||
user: root
|
||||
password: password
|
||||
|
||||
pipeline:
|
||||
pipeline_1: my_pipeline
|
||||
20
examples/frameworks/hydra/hydra_example.py
Normal file
20
examples/frameworks/hydra/hydra_example.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# ClearML - Hydra Example
|
||||
#
|
||||
import hydra
|
||||
|
||||
from omegaconf import OmegaConf
|
||||
|
||||
from clearml import Task
|
||||
|
||||
|
||||
@hydra.main(config_path="config_files", config_name="config")
|
||||
def my_app(cfg):
|
||||
# type (DictConfig) -> None
|
||||
task = Task.init(project_name="examples", task_name="hydra configuration")
|
||||
logger = task.get_logger()
|
||||
logger.report_text("You can view your full hydra configuration under Configuration tab in the UI")
|
||||
print(OmegaConf.to_yaml(cfg))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
my_app()
|
||||
2
examples/frameworks/hydra/requirements.txt
Normal file
2
examples/frameworks/hydra/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
clearml
|
||||
hydra-core
|
||||
@@ -8,7 +8,7 @@ from clearml import Task
|
||||
|
||||
# Connecting ClearML with the current process,
|
||||
# from here on everything is logged automatically
|
||||
task = Task.init(project_name="examples", task_name="LIGHTgbm")
|
||||
task = Task.init(project_name="examples", task_name="LightGBM")
|
||||
|
||||
print('Loading data...')
|
||||
|
||||
Reference in New Issue
Block a user