Log your results to Picsell.ia
We will see how you can store any variable, function output, array, image, and visualize it in your experiment's tab in our platform.

The Log method

Logging something to Picsell.ia is as simple as this :
1
from picsellia.client import Client
2
3
api_token = '4d388e237d10b8a19a93517ffbe7ea32ee7f4787'
4
project_token = '9c68b4ae-691d-4c3a-9972-8fe49ffb2799'
5
6
experiment = Client.Experiment(
7
api_token=api_token,
8
project_token=project_token,
9
name='my_new_experiment'
10
)
11
12
data = [3, 1.25, 1.4, 0.35, 0.95]
13
experiment.log('TotalLoss', data, 'line')
Copied!
Now let's check your experiment's dashboard :
What you just created is what we call a data asset, now we will dive into it to see how to use it properly and how far we can go.

The Data Asset

To store something related to an experiment and visualize it in Picsell.ia, you have to store it in what we call a data asset, it is composed of the following properties :
  • name, it is the name of the tab you will see in your experiment, it can group several data assets
  • data, is the value, dictionary, array, image, that you want to store
  • type, the type of visualization your want to render your asset in (e.g array, line-chart, bar-chart...)
1
experiment.log(name='logs', data=data, type='line')
Copied!

Supported types

These are just basic usage example of what how to display different kinds of data in Picsell.ia.
To see the complete list of options and arguments for each type, please check the data reference.
We are doing our best to offer you as much data visualization possibilities but it takes time to integrate. Here is the list of the visualization we support for now. If you need something that is not in the list, please send us a kind message and we will do our best to treat your request a.s.a.p 😊

Single Value

Store one value to be displayed alone. It can be of any types (int, float, str...)
1
experiment.log(name='accuracy', type='value', data=0.95)
Copied!
Single values will appear in your experiment dashboard in the Summary at the top of the page like this :

Line

A basic line chart
1
data = [3, 8, 2, 7, 9]
2
experiment.log(name='logs', type='line', data=data)
Copied!
The format of your data to display a line-chart must be one of the following.

List format

If you don't specify it, we automatically increment the steps/x_axis for you so you can just send the y values like this:
1
experiment.log(name='logs', type='line', data=[5, 8, 2, 9, 10])
Copied!
If there is already existing data with the name you provided ('logs' in this example), the values will be append to the current list of values.
If you want to completely replace the existing values with a brand new list you can set the replace parameter to True
1
experiment.log(name='logs', type='line', data=[5, 8, 2, 9, 10], replace=True)
Copied!

Dict format

If you want to specify your own x_axis steps, you can send the data this way:
1
data = {
2
'steps': [0, 2, 4, 8, 10],
3
'values': [0.7, 0.8, 0.9, 0.3, 0.12]
4
}
5
experiment.log(name='logs', type='line', data=data)
Copied!
You can also visualize multiple lines on the same chart by adding keys to your dictionary (with or without steps) :
1
data = {
2
'loss1': [0.45, 0.2, 0.98, 0.47, 0.28],
3
'loss2': [0.7, 0.8, 0.9, 0.3, 0.12],
4
'loss3': [0.21, 0.47, 0.74, 0.56, 0.86]
5
}
6
experiment.log(name='logs', type='line', data=data)
Copied!

Bar

A basic bar chart
1
data = {
2
'x': ['car', 'person', 'birid'],
3
'y': [5, 8, 2],
4
}
5
experiment.log(name='labels', type='bar', data=data)
Copied!

Table

1
data = {
2
"Loss/total_loss": 1.202446,
3
"Loss/localization_loss": 0.022069892,
4
"Loss/classification_loss": 1.1457626,
5
"Loss/regularization_loss": 0.034613654,
6
"DetectionBoxes_Recall/[email protected]": 0.0
7
}
8
experiment.log(name='metrics', type='table', data=data)
Copied!

Image

1
path = "path/to/my/image.jpg"
2
experiment.log("img3", type="image", data=path)
Copied!

Heatmap

Please note that you can send an array of values whose shape is (N+1xN+1) whereas the list of your categories as a length of N. The last dimensions of the array will be labeled as FP (False Positive) and FN (False Negative).
1
conf = [[33, 0, 13],
2
[ 2, 7, 16],
3
[10, 0, 0]]
4
5
confusion = {
6
'categories': ['car', 'pedestrian'],
7
'values': conf.tolist()
8
}
9
exp.log('confusion', confusion, 'heatmap')
Copied!
Last modified 4mo ago