Patch syntax for test_cgpm_loom.
@@ -25,8 +25,8 @@ dha_csv = os.path.join(root, 'dha.csv')
satellites_csv = os.path.join(root, 'satellites.csv')
'''
-Integration test for using `ANALYZE <metamodel> FOR <k> ITERATION WAIT(loom);`
-on real-world datesets: `dha.csv` and `satellites.csv`.
+Integration test for using `ANALYZE <generator> FOR <k> ITERATION (loom); on
+dha.csv and satellites.csv.
'''
def loom_analyze(csv_filename):
@@ -40,34 +40,34 @@ def loom_analyze(csv_filename):
bdb.execute('CREATE TABLE t FROM \'%s\'' % (csv_filename))
bdb.execute('''
CREATE POPULATION p FOR t WITH SCHEMA(
- GUESS STATTYPES FOR (*);
+ GUESS STATTYPES OF (*);
)
''')
- bdb.execute('CREATE METAMODEL m FOR p WITH BASELINE crosscat;')
+ bdb.execute('CREATE GENERATOR m FOR p;')
bdb.execute('INITIALIZE 10 MODELS FOR m')
- bdb.execute('ANALYZE m FOR 20 ITERATIONS WAIT (loom);')
+ bdb.execute('ANALYZE m FOR 2 ITERATIONS (loom);')
# targeted analysis for Loom not supported.
with pytest.raises(BQLError):
bdb.execute('''
- ANALYZE m FOR 1 ITERATION WAIT (loom; variables TTL_MDCR_SPND);
+ ANALYZE m FOR 1 ITERATION (loom; variables TTL_MDCR_SPND);
''')
# progress for Loom not supported (error from cgpm).
with pytest.raises(ValueError):
bdb.execute('''
- ANALYZE m FOR 1 ITERATION WAIT (loom; quiet);
+ ANALYZE m FOR 1 ITERATION (loom; quiet);
''')
# timing for Loom not supported (error from cgpm).
with pytest.raises(ValueError):
bdb.execute('''
- ANALYZE m FOR 1 SECONDS WAIT (loom);
+ ANALYZE m FOR 1 SECONDS (loom);
''')
# Run a BQL query.
bdb.execute('''
ESTIMATE DEPENDENCE PROBABILITY FROM PAIRWISE VARIABLES OF p;
''')
# Make sure we can run lovecat afterwards.
- bdb.execute('ANALYZE m FOR 2 ITERATION WAIT (optimized);')
+ bdb.execute('ANALYZE m FOR 2 ITERATION (optimized);')
def test_loom_dha__ci_slow():
loom_analyze(dha_csv)
