Resume SynthData0523 main/c17 batch 1
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+23
- SynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/y_val.npyAdded+3
- SynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/train_20260510_205404.logAdded+3
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/config.tomlAdded+39
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/gen_20260319_072452.logAdded+1008
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/runtime_result.jsonAdded+22
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/source_import_manifest.jsonAdded+16
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/tabddpm-c17-1000-20260319_072452.csvAdded+1001
- SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/train_20260319_072211.logAdded+119
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_gen.pyAdded+42
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/.gitignoreAdded+15
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/LICENSEAdded+7
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/README.mdAdded+201
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_test.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_train.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_val.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_test.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_train.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_val.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/info.jsonAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/real.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/staged_features.jsonAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/test.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/train.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/val.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_test.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_train.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_val.npyAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/download_dataset.pyAdded+51
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/eval_quality.pyAdded+151
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/mle.pyAdded+781
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/tabular_dataload.pyAdded+111
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/tabular_transformer.pyAdded+110
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/visualize_density.pyAdded+85
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval_impute.pyAdded+82
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.gifAdded
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.mp4Added+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_flowchart.jpgAdded
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/main.pyAdded+46
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/process_dataset.pyAdded+646
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/__init__.pyAdded+11
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/data.pyAdded+780
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/env.pyAdded+39
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/metrics.pyAdded+157
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/util.pyAdded+347
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthcity.yamlAdded+11
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/real.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/test.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/val.csvAdded+3
- SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/tabdiff.yamlAdded+35
2320 unmodified lines232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462320 unmodified linesSynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/val.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/y_test.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/y_train.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/y_val.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/train_20260510_205404.log filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_test.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_train.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_val.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_test.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_train.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_val.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/info.json filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/real.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/staged_features.json filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/test.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/train.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/val.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_test.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_train.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_val.npy filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.gif filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.mp4 filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/real.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/test.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/val.csv filter=lfs diff=lfs merge=lfs -textSynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/tabdiff/ckpt/pipeline_c17/adapter_learnable/config.pkl filter=lfs diff=lfs merge=lfs -text123version https://git-lfs.github.com/spec/v1oid sha256:38857ac7884ffa140873b5a87e96f370a6373fd14142ded83f9144dea0debbf5size 7168123version https://git-lfs.github.com/spec/v1oid sha256:a04d08da3372b055c0e5d6912531f251aaaa3550fd71099710e5a9ab81687c81size 88696123456789101112131415161718192021222324252627282930313233343536373839seed = 0parent_dir = "/work/output-SpecializedModels/c17/tabddpm/tabddpm-c17-20260319_072207/output"real_data_path = "/work/output-SpecializedModels/c17/tabddpm/tabddpm-c17-20260319_072207/data"model_type = "mlp"num_numerical_features = 0device = "cuda:0"
[model_params]d_in = 9num_classes = 0is_y_cond = true
[model_params.rtdl_params]d_layers = [256, 256]dropout = 0.0
[diffusion_params]num_timesteps = 1000gaussian_loss_type = "mse"
[train.main]steps = 5000lr = 0.001weight_decay = 0.0batch_size = 256
[train.T]seed = 0normalization = "quantile"num_nan_policy = "__none__"cat_nan_policy = "__none__"cat_min_frequency = "__none__"cat_encoding = "__none__"y_policy = "default"
[sample]num_samples = 1000batch_size = 1000seed = 0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008/opt/conda/lib/python3.11/site-packages/skorch/__init__.py:6: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")mlpSample timestep 999Sample timestep 998Sample timestep 997Sample timestep 996Sample timestep 995Sample timestep 994Sample timestep 993Sample timestep 992Sample timestep 991Sample timestep 990Sample timestep 989Sample timestep 988Sample timestep 987Sample timestep 986Sample timestep 985Sample timestep 984Sample timestep 983Sample timestep 982Sample timestep 981Sample timestep 980Sample timestep 979Sample timestep 978Sample timestep 977Sample timestep 976Sample timestep 975Sample timestep 974Sample timestep 973Sample timestep 972Sample timestep 971Sample timestep 970Sample timestep 969Sample timestep 968Sample timestep 967Sample timestep 966Sample timestep 965Sample timestep 964Sample timestep 963Sample timestep 962Sample timestep 961Sample timestep 960Sample timestep 959Sample timestep 958Sample timestep 957Sample timestep 956Sample timestep 955Sample timestep 954Sample timestep 953Sample timestep 952Sample timestep 951Sample timestep 950Sample timestep 949Sample timestep 948Sample timestep 947Sample timestep 946Sample timestep 945Sample timestep 944Sample timestep 943Sample timestep 942Sample timestep 941Sample timestep 940Sample timestep 939Sample timestep 938Sample timestep 937Sample timestep 936Sample timestep 935Sample timestep 934Sample timestep 933Sample timestep 932Sample timestep 931Sample timestep 930Sample timestep 929Sample timestep 928Sample timestep 927Sample timestep 926Sample timestep 925Sample timestep 924Sample timestep 923Sample timestep 922Sample timestep 921Sample timestep 920Sample timestep 919Sample timestep 918Sample timestep 917Sample timestep 916Sample timestep 915Sample timestep 914Sample timestep 913Sample timestep 912Sample timestep 911Sample timestep 910Sample timestep 909Sample timestep 908Sample timestep 907Sample timestep 906Sample timestep 905Sample timestep 904Sample timestep 903Sample timestep 902Sample timestep 901Sample timestep 900Sample timestep 899Sample timestep 898Sample timestep 897Sample timestep 896Sample timestep 895Sample timestep 894Sample timestep 893Sample timestep 892Sample timestep 891Sample timestep 890Sample timestep 889Sample timestep 888Sample timestep 887Sample timestep 886Sample timestep 885Sample timestep 884Sample timestep 883Sample timestep 882Sample timestep 881Sample timestep 880Sample timestep 879Sample timestep 878Sample timestep 877Sample timestep 876Sample timestep 875Sample timestep 874Sample timestep 873Sample timestep 872Sample timestep 871Sample timestep 870Sample timestep 869Sample timestep 868Sample timestep 867Sample timestep 866Sample timestep 865Sample timestep 864Sample timestep 863Sample timestep 862Sample timestep 861Sample timestep 860Sample timestep 859Sample timestep 858Sample timestep 857Sample timestep 856Sample timestep 855Sample timestep 854Sample timestep 853Sample timestep 852Sample timestep 851Sample timestep 850Sample timestep 849Sample timestep 848Sample timestep 847Sample timestep 846Sample timestep 845Sample timestep 844Sample timestep 843Sample timestep 842Sample timestep 841Sample timestep 840Sample timestep 839Sample timestep 838Sample timestep 837Sample timestep 836Sample timestep 835Sample timestep 834Sample timestep 833Sample timestep 832Sample timestep 831Sample timestep 830Sample timestep 829Sample timestep 828Sample timestep 827Sample timestep 826Sample timestep 825Sample timestep 824Sample timestep 823Sample timestep 822Sample timestep 821Sample timestep 820Sample timestep 819Sample timestep 818Sample timestep 817Sample timestep 816Sample timestep 815Sample timestep 814Sample timestep 813Sample timestep 812Sample timestep 811Sample timestep 810Sample timestep 809Sample timestep 808Sample timestep 807Sample timestep 806Sample timestep 805Sample timestep 804Sample timestep 803Sample timestep 802Sample timestep 801Sample timestep 800Sample timestep 799Sample timestep 798Sample timestep 797Sample timestep 796Sample timestep 795Sample timestep 794Sample timestep 793Sample timestep 792Sample timestep 791Sample timestep 790Sample timestep 789Sample timestep 788Sample timestep 787Sample timestep 786Sample timestep 785Sample timestep 784Sample timestep 783Sample timestep 782Sample timestep 781Sample timestep 780Sample timestep 779Sample timestep 778Sample timestep 777Sample timestep 776Sample timestep 775Sample timestep 774Sample timestep 773Sample timestep 772Sample timestep 771Sample timestep 770Sample timestep 769Sample timestep 768Sample timestep 767Sample timestep 766Sample timestep 765Sample timestep 764Sample timestep 763Sample timestep 762Sample timestep 761Sample timestep 760Sample timestep 759Sample timestep 758Sample timestep 757Sample timestep 756Sample timestep 755Sample timestep 754Sample timestep 753Sample timestep 752Sample timestep 751Sample timestep 750Sample timestep 749Sample timestep 748Sample timestep 747Sample timestep 746Sample timestep 745Sample timestep 744Sample timestep 743Sample timestep 742Sample timestep 741Sample timestep 740Sample timestep 739Sample timestep 738Sample timestep 737Sample timestep 736Sample timestep 735Sample timestep 734Sample timestep 733Sample timestep 732Sample timestep 731Sample timestep 730Sample timestep 729Sample timestep 728Sample timestep 727Sample timestep 726Sample timestep 725Sample timestep 724Sample timestep 723Sample timestep 722Sample timestep 721Sample timestep 720Sample timestep 719Sample timestep 718Sample timestep 717Sample timestep 716Sample timestep 715Sample timestep 714Sample timestep 713Sample timestep 712Sample timestep 711Sample timestep 710Sample timestep 709Sample timestep 708Sample timestep 707Sample timestep 706Sample timestep 705Sample timestep 704Sample timestep 703Sample timestep 702Sample timestep 701Sample timestep 700Sample timestep 699Sample timestep 698Sample timestep 697Sample timestep 696Sample timestep 695Sample timestep 694Sample timestep 693Sample timestep 692Sample timestep 691Sample timestep 690Sample timestep 689Sample timestep 688Sample timestep 687Sample timestep 686Sample timestep 685Sample timestep 684Sample timestep 683Sample timestep 682Sample timestep 681Sample timestep 680Sample timestep 679Sample timestep 678Sample timestep 677Sample timestep 676Sample timestep 675Sample timestep 674Sample timestep 673Sample timestep 672Sample timestep 671Sample timestep 670Sample timestep 669Sample timestep 668Sample timestep 667Sample timestep 666Sample timestep 665Sample timestep 664Sample timestep 663Sample timestep 662Sample timestep 661Sample timestep 660Sample timestep 659Sample timestep 658Sample timestep 657Sample timestep 656Sample timestep 655Sample timestep 654Sample timestep 653Sample timestep 652Sample timestep 651Sample timestep 650Sample timestep 649Sample timestep 648Sample timestep 647Sample timestep 646Sample timestep 645Sample timestep 644Sample timestep 643Sample timestep 642Sample timestep 641Sample timestep 640Sample timestep 639Sample timestep 638Sample timestep 637Sample timestep 636Sample timestep 635Sample timestep 634Sample timestep 633Sample timestep 632Sample timestep 631Sample timestep 630Sample timestep 629Sample timestep 628Sample timestep 627Sample timestep 626Sample timestep 625Sample timestep 624Sample timestep 623Sample timestep 622Sample timestep 621Sample timestep 620Sample timestep 619Sample timestep 618Sample timestep 617Sample timestep 616Sample timestep 615Sample timestep 614Sample timestep 613Sample timestep 612Sample timestep 611Sample timestep 610Sample timestep 609Sample timestep 608Sample timestep 607Sample timestep 606Sample timestep 605Sample timestep 604Sample timestep 603Sample timestep 602Sample timestep 601Sample timestep 600Sample timestep 599Sample timestep 598Sample timestep 597Sample timestep 596Sample timestep 595Sample timestep 594Sample timestep 593Sample timestep 592Sample timestep 591Sample timestep 590Sample timestep 589Sample timestep 588Sample timestep 587Sample timestep 586Sample timestep 585Sample timestep 584Sample timestep 583Sample timestep 582Sample timestep 581Sample timestep 580Sample timestep 579Sample timestep 578Sample timestep 577Sample timestep 576Sample timestep 575Sample timestep 574Sample timestep 573Sample timestep 572Sample timestep 571Sample timestep 570Sample timestep 569Sample timestep 568Sample timestep 567Sample timestep 566Sample timestep 565Sample timestep 564Sample timestep 563Sample timestep 562Sample timestep 561Sample timestep 560Sample timestep 559Sample timestep 558Sample timestep 557Sample timestep 556Sample timestep 555Sample timestep 554Sample timestep 553Sample timestep 552Sample timestep 551Sample timestep 550Sample timestep 549Sample timestep 548Sample timestep 547Sample timestep 546Sample timestep 545Sample timestep 544Sample timestep 543Sample timestep 542Sample timestep 541Sample timestep 540Sample timestep 539Sample timestep 538Sample timestep 537Sample timestep 536Sample timestep 535Sample timestep 534Sample timestep 533Sample timestep 532Sample timestep 531Sample timestep 530Sample timestep 529Sample timestep 528Sample timestep 527Sample timestep 526Sample timestep 525Sample timestep 524Sample timestep 523Sample timestep 522Sample timestep 521Sample timestep 520Sample timestep 519Sample timestep 518Sample timestep 517Sample timestep 516Sample timestep 515Sample timestep 514Sample timestep 513Sample timestep 512Sample timestep 511Sample timestep 510Sample timestep 509Sample timestep 508Sample timestep 507Sample timestep 506Sample timestep 505Sample timestep 504Sample timestep 503Sample timestep 502Sample timestep 501Sample timestep 500Sample timestep 499Sample timestep 498Sample timestep 497Sample timestep 496Sample timestep 495Sample timestep 494Sample timestep 493Sample timestep 492Sample timestep 491Sample timestep 490Sample timestep 489Sample timestep 488Sample timestep 487Sample timestep 486Sample timestep 485Sample timestep 484Sample timestep 483Sample timestep 482Sample timestep 481Sample timestep 480Sample timestep 479Sample timestep 478Sample timestep 477Sample timestep 476Sample timestep 475Sample timestep 474Sample timestep 473Sample timestep 472Sample timestep 471Sample timestep 470Sample timestep 469Sample timestep 468Sample timestep 467Sample timestep 466Sample timestep 465Sample timestep 464Sample timestep 463Sample timestep 462Sample timestep 461Sample timestep 460Sample timestep 459Sample timestep 458Sample timestep 457Sample timestep 456Sample timestep 455Sample timestep 454Sample timestep 453Sample timestep 452Sample timestep 451Sample timestep 450Sample timestep 449Sample timestep 448Sample timestep 447Sample timestep 446Sample timestep 445Sample timestep 444Sample timestep 443Sample timestep 442Sample timestep 441Sample timestep 440Sample timestep 439Sample timestep 438Sample timestep 437Sample timestep 436Sample timestep 435Sample timestep 434Sample timestep 433Sample timestep 432Sample timestep 431Sample timestep 430Sample timestep 429Sample timestep 428Sample timestep 427Sample timestep 426Sample timestep 425Sample timestep 424Sample timestep 423Sample timestep 422Sample timestep 421Sample timestep 420Sample timestep 419Sample timestep 418Sample timestep 417Sample timestep 416Sample timestep 415Sample timestep 414Sample timestep 413Sample timestep 412Sample timestep 411Sample timestep 410Sample timestep 409Sample timestep 408Sample timestep 407Sample timestep 406Sample timestep 405Sample timestep 404Sample timestep 403Sample timestep 402Sample timestep 401Sample timestep 400Sample timestep 399Sample timestep 398Sample timestep 397Sample timestep 396Sample timestep 395Sample timestep 394Sample timestep 393Sample timestep 392Sample timestep 391Sample timestep 390Sample timestep 389Sample timestep 388Sample timestep 387Sample timestep 386Sample timestep 385Sample timestep 384Sample timestep 383Sample timestep 382Sample timestep 381Sample timestep 380Sample timestep 379Sample timestep 378Sample timestep 377Sample timestep 376Sample timestep 375Sample timestep 374Sample timestep 373Sample timestep 372Sample timestep 371Sample timestep 370Sample timestep 369Sample timestep 368Sample timestep 367Sample timestep 366Sample timestep 365Sample timestep 364Sample timestep 363Sample timestep 362Sample timestep 361Sample timestep 360Sample timestep 359Sample timestep 358Sample timestep 357Sample timestep 356Sample timestep 355Sample timestep 354Sample timestep 353Sample timestep 352Sample timestep 351Sample timestep 350Sample timestep 349Sample timestep 348Sample timestep 347Sample timestep 346Sample timestep 345Sample timestep 344Sample timestep 343Sample timestep 342Sample timestep 341Sample timestep 340Sample timestep 339Sample timestep 338Sample timestep 337Sample timestep 336Sample timestep 335Sample timestep 334Sample timestep 333Sample timestep 332Sample timestep 331Sample timestep 330Sample timestep 329Sample timestep 328Sample timestep 327Sample timestep 326Sample timestep 325Sample timestep 324Sample timestep 323Sample timestep 322Sample timestep 321Sample timestep 320Sample timestep 319Sample timestep 318Sample timestep 317Sample timestep 316Sample timestep 315Sample timestep 314Sample timestep 313Sample timestep 312Sample timestep 311Sample timestep 310Sample timestep 309Sample timestep 308Sample timestep 307Sample timestep 306Sample timestep 305Sample timestep 304Sample timestep 303Sample timestep 302Sample timestep 301Sample timestep 300Sample timestep 299Sample timestep 298Sample timestep 297Sample timestep 296Sample timestep 295Sample timestep 294Sample timestep 293Sample timestep 292Sample timestep 291Sample timestep 290Sample timestep 289Sample timestep 288Sample timestep 287Sample timestep 286Sample timestep 285Sample timestep 284Sample timestep 283Sample timestep 282Sample timestep 281Sample timestep 280Sample timestep 279Sample timestep 278Sample timestep 277Sample timestep 276Sample timestep 275Sample timestep 274Sample timestep 273Sample timestep 272Sample timestep 271Sample timestep 270Sample timestep 269Sample timestep 268Sample timestep 267Sample timestep 266Sample timestep 265Sample timestep 264Sample timestep 263Sample timestep 262Sample timestep 261Sample timestep 260Sample timestep 259Sample timestep 258Sample timestep 257Sample timestep 256Sample timestep 255Sample timestep 254Sample timestep 253Sample timestep 252Sample timestep 251Sample timestep 250Sample timestep 249Sample timestep 248Sample timestep 247Sample timestep 246Sample timestep 245Sample timestep 244Sample timestep 243Sample timestep 242Sample timestep 241Sample timestep 240Sample timestep 239Sample timestep 238Sample timestep 237Sample timestep 236Sample timestep 235Sample timestep 234Sample timestep 233Sample timestep 232Sample timestep 231Sample timestep 230Sample timestep 229Sample timestep 228Sample timestep 227Sample timestep 226Sample timestep 225Sample timestep 224Sample timestep 223Sample timestep 222Sample timestep 221Sample timestep 220Sample timestep 219Sample timestep 218Sample timestep 217Sample timestep 216Sample timestep 215Sample timestep 214Sample timestep 213Sample timestep 212Sample timestep 211Sample timestep 210Sample timestep 209Sample timestep 208Sample timestep 207Sample timestep 206Sample timestep 205Sample timestep 204Sample timestep 203Sample timestep 202Sample timestep 201Sample timestep 200Sample timestep 199Sample timestep 198Sample timestep 197Sample timestep 196Sample timestep 195Sample timestep 194Sample timestep 193Sample timestep 192Sample timestep 191Sample timestep 190Sample timestep 189Sample timestep 188Sample timestep 187Sample timestep 186Sample timestep 185Sample timestep 184Sample timestep 183Sample timestep 182Sample timestep 181Sample timestep 180Sample timestep 179Sample timestep 178Sample timestep 177Sample timestep 176Sample timestep 175Sample timestep 174Sample timestep 173Sample timestep 172Sample timestep 171Sample timestep 170Sample timestep 169Sample timestep 168Sample timestep 167Sample timestep 166Sample timestep 165Sample timestep 164Sample timestep 163Sample timestep 162Sample timestep 161Sample timestep 160Sample timestep 159Sample timestep 158Sample timestep 157Sample timestep 156Sample timestep 155Sample timestep 154Sample timestep 153Sample timestep 152Sample timestep 151Sample timestep 150Sample timestep 149Sample timestep 148Sample timestep 147Sample timestep 146Sample timestep 145Sample timestep 144Sample timestep 143Sample timestep 142Sample timestep 141Sample timestep 140Sample timestep 139Sample timestep 138Sample timestep 137Sample timestep 136Sample timestep 135Sample timestep 134Sample timestep 133Sample timestep 132Sample timestep 131Sample timestep 130Sample timestep 129Sample timestep 128Sample timestep 127Sample timestep 126Sample timestep 125Sample timestep 124Sample timestep 123Sample timestep 122Sample timestep 121Sample timestep 120Sample timestep 119Sample timestep 118Sample timestep 117Sample timestep 116Sample timestep 115Sample timestep 114Sample timestep 113Sample timestep 112Sample timestep 111Sample timestep 110Sample timestep 109Sample timestep 108Sample timestep 107Sample timestep 106Sample timestep 105Sample timestep 104Sample timestep 103Sample timestep 102Sample timestep 101Sample timestep 100Sample timestep 99Sample timestep 98Sample timestep 97Sample timestep 96Sample timestep 95Sample timestep 94Sample timestep 93Sample timestep 92Sample timestep 91Sample timestep 90Sample timestep 89Sample timestep 88Sample timestep 87Sample timestep 86Sample timestep 85Sample timestep 84Sample timestep 83Sample timestep 82Sample timestep 81Sample timestep 80Sample timestep 79Sample timestep 78Sample timestep 77Sample timestep 76Sample timestep 75Sample timestep 74Sample timestep 73Sample timestep 72Sample timestep 71Sample timestep 70Sample timestep 69Sample timestep 68Sample timestep 67Sample timestep 66Sample timestep 65Sample timestep 64Sample timestep 63Sample timestep 62Sample timestep 61Sample timestep 60Sample timestep 59Sample timestep 58Sample timestep 57Sample timestep 56Sample timestep 55Sample timestep 54Sample timestep 53Sample timestep 52Sample timestep 51Sample timestep 50Sample timestep 49Sample timestep 48Sample timestep 47Sample timestep 46Sample timestep 45Sample timestep 44Sample timestep 43Sample timestep 42Sample timestep 41Sample timestep 40Sample timestep 39Sample timestep 38Sample timestep 37Sample timestep 36Sample timestep 35Sample timestep 34Sample timestep 33Sample timestep 32Sample timestep 31Sample timestep 30Sample timestep 29Sample timestep 28Sample timestep 27Sample timestep 26Sample timestep 25Sample timestep 24Sample timestep 23Sample timestep 22Sample timestep 21Sample timestep 20Sample timestep 19Sample timestep 18Sample timestep 17Sample timestep 16Sample timestep 15Sample timestep 14Sample timestep 13Sample timestep 12Sample timestep 11Sample timestep 10Sample timestep 9Sample timestep 8Sample timestep 7Sample timestep 6Sample timestep 5Sample timestep 4Sample timestep 3Sample timestep 2Sample timestep 1Sample timestep 0Elapsed time: 0:00:18[TabDDPM] Sampling 1000 rows[TabDDPM] Saved 1000 rows -> /work/output-SpecializedModels/c17/tabddpm/tabddpm-c17-20260319_072207/tabddpm-c17-1000-20260319_072452.csv12345678910111213141516171819202122{ "dataset_id": "c17", "model": "tabddpm", "run_id": "tabddpm-c17-20260319_072207", "public_gate_status": "legacy_import", "adapter_ready_status": "legacy_import", "train_status": "success", "generate_status": "success", "reason_code": null, "reason_detail": "Imported into TabQueryBench authoritative main during missing-coverage patch 2026-05-20", "artifacts": { "synthetic_csv": "/data/jialinzhang/TabQueryBench/SynDataSuccess/main/c17/tabddpm/tabddpm-c17-20260319_072207/tabddpm-c17-1000-20260319_072452.csv" }, "timings": { "train": { "duration_sec": 148.0 }, "generate": { "duration_sec": 18.0 } }}12345678910111213141516{ "imported_at_utc": "2026-05-20T17:36:24.306567+00:00", "source_run_dir": "/data/jialinzhang/SynthesizePipeline-server/output-SpecializedModels/c17/tabddpm/tabddpm-c17-20260319_072207", "target_run_dir": "/data/jialinzhang/TabQueryBench/SynDataSuccess/main/c17/tabddpm/tabddpm-c17-20260319_072207", "dataset_id": "c17", "model_id": "tabddpm", "synthetic_csv": "tabddpm-c17-1000-20260319_072452.csv", "copied_files": [ "config.toml", "gen_20260319_072452.log", "runtime_result.json", "tabddpm-c17-1000-20260319_072452.csv", "train_20260319_072211.log" ], "import_reason": "fill official SQL score coverage gap"}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001show_id,title,director,cast,date_added,rating,duration,listed_in,description,release_year0.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,73.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,71.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,70.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,67.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,73.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,67.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,54.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,72.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,71.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,52.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,68.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,71.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,60.00.0,0.0,-1.0,-1.0,-1.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0.0,70.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,64.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,70.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,33.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,69.00.0,0.0,-1.0,-1.0,-1.0,-1.0,-1.0,0.0,0.0,61.0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119/opt/conda/lib/python3.11/site-packages/skorch/__init__.py:6: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")/opt/conda/lib/python3.11/site-packages/torch/_tensor.py:1025: UserWarning: non-inplace resize is deprecated warnings.warn("non-inplace resize is deprecated")[5636 5636 3168 4956 1505 16 202 446 5625]27190{'d_in': 27190, 'num_classes': 0, 'is_y_cond': True, 'rtdl_params': {'d_layers': [256, 256], 'dropout': 0.0}}mlpStep 500/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 1000/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 1500/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 2000/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 2500/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 3000/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 3500/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 4000/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 4500/5000 MLoss: nan GLoss: 0.0 Sum: nanStep 5000/5000 MLoss: nan GLoss: 0.0 Sum: nanElapsed time: 0:02:28[TabDDPM] Training, config=/work/output-SpecializedModels/c17/tabddpm/tabddpm-c17-20260319_072207/config.toml[TabDDPM] Training complete123456789101112131415161718192021222324252627282930313233343536373839404142
import os, shutil, subprocess, systd = r"/workspace/TabDiff"name = r"pipeline_c17"src = r"/work/output-Benchmark-trainonly-v1/c17/tabdiff/tabdiff-c17-20260513_002853/tabular_bundle/pipeline_c17"rt = r"/work/output-Benchmark-trainonly-v1/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime"if not os.path.exists(rt): def _ignore(_, names): skip = {"__pycache__", "data", "synthetic", "result", "results", "ckpt"} return [n for n in names if n in skip or n.endswith(".pyc")] shutil.copytree(td, rt, ignore=_ignore)dst_data = os.path.join(rt, "data", name)dst_syn = os.path.join(rt, "synthetic", name)shutil.rmtree(dst_data, ignore_errors=True)os.makedirs(os.path.dirname(dst_data), exist_ok=True)shutil.copytree(src, dst_data)os.makedirs(dst_syn, exist_ok=True)for fn in ("real.csv", "test.csv", "val.csv"): shutil.copy(os.path.join(src, fn), os.path.join(dst_syn, fn))os.chdir(rt)os.environ["PYTHONPATH"] = rt + os.pathsep + os.environ.get("PYTHONPATH", "")subprocess.check_call([ sys.executable, "-m", "tabdiff.main", "--dataname", name, "--mode", "test", "--gpu", "0", "--no_wandb", "--exp_name", r"adapter_learnable", "--ckpt_path", r"/work/output-Benchmark-trainonly-v1/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/tabdiff/ckpt/pipeline_c17/adapter_learnable/model_200.pt", "--num_samples_to_generate", str(int(7045)),])# test() 写入 tabdiff/result/<dataname>/<exp>/<epoch>/samples.csvbase = os.path.join(rt, "tabdiff", "result", name, r"adapter_learnable")best = Nonebest_t = -1.0for root, _, files in os.walk(base): if "samples.csv" in files: p = os.path.join(root, "samples.csv") t = os.path.getmtime(p) if t > best_t: best_t = t best = pif not best: raise SystemExit("tabdiff: no samples.csv under " + base)shutil.copy(best, r"/work/output-Benchmark-trainonly-v1/c17/tabdiff/tabdiff-c17-20260513_002853/tabdiff-c17-7045-20260513_004055.csv")123456789101112131415**/__pycache__/***.pyc
data/*!/data/Info/
wandb/eval/synthetic/impute/workspace/debug/tabdiff/result/
**/ckpt/*1234567Copyright 2024 Minkai Xu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201# TabDiff: a Mixed-type Diffusion Model for Tabular Data Generation
<p align="center"> <a href="https://github.com/MinkaiXu/TabDiff/blob/main/LICENSE"> <img alt="MIT License" src="https://img.shields.io/badge/License-MIT-yellow.svg"> </a> <a href="https://openreview.net/forum?id=swvURjrt8z"> <img alt="Openreview" src="https://img.shields.io/badge/review-OpenReview-blue"> </a> <a href="https://arxiv.org/abs/2410.20626"> <img alt="Paper URL" src="https://img.shields.io/badge/cs.LG-2410.20626-B31B1B.svg"> </a></p>
<div align="center"> <img src="images/tabdiff_demo.gif" alt="Model Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/> <p><em>Figure 1: Visualing the generative process of TabDiff. A high-quality version of this video can be found at <a href="images/tabdiff_demo.mp4" download>tabdiff_demo.mp4</a></em></p></div>
This repository provides the official implementation of TabDiff: a Mixed-type Diffusion Model for Tabular Data Generation (ICLR 2025).
## Latest Update- [2025.04]:The categorical-heavy dataset **[Diabetes](https://archive.ics.uci.edu/dataset/296/diabetes+130-us+hospitals+for+years+1999-2008)** evaluated in the paper has now been released!- [2025.02]:Our code is finally released! We have released part of the tested datasets. The rest will be released soon!
## Introduction
<div align="center"> <img src="images/tabdiff_flowchart.jpg" alt="Model Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/> <p><em>Figure 2: The high-level schema of TabDiff</a></em></p></div>TabDiff is a unified diffusion framework designed to model all muti-modal distributions of tabular data in a single model. Its key innovations include:
1) Framing the joint diffusion process in continuous time,2) A feature-wised learnable diffusion process that offsets the heterogeneity across different feature distributions,3) Classifier-free guidance conditional generation for missing column value imputation.
The schema of TabDiff is presented in the figure above. For more details, please refer to [our paper](https://arxiv.org/abs/2410.20626).
## Environment Setup
Create the main environment with [tabdiff.yaml](tabdiff.yaml). This environment will be used for all tasks except for the evaluation of additional data fidelity metrics (i.e., $\alpha$-precision and $\beta$-recall scores)
```conda env create -f tabdiff.yaml```
Create another environment with [synthcity.yaml](synthcity.yaml) to evaluate additional data fidelity metrics
```conda env create -f synthcity.yaml```
## Datasets Preparation
### Using the datasets experimented in the paper
Download raw datasets:
```python download_dataset.py```
Process datasets:
```python process_dataset.py```
### Using your own dataset
First, create a directory for your dataset in [./data](./data):```cd datamkdir <NAME_OF_YOUR_DATASET>```
Compile your raw tabular data in .csv format. **The first row should be the header** indicating the name of each column, and the remaining rows are records. After finishing these steps, place you data's csv file in the directory you just created and name it as <NAME_OF_YOUR_DATASET>.csv.
Then, create <NAME_OF_YOUR_DATASET>.json in [./data/Info](./data/Info). Write this file with the metadata of your dataset, covering the following information:```{ "name": "<NAME_OF_YOUR_DATASET>", "task_type": "[NAME_OF_TASK]", # binclass or regression "header": "infer", "column_names": null, "num_col_idx": [LIST], # list of indices of numerical columns "cat_col_idx": [LIST], # list of indices of categorical columns "target_col_idx": [list], # list of indices of the target columns (for MLE) "file_type": "csv", "data_path": "data/<NAME_OF_YOUR_DATASET>/<NAME_OF_YOUR_DATASET>.csv" "test_path": null,}```
### Important Notes When Creating the Info File- The MLE evaluation and the imputation task (see later sections for details) assume that one column of your data is the regression or classification target. To enable these tasks, you will need to specify `target_col_idx`. If you don't need to evalute MLE, you can comment out the following line: https://github.com/MinkaiXu/TabDiff/blob/0c4fc3bbfa19046d36c5dce64628df52d5c73d15/tabdiff/main.py#L152- The fields `target_col_idx`, `num_col_idx` and `cat_col_idx` must be multually exclusive—no column should appear in more than one of these lists. - Set the task_type to "regression" if the target column is numerical, or "binclass" if it is categorical.
Finally, run the following command to process your dataset:```python process_dataset.py --dataname <NAME_OF_YOUR_DATASET>```
## Training TabDiff
To train an unconditional TabDiff model across the entire table, run
```python main.py --dataname <NAME_OF_DATASET> --mode train```
Current Options of ```<NAME_OF_DATASET>``` are: adult, default, shoppers, magic, beijing, news
Wanb logging is enabled by default. To disable it and log locally, add the ```--no_wandb``` flag.
To disable the learnable noise schedules, add the ```--non_learnable_schedule```. Please note that in order for the code to test/sample from such model properly, you need to add this flag for all commands below.
To specify your own experiment name, which will be used for logging and saving files, add ```--exp_name <your experiment name>```. This flag overwrites the default experiment name (learnable_schedule/non_learnable_schedule), so, similar to ```--non_learnable_schedule```, once added to training, you need to add it to all following commands as well.
## Sampling and Evaluating TabDiff (Density, MLE, C2ST)
To sample synthetic tables from trained TabDiff models and evaluate them, run```python main.py --dataname <NAME_OF_DATASET> --mode test --report --no_wandb```
This will sample 20 synthetic tables randomly. Meanwhile, it will evaluate the density, mle, and c2st scores for each sample and report their average and standard deviation. The results will be printed out in the terminal, and the samples and detailed evaluation results will be placed in ./eval/report_runs/<EXP_NAME>/<NAME_OF_DATASET>/.
## Evaluating on Additional Fidelity Metrics ($\alpha$-precision and $\beta$-recall scores)To evaluate TabDiff on the additional fidelity metrics ($\alpha$-precision and $\beta$-recall scores), you need to first make sure that you have already generated some samples by the previous commands. Then, you need to switch to the `synthcity` environment (as the synthcity packet used to compute those metrics conflicts with the main environment), by running```conda activate synthcity```Then, evaluate the metrics by running```python eval/eval_quality.py --dataname <NAME_OF_DATASET>```
Similarly, the results will be printed out in the terminal and added to ./eval/report_runs/<EXP_NAME>/<NAME_OF_DATASET>/
## Evaluating Data Privacy (DCR score)To evalute the privacy metric DCR score, you first need to retrain all the models, as the metric requires an equal split between the training and testing data (our initial splits employ a 90/10 ratio). To retrain with an equal split, run the training command but append `_dcr` to ```<NAME_OF_DATASET>``````python main.py --dataname <NAME_OF_DATASET>_dcr --mode train```
Then, test the models on DCR with the same `_dcr` suffix```python main.py --dataname <NAME_OF_DATASET>_dcr --mode test --report --no_wandb```
## Missing Value Imputation with Classifier-free Guidance (CFG)Our current experiments only include imputing the target column. However, our implementation, located at ```sample_impute()``` in [unified_ctime_diffusion.py](./tabdiff/models/unified_ctime_diffusion.py), should support imputing multiple columns with different data types.
### Training Guidance ModelIn order to enable classifier-free guidance (CFG), you need to first train an unconditional guidance model on the target column by running the training command with the `--y_only` flag```python main.py --dataname <NAME_OF_DATASET> --mode train --y_only```
### Sampling Imputed TablesWith the trained guidance model, you can then impute the missing target column by running the testing command with the `--impute` flag```python main.py --dataname <NAME_OF_DATASET> --mode test --impute --no_wandb```This will, by default, randomly produce 50 imputed tables and save them to ./impute/<NAME_OF_DATASET>/<EXP_NAME>.
### Evaluating ImputationYou can then evaluate the imputation quality by running```python eval_impute.py --dataname <NAME_OF_DATASET>```
## License
This work is licensed undeer the MIT License.
## AcknowledgementThis repo is built upon the previous work TabSyn's [[codebase]](https://github.com/amazon-science/tabsyn). Many thanks to Hengrui!
## CitationPlease consider citing our work if you find it helpful in your research!```@inproceedings{shi2025tabdiff,title={TabDiff: a Mixed-type Diffusion Model for Tabular Data Generation},author={Juntong Shi and Minkai Xu and Harper Hua and Hengrui Zhang and Stefano Ermon and Jure Leskovec},booktitle={The Thirteenth International Conference on Learning Representations},year={2025},url={https://openreview.net/forum?id=swvURjrt8z}}```## ContactIf you encounter any problem, please file an issue on this GitHub repo.
If you have any question regarding the paper, please contact Minkai at [minkai@stanford.edu](minkai@stanford.edu) or Juntong at [shisteve@usc.edu](shisteve@usc.edu).123version https://git-lfs.github.com/spec/v1oid sha256:9a602698c899f6d97192182969a763a3ecbc5cf745eb4a3961eda66655442643size 70688123version https://git-lfs.github.com/spec/v1oid sha256:d9bb40ffd37e75f0a42dd40f07ed24144200e84e2ebaf87b6877e4ecaea9a828size 563728123version https://git-lfs.github.com/spec/v1oid sha256:86e0b102bd0b6cfea0dfbde9f87fbbff82bd631e82dafdfc93a7a7bbac4ba42dsize 70528123version https://git-lfs.github.com/spec/v1oid sha256:aba2e7dea310a44563668252abde60b3df55cdc0593b3701a52944421ec0cb4esize 3656123version https://git-lfs.github.com/spec/v1oid sha256:180312a3459bb0e4407a488c06d2c96ccc4d186b7a9ec1cb7de230e903b862dbsize 28308123version https://git-lfs.github.com/spec/v1oid sha256:b94237c2995dd8252570dabb13a810bc41d7a53ec99766e6ba6d179cf6064612size 3648123version https://git-lfs.github.com/spec/v1oid sha256:6b9a707bbb32e1d9ec63f0d699982d29cb2610659d058650d63bb4a61fdd39cbsize 1983123version https://git-lfs.github.com/spec/v1oid sha256:788ecf6df79b06c0c0e1c73269eae885e0862c7ad79baf15e72895b3b13032e7size 2719568123version https://git-lfs.github.com/spec/v1oid sha256:397b72d4ec08187fac7f4cc0c20fafec4f07478c059ef5c6393fa0e68204af4esize 1111123version https://git-lfs.github.com/spec/v1oid sha256:b9f567ce7dc617caa6a1f54059d6e92185996eef4edeee0dc3704c9e7c40bf63size 339093123version https://git-lfs.github.com/spec/v1oid sha256:788ecf6df79b06c0c0e1c73269eae885e0862c7ad79baf15e72895b3b13032e7size 2719568123version https://git-lfs.github.com/spec/v1oid sha256:08456e9ce46be6e184eefbd889ca81bd16877e740f0e40c8dbadd4418f95fa86size 341126123version https://git-lfs.github.com/spec/v1oid sha256:07355b06724ab119c4396c8b6b4b3d0b4a83b4624b85ae8c3be275dc72940fd5size 7184123version https://git-lfs.github.com/spec/v1oid sha256:891019c3942ff73d08d9b0a4c7aa6c10898b9a5286868e9b048736c09cf7e811size 56488123version https://git-lfs.github.com/spec/v1oid sha256:38857ac7884ffa140873b5a87e96f370a6373fd14142ded83f9144dea0debbf5size 7168123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051import osfrom urllib import requestimport zipfile
DATA_DIR = 'data'
NAME_URL_DICT_UCI = { 'adult': 'https://archive.ics.uci.edu/static/public/2/adult.zip', 'default': 'https://archive.ics.uci.edu/static/public/350/default+of+credit+card+clients.zip', 'magic': 'https://archive.ics.uci.edu/static/public/159/magic+gamma+telescope.zip', 'shoppers': 'https://archive.ics.uci.edu/static/public/468/online+shoppers+purchasing+intention+dataset.zip', 'beijing': 'https://archive.ics.uci.edu/static/public/381/beijing+pm2+5+data.zip', 'news': 'https://archive.ics.uci.edu/static/public/332/online+news+popularity.zip', 'news_nocat': 'https://archive.ics.uci.edu/static/public/332/online+news+popularity.zip', 'diabetes': 'https://archive.ics.uci.edu/static/public/296/diabetes+130-us+hospitals+for+years+1999-2008.zip', 'adult_dcr': 'https://archive.ics.uci.edu/static/public/2/adult.zip', 'default_dcr': 'https://archive.ics.uci.edu/static/public/350/default+of+credit+card+clients.zip', 'magic_dcr': 'https://archive.ics.uci.edu/static/public/159/magic+gamma+telescope.zip', 'shoppers_dcr': 'https://archive.ics.uci.edu/static/public/468/online+shoppers+purchasing+intention+dataset.zip', 'beijing_dcr': 'https://archive.ics.uci.edu/static/public/381/beijing+pm2+5+data.zip', 'news_dcr': 'https://archive.ics.uci.edu/static/public/332/online+news+popularity.zip', 'diabetes_dcr': 'https://archive.ics.uci.edu/static/public/296/diabetes+130-us+hospitals+for+years+1999-2008.zip',}
def unzip_file(zip_filepath, dest_path): with zipfile.ZipFile(zip_filepath, 'r') as zip_ref: zip_ref.extractall(dest_path)
def download_from_uci(name):
print(f'Start processing dataset {name} from UCI.') save_dir = f'{DATA_DIR}/{name}' if not os.path.exists(save_dir): os.makedirs(save_dir)
url = NAME_URL_DICT_UCI[name] request.urlretrieve(url, f'{save_dir}/{name}.zip') print(f'Finish downloading dataset from {url}, data has been saved to {save_dir}.') unzip_file(f'{save_dir}/{name}.zip', save_dir) print(f'Finish unzipping {name}.') else: print('Aready downloaded.')
if __name__ == '__main__': for name in NAME_URL_DICT_UCI.keys(): download_from_uci(name) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151import globimport numpy as npimport pandas as pdimport os import sysimport json
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))from sklearn.preprocessing import OneHotEncoderfrom synthcity.metrics import eval_statisticalfrom synthcity.plugins.core.dataloader import GenericDataLoader
pd.options.mode.chained_assignment = None
import argparse
parser = argparse.ArgumentParser()parser.add_argument('--dataname', type=str)parser.add_argument('--exp_name', type=str, default=None)parser.add_argument('--non_learnable_schedule', action='store_true')
args = parser.parse_args()
def evaluate_quality(real_path, syn_path, info_path): with open(info_path, 'r') as f: info = json.load(f)
syn_data = pd.read_csv(syn_path) real_data = pd.read_csv(real_path)
''' Special treatment for default dataset and CoDi model '''
real_data.columns = range(len(real_data.columns)) syn_data.columns = range(len(syn_data.columns))
num_col_idx = info['num_col_idx'] cat_col_idx = info['cat_col_idx'] target_col_idx = info['target_col_idx'] if info['task_type'] == 'regression': num_col_idx += target_col_idx else: cat_col_idx += target_col_idx num_real_data = real_data[num_col_idx] cat_real_data = real_data[cat_col_idx]
num_real_data_np = num_real_data.to_numpy() cat_real_data_np = cat_real_data.to_numpy().astype('str')
num_syn_data = syn_data[num_col_idx] cat_syn_data = syn_data[cat_col_idx]
num_syn_data_np = num_syn_data.to_numpy()
# cat_syn_data_np = np.array cat_syn_data_np = cat_syn_data.to_numpy().astype('str')
encoder = OneHotEncoder() encoder.fit(cat_real_data_np)
cat_real_data_oh = encoder.transform(cat_real_data_np).toarray() cat_syn_data_oh = encoder.transform(cat_syn_data_np).toarray()
le_real_data = pd.DataFrame(np.concatenate((num_real_data_np, cat_real_data_oh), axis = 1)).astype(float) le_real_num = pd.DataFrame(num_real_data_np).astype(float) le_real_cat = pd.DataFrame(cat_real_data_oh).astype(float)
le_syn_data = pd.DataFrame(np.concatenate((num_syn_data_np, cat_syn_data_oh), axis = 1)).astype(float) le_syn_num = pd.DataFrame(num_syn_data_np).astype(float) le_syn_cat = pd.DataFrame(cat_syn_data_oh).astype(float) # Check for nan if le_syn_data.isnull().values.any(): nan_coordinate = np.isnan(le_syn_data.to_numpy()).nonzero() nan_row = np.unique(nan_coordinate[0]) print(f"Synthetic data contains NaN at row {nan_row}: ") print(le_syn_data.iloc[nan_row]) return None, None
np.set_printoptions(precision=4)
result = []
print('=========== All Features ===========') print('Data shape: ', le_syn_data.shape)
X_syn_loader = GenericDataLoader(le_syn_data) X_real_loader = GenericDataLoader(le_real_data)
quality_evaluator = eval_statistical.AlphaPrecision() qual_res = quality_evaluator.evaluate(X_real_loader, X_syn_loader) qual_res = { k: v for (k, v) in qual_res.items() if "naive" in k } # use the naive implementation of AlphaPrecision qual_score = np.mean(list(qual_res.values()))
print('alpha precision: {:.6f}, beta recall: {:.6f}'.format(qual_res['delta_precision_alpha_naive'], qual_res['delta_coverage_beta_naive'] ))
Alpha_Precision_all = qual_res['delta_precision_alpha_naive'] Beta_Recall_all = qual_res['delta_coverage_beta_naive']
return Alpha_Precision_all, Beta_Recall_all
if __name__ == '__main__': exp_name = args.exp_name if exp_name is None: exp_name = "non_learnable_schedule" if args.non_learnable_schedule else "learnable_schedule" dataname = args.dataname data_dir = f'data/{dataname}' info_path = f'{data_dir}/info.json' real_path = f'synthetic/{dataname}/real.csv' sample_dir = f"eval/report_runs/{exp_name}/{dataname}/all_samples" sample_paths = glob.glob(os.path.join(sample_dir, "*.csv")) print(f"{len(sample_paths )} samples loaded from {sample_dir}")
alphas, betas = [], [] for syn_path in sample_paths: alpha_precision, beta_recall = evaluate_quality(real_path, syn_path, info_path) if (alpha_precision is None) or (beta_recall is None): continue alphas.append(alpha_precision) betas.append(beta_recall)
alphas = np.array(alphas) betas = np.array(betas) alpha_percent = alphas * 100 beta_percent = betas * 100 quality = pd.DataFrame({ 'alpha': alpha_percent, 'beta': beta_percent }) avg = quality.mean(axis=0).round(2) std = quality.std(axis=0).round(2) quality_avg_std = pd.concat([avg, std], axis=1, ignore_index=True) quality_avg_std.columns = ["avg", "std"] quality_avg_std.index = ["alpha", "beta"] save_dir = os.path.dirname(sample_dir) quality.to_csv(os.path.join(save_dir, "quality.csv"), index=True) avg_std = pd.read_csv(os.path.join(save_dir, "avg_std.csv"), index_col=0) avg_std = pd.concat([avg_std, quality_avg_std]) print(avg_std) avg_std.to_csv(os.path.join(save_dir, "avg_std.csv"), index=True)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781import numpy as npimport pandas as pdfrom xgboost import XGBClassifier, XGBRegressorfrom sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier, RandomForestRegressorfrom sklearn.linear_model import LogisticRegression, LinearRegressionfrom sklearn.neural_network import MLPClassifier, MLPRegressorfrom sklearn.preprocessing import OneHotEncoder, LabelEncoderfrom sklearn.tree import DecisionTreeClassifierfrom sklearn.metrics import classification_report, accuracy_score, f1_score, precision_score, recall_score, roc_auc_scorefrom sklearn.metrics import explained_variance_score, mean_squared_error, mean_absolute_error, r2_scorefrom sklearn.model_selection import ParameterGridfrom sklearn.utils._testing import ignore_warningsfrom sklearn.exceptions import ConvergenceWarningimport loggingfrom prdc import compute_prdcfrom tqdm import tqdm
CATEGORICAL = "categorical"CONTINUOUS = "continuous"
_MODELS = { 'binclass': [ # 184 # { # 'class': DecisionTreeClassifier, # 48 # 'kwargs': { # 'max_depth': [4, 8, 16, 32], # 'min_samples_split': [2, 4, 8], # 'min_samples_leaf': [1, 2, 4, 8] # } # }, # { # 'class': AdaBoostClassifier, # 4 # 'kwargs': { # 'n_estimators': [10, 50, 100, 200] # } # }, # { # 'class': LogisticRegression, # 36 # 'kwargs': { # 'solver': ['lbfgs'], # 'n_jobs': [-1], # 'max_iter': [10, 50, 100, 200], # 'C': [0.01, 0.1, 1.0], # 'tol': [1e-01, 1e-02, 1e-04] # } # }, # { # 'class': MLPClassifier, # 12 # 'kwargs': { # 'hidden_layer_sizes': [(100, ), (200, ), (100, 100)], # 'max_iter': [50, 100], # 'alpha': [0.0001, 0.001] # } # }, # { # 'class': RandomForestClassifier, # 48 # 'kwargs': { # 'max_depth': [8, 16, None], # 'min_samples_split': [2, 4, 8], # 'min_samples_leaf': [1, 2, 4, 8], # 'n_jobs': [-1]
# } # }, { 'class': XGBClassifier, # 36 'kwargs': { 'n_estimators': [10, 50, 100], 'min_child_weight': [1, 10], 'max_depth': [5, 10, 20], 'gamma': [0.0, 1.0], 'objective': ['binary:logistic'], 'nthread': [-1], 'tree_method': ['gpu_hist'] }, }
], 'multiclass': [ # 132 # { # 'class': MLPClassifier, # 12 # 'kwargs': { # 'hidden_layer_sizes': [(100, ), (200, ), (100, 100)], # 'max_iter': [50, 100], # 'alpha': [0.0001, 0.001] # } # }, # { # 'class': DecisionTreeClassifier, # 48 # 'kwargs': { # 'max_depth': [4, 8, 16, 32], # 'min_samples_split': [2, 4, 8], # 'min_samples_leaf': [1, 2, 4, 8] # } # }, # { # 'class': RandomForestClassifier, # 36 # 'kwargs': { # 'max_depth': [8, 16, None], # 'min_samples_split': [2, 4, 8], # 'min_samples_leaf': [1, 2, 4, 8], # 'n_jobs': [-1]
# } # }, { 'class': XGBClassifier, # 36 'kwargs': { 'n_estimators': [10, 50, 100], 'min_child_weight': [1, 10], 'max_depth': [5, 10, 20], 'gamma': [0.0, 1.0], 'objective': ['binary:logistic'], 'nthread': [-1], 'tree_method': ['gpu_hist'] } }
], 'regression': [ # 84 # { # 'class': LinearRegression, # }, # { # 'class': MLPRegressor, # 12 # 'kwargs': { # 'hidden_layer_sizes': [(100, ), (200, ), (100, 100)], # 'max_iter': [50, 100], # 'alpha': [0.0001, 0.001] # } #}, { 'class': XGBRegressor, # 36 'kwargs': { 'n_estimators': [10, 50, 100], 'min_child_weight': [1, 10], 'max_depth': [5, 10, 20], 'gamma': [0.0, 1.0], 'objective': ['reg:linear'], 'nthread': [-1], 'tree_method': ['gpu_hist'] } }, # { # 'class': RandomForestRegressor, # 36 # 'kwargs': { # 'max_depth': [8, 16, None], # 'min_samples_split': [2, 4, 8], # 'min_samples_leaf': [1, 2, 4, 8], # 'n_jobs': [-1] # } # } ]}
def feat_transform(data, info, label_encoder = None, encoders = None, cmax = None, cmin = None): num_col_idx = info['num_col_idx'] cat_col_idx = info['cat_col_idx'] target_col_idx = info['target_col_idx']
num_cols = len(num_col_idx + cat_col_idx + target_col_idx) features = [] if not encoders: encoders = dict() for idx in range(num_cols): col = data[:, idx]
if idx in target_col_idx:
if info['task_type'] != 'regression': if not label_encoder: label_encoder = LabelEncoder() label_encoder.fit(col)
encoded_labels = label_encoder.transform(col) labels = encoded_labels else: col = col.astype(np.float32) labels = col.astype(np.float32) continue
if idx in num_col_idx: col = col.astype(np.float32)
if not cmin: cmin = col.min() if not cmax: cmax = col.max()
if cmin >= 0 and cmax >= 1e3: feature = np.log(np.maximum(col, 1e-2))
else: feature = (col - cmin) / (cmax - cmin) * 5
elif idx in cat_col_idx: encoder = encoders.get(idx) col = col.reshape(-1, 1) if encoder: feature = encoder.transform(col) else: # encoder = OneHotEncoder(sparse=False, handle_unknown='ignore') encoder = OneHotEncoder(sparse_output=False, handle_unknown='ignore') # New in version 1.2: sparse was renamed to sparse_output encoders[idx] = encoder feature = encoder.fit_transform(col)
features.append(feature) features = np.column_stack(features) return features, labels, label_encoder, encoders, cmax, cmin
def prepare_ml_problem(train, test, info, val=None): # test_X, test_y, label_encoder, encoders = feat_transform(test, info) # train_X, train_y, _, _ = feat_transform(train, info, label_encoder, encoders) train_X, train_y, label_encoder, encoders, cmax, cmin = feat_transform(train, info) test_X, test_y, _, _ , _, _ = feat_transform(test, info, label_encoder, encoders, cmax, cmin)
if val is not None: val_X, val_y, _, _, _, _ = feat_transform(val, info, label_encoder, encoders, cmax, cmin) else: total_train_num = train_X.shape[0] val_num = int(total_train_num / 9)
total_train_idx = np.arange(total_train_num) np.random.shuffle(total_train_idx) train_idx = total_train_idx[val_num:] val_idx = total_train_idx[:val_num]
# val_X, val_y = train_X[val_idx], train_y[val_idx] # train_X, train_y = train_X[train_idx], train_y[train_idx] # model = _MODELS[info['task_type']] # return train_X, train_y, train_X, train_y, test_X, test_y, model
val_X, val_y = train_X[val_idx], train_y[val_idx] train_X, train_y = train_X[train_idx], train_y[train_idx] model = _MODELS[info['task_type']] return train_X, train_y, val_X, val_y, test_X, test_y, model
class FeatureMaker:
def __init__(self, metadata, label_column='label', label_type='int', sample=50000): self.columns = metadata['columns'] self.label_column = label_column self.label_type = label_type self.sample = sample self.encoders = dict()
def make_features(self, data): data = data.copy() np.random.shuffle(data) data = data[:self.sample]
features = [] labels = []
for index, cinfo in enumerate(self.columns): col = data[:, index] if cinfo['name'] == self.label_column: if self.label_type == 'int': labels = col.astype(int) elif self.label_type == 'float': labels = col.astype(float) else: assert 0, 'unkown label type' continue
if cinfo['type'] == CONTINUOUS: cmin = cinfo['min'] cmax = cinfo['max'] if cmin >= 0 and cmax >= 1e3: feature = np.log(np.maximum(col, 1e-2))
else: feature = (col - cmin) / (cmax - cmin) * 5
else: if cinfo['size'] <= 2: feature = col
else: encoder = self.encoders.get(index) col = col.reshape(-1, 1) if encoder: feature = encoder.transform(col) else: encoder = OneHotEncoder(sparse=False, handle_unknown='ignore') self.encoders[index] = encoder feature = encoder.fit_transform(col)
features.append(feature)
features = np.column_stack(features)
return features, labels
def _prepare_ml_problem(train, val, test, metadata, eval): fm = FeatureMaker(metadata) x_trains, y_trains = [], []
for i in train: x_train, y_train = fm.make_features(i) x_trains.append(x_train) y_trains.append(y_train)
x_val, y_val = fm.make_features(val) if eval is None: x_test = None y_test = None else: x_test, y_test = fm.make_features(test) model = _MODELS[metadata['problem_type']]
return x_trains, y_trains, x_val, y_val, x_test, y_test, model
def _weighted_f1(y_test, pred): report = classification_report(y_test, pred, output_dict=True) classes = list(report.keys())[:-3] proportion = [ report[i]['support'] / len(y_test) for i in classes] weighted_f1 = np.sum(list(map(lambda i, prop: report[i]['f1-score']* (1-prop)/(len(classes)-1), classes, proportion))) return weighted_f1
@ignore_warnings(category=ConvergenceWarning)def _evaluate_multi_classification(train, test, info, val=None): x_trains, y_trains, x_valid, y_valid, x_test, y_test, classifiers = prepare_ml_problem(train, test, info, val=val) best_f1_scores = [] unique_labels = np.unique(y_trains)
best_f1_scores = [] best_weighted_scores = [] best_auroc_scores = [] best_acc_scores = [] best_avg_scores = []
for model_spec in classifiers: model_class = model_spec['class'] model_kwargs = model_spec.get('kwargs', dict()) model_repr = model_class.__name__
unique_labels = np.unique(y_trains)
param_set = list(ParameterGrid(model_kwargs))
results = [] for param in tqdm(param_set): model = model_class(**param)
try: model.fit(x_trains, y_trains) except: pass
if len(unique_labels) != len(np.unique(y_valid)): pred = [unique_labels[0]] * len(x_valid) pred_prob = np.array([1.] * len(x_valid)) else: pred = model.predict(x_valid) pred_prob = model.predict_proba(x_valid)
macro_f1 = f1_score(y_valid, pred, average='macro') weighted_f1 = _weighted_f1(y_valid, pred) acc = accuracy_score(y_valid, pred)
# 3. auroc # size = [a["size"] for a in metadata["columns"] if a["name"] == "label"][0] size = len(set(unique_labels)) rest_label = set(range(size)) - set(unique_labels) tmp = [] j = 0 for i in range(size): if i in rest_label: tmp.append(np.array([0] * y_valid.shape[0])[:,np.newaxis]) else: try: tmp.append(pred_prob[:,[j]]) except: tmp.append(pred_prob[:, np.newaxis]) j += 1
roc_auc = roc_auc_score(np.eye(size)[y_valid], np.hstack(tmp), multi_class='ovr')
results.append( { "name": model_repr, "param": param, "macro_f1": macro_f1, "weighted_f1": weighted_f1, "roc_auc": roc_auc, "accuracy": acc } )
results = pd.DataFrame(results) results['avg'] = results.loc[:, ['macro_f1', 'weighted_f1', 'roc_auc']].mean(axis=1) best_f1_param = results.param[results.macro_f1.idxmax()] best_weighted_param = results.param[results.weighted_f1.idxmax()] best_auroc_param = results.param[results.roc_auc.idxmax()] best_acc_param = results.param[results.accuracy.idxmax()] best_avg_param = results.param[results.avg.idxmax()]
# test the best model results = pd.DataFrame(results) # best_param = results.param[results.macro_f1.idxmax()]
def _calc(best_model): best_scores = [] x_train = x_trains y_train = y_trains try: best_model.fit(x_train, y_train) except: pass
if len(unique_labels) != len(np.unique(y_test)): pred = [unique_labels[0]] * len(x_test) pred_prob = np.array([1.] * len(x_test)) else: pred = best_model.predict(x_test) pred_prob = best_model.predict_proba(x_test)
macro_f1 = f1_score(y_test, pred, average='macro') weighted_f1 = _weighted_f1(y_test, pred) acc = accuracy_score(y_test, pred)
# 3. auroc size = len(set(unique_labels)) rest_label = set(range(size)) - set(unique_labels) tmp = [] j = 0 for i in range(size): if i in rest_label: tmp.append(np.array([0] * y_test.shape[0])[:,np.newaxis]) else: try: tmp.append(pred_prob[:,[j]]) except: tmp.append(pred_prob[:, np.newaxis]) j += 1 roc_auc = roc_auc_score(np.eye(size)[y_test], np.hstack(tmp), multi_class='ovr')
best_scores.append( { "name": model_repr, "macro_f1": macro_f1, "weighted_f1": weighted_f1, "roc_auc": roc_auc, "accuracy": acc } ) return pd.DataFrame(best_scores)
def _df(dataframe): return { "name": model_repr, "macro_f1": dataframe.macro_f1.values[0], "roc_auc": dataframe.roc_auc.values[0], "weighted_f1": dataframe.weighted_f1.values[0], "accuracy": dataframe.accuracy.values[0], }
best_f1_scores.append(_df(_calc(model_class(**best_f1_param)))) best_weighted_scores.append(_df(_calc(model_class(**best_weighted_param)))) best_auroc_scores.append(_df(_calc(model_class(**best_auroc_param)))) best_acc_scores.append(_df(_calc(model_class(**best_acc_param)))) best_avg_scores.append(_df(_calc(model_class(**best_avg_param))))
return best_f1_scores, best_weighted_scores, best_auroc_scores, best_acc_scores, best_avg_scores
@ignore_warnings(category=ConvergenceWarning)def _evaluate_binary_classification(train, test, info, val=None): x_trains, y_trains, x_valid, y_valid, x_test, y_test, classifiers = prepare_ml_problem(train, test, info, val=val)
unique_labels = np.unique(y_trains)
best_f1_scores = [] best_weighted_scores = [] best_auroc_scores = [] best_acc_scores = [] best_avg_scores = []
for model_spec in classifiers:
model_class = model_spec['class'] model_kwargs = model_spec.get('kwargs', dict()) model_repr = model_class.__name__
unique_labels = np.unique(y_trains)
param_set = list(ParameterGrid(model_kwargs))
results = [] for param in tqdm(param_set): model = model_class(**param)
try: model.fit(x_trains, y_trains) except ValueError: pass
if len(unique_labels) == 1: pred = [unique_labels[0]] * len(x_valid) pred_prob = np.array([1.] * len(x_valid)) else: pred = model.predict(x_valid) pred_prob = model.predict_proba(x_valid)
binary_f1 = f1_score(y_valid, pred, average='binary') weighted_f1 = _weighted_f1(y_valid, pred) acc = accuracy_score(y_valid, pred) precision = precision_score(y_valid, pred, average='binary') recall = recall_score(y_valid, pred, average='binary') macro_f1 = f1_score(y_valid, pred, average='macro')
# auroc size = 2 rest_label = set(range(size)) - set(unique_labels) tmp = [] j = 0 for i in range(size): if i in rest_label: tmp.append(np.array([0] * y_valid.shape[0])[:,np.newaxis]) else: try: tmp.append(pred_prob[:,[j]]) except: tmp.append(pred_prob[:, np.newaxis]) j += 1 roc_auc = roc_auc_score(np.eye(size)[y_valid], np.hstack(tmp))
results.append( { "name": model_repr, "param": param, "binary_f1": binary_f1, "weighted_f1": weighted_f1, "roc_auc": roc_auc, "accuracy": acc, "precision": precision, "recall": recall, "macro_f1": macro_f1 } )
# test the best model results = pd.DataFrame(results) results['avg'] = results.loc[:, ['binary_f1', 'weighted_f1', 'roc_auc']].mean(axis=1) best_f1_param = results.param[results.binary_f1.idxmax()] best_weighted_param = results.param[results.weighted_f1.idxmax()] best_auroc_param = results.param[results.roc_auc.idxmax()] best_acc_param = results.param[results.accuracy.idxmax()] best_avg_param = results.param[results.avg.idxmax()]
def _calc(best_model): best_scores = []
best_model.fit(x_trains, y_trains)
if len(unique_labels) == 1: pred = [unique_labels[0]] * len(x_test) pred_prob = np.array([1.] * len(x_test)) else: pred = best_model.predict(x_test) pred_prob = best_model.predict_proba(x_test)
binary_f1 = f1_score(y_test, pred, average='binary') weighted_f1 = _weighted_f1(y_test, pred) acc = accuracy_score(y_test, pred) precision = precision_score(y_test, pred, average='binary') recall = recall_score(y_test, pred, average='binary') macro_f1 = f1_score(y_test, pred, average='macro')
# auroc size = 2 rest_label = set(range(size)) - set(unique_labels) tmp = [] j = 0 for i in range(size): if i in rest_label: tmp.append(np.array([0] * y_test.shape[0])[:,np.newaxis]) else: try: tmp.append(pred_prob[:,[j]]) except: tmp.append(pred_prob[:, np.newaxis]) j += 1 try: roc_auc = roc_auc_score(np.eye(size)[y_test], np.hstack(tmp)) except ValueError: tmp[1] = tmp[1].reshape(20000, 1) roc_auc = roc_auc_score(np.eye(size)[y_test], np.hstack(tmp))
best_scores.append( { "name": model_repr, # "param": param, "binary_f1": binary_f1, "weighted_f1": weighted_f1, "roc_auc": roc_auc, "accuracy": acc, "precision": precision, "recall": recall, "macro_f1": macro_f1 } )
return pd.DataFrame(best_scores) def _df(dataframe): return { "name": model_repr, "binary_f1": dataframe.binary_f1.values[0], "roc_auc": dataframe.roc_auc.values[0], "weighted_f1": dataframe.weighted_f1.values[0], "accuracy": dataframe.accuracy.values[0], } best_f1_scores.append(_df(_calc(model_class(**best_f1_param)))) best_weighted_scores.append(_df(_calc(model_class(**best_weighted_param)))) best_auroc_scores.append(_df(_calc(model_class(**best_auroc_param)))) best_acc_scores.append(_df(_calc(model_class(**best_acc_param)))) best_avg_scores.append(_df(_calc(model_class(**best_avg_param))))
return best_f1_scores, best_weighted_scores, best_auroc_scores, best_acc_scores, best_avg_scores
@ignore_warnings(category=ConvergenceWarning)def _evaluate_regression(train, test, info, val=None): x_trains, y_trains, x_valid, y_valid, x_test, y_test, regressors = prepare_ml_problem(train, test, info, val=val)
best_r2_scores = [] best_ev_scores = [] best_mae_scores = [] best_rmse_scores = [] best_avg_scores = []
y_trains = np.log(np.clip(y_trains, 1, 20000)) y_test = np.log(np.clip(y_test, 1, 20000))
for model_spec in regressors: model_class = model_spec['class'] model_kwargs = model_spec.get('kwargs', dict()) model_repr = model_class.__name__
param_set = list(ParameterGrid(model_kwargs))
results = [] for param in tqdm(param_set): model = model_class(**param) model.fit(x_trains, y_trains) pred = model.predict(x_valid)
r2 = r2_score(y_valid, pred) explained_variance = explained_variance_score(y_valid, pred) mean_squared = mean_squared_error(y_valid, pred) root_mean_squared = mean_squared_error(y_valid, pred, squared=False) mean_absolute = mean_absolute_error(y_valid, pred)
results.append( { "name": model_repr, "param": param, "r2": r2, "explained_variance": explained_variance, "mean_squared": mean_squared, "mean_absolute": mean_absolute, "rmse": root_mean_squared } )
results = pd.DataFrame(results) # results['avg'] = results.loc[:, ['r2', 'rmse']].mean(axis=1) best_r2_param = results.param[results.r2.idxmax()] best_ev_param = results.param[results.explained_variance.idxmax()] best_mae_param = results.param[results.mean_absolute.idxmin()] best_rmse_param = results.param[results.rmse.idxmin()] # best_avg_param = results.param[results.avg.idxmax()]
def _calc(best_model): best_scores = [] x_train, y_train = x_trains, y_trains best_model.fit(x_train, y_train) pred = best_model.predict(x_test)
r2 = r2_score(y_test, pred) explained_variance = explained_variance_score(y_test, pred) mean_squared = mean_squared_error(y_test, pred) root_mean_squared = mean_squared_error(y_test, pred, squared=False) mean_absolute = mean_absolute_error(y_test, pred)
best_scores.append( { "name": model_repr, "param": param, "r2": r2, "explained_variance": explained_variance, "mean_squared": mean_squared, "mean_absolute": mean_absolute, "rmse": root_mean_squared } )
return pd.DataFrame(best_scores)
def _df(dataframe): return { "name": model_repr, "r2": dataframe.r2.values[0].astype(float), "explained_variance": dataframe.explained_variance.values[0].astype(float), "MAE": dataframe.mean_absolute.values[0].astype(float), "RMSE": dataframe.rmse.values[0].astype(float), }
best_r2_scores.append(_df(_calc(model_class(**best_r2_param)))) best_ev_scores.append(_df(_calc(model_class(**best_ev_param)))) best_mae_scores.append(_df(_calc(model_class(**best_mae_param)))) best_rmse_scores.append(_df(_calc(model_class(**best_rmse_param))))
return best_r2_scores, best_rmse_scores
@ignore_warnings(category=ConvergenceWarning)def compute_diversity(train, fake): nearest_k = 5 if train.shape[0] >= 50000: num = np.random.randint(0, train.shape[0], 50000) real_features = train[num] fake_features_lst = [i[num] for i in fake] else: num = train.shape[0] real_features = train[:num] fake_features_lst = [i[:num] for i in fake] scores = [] for i, data in enumerate(fake_features_lst): fake_features = data metrics = compute_prdc(real_features=real_features, fake_features=fake_features, nearest_k=nearest_k) metrics['i'] = i scores.append(metrics) return pd.DataFrame(scores).mean(axis=0), pd.DataFrame(scores).std(axis=0)
_EVALUATORS = { 'binclass': _evaluate_binary_classification, 'multiclass': _evaluate_multi_classification, 'regression': _evaluate_regression}
def get_evaluator(problem_type): return _EVALUATORS[problem_type]
def compute_scores(train, test, synthesized_data, metadata, eval): a, b, c = _EVALUATORS[metadata['problem_type']](train=train, test=test, fake=synthesized_data, metadata=metadata, eval=eval) if eval is None: return a.mean(axis=0), a.std(axis=0), a[['name','param']] else: return a.mean(axis=0), a.std(axis=0)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111# coding=utf-8# Copyright 2020 The Google Research Authors.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.
# pylint: skip-file"""Return training and evaluation/test datasets from config files."""import torchimport numpy as npimport pandas as pdfrom tabular_transformer import GeneralTransformerimport jsonimport loggingimport os
CATEGORICAL = "categorical"CONTINUOUS = "continuous"
LOGGER = logging.getLogger(__name__)
DATA_PATH = os.path.join(os.path.dirname(__file__), 'tabular_datasets')
def _load_json(path): with open(path) as json_file: return json.load(json_file)
def _load_file(filename, loader): local_path = os.path.join(DATA_PATH, filename) if loader == np.load: return loader(local_path, allow_pickle=True) return loader(local_path)
def _get_columns(metadata): categorical_columns = list()
for column_idx, column in enumerate(metadata['columns']): if column['type'] == CATEGORICAL: categorical_columns.append(column_idx)
return categorical_columns
def load_data(name): data_dir = f'data/{name}' info_path = f'{data_dir}/info.json'
train = pd.read_csv(f'{data_dir}/train.csv').to_numpy() test = pd.read_csv(f'{data_dir}/test.csv').to_numpy()
with open(f'{data_dir}/info.json', 'r') as f: info = json.load(f)
task_type = info['task_type']
num_cols = info['num_col_idx'] cat_cols = info['cat_col_idx'] target_cols = info['target_col_idx']
if task_type != 'regression': cat_cols = cat_cols + target_cols
return train, test, (cat_cols, info)
def get_dataset(FLAGS, evaluation=False):
batch_size = FLAGS.training_batch_size if not evaluation else FLAGS.eval_batch_size
if batch_size % torch.cuda.device_count() != 0: raise ValueError(f'Batch sizes ({batch_size} must be divided by' f'the number of devices ({torch.cuda.device_count()})')
# Create dataset builders for tabular data. train, test, cols = load_data(FLAGS.dataname) cols_idx = list(np.arange(train.shape[1])) dis_idx = cols[0] con_idx = [x for x in cols_idx if x not in dis_idx]
#split continuous and categorical train_con = train[:,con_idx] train_dis = train[:,dis_idx]
#new index cat_idx_ = list(np.arange(train_dis.shape[1]))[:len(cols[0])]
transformer_con = GeneralTransformer() transformer_dis = GeneralTransformer()
transformer_con.fit(train_con, []) transformer_dis.fit(train_dis, cat_idx_)
train_con_data = transformer_con.transform(train_con) train_dis_data = transformer_dis.transform(train_dis)
return train, train_con_data, train_dis_data, test, (transformer_con, transformer_dis, cols[1]), con_idx, dis_idx 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110import numpy as npimport pandas as pd
CATEGORICAL = "categorical"CONTINUOUS = "continuous"
class Transformer:
@staticmethod def get_metadata(data, categorical_columns=tuple()): meta = []
df = pd.DataFrame(data) for index in df: column = df[index]
if index in categorical_columns: mapper = column.value_counts().index.tolist() meta.append({ "name": index, "type": CATEGORICAL, "size": len(mapper), "i2s": mapper }) else: meta.append({ "name": index, "type": CONTINUOUS, "min": column.min(), "max": column.max(), })
return meta
def fit(self, data, categorical_columns=tuple()): raise NotImplementedError
def transform(self, data): raise NotImplementedError
def inverse_transform(self, data): raise NotImplementedError
class GeneralTransformer(Transformer):
def __init__(self, act='tanh'): self.act = act self.meta = None self.output_dim = None
def fit(self, data, categorical_columns=tuple()): self.meta = self.get_metadata(data, categorical_columns) self.output_dim = 0 for info in self.meta: if info['type'] in [CONTINUOUS]: self.output_dim += 1 else: self.output_dim += info['size']
def transform(self, data): data_t = [] self.output_info = [] for id_, info in enumerate(self.meta): col = data[:, id_] if info['type'] == CONTINUOUS: col = (col - (info['min'])) / (info['max'] - info['min']) if self.act == 'tanh': col = col * 2 - 1 data_t.append(col.reshape([-1, 1])) self.output_info.append((1, self.act))
else: col_t = np.zeros([len(data), info['size']]) idx = list(map(info['i2s'].index, col)) col_t[np.arange(len(data)), idx] = 1 data_t.append(col_t) self.output_info.append((info['size'], 'softmax'))
return np.concatenate(data_t, axis=1)
def inverse_transform(self, data): if self.meta[1]['type'] == CONTINUOUS: data_t = np.zeros([len(data), len(self.meta)]) else: dtype = np.dtype('U50') data_t = np.empty([len(data), len(self.meta)], dtype=dtype)
data = data.copy() for id_, info in enumerate(self.meta): if info['type'] == CONTINUOUS: current = data[:, 0] data = data[:, 1:]
if self.act == 'tanh': current = (current + 1) / 2
current = np.clip(current, 0, 1) data_t[:, id_] = current * (info['max'] - info['min']) + info['min']
else: current = data[:, :info['size']] data = data[:, info['size']:] idx = np.argmax(current, axis=1) recovered = list(map(info['i2s'].__getitem__, idx))
data_t[:, id_] = recovered return data_t12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485# %%import numpy as npimport pandas as pdimport torchimport os
import json
# Metricsfrom sdmetrics.visualization import get_column_plot
import plotly.io as piofrom PIL import Imagefrom io import BytesIO
from tqdm import tqdmimport argparse
def main(args): dataname = args.dataname sample_file_name = args.sample_file_name
syn_path = f'synthetic/{dataname}/{sample_file_name}' real_path = f'synthetic/{dataname}/real.csv'
syn_data = pd.read_csv(syn_path) real_data = pd.read_csv(real_path)
print((real_data[:2]))
data_dir = f'data/{dataname}' with open(f'{data_dir}/info.json', 'r') as f: info = json.load(f)
big_img = plot_density(syn_data, real_data, info)
save_dir = f"eval/density_graphs/{dataname}" if not os.path.exists(save_dir): os.makedirs(save_dir) save_path = os.path.join(save_dir, sample_file_name.replace('.csv', '.png')) big_img.save(save_path) print(f"Saved density graph to {save_path}")
def plot_density(syn_data, real_data, info, num_per_row=3): column_names = info['column_names'] num_cat = len(column_names) num_col = num_per_row num_row = (num_cat-1)//num_col+1
imgs = [] for i, col in tqdm(enumerate(column_names), total = len(column_names)): # plot_type = 'bar' if i in info['cat_col_idx'] else 'distplot' plot_type = 'bar' if info['metadata']['columns'][str(i)]['sdtype'] == 'categorical' else 'distplot' if plot_type == 'distplot' and (syn_data[col][0] == syn_data[col]).all(): # to tackle a very weird bug # If the continuous data all aggregate at a single value, get_column_plot() cannot plot a density curve for it. # So, we perturb one entry of the cont data by a small amount print(f"\n ALERT: the generated samples column_{i} with name '{col}' all has the same value of {syn_data[col][0]} \n") syn_data[col][0] += 1e-5 fig = get_column_plot( real_data=real_data, synthetic_data=syn_data, column_name=col, plot_type=plot_type ) img_bytes = pio.to_image(fig, format='png') img = Image.open(BytesIO(img_bytes)) imgs.append(img) width, height = imgs[0].size big_img = Image.new('RGB', (width * num_col, height * num_row)) for i, img in enumerate(imgs): coordinate = (i%num_col * width, i//num_col * height) big_img.paste(img, coordinate) return big_img
if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--dataname', type=str, default='adult') parser.add_argument('--sample_file_name', type=str, default='tabsyn.csv')
args = parser.parse_args() main(args)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182import numpy as npimport pandas as pdfrom sklearn.preprocessing import OneHotEncoderfrom sklearn.metrics import f1_score, roc_auc_scorefrom sklearn.metrics import root_mean_squared_errorimport argparseimport json
parser = argparse.ArgumentParser(description='Missing Value Imputation')
parser.add_argument('--dataname', type=str, default='adult', help='Name of dataset.')parser.add_argument('--exp_name', type=str, default=None)parser.add_argument('--col', type=int, default=0, help='Numerical Column to Impute')parser.add_argument('--non_learnable_schedule', action='store_true')
args = parser.parse_args()
dataname = args.datanameexp_name = args.exp_nameif exp_name is None: exp_name = "non_learnable_schedule" if args.non_learnable_schedule else "learnable_schedule"col = args.col
dataname = args.dataname
data_dir = f'data/{dataname}'
real_path = f'{data_dir}/test.csv'
info_path = f'data/{dataname}/info.json'with open(info_path, 'r') as f: info = json.load(f)task_type = info['task_type']
encoder = OneHotEncoder()
real_data = pd.read_csv(real_path)target_col = real_data.columns[info['target_col_idx'][0]]
if task_type == "binclass": real_target = real_data[target_col].to_numpy().reshape(-1,1) real_y = encoder.fit_transform(real_target).toarray() syn_y = [] for i in range(50): syn_path = f'impute/{dataname}/{exp_name}/{i}.csv' syn_data = pd.read_csv(syn_path) target = syn_data[target_col].to_numpy().reshape(-1, 1) syn_y.append(encoder.transform(target).toarray())
syn_y_prob = np.stack(syn_y).mean(0) syn_y_oh = np.argmax(syn_y_prob, axis=1) num_classes = np.max(syn_y_oh) + 1 syn_y_oh = np.eye(num_classes)[syn_y_oh]
micro_f1 = f1_score(real_y.argmax(axis=1), syn_y_prob.argmax(axis=1), average='micro') auc = roc_auc_score(real_y, syn_y_prob, average='micro') auc_argmaxed = roc_auc_score(real_y, syn_y_oh, average='micro') print("AUC: ", round(auc*100, 3))else: y_test = real_data[target_col].to_numpy() y_test = np.log(np.clip(y_test, 1, 20000)) syn_y_ = [] error = [] for i in range(50): syn_path = f'impute/{dataname}/{exp_name}/{i}.csv' syn_data = pd.read_csv(syn_path) syn_y = syn_data[target_col].to_numpy() syn_y = np.log(np.clip(syn_y, 1, 20000)) syn_y_.append(syn_y) pred = np.stack(syn_y_).mean(0) root_mean_squared = root_mean_squared_error(y_test, pred) # mean_squared_error with squared=False is deprecated print("RMSE:", round(root_mean_squared, 4)) 123version https://git-lfs.github.com/spec/v1oid sha256:90c8072ab9a7dcc73d7bc3ea32b0e961cae5fcd7d73b6ffc2ffb44e6c291962fsize 110859912345678910111213141516171819202122232425262728293031323334353637383940414243444546import torchfrom tabdiff.main import main as tabdiff_mainimport argparse
if __name__ == '__main__': parser = argparse.ArgumentParser(description='Training of TabDiff')
# General configs parser.add_argument('--dataname', type=str, default='adult', help='Name dataset, one of those in data/ dir') parser.add_argument('--mode', type=str, default='train', help='train or test') parser.add_argument('--method', type=str, default='tabdiff', help='Currently we only release our model TabDiff. Baselines will be released soon.') parser.add_argument('--gpu', type=int, default=0, help='GPU index') parser.add_argument('--debug', action='store_true', help='Enable debug mode') parser.add_argument('--no_wandb', action='store_true', help='disable wandb') parser.add_argument('--exp_name', type=str, default=None, help='Experiment name, used to name log directories and the wandb run name') parser.add_argument('--deterministic', action='store_true', help='Whether to make the entire process deterministic, i.e., fix global random seeds') # Configs for tabdiff parser.add_argument('--y_only', action='store_true', help='Train guidance model that only model the target column') parser.add_argument('--non_learnable_schedule', action='store_true', help='disable learnable noise schedule') # Configs for testing tabdiff parser.add_argument('--num_samples_to_generate', type=int, default=None, help='Number of samples to be generated while testing') parser.add_argument('--ckpt_path', type=str, default=None, help='Path to the model checkpoint to be tested') parser.add_argument('--report', action='store_true', help="Report testing mode: this mode sequentially runs <num_runs> test runs and report the avg and std") parser.add_argument('--num_runs', type=int, default=20, help="Number of runs to be averaged in the report testing mode") # Configs for imputation parser.add_argument('--impute', action='store_true') parser.add_argument('--trial_start', type=int, default=0) parser.add_argument('--trial_size', type=int, default=50) parser.add_argument('--resample_rounds', type=int, default=1) parser.add_argument('--impute_condition', type=str, default="x_t") parser.add_argument('--y_only_model_path', type=str, default=None, help="Path to the y_only model checkpoint that will be used as the unconditional guidance model") parser.add_argument('--w_num', type=float, default=0.6) parser.add_argument('--w_cat', type=float, default=0.6)
args = parser.parse_args()
# check cuda if args.gpu != -1 and torch.cuda.is_available(): args.device = f'cuda:{args.gpu}' else: args.device = 'cpu' tabdiff_main(args)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646import numpy as npimport pandas as pdimport osimport sysimport jsonimport argparse
from sklearn.preprocessing import OrdinalEncoderfrom sklearn import model_selection
TYPE_TRANSFORM ={ 'float', np.float32, 'str', str, 'int', int}
INFO_PATH = 'data/Info'
parser = argparse.ArgumentParser(description='process dataset')
# General configsparser.add_argument('--dataname', type=str, default=None, help='Name of dataset.')args = parser.parse_args()
def preprocess_beijing(): with open(f'{INFO_PATH}/beijing.json', 'r') as f: info = json.load(f) data_path = info['raw_data_path']
data_df = pd.read_csv(data_path) columns = data_df.columns
data_df = data_df[columns[1:]]
df_cleaned = data_df.dropna() df_cleaned.to_csv(info['data_path'], index = False) def preprocess_beijing_dcr(): with open(f'{INFO_PATH}/beijing_dcr.json', 'r') as f: info = json.load(f) data_path = info['raw_data_path']
data_df = pd.read_csv(data_path) columns = data_df.columns
data_df = data_df[columns[1:]]
df_cleaned = data_df.dropna() df_cleaned.to_csv(info['data_path'], index = False)
def preprocess_news(remove_cat=False): name = 'news' if not remove_cat else 'news_nocat' with open(f'{INFO_PATH}/{name}.json', 'r') as f: info = json.load(f)
data_path = info['raw_data_path'] data_df = pd.read_csv(data_path) data_df = data_df.drop('url', axis=1)
columns = np.array(data_df.columns.tolist())
cat_columns1 = columns[list(range(12,18))] cat_columns2 = columns[list(range(30,38))] if not remove_cat: cat_col1 = data_df[cat_columns1].astype(int).to_numpy().argmax(axis = 1) cat_col2 = data_df[cat_columns2].astype(int).to_numpy().argmax(axis = 1)
data_df = data_df.drop(cat_columns2, axis=1) data_df = data_df.drop(cat_columns1, axis=1)
if not remove_cat: data_df['data_channel'] = cat_col1 data_df['weekday'] = cat_col2 data_save_path = f'data/{name}/{name}.csv' data_df.to_csv(f'{data_save_path}', index = False)
columns = np.array(data_df.columns.tolist()) num_columns = columns[list(range(45))] cat_columns = ['data_channel', 'weekday'] if not remove_cat else [] target_columns = columns[[45]]
info['num_col_idx'] = list(range(45)) info['cat_col_idx'] = [46, 47] if not remove_cat else [] info['target_col_idx'] = [45] info['data_path'] = data_save_path with open(f'{INFO_PATH}/{name}.json', 'w') as file: json.dump(info, file, indent=4) def preprocess_news_dcr(remove_cat=False): name = 'news_dcr' if not remove_cat else 'news_nocat_dcr' with open(f'{INFO_PATH}/{name}.json', 'r') as f: info = json.load(f)
data_path = info['raw_data_path'] data_df = pd.read_csv(data_path) data_df = data_df.drop('url', axis=1)
columns = np.array(data_df.columns.tolist())
cat_columns1 = columns[list(range(12,18))] cat_columns2 = columns[list(range(30,38))] if not remove_cat: cat_col1 = data_df[cat_columns1].astype(int).to_numpy().argmax(axis = 1) cat_col2 = data_df[cat_columns2].astype(int).to_numpy().argmax(axis = 1)
data_df = data_df.drop(cat_columns2, axis=1) data_df = data_df.drop(cat_columns1, axis=1)
if not remove_cat: data_df['data_channel'] = cat_col1 data_df['weekday'] = cat_col2 data_save_path = f'data/{name}/{name}.csv' data_df.to_csv(f'{data_save_path}', index = False)
columns = np.array(data_df.columns.tolist()) num_columns = columns[list(range(45))] cat_columns = ['data_channel', 'weekday'] if not remove_cat else [] target_columns = columns[[45]]
info['num_col_idx'] = list(range(45)) info['cat_col_idx'] = [46, 47] if not remove_cat else [] info['target_col_idx'] = [45] info['data_path'] = data_save_path with open(f'{INFO_PATH}/{name}.json', 'w') as file: json.dump(info, file, indent=4) def preprocess_diabetes(): """ Preprocesses the diabetes dataset is aligned with the concurrent work Continuous Diffusion for Mixed-Type Tabular Data (CDTD): https://github.com/muellermarkus/cdtd """ with open(f'{INFO_PATH}/diabetes.json', 'r') as f: info = json.load(f)
info['num_col_idx'] = list(range(9)) info['cat_col_idx'] = list(range(9, 36)) info['target_col_idx'] = [36] data_path = info['raw_data_path'] df = pd.read_csv(data_path, sep=',') df = df[info['column_names']] df = df.replace(r' ', np.nan) df = df.replace(r'?', np.nan) df = df.replace(r'', np.nan) num_features = [info['column_names'][idx] for idx in info['num_col_idx']] cat_features = [info['column_names'][idx] for idx in info['cat_col_idx']] target = info['column_names'][info['target_col_idx'][0]] df[target] = np.where(df[target] == 'NO', 0, 1) enc = OrdinalEncoder() df['age'] = enc.fit_transform(df['age'].to_numpy().reshape(-1,1)) # remove rows with missings in targets idx_target_nan = df[target].isna().to_numpy().nonzero()[0] df.drop(labels = idx_target_nan, axis = 0, inplace = True) # for categorical features, replace missings with 'empty', which will be counted as a new category df[cat_features] = df[cat_features].fillna('empty') # for continuous data, drop missing df.dropna(inplace = True) # ensure correct types X_cat = df[cat_features].to_numpy().astype('str') X_cont = df[num_features].to_numpy().astype('float') y = df[[target]].to_numpy() val_prop, test_prop = 0.2, 0.2 prop = val_prop / (1 - test_prop) stratify = None if info['task_type'] == 'regression' else y X_cat_train, X_cat_test, X_cont_train, X_cont_test, y_train, y_test = \ model_selection.train_test_split(X_cat, X_cont, y, test_size = test_prop, stratify = stratify, random_state = 42) if val_prop > 0: stratify = None if info['task_type'] == 'regression' else y_train X_cat_train, X_cat_val, X_cont_train, X_cont_val, y_train, y_val = \ model_selection.train_test_split(X_cat_train, X_cont_train, y_train, stratify = stratify, test_size = prop, random_state = 42) train_df = pd.DataFrame(np.concatenate([X_cont_train, X_cat_train, y_train], axis = 1), columns = num_features + cat_features + [target]) val_df = pd.DataFrame(np.concatenate([X_cont_val, X_cat_val, y_val], axis = 1), columns = num_features + cat_features + [target]) test_df = pd.DataFrame(np.concatenate([X_cont_test, X_cat_test, y_test], axis = 1), columns = num_features + cat_features + [target])
# Save the splited data train_df.to_csv(info['data_path'], index = False) val_df.to_csv(info['val_path'], index = False) test_df.to_csv(info['test_path'], index = False) # Save updated info with open(f'{INFO_PATH}/diabetes.json', 'w') as file: json.dump(info, file, indent=4) def preprocess_diabetes_dcr(): """ Preprocesses the diabetes dataset is aligned with the concurrent work Continuous Diffusion for Mixed-Type Tabular Data (CDTD): https://github.com/muellermarkus/cdtd """ with open(f'{INFO_PATH}/diabetes_dcr.json', 'r') as f: info = json.load(f)
info['num_col_idx'] = list(range(9)) info['cat_col_idx'] = list(range(9, 36)) info['target_col_idx'] = [36] data_path = info['raw_data_path'] df = pd.read_csv(data_path, sep=',') df = df[info['column_names']] df = df.replace(r' ', np.nan) df = df.replace(r'?', np.nan) df = df.replace(r'', np.nan) num_features = [info['column_names'][idx] for idx in info['num_col_idx']] cat_features = [info['column_names'][idx] for idx in info['cat_col_idx']] target = info['column_names'][info['target_col_idx'][0]] df[target] = np.where(df[target] == 'NO', 0, 1) enc = OrdinalEncoder() df['age'] = enc.fit_transform(df['age'].to_numpy().reshape(-1,1)) # remove rows with missings in targets idx_target_nan = df[target].isna().to_numpy().nonzero()[0] df.drop(labels = idx_target_nan, axis = 0, inplace = True) # for categorical features, replace missings with 'empty', which will be counted as a new category df[cat_features] = df[cat_features].fillna('empty') # for continuous data, drop missing df.dropna(inplace = True) # ensure correct types X_cat = df[cat_features].to_numpy().astype('str') X_cont = df[num_features].to_numpy().astype('float') y = df[[target]].to_numpy() val_prop, test_prop = 0.0, 0.5 # 50-50 split for dcr eval prop = val_prop / (1 - test_prop) stratify = None if info['task_type'] == 'regression' else y X_cat_train, X_cat_test, X_cont_train, X_cont_test, y_train, y_test = \ model_selection.train_test_split(X_cat, X_cont, y, test_size = test_prop, stratify = stratify, random_state = 42) if val_prop > 0: stratify = None if info['task_type'] == 'regression' else y_train X_cat_train, X_cat_val, X_cont_train, X_cont_val, y_train, y_val = \ model_selection.train_test_split(X_cat_train, X_cont_train, y_train, stratify = stratify, test_size = prop, random_state = 42) train_df = pd.DataFrame(np.concatenate([X_cont_train, X_cat_train, y_train], axis = 1), columns = num_features + cat_features + [target]) if val_prop > 0: val_df = pd.DataFrame(np.concatenate([X_cont_val, X_cat_val, y_val], axis = 1), columns = num_features + cat_features + [target]) else: val_df = pd.DataFrame(columns = num_features + cat_features + [target]).astype(train_df.dtypes) test_df = pd.DataFrame(np.concatenate([X_cont_test, X_cat_test, y_test], axis = 1), columns = num_features + cat_features + [target])
# Save the splited data train_df.to_csv(info['data_path'], index = False) val_df.to_csv(info['val_path'], index = False) test_df.to_csv(info['test_path'], index = False) # Save updated info with open(f'{INFO_PATH}/diabetes_dcr.json', 'w') as file: json.dump(info, file, indent=4)
def get_column_name_mapping(data_df, num_col_idx, cat_col_idx, target_col_idx, column_names = None): if not column_names: column_names = np.array(data_df.columns.tolist())
idx_mapping = {}
curr_num_idx = 0 curr_cat_idx = len(num_col_idx) curr_target_idx = curr_cat_idx + len(cat_col_idx)
for idx in range(len(column_names)):
if idx in num_col_idx: idx_mapping[int(idx)] = curr_num_idx curr_num_idx += 1 elif idx in cat_col_idx: idx_mapping[int(idx)] = curr_cat_idx curr_cat_idx += 1 else: idx_mapping[int(idx)] = curr_target_idx curr_target_idx += 1
inverse_idx_mapping = {} for k, v in idx_mapping.items(): inverse_idx_mapping[int(v)] = k idx_name_mapping = {} for i in range(len(column_names)): idx_name_mapping[int(i)] = column_names[i]
return idx_mapping, inverse_idx_mapping, idx_name_mapping
def train_val_test_split(data_df, cat_columns, num_train = 0, num_test = 0): total_num = data_df.shape[0] idx = np.arange(total_num)
seed = 1234
while True: np.random.seed(seed) np.random.shuffle(idx)
train_idx = idx[:num_train] test_idx = idx[-num_test:]
train_df = data_df.loc[train_idx] test_df = data_df.loc[test_idx]
flag = 0 for i in cat_columns: if len(set(train_df[i])) != len(set(data_df[i])): flag = 1 break
if flag == 0: break else: seed += 1 return train_df, test_df, seed
def process_data(name):
if name == 'news': preprocess_news() elif name == 'news_nocat': preprocess_news(remove_cat=True) elif name == 'news_dcr': preprocess_news_dcr() elif name == 'beijing': preprocess_beijing() elif name == 'beijing_dcr': preprocess_beijing_dcr() elif name == 'diabetes': preprocess_diabetes() elif name == 'diabetes_dcr': preprocess_diabetes_dcr()
with open(f'{INFO_PATH}/{name}.json', 'r') as f: info = json.load(f)
data_path = info['data_path'] if info['file_type'] == 'csv': data_df = pd.read_csv(data_path, header = info['header'])
elif info['file_type'] == 'xls': data_df = pd.read_excel(data_path, sheet_name='Data', header=1) data_df = data_df.drop('ID', axis=1)
num_data = data_df.shape[0]
column_names = info['column_names'] if info['column_names'] else data_df.columns.tolist() num_col_idx = info['num_col_idx'] cat_col_idx = info['cat_col_idx'] target_col_idx = info['target_col_idx']
num_columns = [column_names[i] for i in num_col_idx] cat_columns = [column_names[i] for i in cat_col_idx] target_columns = [column_names[i] for i in target_col_idx] idx_mapping, inverse_idx_mapping, idx_name_mapping = get_column_name_mapping(data_df, num_col_idx, cat_col_idx, target_col_idx, column_names)
has_val = bool(info['val_path']) val_df = pd.DataFrame(columns=data_df.columns).astype(data_df.dtypes) # by default (val_path is not provided), set val_Df to be empty if info['test_path']:
# if testing data is given test_path = info['test_path'] if "adult" in name: # BUG: currently data saved at adult's test_path cannot be directly loaded. Consider integrate the following code to a preprocesing function for adult with open(test_path, 'r') as f: lines = f.readlines()[1:] test_save_path = f'data/{name}/test.data' if not os.path.exists(test_save_path): with open(test_save_path, 'a') as f1: for line in lines: save_line = line.strip('\n').strip('.') f1.write(f'{save_line}\n')
test_df = pd.read_csv(test_save_path, header = None) else: test_df = pd.read_csv(test_path, header = info['header']) if has_val: # currently you cannot have a val path without a test path val_path = info['val_path'] val_df = pd.read_csv(val_path, header = info['header']) train_df = data_df if "dcr" in name and "diabetes" not in name: # create 50/50 splits for dcr datasets; no need for this for diabetes dataset as it's done in preprocessing complete_df = pd.concat([train_df, test_df, val_df], axis = 0, ignore_index=True) num_data = complete_df.shape[0] num_train = int(num_data*0.5) num_test = num_data - num_train complete_df.rename(columns = idx_name_mapping, inplace=True) train_df, test_df, seed = train_val_test_split(complete_df, cat_columns, num_train, num_test)
else: # Train/ Test Split, 90% Training (50% for dcr eval exclusively), 10% Testing (Validation set will be selected from Training set) if "dcr" in name: num_train = int(num_data*0.5) else: num_train = int(num_data*0.9) num_test = num_data - num_train
train_df, test_df, seed = train_val_test_split(data_df, cat_columns, num_train, num_test) complete_df = pd.concat([train_df, test_df, val_df], axis = 0) name_idx_mapping = {val: key for key, val in idx_name_mapping.items()} int_columns = [] int_col_idx = [] int_col_idx_wrt_num = [] for i, col_idx in enumerate(num_col_idx): col = column_names[col_idx] col_data = complete_df.iloc[:,col_idx] is_int = (col_data%1 == 0).all() if is_int: int_columns.append(col) int_col_idx.append(name_idx_mapping[col]) int_col_idx_wrt_num.append(i) info['int_col_idx'] = int_col_idx info['int_columns'] = int_columns info['int_col_idx_wrt_num'] = int_col_idx_wrt_num
train_df.columns = range(len(train_df.columns)) test_df.columns = range(len(test_df.columns)) val_df.columns = range(len(val_df.columns))
print(name, train_df.shape, val_df.shape, test_df.shape, data_df.shape)
col_info = {} for col_idx in num_col_idx: col_info[col_idx] = {} col_info['type'] = 'numerical' col_info['max'] = float(train_df[col_idx].max()) col_info['min'] = float(train_df[col_idx].min()) for col_idx in cat_col_idx: col_info[col_idx] = {} col_info['type'] = 'categorical' col_info['categorizes'] = list(set(train_df[col_idx]))
for col_idx in target_col_idx: if info['task_type'] == 'regression': col_info[col_idx] = {} col_info['type'] = 'numerical' col_info['max'] = float(train_df[col_idx].max()) col_info['min'] = float(train_df[col_idx].min()) else: col_info[col_idx] = {} col_info['type'] = 'categorical' col_info['categorizes'] = list(set(train_df[col_idx]))
info['column_info'] = col_info
train_df.rename(columns = idx_name_mapping, inplace=True) test_df.rename(columns = idx_name_mapping, inplace=True) val_df.rename(columns = idx_name_mapping, inplace=True)
for col in num_columns: if (train_df[col] == ' ?').sum() > 0: print(col) import pdb; pdb.set_trace() if (train_df[col] == '?').sum() > 0: print(col) import pdb; pdb.set_trace() train_df.loc[train_df[col] == '?', col] = np.nan for col in cat_columns: train_df.loc[train_df[col] == '?', col] = 'nan' for col in num_columns: if (test_df[col] == ' ?').sum() > 0: print(col) import pdb; pdb.set_trace() if (test_df[col] == '?').sum() > 0: print(col) import pdb; pdb.set_trace() test_df.loc[test_df[col] == '?', col] = np.nan for col in cat_columns: test_df.loc[test_df[col] == '?', col] = 'nan' for col in num_columns: val_df.loc[val_df[col] == '?', col] = np.nan for col in cat_columns: val_df.loc[val_df[col] == '?', col] = 'nan' if train_df.isna().any().any(): print("Training data contains nan in the numerical cols") import pdb; pdb.set_trace()
X_num_train = train_df[num_columns].to_numpy().astype(np.float32) X_cat_train = train_df[cat_columns].to_numpy() y_train = train_df[target_columns].to_numpy()
X_num_test = test_df[num_columns].to_numpy().astype(np.float32) X_cat_test = test_df[cat_columns].to_numpy() y_test = test_df[target_columns].to_numpy()
X_num_val = val_df[num_columns].to_numpy().astype(np.float32) X_cat_val = val_df[cat_columns].to_numpy() y_val = val_df[target_columns].to_numpy() save_dir = f'data/{name}' np.save(f'{save_dir}/X_num_train.npy', X_num_train) np.save(f'{save_dir}/X_cat_train.npy', X_cat_train) np.save(f'{save_dir}/y_train.npy', y_train)
np.save(f'{save_dir}/X_num_test.npy', X_num_test) np.save(f'{save_dir}/X_cat_test.npy', X_cat_test) np.save(f'{save_dir}/y_test.npy', y_test) if has_val: np.save(f'{save_dir}/X_num_val.npy', X_num_val) np.save(f'{save_dir}/X_cat_val.npy', X_cat_val) np.save(f'{save_dir}/y_val.npy', y_val)
train_df[num_columns] = train_df[num_columns].astype(np.float32) test_df[num_columns] = test_df[num_columns].astype(np.float32) val_df[num_columns] = val_df[num_columns].astype(np.float32)
train_df.to_csv(f'{save_dir}/train.csv', index = False) test_df.to_csv(f'{save_dir}/test.csv', index = False) if has_val: val_df.to_csv(f'{save_dir}/val.csv', index = False)
if not os.path.exists(f'synthetic/{name}'): os.makedirs(f'synthetic/{name}') train_df.to_csv(f'synthetic/{name}/real.csv', index = False) test_df.to_csv(f'synthetic/{name}/test.csv', index = False) if has_val: val_df.to_csv(f'synthetic/{name}/val.csv', index = False)
print('Numerical', X_num_train.shape) print('Categorical', X_cat_train.shape)
info['column_names'] = column_names info['train_num'] = train_df.shape[0] info['test_num'] = test_df.shape[0] info['val_num'] = val_df.shape[0]
info['idx_mapping'] = idx_mapping info['inverse_idx_mapping'] = inverse_idx_mapping info['idx_name_mapping'] = idx_name_mapping
metadata = {'columns': {}} task_type = info['task_type'] num_col_idx = info['num_col_idx'] cat_col_idx = info['cat_col_idx'] target_col_idx = info['target_col_idx']
for i in num_col_idx: metadata['columns'][i] = {} metadata['columns'][i]['sdtype'] = 'numerical' metadata['columns'][i]['computer_representation'] = 'Float'
for i in cat_col_idx: metadata['columns'][i] = {} metadata['columns'][i]['sdtype'] = 'categorical'
if task_type == 'regression': for i in target_col_idx: metadata['columns'][i] = {} metadata['columns'][i]['sdtype'] = 'numerical' metadata['columns'][i]['computer_representation'] = 'Float'
else: for i in target_col_idx: metadata['columns'][i] = {} metadata['columns'][i]['sdtype'] = 'categorical'
info['metadata'] = metadata
with open(f'{save_dir}/info.json', 'w') as file: json.dump(info, file, indent=4)
print(f'Processing and Saving {name} Successfully!')
print(name) print('Total', info['train_num'] + info['test_num']) print('Train', info['train_num']) print('Val', info['val_num']) print('Test', info['test_num']) if info['task_type'] == 'regression': num = len(info['num_col_idx'] + info['target_col_idx']) cat = len(info['cat_col_idx']) else: cat = len(info['cat_col_idx'] + info['target_col_idx']) num = len(info['num_col_idx']) print('Num', num) print('Int', len(info['int_col_idx'])) print('Cat', cat)
if __name__ == "__main__":
if args.dataname: process_data(args.dataname) else: for name in [ 'adult', 'default', 'shoppers', 'magic', 'beijing', 'news', 'news_nocat', 'diabetes', 'adult_dcr', 'default_dcr', 'shoppers_dcr', 'beijing_dcr', 'news_dcr', 'diabetes_dcr' ]: process_data(name)
1234567891011import torchfrom icecream import install
torch.set_num_threads(1)install()
from . import env # noqafrom .data import * # noqafrom .env import * # noqafrom .metrics import * # noqafrom .util import * # noqa123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780import hashlibfrom collections import Counterfrom copy import deepcopyfrom dataclasses import astuple, dataclass, replacefrom importlib.resources import pathfrom pathlib import Pathfrom typing import Any, Literal, Optional, Union, cast, Tuple, Dict, List
import numpy as npimport pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.pipeline import make_pipelineimport sklearn.preprocessingimport torchimport osfrom category_encoders import LeaveOneOutEncoderfrom sklearn.impute import SimpleImputerfrom sklearn.preprocessing import StandardScalerfrom scipy.spatial.distance import cdist
from . import env, utilfrom .metrics import calculate_metrics as calculate_metrics_from .util import TaskType, load_json
ArrayDict = Dict[str, np.ndarray]TensorDict = Dict[str, torch.Tensor]
CAT_MISSING_VALUE = 'nan'CAT_RARE_VALUE = '__rare__'Normalization = Literal['standard', 'quantile', 'minmax']NumNanPolicy = Literal['drop-rows', 'mean']CatNanPolicy = Literal['most_frequent']CatEncoding = Literal['one-hot', 'counter']YPolicy = Literal['default']DEQUANT_DIST = Literal['uniform', 'beta', 'round', 'none']
class StandardScaler1d(StandardScaler): def partial_fit(self, X, *args, **kwargs): assert X.ndim == 1 return super().partial_fit(X[:, None], *args, **kwargs)
def transform(self, X, *args, **kwargs): assert X.ndim == 1 return super().transform(X[:, None], *args, **kwargs).squeeze(1)
def inverse_transform(self, X, *args, **kwargs): assert X.ndim == 1 return super().inverse_transform(X[:, None], *args, **kwargs).squeeze(1)
def get_category_sizes(X: Union[torch.Tensor, np.ndarray]) -> List[int]: XT = X.T.cpu().tolist() if isinstance(X, torch.Tensor) else X.T.tolist() return [len(set(x)) for x in XT]
@dataclass(frozen=False)class Dataset: X_num: Optional[ArrayDict] X_cat: Optional[ArrayDict] y: ArrayDict int_col_idx_wrt_num: list y_info: Dict[str, Any] task_type: TaskType n_classes: Optional[int]
@classmethod def from_dir(cls, dir_: Union[Path, str]) -> 'Dataset': dir_ = Path(dir_) splits = [k for k in ['train', 'test'] if dir_.joinpath(f'y_{k}.npy').exists()]
def load(item) -> ArrayDict: return { x: cast(np.ndarray, np.load(dir_ / f'{item}_{x}.npy', allow_pickle=True)) # type: ignore[code] for x in splits }
if Path(dir_ / 'info.json').exists(): info = util.load_json(dir_ / 'info.json') else: info = None return Dataset( load('X_num') if dir_.joinpath('X_num_train.npy').exists() else None, load('X_cat') if dir_.joinpath('X_cat_train.npy').exists() else None, load('y'), {}, TaskType(info['task_type']), info.get('n_classes'), )
@property def is_binclass(self) -> bool: return self.task_type == TaskType.BINCLASS
@property def is_multiclass(self) -> bool: return self.task_type == TaskType.MULTICLASS
@property def is_regression(self) -> bool: return self.task_type == TaskType.REGRESSION
@property def n_num_features(self) -> int: return 0 if self.X_num is None else self.X_num['train'].shape[1]
@property def n_cat_features(self) -> int: return 0 if self.X_cat is None else self.X_cat['train'].shape[1]
@property def n_features(self) -> int: return self.n_num_features + self.n_cat_features
def size(self, part: Optional[str]) -> int: return sum(map(len, self.y.values())) if part is None else len(self.y[part])
@property def nn_output_dim(self) -> int: if self.is_multiclass: assert self.n_classes is not None return self.n_classes else: return 1
def get_category_sizes(self, part: str) -> List[int]: return [] if self.X_cat is None else get_category_sizes(self.X_cat[part])
def calculate_metrics( self, predictions: Dict[str, np.ndarray], prediction_type: Optional[str], ) -> Dict[str, Any]: metrics = { x: calculate_metrics_( self.y[x], predictions[x], self.task_type, prediction_type, self.y_info ) for x in predictions } if self.task_type == TaskType.REGRESSION: score_key = 'rmse' score_sign = -1 else: score_key = 'accuracy' score_sign = 1 for part_metrics in metrics.values(): part_metrics['score'] = score_sign * part_metrics[score_key] return metrics
def change_val(dataset: Dataset, val_size: float = 0.2): # should be done before transformations
y = np.concatenate([dataset.y['train'], dataset.y['val']], axis=0)
ixs = np.arange(y.shape[0]) if dataset.is_regression: train_ixs, val_ixs = train_test_split(ixs, test_size=val_size, random_state=777) else: train_ixs, val_ixs = train_test_split(ixs, test_size=val_size, random_state=777, stratify=y)
dataset.y['train'] = y[train_ixs] dataset.y['val'] = y[val_ixs]
if dataset.X_num is not None: X_num = np.concatenate([dataset.X_num['train'], dataset.X_num['val']], axis=0) dataset.X_num['train'] = X_num[train_ixs] dataset.X_num['val'] = X_num[val_ixs]
if dataset.X_cat is not None: X_cat = np.concatenate([dataset.X_cat['train'], dataset.X_cat['val']], axis=0) dataset.X_cat['train'] = X_cat[train_ixs] dataset.X_cat['val'] = X_cat[val_ixs]
return dataset
def num_process_nans(dataset: Dataset, policy: Optional[NumNanPolicy]) -> Dataset:
assert dataset.X_num is not None nan_masks = {k: np.isnan(v) for k, v in dataset.X_num.items()} if not any(x.any() for x in nan_masks.values()): # type: ignore[code] # assert policy is None print('No NaNs in numerical features, skipping') return dataset
assert policy is not None if policy == 'drop-rows': valid_masks = {k: ~v.any(1) for k, v in nan_masks.items()} assert valid_masks[ 'test' ].all(), 'Cannot drop test rows, since this will affect the final metrics.' new_data = {} for data_name in ['X_num', 'X_cat', 'y']: data_dict = getattr(dataset, data_name) if data_dict is not None: new_data[data_name] = { k: v[valid_masks[k]] for k, v in data_dict.items() } dataset = replace(dataset, **new_data) elif policy == 'mean': new_values = np.nanmean(dataset.X_num['train'], axis=0) X_num = deepcopy(dataset.X_num) for k, v in X_num.items(): num_nan_indices = np.where(nan_masks[k]) v[num_nan_indices] = np.take(new_values, num_nan_indices[1]) dataset = replace(dataset, X_num=X_num) else: assert util.raise_unknown('policy', policy) return dataset
# Inspired by: https://github.com/yandex-research/rtdl/blob/a4c93a32b334ef55d2a0559a4407c8306ffeeaee/lib/data.py#L20def normalize( X: ArrayDict, normalization: Normalization, seed: Optional[int], return_normalizer : bool = False) -> ArrayDict: X_train = X['train'] if normalization == 'standard': normalizer = sklearn.preprocessing.StandardScaler() elif normalization == 'minmax': normalizer = sklearn.preprocessing.MinMaxScaler() elif normalization == 'quantile': normalizer = sklearn.preprocessing.QuantileTransformer( output_distribution='normal', n_quantiles=max(min(X['train'].shape[0] // 30, 1000), 10), subsample=int(1e9), random_state=seed, ) # noise = 1e-3 # if noise > 0: # assert seed is not None # stds = np.std(X_train, axis=0, keepdims=True) # noise_std = noise / np.maximum(stds, noise) # type: ignore[code] # X_train = X_train + noise_std * np.random.default_rng(seed).standard_normal( # X_train.shape # ) else: util.raise_unknown('normalization', normalization)
normalizer.fit(X_train) if return_normalizer: return {k: normalizer.transform(v) for k, v in X.items()}, normalizer return {k: normalizer.transform(v) for k, v in X.items()}
class dequantizer: def __init__( self, dequant_dist: DEQUANT_DIST, int_col_idx_wrt_num: list, int_dequant_factor: float, # return_dequantizer: bool = False ): self.dequant_dist = dequant_dist self.int_col_idx_wrt_num = int_col_idx_wrt_num self.int_dequant_factor = int_dequant_factor def transform(self, X): X_int = X[:, self.int_col_idx_wrt_num] if self.dequant_dist == 'uniform': X[:, self.int_col_idx_wrt_num] = X_int+ np.random.uniform(size=X_int.shape) * self.int_dequant_factor elif self.dequant_dist == 'beta': X[:, self.int_col_idx_wrt_num] = X_int + np.random.beta(self.int_dequant_factor, self.int_dequant_factor, size=X_int.shape) - 0.5 elif self.dequant_dist in ['round', 'none']: pass return X def inverse_transform(self, X): X_int = X[:, self.int_col_idx_wrt_num] if self.dequant_dist == 'uniform': X[:, self.int_col_idx_wrt_num] = np.floor(X_int) elif self.dequant_dist == 'beta': X[:, self.int_col_idx_wrt_num] = np.rint(X_int) elif self.dequant_dist == 'round': X[:, self.int_col_idx_wrt_num] = np.rint(X_int) elif self.dequant_dist == 'none': pass return X # if return_dequantizer: # return {k: transform(v) for k, v in X.items()}, inverse_transform # return {k: transform(v) for k, v in X.items()}
def cat_process_nans(X: ArrayDict, policy: Optional[CatNanPolicy]) -> ArrayDict: assert X is not None nan_masks = {k: v == CAT_MISSING_VALUE for k, v in X.items()} if any(x.any() for x in nan_masks.values()): # type: ignore[code] if policy is None: X_new = X elif policy == 'most_frequent': imputer = SimpleImputer(missing_values=CAT_MISSING_VALUE, strategy=policy) # type: ignore[code] imputer.fit(X['train']) X_new = {k: cast(np.ndarray, imputer.transform(v)) for k, v in X.items()} else: util.raise_unknown('categorical NaN policy', policy) else: assert policy is None X_new = X return X_new
def cat_drop_rare(X: ArrayDict, min_frequency: float) -> ArrayDict: assert 0.0 < min_frequency < 1.0 min_count = round(len(X['train']) * min_frequency) X_new = {x: [] for x in X} for column_idx in range(X['train'].shape[1]): counter = Counter(X['train'][:, column_idx].tolist()) popular_categories = {k for k, v in counter.items() if v >= min_count} for part in X_new: X_new[part].append( [ (x if x in popular_categories else CAT_RARE_VALUE) for x in X[part][:, column_idx].tolist() ] ) return {k: np.array(v).T for k, v in X_new.items()}
def cat_encode( X: ArrayDict, encoding: Optional[CatEncoding], y_train: Optional[np.ndarray], seed: Optional[int], return_encoder : bool = False) -> Tuple[ArrayDict, bool, Optional[Any]]: # (X, is_converted_to_numerical) if encoding != 'counter': y_train = None
# Step 1. Map strings to 0-based ranges
if encoding is None: unknown_value = np.iinfo('int64').max - 3 oe = sklearn.preprocessing.OrdinalEncoder( handle_unknown='use_encoded_value', # type: ignore[code] unknown_value=unknown_value, # type: ignore[code] dtype='int64', # type: ignore[code] ).fit(X['train']) encoder = make_pipeline(oe) encoder.fit(X['train']) X = {k: encoder.transform(v) for k, v in X.items()} max_values = X['train'].max(axis=0) for part in X.keys(): if part == 'train': continue for column_idx in range(X[part].shape[1]): X[part][X[part][:, column_idx] == unknown_value, column_idx] = ( max_values[column_idx] + 1 ) if return_encoder: return (X, False, encoder) return (X, False)
# Step 2. Encode.
elif encoding == 'one-hot': ohe = sklearn.preprocessing.OneHotEncoder( handle_unknown='ignore', sparse_output=False, dtype=np.float32 # type: ignore[code] ) encoder = make_pipeline(ohe)
# encoder.steps.append(('ohe', ohe)) encoder.fit(X['train']) X = {k: encoder.transform(v) for k, v in X.items()}
elif encoding == 'counter': assert y_train is not None assert seed is not None loe = LeaveOneOutEncoder(sigma=0.1, random_state=seed, return_df=False) encoder.steps.append(('loe', loe)) encoder.fit(X['train'], y_train) X = {k: encoder.transform(v).astype('float32') for k, v in X.items()} # type: ignore[code] if not isinstance(X['train'], pd.DataFrame): X = {k: v.values for k, v in X.items()} # type: ignore[code] else: util.raise_unknown('encoding', encoding) if return_encoder: return X, True, encoder # type: ignore[code] return (X, True)
def build_target( y: ArrayDict, policy: Optional[YPolicy], task_type: TaskType) -> Tuple[ArrayDict, Dict[str, Any]]: info: Dict[str, Any] = {'policy': policy} if policy is None: pass elif policy == 'default': if task_type == TaskType.REGRESSION: mean, std = float(y['train'].mean()), float(y['train'].std()) y = {k: (v - mean) / std for k, v in y.items()} info['mean'] = mean info['std'] = std else: util.raise_unknown('policy', policy) return y, info
@dataclass(frozen=True)class Transformations: seed: int = 0 normalization: Optional[Normalization] = None num_nan_policy: Optional[NumNanPolicy] = None cat_nan_policy: Optional[CatNanPolicy] = None cat_min_frequency: Optional[float] = None cat_encoding: Optional[CatEncoding] = None y_policy: Optional[YPolicy] = 'default' dequant_dist: Optional[DEQUANT_DIST] = None int_dequant_factor: Optional[float] = 0.0
def transform_dataset( dataset: Dataset, transformations: Transformations, cache_dir: Optional[Path], return_transforms: bool = False) -> Dataset: # WARNING: the order of transformations matters. Moreover, the current # implementation is not ideal in that sense. if cache_dir is not None: transformations_md5 = hashlib.md5( str(transformations).encode('utf-8') ).hexdigest() transformations_str = '__'.join(map(str, astuple(transformations))) cache_path = ( cache_dir / f'cache__{transformations_str}__{transformations_md5}.pickle' ) if cache_path.exists(): cache_transformations, value = util.load_pickle(cache_path) if transformations == cache_transformations: print( f"Using cached features: {cache_dir.name + '/' + cache_path.name}" ) return value else: raise RuntimeError(f'Hash collision for {cache_path}') else: cache_path = None
if dataset.X_num is not None: dataset = num_process_nans(dataset, transformations.num_nan_policy)
num_transform = None int_transform = None cat_transform = None X_num = dataset.X_num
int_col_idx_wrt_num = dataset.int_col_idx_wrt_num if X_num is not None and int_col_idx_wrt_num and transformations.dequant_dist is not None: int_transform = dequantizer( transformations.dequant_dist, int_col_idx_wrt_num, transformations.int_dequant_factor, ) X_num = {k: int_transform.transform(v) for k, v in X_num.items()} if X_num is not None and transformations.normalization is not None: has_num = all([x.shape[1]>0 for x in dataset.X_num.values()]) if has_num: X_num, num_transform = normalize( X_num, transformations.normalization, transformations.seed, return_normalizer=True ) num_transform = num_transform if dataset.X_cat is None: assert transformations.cat_nan_policy is None assert transformations.cat_min_frequency is None # assert transformations.cat_encoding is None X_cat = None else: has_cat = all([x.shape[1]>0 for x in dataset.X_cat.values()]) if not has_cat: assert transformations.cat_nan_policy is None assert transformations.cat_min_frequency is None X_cat = dataset.X_cat for split in X_cat.keys(): # a patch to make sure that the empty array is transformed into int dtype X_cat[split] = X_cat[split].astype(np.int64) else: X_cat = cat_process_nans(dataset.X_cat, transformations.cat_nan_policy) if transformations.cat_min_frequency is not None: X_cat = cat_drop_rare(X_cat, transformations.cat_min_frequency) X_cat, is_num, cat_transform = cat_encode( X_cat, transformations.cat_encoding, dataset.y['train'], transformations.seed, return_encoder=True )
if is_num: X_num = ( X_cat if X_num is None else {x: np.hstack([X_num[x], X_cat[x]]) for x in X_num} ) X_cat = None
y, y_info = build_target(dataset.y, transformations.y_policy, dataset.task_type)
dataset = replace(dataset, X_num=X_num, X_cat=X_cat, y=y, y_info=y_info) dataset.num_transform = num_transform dataset.int_transform = int_transform dataset.cat_transform = cat_transform
if cache_path is not None: util.dump_pickle((transformations, dataset), cache_path) # if return_transforms: # return dataset, num_transform, cat_transform return dataset
def build_dataset( path: Union[str, Path], transformations: Transformations, cache: bool) -> Dataset: path = Path(path) dataset = Dataset.from_dir(path) return transform_dataset(dataset, transformations, path if cache else None)
def prepare_tensors( dataset: Dataset, device: Union[str, torch.device]) -> Tuple[Optional[TensorDict], Optional[TensorDict], TensorDict]: X_num, X_cat, Y = ( None if x is None else {k: torch.as_tensor(v) for k, v in x.items()} for x in [dataset.X_num, dataset.X_cat, dataset.y] ) if device.type != 'cpu': X_num, X_cat, Y = ( None if x is None else {k: v.to(device) for k, v in x.items()} for x in [X_num, X_cat, Y] ) assert X_num is not None assert Y is not None if not dataset.is_multiclass: Y = {k: v.float() for k, v in Y.items()} return X_num, X_cat, Y
################# DataLoader#################
class TabDataset(torch.utils.data.Dataset): def __init__( self, dataset : Dataset, split : Literal['train', 'val', 'test'] ): super().__init__() self.X_num = torch.from_numpy(dataset.X_num[split]) if dataset.X_num is not None else None self.X_cat = torch.from_numpy(dataset.X_cat[split]) if dataset.X_cat is not None else None self.y = torch.from_numpy(dataset.y[split])
assert self.y is not None assert self.X_num is not None or self.X_cat is not None
def __len__(self): return len(self.y)
def __getitem__(self, idx): out_dict = { 'y': self.y[idx].long() if self.y is not None else None, }
x = np.empty((0,)) if self.X_num is not None: x = self.X_num[idx] if self.X_cat is not None: x = torch.cat([x, self.X_cat[idx]], dim=0) return x.float(), out_dict
def prepare_dataloader( dataset : Dataset, split : str, batch_size: int,):
torch_dataset = TabDataset(dataset, split) loader = torch.utils.data.DataLoader( torch_dataset, batch_size=batch_size, shuffle=(split == 'train'), num_workers=1, ) while True: yield from loader
def prepare_torch_dataloader( dataset : Dataset, split : str, shuffle : bool, batch_size: int,) -> torch.utils.data.DataLoader:
torch_dataset = TabDataset(dataset, split) loader = torch.utils.data.DataLoader(torch_dataset, batch_size=batch_size, shuffle=shuffle, num_workers=1)
return loader
def dataset_from_csv(paths : Dict[str, str], cat_features, target, T): assert 'train' in paths y = {} X_num = {} X_cat = {} if len(cat_features) else None for split in paths.keys(): df = pd.read_csv(paths[split]) y[split] = df[target].to_numpy().astype(float) if X_cat is not None: X_cat[split] = df[cat_features].to_numpy().astype(str) X_num[split] = df.drop(cat_features + [target], axis=1).to_numpy().astype(float)
dataset = Dataset(X_num, X_cat, y, {}, None, len(np.unique(y['train']))) return transform_dataset(dataset, T, None)
class FastTensorDataLoader: """ A DataLoader-like object for a set of tensors that can be much faster than TensorDataset + DataLoader because dataloader grabs individual indices of the dataset and calls cat (slow). Source: https://discuss.pytorch.org/t/dataloader-much-slower-than-manual-batching/27014/6 """ def __init__(self, *tensors, batch_size=32, shuffle=False): """ Initialize a FastTensorDataLoader. :param *tensors: tensors to store. Must have the same length @ dim 0. :param batch_size: batch size to load. :param shuffle: if True, shuffle the data *in-place* whenever an iterator is created out of this object. :returns: A FastTensorDataLoader. """ assert all(t.shape[0] == tensors[0].shape[0] for t in tensors) self.tensors = tensors
self.dataset_len = self.tensors[0].shape[0] self.batch_size = batch_size self.shuffle = shuffle
# Calculate # batches n_batches, remainder = divmod(self.dataset_len, self.batch_size) if remainder > 0: n_batches += 1 self.n_batches = n_batches def __iter__(self): if self.shuffle: r = torch.randperm(self.dataset_len) self.tensors = [t[r] for t in self.tensors] self.i = 0 return self
def __next__(self): if self.i >= self.dataset_len: raise StopIteration batch = tuple(t[self.i:self.i+self.batch_size] for t in self.tensors) self.i += self.batch_size return batch
def __len__(self): return self.n_batches
def prepare_fast_dataloader( D : Dataset, split : str, batch_size: int): X = torch.from_numpy(np.concatenate([D.X_num[split], D.X_cat[split]], axis=1)).float() dataloader = FastTensorDataLoader(X, batch_size=batch_size, shuffle=(split=='train')) while True: yield from dataloader
def prepare_fast_torch_dataloader( D : Dataset, split : str, batch_size: int): if D.X_cat is not None: X = torch.from_numpy(np.concatenate([D.X_num[split], D.X_cat[split]], axis=1)).float() else: X = torch.from_numpy(D.X_num[split]).float() y = torch.from_numpy(D.y[split]) dataloader = FastTensorDataLoader(X, y, batch_size=batch_size, shuffle=(split=='train')) return dataloader
def round_columns(X_real, X_synth, columns): for col in columns: uniq = np.unique(X_real[:,col]) dist = cdist(X_synth[:, col][:, np.newaxis].astype(float), uniq[:, np.newaxis].astype(float)) X_synth[:, col] = uniq[dist.argmin(axis=1)] return X_synth
def concat_features(D : Dataset): if D.X_num is None: assert D.X_cat is not None X = {k: pd.DataFrame(v, columns=range(D.n_features)) for k, v in D.X_cat.items()} elif D.X_cat is None: assert D.X_num is not None X = {k: pd.DataFrame(v, columns=range(D.n_features)) for k, v in D.X_num.items()} else: X = { part: pd.concat( [ pd.DataFrame(D.X_num[part], columns=range(D.n_num_features)), pd.DataFrame( D.X_cat[part], columns=range(D.n_num_features, D.n_features), ), ], axis=1, ) for part in D.y.keys() }
return X
def concat_to_pd(X_num, X_cat, y): if X_num is None: return pd.concat([ pd.DataFrame(X_cat, columns=list(range(X_cat.shape[1]))), pd.DataFrame(y, columns=['y']) ], axis=1) if X_cat is not None: return pd.concat([ pd.DataFrame(X_num, columns=list(range(X_num.shape[1]))), pd.DataFrame(X_cat, columns=list(range(X_num.shape[1], X_num.shape[1] + X_cat.shape[1]))), pd.DataFrame(y, columns=['y']) ], axis=1) return pd.concat([ pd.DataFrame(X_num, columns=list(range(X_num.shape[1]))), pd.DataFrame(y, columns=['y']) ], axis=1)
def read_pure_data(path, split='train'): y = np.load(os.path.join(path, f'y_{split}.npy'), allow_pickle=True) X_num = None X_cat = None if os.path.exists(os.path.join(path, f'X_num_{split}.npy')): X_num = np.load(os.path.join(path, f'X_num_{split}.npy'), allow_pickle=True) if os.path.exists(os.path.join(path, f'X_cat_{split}.npy')): X_cat = np.load(os.path.join(path, f'X_cat_{split}.npy'), allow_pickle=True)
return X_num, X_cat, y
def read_changed_val(path, val_size=0.2): path = Path(path) X_num_train, X_cat_train, y_train = read_pure_data(path, 'train') X_num_val, X_cat_val, y_val = read_pure_data(path, 'val') is_regression = load_json(path / 'info.json')['task_type'] == 'regression'
y = np.concatenate([y_train, y_val], axis=0)
ixs = np.arange(y.shape[0]) if is_regression: train_ixs, val_ixs = train_test_split(ixs, test_size=val_size, random_state=777) else: train_ixs, val_ixs = train_test_split(ixs, test_size=val_size, random_state=777, stratify=y) y_train = y[train_ixs] y_val = y[val_ixs]
if X_num_train is not None: X_num = np.concatenate([X_num_train, X_num_val], axis=0) X_num_train = X_num[train_ixs] X_num_val = X_num[val_ixs]
if X_cat_train is not None: X_cat = np.concatenate([X_cat_train, X_cat_val], axis=0) X_cat_train = X_cat[train_ixs] X_cat_val = X_cat[val_ixs] return X_num_train, X_cat_train, y_train, X_num_val, X_cat_val, y_val
#############
def load_dataset_info(dataset_dir_name: str) -> Dict[str, Any]: path = Path("data/" + dataset_dir_name) info = util.load_json(path / 'info.json') info['size'] = info['train_size'] + info['val_size'] + info['test_size'] info['n_features'] = info['n_num_features'] + info['n_cat_features'] info['path'] = path return info123456789101112131415161718192021222324252627282930313233343536373839"""Have not used in TabDDPM project."""
import datetimeimport osimport shutilimport typing as tyfrom pathlib import Path
PROJ = Path('tab-ddpm/').absolute().resolve()EXP = PROJ / 'exp'DATA = PROJ / 'data'
def get_path(path: ty.Union[str, Path]) -> Path: if isinstance(path, str): path = Path(path) if not path.is_absolute(): path = PROJ / path return path.resolve()
def get_relative_path(path: ty.Union[str, Path]) -> Path: return get_path(path).relative_to(PROJ)
def duplicate_path( src: ty.Union[str, Path], alternative_project_dir: ty.Union[str, Path]) -> None: src = get_path(src) alternative_project_dir = get_path(alternative_project_dir) dst = alternative_project_dir / src.relative_to(PROJ) dst.parent.mkdir(parents=True, exist_ok=True) if dst.exists(): dst = dst.with_name( dst.name + '_' + datetime.datetime.now().strftime('%Y%m%dT%H%M%S') ) (shutil.copytree if src.is_dir() else shutil.copyfile)(src, dst)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157import enumfrom typing import Any, Optional, Tuple, Dict, Union, castfrom functools import partial
import numpy as npimport scipy.specialimport sklearn.metrics as skm
from . import utilfrom .util import TaskType
class PredictionType(enum.Enum): LOGITS = 'logits' PROBS = 'probs'
class MetricsReport: def __init__(self, report: dict, task_type: TaskType): self._res = {k: {} for k in report.keys()} if task_type in (TaskType.BINCLASS, TaskType.MULTICLASS): self._metrics_names = ["acc", "f1"] for k in report.keys(): self._res[k]["acc"] = report[k]["accuracy"] self._res[k]["f1"] = report[k]["macro avg"]["f1-score"] if task_type == TaskType.BINCLASS: self._res[k]["roc_auc"] = report[k]["roc_auc"] self._metrics_names.append("roc_auc")
elif task_type == TaskType.REGRESSION: self._metrics_names = ["r2", "rmse"] for k in report.keys(): self._res[k]["r2"] = report[k]["r2"] self._res[k]["rmse"] = report[k]["rmse"] else: raise "Unknown TaskType!"
def get_splits_names(self) -> list[str]: return self._res.keys()
def get_metrics_names(self) -> list[str]: return self._metrics_names
def get_metric(self, split: str, metric: str) -> float: return self._res[split][metric]
def get_val_score(self) -> float: return self._res["val"]["r2"] if "r2" in self._res["val"] else self._res["val"]["f1"] def get_test_score(self) -> float: return self._res["test"]["r2"] if "r2" in self._res["test"] else self._res["test"]["f1"] def print_metrics(self) -> None: res = { "val": {k: np.around(self._res["val"][k], 4) for k in self._res["val"]}, "test": {k: np.around(self._res["test"][k], 4) for k in self._res["test"]} } print("*"*100) print("[val]") print(res["val"]) print("[test]") print(res["test"])
return res
class SeedsMetricsReport: def __init__(self): self._reports = []
def add_report(self, report: MetricsReport) -> None: self._reports.append(report) def get_mean_std(self) -> dict: res = {k: {} for k in ["train", "val", "test"]} for split in self._reports[0].get_splits_names(): for metric in self._reports[0].get_metrics_names(): res[split][metric] = [x.get_metric(split, metric) for x in self._reports]
agg_res = {k: {} for k in ["train", "val", "test"]} for split in self._reports[0].get_splits_names(): for metric in self._reports[0].get_metrics_names(): for k, f in [("count", len), ("mean", np.mean), ("std", np.std)]: agg_res[split][f"{metric}-{k}"] = f(res[split][metric]) self._res = res self._agg_res = agg_res
return agg_res
def print_result(self) -> dict: res = {split: {k: float(np.around(self._agg_res[split][k], 4)) for k in self._agg_res[split]} for split in ["val", "test"]} print("="*100) print("EVAL RESULTS:") print("[val]") print(res["val"]) print("[test]") print(res["test"]) print("="*100) return res
def calculate_rmse( y_true: np.ndarray, y_pred: np.ndarray, std = None) -> float: rmse = skm.mean_squared_error(y_true, y_pred) ** 0.5 if std is not None: rmse *= std return rmse
def _get_labels_and_probs( y_pred: np.ndarray, task_type: TaskType, prediction_type: Optional[PredictionType]) -> Tuple[np.ndarray, Optional[np.ndarray]]: assert task_type in (TaskType.BINCLASS, TaskType.MULTICLASS)
if prediction_type is None: return y_pred, None
if prediction_type == PredictionType.LOGITS: probs = ( scipy.special.expit(y_pred) if task_type == TaskType.BINCLASS else scipy.special.softmax(y_pred, axis=1) ) elif prediction_type == PredictionType.PROBS: probs = y_pred else: util.raise_unknown('prediction_type', prediction_type)
assert probs is not None labels = np.round(probs) if task_type == TaskType.BINCLASS else probs.argmax(axis=1) return labels.astype('int64'), probs
def calculate_metrics( y_true: np.ndarray, y_pred: np.ndarray, task_type: Union[str, TaskType], prediction_type: Optional[Union[str, PredictionType]], y_info: Dict[str, Any],) -> Dict[str, Any]: # Example: calculate_metrics(y_true, y_pred, 'binclass', 'logits', {}) task_type = TaskType(task_type) if prediction_type is not None: prediction_type = PredictionType(prediction_type)
if task_type == TaskType.REGRESSION: assert prediction_type is None assert 'std' in y_info rmse = calculate_rmse(y_true, y_pred, y_info['std']) r2 = skm.r2_score(y_true, y_pred) result = {'rmse': rmse, 'r2': r2} else: labels, probs = _get_labels_and_probs(y_pred, task_type, prediction_type) result = cast( Dict[str, Any], skm.classification_report(y_true, labels, output_dict=True) ) if task_type == TaskType.BINCLASS: result['roc_auc'] = skm.roc_auc_score(y_true, probs) return result123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347import argparseimport atexitimport enumimport jsonimport osimport pickleimport shutilimport sysimport timeimport uuidfrom copy import deepcopyfrom dataclasses import asdict, fields, is_dataclassfrom pathlib import Pathfrom pprint import pprintfrom typing import Any, Callable, List, Dict, Type, Optional, Tuple, TypeVar, Union, cast, get_args, get_origin
import __main__import numpy as npimport tomliimport tomli_wimport torchimport typing as ty
from . import env
RawConfig = Dict[str, Any]Report = Dict[str, Any]T = TypeVar('T')
class Part(enum.Enum): TRAIN = 'train' VAL = 'val' TEST = 'test'
def __str__(self) -> str: return self.value
class TaskType(enum.Enum): BINCLASS = 'binclass' MULTICLASS = 'multiclass' REGRESSION = 'regression'
def __str__(self) -> str: return self.value
def update_training_log(training_log, data, metrics): def _update(log_part, data_part): for k, v in data_part.items(): if isinstance(v, dict): _update(log_part.setdefault(k, {}), v) elif isinstance(v, list): log_part.setdefault(k, []).extend(v) else: log_part.setdefault(k, []).append(v)
_update(training_log, data) transposed_metrics = {} for part, part_metrics in metrics.items(): for metric_name, value in part_metrics.items(): transposed_metrics.setdefault(metric_name, {})[part] = value _update(training_log, transposed_metrics)
def raise_unknown(unknown_what: str, unknown_value: Any): raise ValueError(f'Unknown {unknown_what}: {unknown_value}')
def _replace(data, condition, value): def do(x): if isinstance(x, dict): return {k: do(v) for k, v in x.items()} elif isinstance(x, list): return [do(y) for y in x] else: return value if condition(x) else x
return do(data)
_CONFIG_NONE = '__none__'
def unpack_config(config: RawConfig) -> RawConfig: config = cast(RawConfig, _replace(config, lambda x: x == _CONFIG_NONE, None)) return config
def pack_config(config: RawConfig) -> RawConfig: config = cast(RawConfig, _replace(config, lambda x: x is None, _CONFIG_NONE)) return config
def load_config(path: Union[Path, str]) -> Any: with open(path, 'rb') as f: return unpack_config(tomli.load(f))
def dump_config(config: Any, path: Union[Path, str]) -> None: with open(path, 'wb') as f: tomli_w.dump(pack_config(config), f) # check that there are no bugs in all these "pack/unpack" things assert config == load_config(path)
def load_json(path: Union[Path, str], **kwargs) -> Any: return json.loads(Path(path).read_text(), **kwargs)
def dump_json(x: Any, path: Union[Path, str], **kwargs) -> None: kwargs.setdefault('indent', 4) Path(path).write_text(json.dumps(x, **kwargs) + '\n')
def load_pickle(path: Union[Path, str], **kwargs) -> Any: return pickle.loads(Path(path).read_bytes(), **kwargs)
def dump_pickle(x: Any, path: Union[Path, str], **kwargs) -> None: Path(path).write_bytes(pickle.dumps(x, **kwargs))
def load(path: Union[Path, str], **kwargs) -> Any: return globals()[f'load_{Path(path).suffix[1:]}'](Path(path), **kwargs)
def dump(x: Any, path: Union[Path, str], **kwargs) -> Any: return globals()[f'dump_{Path(path).suffix[1:]}'](x, Path(path), **kwargs)
def _get_output_item_path( path: Union[str, Path], filename: str, must_exist: bool) -> Path: path = env.get_path(path) if path.suffix == '.toml': path = path.with_suffix('') if path.is_dir(): path = path / filename else: assert path.name == filename assert path.parent.exists() if must_exist: assert path.exists() return path
def load_report(path: Path) -> Report: return load_json(_get_output_item_path(path, 'report.json', True))
def dump_report(report: dict, path: Path) -> None: dump_json(report, _get_output_item_path(path, 'report.json', False))
def load_predictions(path: Path) -> Dict[str, np.ndarray]: with np.load(_get_output_item_path(path, 'predictions.npz', True)) as predictions: return {x: predictions[x] for x in predictions}
def dump_predictions(predictions: Dict[str, np.ndarray], path: Path) -> None: np.savez(_get_output_item_path(path, 'predictions.npz', False), **predictions)
def dump_metrics(metrics: Dict[str, Any], path: Path) -> None: dump_json(metrics, _get_output_item_path(path, 'metrics.json', False))
def load_checkpoint(path: Path, *args, **kwargs) -> Dict[str, np.ndarray]: return torch.load( _get_output_item_path(path, 'checkpoint.pt', True), *args, **kwargs )
def get_device() -> torch.device: if torch.cuda.is_available(): assert os.environ.get('CUDA_VISIBLE_DEVICES') is not None return torch.device('cuda:0') else: return torch.device('cpu')
def _print_sep(c, size=100): print(c * size)
_LAST_SNAPSHOT_TIME = None
def backup_output(output_dir: Path) -> None: backup_dir = os.environ.get('TMP_OUTPUT_PATH') snapshot_dir = os.environ.get('SNAPSHOT_PATH') if backup_dir is None: assert snapshot_dir is None return assert snapshot_dir is not None
try: relative_output_dir = output_dir.relative_to(env.PROJ) except ValueError: return
for dir_ in [backup_dir, snapshot_dir]: new_output_dir = dir_ / relative_output_dir prev_backup_output_dir = new_output_dir.with_name(new_output_dir.name + '_prev') new_output_dir.parent.mkdir(exist_ok=True, parents=True) if new_output_dir.exists(): new_output_dir.rename(prev_backup_output_dir) shutil.copytree(output_dir, new_output_dir) # the case for evaluate.py which automatically creates configs if output_dir.with_suffix('.toml').exists(): shutil.copyfile( output_dir.with_suffix('.toml'), new_output_dir.with_suffix('.toml') ) if prev_backup_output_dir.exists(): shutil.rmtree(prev_backup_output_dir)
global _LAST_SNAPSHOT_TIME if _LAST_SNAPSHOT_TIME is None or time.time() - _LAST_SNAPSHOT_TIME > 10 * 60: import nirvana_dl.snapshot # type: ignore[code]
nirvana_dl.snapshot.dump_snapshot() _LAST_SNAPSHOT_TIME = time.time() print('The snapshot was saved!')
def _get_scores(metrics: Dict[str, Dict[str, Any]]) -> Optional[Dict[str, float]]: return ( {k: v['score'] for k, v in metrics.items()} if 'score' in next(iter(metrics.values())) else None )
def format_scores(metrics: Dict[str, Dict[str, Any]]) -> str: return ' '.join( f"[{x}] {metrics[x]['score']:.3f}" for x in ['test', 'val', 'train'] if x in metrics )
def finish(output_dir: Path, report: dict) -> None: print() _print_sep('=')
metrics = report.get('metrics') if metrics is not None: scores = _get_scores(metrics) if scores is not None: dump_json(scores, output_dir / 'scores.json') print(format_scores(metrics)) _print_sep('-')
dump_report(report, output_dir) json_output_path = os.environ.get('JSON_OUTPUT_FILE') if json_output_path: try: key = str(output_dir.relative_to(env.PROJ)) except ValueError: pass else: json_output_path = Path(json_output_path) try: json_data = json.loads(json_output_path.read_text()) except (FileNotFoundError, json.decoder.JSONDecodeError): json_data = {} json_data[key] = load_json(output_dir / 'report.json') json_output_path.write_text(json.dumps(json_data, indent=4)) shutil.copyfile( json_output_path, os.path.join(os.environ['SNAPSHOT_PATH'], 'json_output.json'), )
output_dir.joinpath('DONE').touch() backup_output(output_dir) print(f'Done! | {report.get("time")} | {output_dir}') _print_sep('=') print()
def from_dict(datacls: Type[T], data: dict) -> T: assert is_dataclass(datacls) data = deepcopy(data) for field in fields(datacls): if field.name not in data: continue if is_dataclass(field.type): data[field.name] = from_dict(field.type, data[field.name]) elif ( get_origin(field.type) is Union and len(get_args(field.type)) == 2 and get_args(field.type)[1] is type(None) and is_dataclass(get_args(field.type)[0]) ): if data[field.name] is not None: data[field.name] = from_dict(get_args(field.type)[0], data[field.name]) return datacls(**data)
def replace_factor_with_value( config: RawConfig, key: str, reference_value: int, bounds: Tuple[float, float],) -> None: factor_key = key + '_factor' if factor_key not in config: assert key in config else: assert key not in config factor = config.pop(factor_key) assert bounds[0] <= factor <= bounds[1] config[key] = int(factor * reference_value)
def get_temporary_copy(path: Union[str, Path]) -> Path: path = env.get_path(path) assert not path.is_dir() and not path.is_symlink() tmp_path = path.with_name( path.stem + '___' + str(uuid.uuid4()).replace('-', '') + path.suffix ) shutil.copyfile(path, tmp_path) atexit.register(lambda: tmp_path.unlink()) return tmp_path
def get_python(): python = Path('python3.9') return str(python) if python.exists() else 'python'
def get_catboost_config(real_data_path, is_cv=False): ds_name = Path(real_data_path).name C = load_json(f'tuned_models/catboost/{ds_name}_cv.json') return C
def get_categories(X_train_cat): return ( None if X_train_cat is None else [ len(set(X_train_cat[:, i])) for i in range(X_train_cat.shape[1]) ] )1234567891011name: synthcitychannels: - pytorch - nvidia - defaultsdependencies: - python=3.10 - pip - pip: - synthcity - category_encoders123version https://git-lfs.github.com/spec/v1oid sha256:788ecf6df79b06c0c0e1c73269eae885e0862c7ad79baf15e72895b3b13032e7size 2719568123version https://git-lfs.github.com/spec/v1oid sha256:b9f567ce7dc617caa6a1f54059d6e92185996eef4edeee0dc3704c9e7c40bf63size 339093123version https://git-lfs.github.com/spec/v1oid sha256:08456e9ce46be6e184eefbd889ca81bd16877e740f0e40c8dbadd4418f95fa86size 3411261234567891011121314151617181920212223242526272829303132333435name: tabdiffchannels: - pytorch - nvidia - defaultsdependencies: - python=3.10 - pytorch=2.0.1 - torchvision==0.15.2 - torchaudio==2.0.2 - pytorch-cuda=11.7 - numpy<2 - pip - pip: - pandas - scikit-learn - scipy - icecream - xlrd - tomli-w - tomli==2.0.1 - category_encoders - imbalanced-learn - kaggle - transformers - datasets - peft==0.9.0 - ml_collections - sdmetrics - prdc - rdt - openpyxl - xgboost - wandb==0.17.3 - kaleido.gitattributes+23
SynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/tabular_bundle/pipeline_c17/y_val.npyAdded+3
SynthData0523/main/c17/tabbyflow/tabbyflow-c17-20260510_205403/train_20260510_205404.logAdded+3
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/config.tomlAdded+39
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/gen_20260319_072452.logAdded+1008
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/runtime_result.jsonAdded+22
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/source_import_manifest.jsonAdded+16
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/tabddpm-c17-1000-20260319_072452.csvAdded+1001
SynthData0523/main/c17/tabddpm/tabddpm-c17-20260319_072207/train_20260319_072211.logAdded+119
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_gen.pyAdded+42
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/.gitignoreAdded+15
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/LICENSEAdded+7
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/README.mdAdded+201
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_test.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_train.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_cat_val.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_test.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_train.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/X_num_val.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/info.jsonAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/real.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/staged_features.jsonAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/test.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/train.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/val.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_test.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_train.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/data/pipeline_c17/y_val.npyAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/download_dataset.pyAdded+51
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/eval_quality.pyAdded+151
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/mle.pyAdded+781
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/tabular_dataload.pyAdded+111
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/mle/tabular_transformer.pyAdded+110
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval/visualize_density.pyAdded+85
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/eval_impute.pyAdded+82
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.gifAdded

Large File Pointer Details
- SHA256: 8b3f9c4819c4ef4abf8ade862da25915b826212f3d3ef9e4774ddde19db88bf2
- Pointer size: 132 Bytes
- Size of remote file: 3.26 MB
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_demo.mp4Added+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/images/tabdiff_flowchart.jpgAdded

Large File Pointer Details
- SHA256: 34e4115e21b32199dd6cc0a0664f924907fcf1f66e2063616c50025f597b7409
- Pointer size: 131 Bytes
- Size of remote file: 383 kB
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/main.pyAdded+46
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/process_dataset.pyAdded+646
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/__init__.pyAdded+11
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/data.pyAdded+780
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/env.pyAdded+39
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/metrics.pyAdded+157
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/src/util.pyAdded+347
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthcity.yamlAdded+11
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/real.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/test.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/synthetic/pipeline_c17/val.csvAdded+3
SynthData0523/main/c17/tabdiff/tabdiff-c17-20260513_002853/_tabdiff_runtime/tabdiff.yamlAdded+35