Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
from . import predict


_TF_GS_URL = 'gs://cloud-datalab/deploy/tf/tensorflow-0.12.0rc1-cp27-none-linux_x86_64.whl'


def _default_project():
import datalab.context
context = datalab.context.Context.default()
Expand Down Expand Up @@ -171,7 +168,7 @@ def cloud_preprocess(output_dir, dataset, project_id=None):

print('Starting cloud preprocessing.')
print('Track BigQuery status at')
print('https://bigquery.cloud.google.com/queries/%s' % datalab_project_id())
print('https://bigquery.cloud.google.com/queries/%s' % _default_project())
preprocess.cloud_preprocess.main(args)
print('Cloud preprocessing done.')
finally:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def make_prediction_pipeline(pipeline, args):
predicted_values, errors = (
pipeline
| 'Read CSV Files'
>> beam.io.ReadFromText(args.predict_data,
>> beam.io.ReadFromText(str(args.predict_data), # DF bug: DF does not work with unicode strings
strip_trailing_newlines=True)
| 'Batch Input'
>> beam.ParDo(EmitAsBatchDoFn(args.batch_size))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _copy_all(src_files, dest_dir):
for src_file in src_files:
file_name = os.path.basename(src_file)
new_file_location = os.path.join(dest_dir, file_name)
file_io.copy(src_file, new_file_location)
file_io.copy(src_file, new_file_location, overwrite=True)


def _recursive_copy(src_dir, dest_dir):
Expand All @@ -83,7 +83,7 @@ def _recursive_copy(src_dir, dest_dir):
if file_io.is_directory(old_path):
_recursive_copy(old_path, new_path)
else:
file_io.copy(old_path, new_path)
file_io.copy(old_path, new_path, overwrite=True)

def serving_from_csv_input(train_config, args, keep_target):
"""Read the input features from a placeholder csv string tensor."""
Expand Down