Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
Read_from_Kairos_Component
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
Read_from_Kairos_Component
Commits
1b451ea8
Commit
1b451ea8
authored
Feb 12, 2021
by
Akshay G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial push
parent
d36e3c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
README.md
README.md
+11
-23
logs/ReadFromKairos.log
logs/ReadFromKairos.log
+8
-0
No files found.
README.md
View file @
1b451ea8
# 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
logs/ReadFromKairos.log
View file @
1b451ea8
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment