Integration Script
Add a dataset instance prior to building a model
Last updated
Was this helpful?
Add a dataset instance prior to building a model
Last updated
Was this helpful?
Within the Tensorleap platform, a contains the and properties for reading and encoding the data that will later be used when training, evaluating and analyzing a model.
Additionally, store sensitive information and credentials securely with .
In order for the Tensorleap platform to read and encode the data, it must be supplied with an Integration Script. The DatasetScript is stored within the Dataset Instance, at which the Dataset Block points and used as input/ground truth encoders.
The Dataset Script has the following structure:
- prepares the data state for fetching into the neural network.
- read and prepare each input for your neural networks.
- read and prepare each output.
- add extra data to each sample for future analysis.
(optional) - custom interpretation of tensors for analysis and visualizations.
- assign meaningful data to the prediction node(s).
- bind the functions above for Tensorleap to register the dataset structure.
The runs once, and returns a list of data objects of type PreprocessResponse that correspond to the training, validation, test dataset slices.
The returned object is then passed to the , and , whose function is to read and prepare the data for a single sample with index idx
passed as an argument.
Finally, the , and , must be bounded to the Tensorleap platform. This is done by the object with , , , and .
Full examples can be found at the Dataset Integration section of the following guides:
Persistent storage is data storage that persists across different instances and reboots of job processes. In some cases there is a need to cache data. For example, after preprocessing or for very large files.
Tensorleap's cloud persistent storage can be accessed via writing and reading to the /nfs/
path:
NOTE: Mounted storage is set up only to serve as a cache, and it is regularly cleaned.
In case you are running an on-premise solution, you can access your chosen mounted storage.
The script can be integrated into the using either the UI or CLI.
In addition, there is an option add custom tensor for more informative visualizations and analysis. The then sets these functions by using .
Tensorleap allows you to store sensitive information as a Secret in a secure location called .
The Dataset Script has access to the Secret set for the . The secret is stored at the AUTH_SECRET
environment variable, and can be accessed simply by using: