diff --git a/.gitignore b/.gitignore index c50152d2b3..ab4724b681 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ nupic.egg-info/ nupic/*py_region.* temp/ docs/_build_html +/src/nupic/support/nupic-site.xml diff --git a/src/nupic/swarming/exp_generator/experimentDescriptionSchema.json b/src/nupic/swarming/exp_generator/experimentDescriptionSchema.json index 5956aedace..e52811ab56 100644 --- a/src/nupic/swarming/exp_generator/experimentDescriptionSchema.json +++ b/src/nupic/swarming/exp_generator/experimentDescriptionSchema.json @@ -54,7 +54,7 @@ "integer", "null" ], - "description": "Maximum number of models to evaluate. This replaces the older location of this specification from the job params. " + "description": "Maximum number of models to evaluate. This replaces the older location of this specification from the job params." }, "spPermuteDecrement": { "default": true, @@ -113,7 +113,7 @@ "description": "inferenceArgs -- arguments for the type of inference you want to use" }, "prediction": { - "description": " [DEPRECATED] Prediction optimization options; at least one MUST be enabled. NOTE: at this time, non-temporal and temporalpredictions are mutually-exclusive (RunPermutations cannot yetoptimize for both). This is deprecated. Used inferenceType instead", + "description": " [DEPRECATED] Prediction optimization options; at least one MUST be enabled. NOTE: at this time, non-temporal and temporal predictions are mutually-exclusive (RunPermutations cannot yet optimize for both). This is deprecated. Used inferenceType instead", "default": { "temporal": { "optimize": true @@ -177,7 +177,7 @@ "customErrorMetric": { "required": false, "type": "object", - "description": "Custom User definied Error metric that will be computed" + "description": "Custom User defined Error metric that will be computed" }, "spCoincInputPoolPct": { "default": 0.8, @@ -216,7 +216,7 @@ "description": "Flag to run baseline error metrics with the job for comparison" }, "metrics": { - "description": "Additional metrics to be generated, along with thedefault ones for the given inferenceType. Note: The specified metric should be compatible withe the giveninference", + "description": "Additional metrics to be generated, along with the default ones for the given inferenceType. Note: The specified metric should be compatible withe the given inference", "default": [], "items": { "required": true, @@ -267,7 +267,7 @@ "minLength": 1, "required": false, "type": "string", - "description": "[DEPRECATED] Name of field we're trying to predict. This is deprected. Used inferenceArgs.predictedField instead" + "description": "[DEPRECATED] Name of field we're trying to predict. This is deprecated. Used inferenceArgs.predictedField instead" }, "streamDef": { "minLength": 1, @@ -380,7 +380,7 @@ "space": { "required": false, "type": "string", - "description": "A way to customize which spaces (absolute, delta) are evaluted when runDelta is True. " + "description": "A way to customize which spaces (absolute, delta) are evaluated when runDelta is True." }, "maxValue": { "required": false, @@ -410,7 +410,7 @@ "encoderType": { "required": false, "type": "string", - "description": "Encoder type, for example 'ScalarEncoder, AdaptiveScalarEncoder, etc. " + "description": "Encoder type, for example 'ScalarEncoder, AdaptiveScalarEncoder, etc." } } }, diff --git a/src/nupic/swarming/exp_generator/experiment_generator.py b/src/nupic/swarming/exp_generator/experiment_generator.py index 0c9adf0c05..f0eb242540 100755 --- a/src/nupic/swarming/exp_generator/experiment_generator.py +++ b/src/nupic/swarming/exp_generator/experiment_generator.py @@ -1858,7 +1858,7 @@ def _generateMetricSpecs(options): def _generateExtraMetricSpecs(options): """Generates the non-default metrics specified by the expGenerator params """ - global _metricSpecSchema + _metricSpecSchema = {'properties': {}} results = [] for metric in options['metrics']: diff --git a/src/nupic/swarming/permutations_runner.py b/src/nupic/swarming/permutations_runner.py index cd17ca82f9..428b0a43cb 100644 --- a/src/nupic/swarming/permutations_runner.py +++ b/src/nupic/swarming/permutations_runner.py @@ -626,10 +626,12 @@ def _launchWorkers(self, cmdLine, numWorkers): self._workers = [] for i in range(numWorkers): - stdout = tempfile.TemporaryFile() - stderr = tempfile.TemporaryFile() + stdout = tempfile.NamedTemporaryFile(delete=False) + stderr = tempfile.NamedTemporaryFile(delete=False) p = subprocess.Popen(cmdLine, bufsize=1, env=os.environ, shell=True, stdin=None, stdout=stdout, stderr=stderr) + p._stderr_file = stderr + p._stdout_file = stdout self._workers.append(p) @@ -1456,7 +1458,9 @@ def __init__(self, nupicJobID, workers): status = cjdao.ClientJobsDAO.STATUS_RUNNING else: status = cjdao.ClientJobsDAO.STATUS_COMPLETED - + if retCode != 0: + with open(worker._stderr_file.name, 'r') as err: + _emit(Verbosity.WARNING, "Job %d failed with error: %s" % (jobInfo.jobId, err.read())) jobInfo = jobInfo._replace(status=status) _emit(Verbosity.DEBUG, "JobStatus: \n%s" % pprint.pformat(jobInfo,