mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: ## TLDR Support using NaN default value for missing dense features in RawInputProcessor for *DPER2*. In preparation for subsequent support for null flag features in *compute meta*. For train_eval this is already supported in DPER3 and we do not plan to support this in DPER2 train eval. ## Overview Intern project plan to support adding dense flags for missing feature values instead of replacing with zero. Project plan : https://docs.google.com/document/d/1OsPUTjpJycwxWLCue3Tnb1mx0uDC_2KKWvC1Rwpo2NI/edit?usp=sharing ## Code paths: See https://fb.quip.com/eFXUA0tbDmNw for the call stack for all affected code paths. Test Plan: # A. DPER3 blob value inspection ## 1. Build local bento kernel in fbcode folder `buck build mode/dev-nosan //bento/kernels:bento_kernel_ads_ranking` ## 2. Use kernel `ads_ranking (local)` to print dense feature blob values n280239 ## 2.1 Try `default_dense_value = "0.0"` (default) ``` preproc_6/feature_preproc_6/dper_feature_processor_7/raw_input_proc_7/float_feature_sparse_to_dense_7/float_features [[0. ] [0. ] [0. ] [0. ] [0. ] [0. ] [0. ] [1. ] [1.7857143] [1.7777778] [1. ] [0. ] [0.5625 ] [0. ] [0. ] [0.8 ] [0. ] [1. ] [0.56 ] [0. ]] ``` ## 2.2 Try `default_dense_value = "123"` ``` preproc_2/feature_preproc_2/dper_feature_processor_3/raw_input_proc_3/float_feature_sparse_to_dense_3/float_features [[123. ] [123. ] [123. ] [123. ] [123. ] [123. ] [123. ] [ 1. ] [ 1.7857143] [ 1.7777778] [ 1. ] [123. ] [ 0.5625 ] [123. ] [123. ] [ 0.8 ] [123. ] [ 1. ] [ 0.56 ] [123. ]] ``` ## 2.3 Try `default_dense_value = float("nan")` ``` RuntimeError: [enforce fail at enforce_finite_op.h:40] std::isfinite(input_data[i]). Index 0 is not finite (e.g., NaN, Inf): -nan (Error from operator: input: "unary_4/logistic_regression_loss_4/average_loss_4/average_loss" name: "" type: "EnforceFinite" device_option { random_seed: 54 }) ``` which is expected due to nan input. # B. Unit test `buck test fblearner/flow/projects/dper/tests/preprocs:raw_feature_extractor_test` https://www.internalfb.com/intern/testinfra/testconsole/testrun/5348024586274923/ {F241336814} Differential Revision: D21961595 fbshipit-source-id: 3dcb153b3c7f42f391584f5e7f52f3d9c76de31f |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| docs | ||
| examples | ||
| fakelowp | ||
| helpers | ||
| ideep | ||
| layers | ||
| mint | ||
| mkl | ||
| modeling | ||
| models | ||
| onnx | ||
| operator_test | ||
| predictor | ||
| rnn | ||
| serialized_test | ||
| test | ||
| trt | ||
| __init__.py | ||
| _import_c_extension.py | ||
| allcompare_test.py | ||
| attention.py | ||
| benchmark_generator.py | ||
| binarysize.py | ||
| brew.py | ||
| brew_test.py | ||
| build.py | ||
| cached_reader.py | ||
| caffe_translator.py | ||
| caffe_translator_test.py | ||
| checkpoint.py | ||
| checkpoint_test.py | ||
| CMakeLists.txt | ||
| cnn.py | ||
| compatibility.py | ||
| context.py | ||
| context_test.py | ||
| control.py | ||
| control_ops_grad.py | ||
| control_ops_grad_test.py | ||
| control_ops_util.py | ||
| control_test.py | ||
| convert.py | ||
| convert_test.py | ||
| convnet_benchmarks.py | ||
| convnet_benchmarks_test.py | ||
| core.py | ||
| core_gradients_test.py | ||
| core_test.py | ||
| crf.py | ||
| crf_predict.py | ||
| crf_viterbi_test.py | ||
| data_parallel_model.py | ||
| data_parallel_model_test.py | ||
| data_workers.py | ||
| data_workers_test.py | ||
| dataio.py | ||
| dataio_test.py | ||
| dataset.py | ||
| db_file_reader.py | ||
| db_test.py | ||
| device_checker.py | ||
| dlpack.h | ||
| dyndep.py | ||
| embedding_generation_benchmark.py | ||
| experiment_util.py | ||
| extension_loader.py | ||
| filler_test.py | ||
| functional.py | ||
| functional_test.py | ||
| fused_8bit_rowwise_conversion_ops_test.py | ||
| gradient_check_test.py | ||
| gradient_checker.py | ||
| gru_cell.py | ||
| hip_test_util.py | ||
| hsm_util.py | ||
| hypothesis_test.py | ||
| hypothesis_test_util.py | ||
| ideep_test_util.py | ||
| layer_model_helper.py | ||
| layer_model_instantiator.py | ||
| layer_parameter_sharing_test.py | ||
| layer_test_util.py | ||
| layers_test.py | ||
| lengths_reducer_fused_8bit_rowwise_ops_test.py | ||
| lengths_reducer_rowwise_8bit_ops_test.py | ||
| lstm_benchmark.py | ||
| memonger.py | ||
| memonger_test.py | ||
| mkl_test_util.py | ||
| model_device_test.py | ||
| model_helper.py | ||
| model_helper_test.py | ||
| modifier_context.py | ||
| mpi_python.cc | ||
| muji.py | ||
| muji_test.py | ||
| net_builder.py | ||
| net_builder_test.py | ||
| net_drawer.py | ||
| net_printer.py | ||
| net_printer_test.py | ||
| nomnigraph.py | ||
| nomnigraph_test.py | ||
| nomnigraph_transformations.py | ||
| nomnigraph_transformations_test.py | ||
| normalizer.py | ||
| normalizer_context.py | ||
| normalizer_test.py | ||
| numa_benchmark.py | ||
| numa_test.py | ||
| observer_test.py | ||
| operator_fp_exceptions_test.py | ||
| optimizer.py | ||
| optimizer_context.py | ||
| optimizer_test.py | ||
| optimizer_test_util.py | ||
| parallel_workers.py | ||
| parallel_workers_test.py | ||
| parallelize_bmuf_distributed_test.py | ||
| pipeline.py | ||
| pipeline_test.py | ||
| predictor_constants.py | ||
| pybind_state.cc | ||
| pybind_state.h | ||
| pybind_state_dlpack.cc | ||
| pybind_state_dlpack.h | ||
| pybind_state_gpu.cc | ||
| pybind_state_hip.cc | ||
| pybind_state_ideep.cc | ||
| pybind_state_int8.cc | ||
| pybind_state_nomni.cc | ||
| pybind_state_registry.cc | ||
| pybind_state_registry.h | ||
| python_op_test.py | ||
| queue_util.py | ||
| record_queue.py | ||
| recurrent.py | ||
| regularizer.py | ||
| regularizer_context.py | ||
| regularizer_test.py | ||
| rnn_cell.py | ||
| schema.py | ||
| schema_test.py | ||
| scope.py | ||
| scope_test.py | ||
| session.py | ||
| session_test.py | ||
| sparse_to_dense_mask_test.py | ||
| sparse_to_dense_test.py | ||
| task.py | ||
| task_test.py | ||
| test_util.py | ||
| text_file_reader.py | ||
| timeout_guard.py | ||
| toy_regression_test.py | ||
| transformations.py | ||
| transformations_test.py | ||
| tt_core.py | ||
| tt_core_test.py | ||
| utils.py | ||
| utils_test.py | ||
| visualize.py | ||
| workspace.py | ||
| workspace_test.py | ||