fracapuano commited on
Commit
42a0c69
1 Parent(s): 7f05690

fix: debug to take into account data chunking

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,12 +1,13 @@
1
  from src.search.ga import GeneticSearch
2
  from src.hw_nats_fast_interface import HW_NATS_FastInterface
3
- from src.utils import DEVICES, DATASETS
4
  import streamlit as st
5
  import numpy as np
6
  import pandas as pd
7
  import matplotlib.pyplot as plt
8
  import plotly.graph_objects as go
9
  from collections import OrderedDict
 
10
  st.set_page_config(layout="wide")
11
 
12
  TIME_TO_SCORE_EACH_ARCHITECTURE=0.15
@@ -98,8 +99,15 @@ def main():
98
  # best architecture index
99
  best_arch_idx = 9930
100
 
 
 
 
 
 
 
 
101
  # Trigger the search and plot NebulOS Architecture
102
- searchspace_interface = HW_NATS_FastInterface(device=device, dataset=dataset)
103
  search = GeneticSearch(
104
  searchspace=searchspace_interface,
105
  fitness_weights=np.array([performance_weight, hardware_weight])
 
1
  from src.search.ga import GeneticSearch
2
  from src.hw_nats_fast_interface import HW_NATS_FastInterface
3
+ from src.utils import DEVICES, DATASETS, union_of_dicts
4
  import streamlit as st
5
  import numpy as np
6
  import pandas as pd
7
  import matplotlib.pyplot as plt
8
  import plotly.graph_objects as go
9
  from collections import OrderedDict
10
+ import json
11
  st.set_page_config(layout="wide")
12
 
13
  TIME_TO_SCORE_EACH_ARCHITECTURE=0.15
 
99
  # best architecture index
100
  best_arch_idx = 9930
101
 
102
+ nebulos_chunks = []
103
+ for i in range(4): # the number of chunks is 4 in this case
104
+ with open(f"data/nebuloss_{i+1}.json", "r") as f:
105
+ nebulos_chunks.append(json.load(f))
106
+
107
+ searchspace_dict = union_of_dicts(nebulos_chunks)
108
+
109
  # Trigger the search and plot NebulOS Architecture
110
+ searchspace_interface = HW_NATS_FastInterface(datapath=searchspace_dict, device=device, dataset=dataset)
111
  search = GeneticSearch(
112
  searchspace=searchspace_interface,
113
  fitness_weights=np.array([performance_weight, hardware_weight])