Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spinncer update #2

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to match database changes in the toolchain
  • Loading branch information
andrewgait committed Mar 6, 2023
commit 8fc2308310ba84f95749fcfbe5eb184ed7bda8f0
11 changes: 4 additions & 7 deletions spinncer/provenance_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,9 @@ def save_provenance_to_file_from_database(in_file, sim_name):
metadata['machine'] = SpynnakerDataView.get_machine()
metadata['structured_provenance_filename'] = in_file

# how do we loop over all the placements in the database at this point?
# can we get router_provenance from the database?
# placements is 0... so is this router(0, 0)?
pr = ProvenanceReader(os.path.join(
SpynnakerDataView().get_provenance_dir_path(),
"provenance.sqlite3"))
SpynnakerDataView().get_run_dir_path(),
"data.sqlite3"))

cores_list = pr.get_cores_with_provenance()

Expand Down Expand Up @@ -218,7 +215,7 @@ def get_provenance_for_core(pr, x, y, p):
for column_to_get in columns_to_get:
query = """
SELECT the_value
FROM core_provenance
FROM core_provenance_view
WHERE x = ? AND y = ? AND p = ? AND description = ?
"""
# result = pr.run_query(query, [x, y, p, column_to_get])
Expand All @@ -233,7 +230,7 @@ def get_provenance_for_core(pr, x, y, p):
def get_core_provenance_value(pr, x, y, p, description):
query = """
SELECT the_value
FROM core_provenance
FROM core_provenance_view
WHERE x = ? AND y = ? AND p = ? AND description = ?
"""
return pr.run_query(query, [x, y, p, description])
Expand Down