Skip to content
Snippets Groups Projects
Commit 521dbcae authored by Cassandra Grzonkowski's avatar Cassandra Grzonkowski
Browse files

find bottleneck

parent fe71ac5a
No related branches found
No related tags found
1 merge request!1Instant spectograms
......@@ -7,9 +7,8 @@
#SBATCH --cpus-per-task=1 # use 1 thread per taks
#SBATCH -N 1 # request slots on 1 node
#SBATCH --partition=informatik-mind # run on one of our DGX servers
#SBATCH --output=/scratch/grzonkow/model_new_chart_processing.txt # capture output
#SBATCH --error=/scratch/grzonkow/err_model_new_chart_processing.txt # and error streams
#SBATCH --gpus=1 # request 1 GPU
#SBATCH --output=/scratch/grzonkow/model_0102.txt # capture output
#SBATCH --error=/scratch/grzonkow/err_0102.txt # and error streams
#SBATCH --gpu_cmode=shared # Set the GPU into shared mode, so that multiple processes can run on it
......
......@@ -135,7 +135,12 @@ def get_paths_diff_charts(song_dirs, indexed_vocabulary, device):
difficulties = []
# sample notes over time, return list of NoteData and [] if empy (for now)
converted_charts = []
for chart in charts:
if idx > 2500:
print(
f"File: {item}, Number_charts: {len(charts)}, Song: {idx}, Processed charts: {num_charts}, "
f"Elapsed time: {elapsed_second_step}, Time: {now}")
for i, chart in enumerate(charts):
num_charts += 1
notes_per_time = process_chart(opened_file, sm_file, chart, indexed_vocabulary, device)
difficulty = chart.meter
......@@ -143,6 +148,10 @@ def get_paths_diff_charts(song_dirs, indexed_vocabulary, device):
if max_len_charts < len(notes_per_time):
max_len_charts = len(notes_per_time)
converted_charts.append(notes_per_time)
if idx > 2500:
print(
f"File: {item}, Chart: {i}, "
f"Elapsed time: {elapsed_second_step}, Time: {now}")
all_difficulties.extend(difficulties)
all_charts.extend(converted_charts)
assert (len(converted_charts) == len(difficulties))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment