Skip to content

Commit 0d38502

Browse files
authored
Remove train_data artifact tests (#596)
1 parent 6599474 commit 0d38502

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

client/verta/tests/test_artifacts.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -351,25 +351,6 @@ def test_requirements(self, experiment_run):
351351

352352
assert six.ensure_binary('\n'.join(new_requirements)) in experiment_run.get_artifact("requirements.txt").read()
353353

354-
def test_training_data(self, experiment_run):
355-
pd = pytest.importorskip("pandas")
356-
357-
X = pd.DataFrame([[1, 1, 1],
358-
[1, 1, 1],
359-
[1, 1, 1]],
360-
columns=["1_1", "1_2", "1_3"])
361-
y = pd.Series([1, 1, 1], name="1")
362-
new_X = pd.DataFrame([[2, 2, 2],
363-
[2, 2, 2],
364-
[2, 2, 2]],
365-
columns=["2_1", "2_2", "2_3"])
366-
new_y = pd.Series([2, 2, 2], name="2")
367-
368-
experiment_run.log_training_data(X, y)
369-
experiment_run.log_training_data(new_X, new_y, overwrite=True)
370-
371-
assert pd.read_csv(experiment_run.get_artifact("train_data")).equals(new_X.join(new_y))
372-
373354
def test_setup_script(self, experiment_run):
374355
setup_script = "import verta"
375356
new_setup_script = "import cloudpickle"

client/verta/tests/test_deployment.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,6 @@ def test_reqs_on_disk(self, experiment_run, model_for_deployment, output_path):
8181
with open(requirements_file, 'r') as f:
8282
assert set(f.read().split()) <= set(retrieved_requirements.split())
8383

84-
def test_with_data(self, experiment_run, model_for_deployment):
85-
"""`train_features` and `train_targets` are joined into a single CSV"""
86-
experiment_run.log_model_for_deployment(**model_for_deployment)
87-
88-
data_csv = experiment_run.get_artifact("train_data").read()
89-
90-
X_train = model_for_deployment['train_features']
91-
y_train = model_for_deployment['train_targets']
92-
assert X_train.join(y_train).to_csv(index=False) == six.ensure_str(data_csv)
93-
9484

9585
@pytest.mark.not_oss
9686
class TestLogModel:
@@ -563,22 +553,18 @@ def test_series(self, experiment_run, model_for_deployment):
563553
X_train = model_for_deployment['train_features']
564554
y_train = model_for_deployment['train_targets']
565555

556+
# no errors
566557
experiment_run.log_training_data(X_train, y_train)
567558

568-
data_csv = experiment_run.get_artifact("train_data").read()
569-
assert X_train.join(y_train).to_csv(index=False) == six.ensure_str(data_csv)
570-
571559
def test_dataframe(self, experiment_run, model_for_deployment):
572560
X_train = model_for_deployment['train_features']
573561
y_train = model_for_deployment['train_targets']
574562

575563
y_train = y_train.to_frame()
576564

565+
# no errors
577566
experiment_run.log_training_data(X_train, y_train)
578567

579-
data_csv = experiment_run.get_artifact("train_data").read()
580-
assert X_train.join(y_train).to_csv(index=False) == six.ensure_str(data_csv)
581-
582568

583569
class TestHistogram:
584570
@staticmethod

0 commit comments

Comments
 (0)