def test_log_dataframe_ref(self):
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    model_file = (tempfile.mkdtemp() + '/df.pkl')
    self.touch(model_file)
    with patch('polyaxon.tracking.run.Run.log_artifact_ref') as log_artifact_ref:
        self.run.log_artifact(name='dataframe', path=model_file, kind=V1ArtifactKind.DATAFRAME, versioned=False)
    assert (log_artifact_ref.call_count == 1)
    self.event_logger.flush()
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    asset_file = self.run.get_outputs_path(rel_path='df.pkl')
    assert (os.path.exists(asset_file) is True)
def test_log_dataframe_ref(self):
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    model_file = (tempfile.mkdtemp() + '/df.pkl')
    self.touch(model_file)
    with patch('polyaxon.tracking.run.Run.log_artifact_ref') as log_artifact_ref:
        self.run.log_artifact(name='dataframe', path=model_file, kind=V1ArtifactKind.DATAFRAME, versioned=False)
    assert (log_artifact_ref.call_count == 1)
    self.event_logger.flush()
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.DATAFRAME)) is False)
    asset_file = self.run.get_outputs_path(rel_path='df.pkl')
    assert (os.path.exists(asset_file) is True)