Skip to content
Open
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
4 changes: 3 additions & 1 deletion ludwig/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def predict(

# preprocessing
logger.debug("Preprocessing")
dataset, _ = preprocess_for_prediction( # TODO (Connor): Refactor to use self.config_obj
dataset, _, postproc_dataset = preprocess_for_prediction( # TODO (Connor): Refactor to use self.config_obj
self.config_obj.to_dict(),
dataset=dataset,
training_set_metadata=self.training_set_metadata,
Expand Down Expand Up @@ -933,6 +933,8 @@ def predict(
makedirs(output_directory, exist_ok=True)

logger.debug("Postprocessing")
if postproc_dataset is not None:
predictions = self.backend.df_engine.df_lib.concat([predictions, postproc_dataset], axis=1)
postproc_predictions = postprocess(
predictions,
self.model.output_features,
Expand Down
4 changes: 3 additions & 1 deletion ludwig/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
INFER_IMAGE_MAX_HEIGHT = "infer_image_max_height"
INFER_IMAGE_MAX_WIDTH = "infer_image_max_width"
INFER_IMAGE_SAMPLE_SIZE = "infer_image_sample_size"
NUM_CLASSES = "num_classes"
INFER_IMAGE_NUM_CLASSES = "infer_image_num_classes"
IMAGE_MAX_CLASSES = 128
NUM_CHANNELS = "num_channels"
REQUIRES_EQUAL_DIMENSIONS = "requires_equal_dimensions"
USE_PRETRAINED = "use_pretrained"
TRAINABLE = "trainable"
CLASS_WEIGHTS = "class_weights"
DICE = "dice"
LOSS = "loss"
ROC_AUC = "roc_auc"
EVAL_LOSS = "eval_loss"
Expand Down
Loading