Skip to content
Snippets Groups Projects
Commit a1157854 authored by dh00601's avatar dh00601
Browse files

fixing bug of "now" not being a class method anymore

parent 09212a21
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,10 @@ import glob
import json
import os
from binarycpython.utils.functions import (
now,
)
from binarycpython.utils.population_extensions._slurm import slurm
from binarycpython.utils.population_extensions._condor import condor
......@@ -193,7 +197,7 @@ class HPC(condor, slurm):
and their .saved equivalents also exist
"""
print("HPC check if we can join at {}".format(self.now()))
print("HPC check if we can join at {}".format(now()))
if self.grid_options["HPC_force_join"] == 0 and os.path.exists(joiningfile):
if vb:
......
......@@ -26,6 +26,7 @@ from binarycpython.utils.dicts import (
)
from binarycpython.utils.functions import (
verbose_print,
now,
)
......@@ -110,7 +111,7 @@ class dataIO:
# add datestamp
population_object.grid_ensemble_results["metadata"][
"save_population_time"
] = self.now()
] = now()
# add extra metadata
population_object.add_system_metadata()
......
......@@ -23,6 +23,10 @@ import sys
from binarycpython.utils.custom_logging_functions import temp_dir
from binarycpython.utils.functions import (
now,
)
_MOE2017_VERBOSITY_LEVEL = 5
_MOE2017_VERBOSITY_INTERPOLATOR_LEVEL = 6
_MOE2017_VERBOSITY_INTERPOLATOR_EXTRA_LEVEL = 7
......@@ -83,7 +87,7 @@ class grid_options_defaults:
"original_command_line": os.getenv("BINARY_C_PYTHON_ORIGINAL_CMD_LINE"),
"working_diretory": os.getcwd(),
"original_working_diretory": os.getenv("BINARY_C_PYTHON_ORIGINAL_WD"),
"start_time": self.now(),
"start_time": now(),
"original_submission_time": os.getenv(
"BINARY_C_PYTHON_ORIGINAL_SUBMISSION_TIME"
),
......
......@@ -15,6 +15,9 @@ from binarycpython.utils.dicts import (
from binarycpython.utils.ensemble import (
binaryc_json_serializer,
)
from binarycpython.utils.functions import (
now,
)
class metadata:
......@@ -39,7 +42,7 @@ class metadata:
self.grid_ensemble_results["metadata"] = {}
# add date
self.grid_ensemble_results["metadata"]["date"] = self.now()
self.grid_ensemble_results["metadata"]["date"] = now()
# add platform and build information
self.grid_ensemble_results["metadata"]["platform"] = platform.platform()
......
......@@ -20,7 +20,7 @@ import numpy as np
import cachetools
import diskcache
from binarycpython.utils.grid import Population
# from binarycpython.utils.grid import Population
import py_rinterpolate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment