def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: type(self).server_type = get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) self.s.table.droptable('datasources.cars_single', caslib=self.srcLib, _messagelevel='none') r = tm.load_data(self.s, 'datasources/cars_single.sashdat', self.server_type) self.table = r['casTable']
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: # Set once per class and have every test use it. No need to change between tests. type(self).server_type = tm.get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) filename = os.path.join(os.path.dirname(__file__), 'datasources', 'ImageData.sashdat') r = tm.load_data(self.s, filename, self.server_type) self.tablename = r['tableName'] self.assertNotEqual(self.tablename, None) self.table = ImageTable.from_table(r['casTable'])
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: # Set once per class and have every test use it. No need to change between tests. type(self).server_type = tm.get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) r = tm.load_data(self.s, 'datasources/cars_single.sashdat', self.server_type) self.tablename = r['tableName'] self.assertNotEqual(self.tablename, None) self.table = r['casTable']
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS() self.server_type = tm.get_cas_host_type(self.s) self.server_sep = "\\" if self.server_type.startswith("lin") or self.server_type.startswith( "osx"): self.server_sep = "/" if "DLPY_DATA_DIR" in os.environ: self.data_dir = os.environ.get("DLPY_DATA_DIR") if self.data_dir.endswith(self.server_sep): self.data_dir = self.data_dir[:-1] self.data_dir += self.server_sep if "DLPY_DATA_DIR_LOCAL" in os.environ: self.local_dir = os.environ.get("DLPY_DATA_DIR_LOCAL")
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.cas.trace_actions = False swat.options.cas.trace_ui_actions = False swat.options.interactive_mode = False user, passwd = tm.get_user_pass() self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: type(self).server_type = tm.get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) r = tm.load_data(self.s, 'datasources/cars_single.sashdat', self.server_type) self.tablename = r['tableName'] self.assertNotEqual(self.tablename, None) self.table = r['casTable']
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: type(self).server_type = get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) self.df = pd.DataFrame( [[1, 2, 3, 4, 5, 'a', 'b', 'c'], [6, np.nan, 8, 9, np.nan, 'd', 'e', 'f'], [11, np.nan, 13, 14, np.nan, np.nan, 'h', 'i'], [16, 17, 18, np.nan, 20, 'j', np.nan, 'l'], [np.nan, 22, 23, 24, np.nan, np.nan, 'n', 'o']], columns=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']) self.table = self.s.upload_frame(self.df)
def setUpClass(cls): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False cls.s = swat.CAS() cls.server_type = tm.get_cas_host_type(cls.s) cls.server_sep = '\\' if cls.server_type.startswith("lin") or cls.server_type.startswith("osx"): cls.server_sep = '/' if 'DLPY_DATA_DIR' in os.environ: cls.data_dir = os.environ.get('DLPY_DATA_DIR') if cls.data_dir.endswith(cls.server_sep): cls.data_dir = cls.data_dir[:-1] cls.data_dir += cls.server_sep if 'DLPY_DATA_DIR_LOCAL' in os.environ: cls.data_dir_local = os.environ.get('DLPY_DATA_DIR_LOCAL') if cls.data_dir_local.endswith(cls.server_sep): cls.data_dir_local = cls.data_dir_local[:-1] cls.data_dir_local += cls.server_sep
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS() self.server_type = tm.get_cas_host_type(self.s) self.server_sep = '\\' if self.server_type.startswith("lin") or self.server_type.startswith("osx"): self.server_sep = '/' if 'DLPY_DATA_DIR' in os.environ: self.data_dir = os.environ.get('DLPY_DATA_DIR') if self.data_dir.endswith(self.server_sep): self.data_dir = self.data_dir[:-1] self.data_dir += self.server_sep if 'DLPY_DATA_DIR_LOCAL' in os.environ: self.data_dir_local = os.environ.get('DLPY_DATA_DIR_LOCAL') if self.data_dir_local.endswith(self.server_sep): self.data_dir_local = self.data_dir_local[:-1] self.data_dir_local += self.server_sep
def setUpClass(cls): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False cls.s = swat.CAS() cls.server_type = tm.get_cas_host_type(cls.s) cls.server_sep = '\\' if cls.server_type.startswith("lin") or cls.server_type.startswith("osx"): cls.server_sep = '/' if 'DLPY_DATA_DIR' in os.environ: cls.data_dir = os.environ.get('DLPY_DATA_DIR') if cls.data_dir.endswith(cls.server_sep): cls.data_dir = cls.data_dir[:-1] cls.data_dir += cls.server_sep filename = os.path.join('datasources', 'sample_syntax_for_test.json') project_path = os.path.dirname(os.path.abspath(__file__)) full_filename = os.path.join(project_path, filename) with open(full_filename) as f: cls.sample_syntax = json.load(f)
def setUp(self): swat.reset_option() swat.options.cas.print_messages = False swat.options.interactive_mode = False self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) if type(self).server_type is None: # Set once per class and have every test use it. No need to change between tests. type(self).server_type = tm.get_cas_host_type(self.s) self.srcLib = tm.get_casout_lib(self.server_type) # Define the model model = Sequential(self.s, model_table='test_model') model.add(InputLayer(3, 224, 224, offsets=(0, 0, 0))) model.add(Conv2d(8, 7)) model.add(Pooling(2)) model.add(Conv2d(8, 7)) model.add(Pooling(2)) model.add(Dense(16)) model.add(OutputLayer(act='softmax', n=2)) self.model = model