Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Maneuver Detection
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OST
ML
Maneuver Detection
Commits
6bfb8962
Commit
6bfb8962
authored
4 months ago
by
Andri Joos
Browse files
Options
Downloads
Patches
Plain Diff
fix memory usage
parent
3b742078
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/preprocessing/transform_dataset.py
+2
-1
2 additions, 1 deletion
app/preprocessing/transform_dataset.py
with
2 additions
and
1 deletion
app/preprocessing/transform_dataset.py
+
2
−
1
View file @
6bfb8962
...
...
@@ -16,7 +16,7 @@ from .file_type import FileType
from
.json_maneuver_data
import
JsonManeuverData
DOUBLE_PATTERN
=
r
'
Double(\d+)
'
MAX_DATASET_MEMORY_SIZE
=
7408802660
MAX_DATASET_MEMORY_SIZE
=
16602933278
MIN_JOBS
=
2
VARIANCE_THRESHOLD
=
0.01
CORRELATION_THRESHOLD
=
0.9
...
...
@@ -223,6 +223,7 @@ def transform_dataset(dataset_dir: Path, out_dir: Path, state_description_file:
print
(
'
Your system may run out of memory. In this case, don
\'
t use parallelization.
'
)
n_jobs
=
max
(
MIN_JOBS
,
min
(
n_jobs_based_on_cpu
,
n_jobs_based_on_memory
))
print
(
f
'
Using
{
n_jobs
}
jobs
'
)
Parallel
(
n_jobs
=
n_jobs
)(
delayed
(
_transform_parquet_file_function_with_args
)(
parquet_file
,
json_file
)
for
parquet_file
,
json_file
in
file_tuples
)
else
:
for
parquet_file
,
json_file
in
file_tuples
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment