mirror of
				https://github.com/clearml/clearml-docs
				synced 2025-06-26 18:17:44 +00:00 
			
		
		
		
	Update Scalar reporting example
This commit is contained in:
		
							parent
							
								
									e83c27c23b
								
							
						
					
					
						commit
						060f4e78b5
					
				@ -7,7 +7,8 @@ demonstrates explicit scalar reporting. ClearML reports scalars in the **ClearML
 | 
			
		||||
 | 
			
		||||
When the script runs, it creates a task named `scalar reporting` in the `examples` project.
 | 
			
		||||
 | 
			
		||||
To reports scalars, call [`Logger.report_scalar()`](../../references/sdk/logger.md#report_scalar). 
 | 
			
		||||
## Reporting Scalar Series 
 | 
			
		||||
To report scalar series, call [`Logger.report_scalar()`](../../references/sdk/logger.md#report_scalar). 
 | 
			
		||||
To report more than one series on the same plot, use the same `title` argument. For different plots, use different 
 | 
			
		||||
`title` arguments. 
 | 
			
		||||
 | 
			
		||||
@ -31,4 +32,20 @@ for i in range(100):
 | 
			
		||||
    )
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Reporting Single Scalar Values 
 | 
			
		||||
 | 
			
		||||
To report single scalar values (individual metrics, not part of a series), use [`Logger.report_single_value()`](../../references/sdk/logger.md#report_single_value).
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
# Report individual scalar values
 | 
			
		||||
Logger.current_logger().report_single_value(name="metric A", value=486)
 | 
			
		||||
Logger.current_logger().report_single_value(name="metric B", value=305.95)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Single value scalars are shown in the UI in the task's **SCALARS** tab under the `Summary` table.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 71 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14_dark.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14_dark.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 73 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14a.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14a.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 40 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14a_dark.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/img/examples_reporting_14a_dark.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 40 KiB  | 
		Loading…
	
		Reference in New Issue
	
	Block a user