mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[bin] Fix all the scripts that had errors
- `meshroom_submit`: the submission to the render farm is now effective (the script did not work at all). - `meshroom_status`: the `--toNode` option did not work and caused errors. - `meshroom_statistics`: some adjustments needed to be made for the script to run with Python3 instead of Python2, an issue in the core/stats.py file led the `statistics` file to never being read correctly, and the calls to the Matplotlib API were outdated.
This commit is contained in:
parent
c63dbc2588
commit
be4c02f515
3 changed files with 6 additions and 7 deletions
|
@ -3,7 +3,8 @@ import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
from collections import Iterable, defaultdict
|
from collections import defaultdict
|
||||||
|
from collections.abc import Iterable
|
||||||
|
|
||||||
from meshroom.core import graph as pg
|
from meshroom.core import graph as pg
|
||||||
|
|
||||||
|
@ -15,11 +16,11 @@ def addPlots(curves, title, fileObj):
|
||||||
import matplotlib.pyplot as plt, mpld3
|
import matplotlib.pyplot as plt, mpld3
|
||||||
|
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
ax = fig.add_subplot(111, axisbg='#EEEEEE')
|
ax = fig.add_subplot(111, facecolor='#EEEEEE')
|
||||||
ax.grid(color='white', linestyle='solid')
|
ax.grid(color='white', linestyle='solid')
|
||||||
|
|
||||||
for curveName, curve in curves:
|
for curveName, curve in curves:
|
||||||
if not isinstance(curve[0], pg.basestring):
|
if not isinstance(curve[0], str):
|
||||||
ax.plot(curve, label=curveName)
|
ax.plot(curve, label=curveName)
|
||||||
ax.legend()
|
ax.legend()
|
||||||
# plt.ylim(0, 100)
|
# plt.ylim(0, 100)
|
||||||
|
|
|
@ -42,11 +42,10 @@ if args.node:
|
||||||
else:
|
else:
|
||||||
startNodes = None
|
startNodes = None
|
||||||
if args.toNode:
|
if args.toNode:
|
||||||
startNodes = [graph.nodes(args.toNode)]
|
startNodes = [graph.findNode(args.toNode)]
|
||||||
nodes, edges = graph.dfsOnFinish(startNodes=startNodes)
|
nodes, edges = graph.dfsOnFinish(startNodes=startNodes)
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
for chunk in node.chunks:
|
for chunk in node.chunks:
|
||||||
print('{}: {}'.format(chunk.name, chunk.status.status.name))
|
print('{}: {}'.format(chunk.name, chunk.status.status.name))
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
pprint([n.status.toDict() for n in nodes])
|
pprint([n.status.toDict() for n in nodes])
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ parser.add_argument('meshroomFile', metavar='MESHROOMFILE.mg', type=str,
|
||||||
help='Filepath to a graph file.')
|
help='Filepath to a graph file.')
|
||||||
parser.add_argument('--toNode', metavar='NODE_NAME', type=str,
|
parser.add_argument('--toNode', metavar='NODE_NAME', type=str,
|
||||||
help='Process the node with its dependencies.')
|
help='Process the node with its dependencies.')
|
||||||
|
|
||||||
parser.add_argument('--submitter',
|
parser.add_argument('--submitter',
|
||||||
type=str,
|
type=str,
|
||||||
default='SimpleFarm',
|
default='SimpleFarm',
|
||||||
|
@ -23,4 +22,4 @@ parser.add_argument("--submitLabel",
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
meshroom.core.graph.submit(args.save, args.submitter, toNode=toNodes, submitLabel=args.submitLabel)
|
meshroom.core.graph.submit(args.meshroomFile, args.submitter, toNode=args.toNode, submitLabel=args.submitLabel)
|
||||||
|
|
Loading…
Add table
Reference in a new issue