Commit 1b451ea8 authored by Akshay G's avatar Akshay G

Initial push

parent d36e3c75
# Read_from_Kairos_Component
#Use the below script to convert .pt to onnx.
# Multipipeline Kairos Read Component for Batch Pipelines
## Pass in the configurations:
```python
# Import required libraries
import torch
import torchvision.models as models
# Use an existing model from Torchvision, note it
# will download this if not already on your computer (might take time)
model = create_cnn_model(models.resnet34, nc=5)
model.load_state_dict(torch.load("/content/best_resnet34.pth")["model"])
# Create some sample input in the shape this model expects
dummy_input = torch.randn(10, 3, 224, 224)
# # It's optional to label the input and output layers
# input_names = [ "actual_input_1" ] + [ "learned_%d" % i for i in range(16) ]
# output_names = [ "output1" ]
# Use the exporter from torch to convert to onnx
# model (that has the weights and net arch)
torch.onnx.export(model, dummy_input, "resnet34.onnx", verbose=True)
{
"kairosdb_url": "http://192.168.0.207:8080",
"metric_name": "ilens.live_data.raw",
"tag_hierarchy": "site_153$dept_1006$line_220$equipment_1258$tag_5790",
"start_absolute": "01/10/2020 00:00:00",
"end_absolute": "30/11/2020 00:00:00",
"shared_volume": "/mnt"
}
```
\ No newline at end of file
......@@ -6,3 +6,11 @@ NoneType: None
2021-02-12 15:18:19,046 INFO ReadFromKairos Querying Karios DB...
2021-02-12 15:18:19,121 INFO ReadFromKairos Receiving data...
2021-02-12 15:18:19,148 INFO ReadFromKairos Data successfully written to --> /mnt/data.csv
2021-02-12 15:27:18,366 INFO ReadFromKairos Parsing user requests
2021-02-12 15:27:18,367 INFO ReadFromKairos Querying Karios DB...
2021-02-12 15:27:18,467 INFO ReadFromKairos Receiving data...
2021-02-12 15:27:18,488 INFO ReadFromKairos Data successfully written to --> /mnt/data.csv
2021-02-12 15:44:02,769 INFO ReadFromKairos Parsing user requests
2021-02-12 15:44:02,770 INFO ReadFromKairos Querying Karios DB...
2021-02-12 15:44:02,851 INFO ReadFromKairos Receiving data...
2021-02-12 15:44:02,893 INFO ReadFromKairos Data successfully written to --> /mnt/data.csv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment