Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Lambert
swh-graph
Commits
20eb9979
Commit
20eb9979
authored
2 years ago
by
vlorentz
Browse files
Options
Downloads
Patches
Plain Diff
TopoSort: better progress bar
parent
281a86d9
No related branches found
Branches containing commit
Tags
v6.3.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/graph/luigi/misc_datasets.py
+13
-1
13 additions, 1 deletion
swh/graph/luigi/misc_datasets.py
with
13 additions
and
1 deletion
swh/graph/luigi/misc_datasets.py
+
13
−
1
View file @
20eb9979
...
...
@@ -74,11 +74,23 @@ class TopoSort(luigi.Task):
if
invalid_object_types
:
raise
ValueError
(
f
"
Invalid object types:
{
invalid_object_types
}
"
)
class_name
=
"
org.softwareheritage.graph.utils.TopoSort
"
node_stats
=
(
self
.
local_graph_path
/
f
"
{
self
.
graph_name
}
.nodes.stats.txt
"
).
read_text
()
nb_nodes_per_type
=
dict
(
line
.
split
()
for
line
in
node_stats
.
split
(
"
\n
"
)
if
line
)
nb_nodes
=
sum
(
int
(
nb_nodes_per_type
[
type_
])
for
type_
in
self
.
object_types
.
split
(
"
,
"
)
)
nb_lines
=
nb_nodes
+
1
# CSV header
# TODO: pass max_ram to run_script() correctly so it can pass it to
# check_config(), instead of hardcoding it on the command line here
script
=
f
"""
java -Xmx
{
self
.
max_ram
}
{
class_name
}
'
{
self
.
local_graph_path
}
/
{
self
.
graph_name
}
'
'
{
self
.
algorithm
}
'
'
{
self
.
direction
}
'
'
{
self
.
object_types
}
'
\
| pv --line-mode --wait
\
| pv --line-mode --wait
--size
'
{
nb_lines
}
'
\
| zstdmt -19
"""
# noqa
run_script
(
script
,
Path
(
self
.
output
().
path
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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