You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/components.md
+13-18Lines changed: 13 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -98,13 +98,13 @@ For convenience, the dict interface can be accessed using the `.` object notatio
98
98
99
99
Flags are configuration values that are associated with the particular execution, for example the random seeds or worker IDs. They are accessible via the `self.flags` object, that supports the `.` object notation. You can add your own flags through basic assignment, e.g. ``self.flags.counter = 1``. To avoid name collision, all native machinable flags use UPPERCASE (e.g. ``self.flags.SEED``).
100
100
101
-
## self.store
101
+
## self.storage
102
102
103
-
The interface `self.store` allows for the storing of data and results of the components. Note that you don't have to specify where the data is being stored. machinable will manage unique directories automatically. The data can later be retrieved using the [Storage](./storage.md) interface.
103
+
`self.storage` provides access to the storage directory of the component (each component directy name is unique and managed automatically so you don't have to specify where the data is being stored). The data can later be retrieved using the [storage interfaces](./storage.md).
104
104
105
105
**Log**
106
106
107
-
`self.store.log` or `self.log` provides a standard logger interface that outputs to the console and a log file.
107
+
`self.storage.log` or `self.log` provides a standard logger interface that outputs to the console and a log file.
`self.store.record` or `self.record` provides an interface for tabular logging, that is, storing recurring data points at each iteration. The results become available as a table where each row represents each iteration.
116
+
`self.storage.record` or `self.record` provides an interface for tabular logging, that is, storing recurring data points at each iteration. The results become available as a table where each row represents each iteration.
117
117
118
118
```python
119
119
for iteration inrange(10):
@@ -129,27 +129,22 @@ for iteration in range(10):
129
129
130
130
If you use the `on_execute_iteration` event, iteration information and `record.save()` will be triggered automatically at the end of each iteration.
131
131
132
-
Sometimes it is useful to have multiple tabular loggers, for example to record training and validation performance separately. You can create custom record loggers using `self.store.get_record_writer(scope)` which returns a new instance of a record writer that you can use just like the main record writer.
132
+
Sometimes it is useful to have multiple tabular loggers, for example to record training and validation performance separately. You can create custom record loggers using `self.storage.get_record_writer(scope)` which returns a new instance of a record writer that you can use just like the main record writer.
133
133
134
-
**Store**
134
+
**Custom data**
135
135
136
-
You can use `self.store.write()` to write any other Python object, for example:
136
+
Any other data can be stored in the `data/` subdirectory.
137
137
138
-
```python
139
-
self.store.write('final_accuracy', [0.85, 0.92])
140
-
```
141
-
Note that to protect unintended data loss, overwriting will fail unless the ``overwrite`` argument is explicitly set.
142
-
143
-
For larger data structures, it can be more suitable to write data in specific file formats by appending a file extension, i.e.:
138
+
You can use `self.storage.write_data()` to write any other Python object, for example:
0 commit comments