1. 30 Sep, 2022 3 commits
    • Kashif Rasul's avatar
      time series forecasting model (#17965) · 5cd16f01
      Kashif Rasul authored
      
      
      * initial files
      
      * initial model via cli
      
      * typos
      
      * make a start on the model config
      
      * ready with configuation
      
      * remove tokenizer ref.
      
      * init the transformer
      
      * added initial model forward to return dec_output
      
      * require gluonts
      
      * update dep. ver table and add as extra
      
      * fixed typo
      
      * add type for prediction_length
      
      * use num_time_features
      
      * use config
      
      * more config
      
      * typos
      
      * opps another typo
      
      * freq can be none
      
      * default via transformation is 1
      
      * initial transformations
      
      * fix imports
      
      * added transform_start_field
      
      * add helper to create pytorch dataloader
      
      * added inital val and test data loader
      
      * added initial distr head and loss
      
      * training working
      
      * remove TimeSeriesTransformerTokenizer
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/__init__.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/__init__.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * fixed copyright
      
      * removed docs
      
      * remove time series tokenizer
      
      * fixed docs
      
      * fix text
      
      * fix second
      
      * fix default
      
      * fix order
      
      * use config directly
      
      * undo change
      
      * fix comment
      
      * fix year
      
      * fix import
      
      * add additional arguments for training vs. test
      
      * initial greedy inference loop
      
      * fix inference
      
      * comment out token inputs to enc dec
      
      * Use HF encoder/decoder
      
      * fix inference
      
      * Use Seq2SeqTSModelOutput output
      
      * return Seq2SeqTSPredictionOutput
      
      * added default arguments
      
      * fix return_dict true
      
      * scale is a tensor
      
      * output static_features for inference
      
      * clean up some unused bits
      
      * fixed typo
      
      * set return_dict if none
      
      * call model once for both train/predict
      
      * use cache if future_target is none
      
      * initial generate func
      
      * generate arguments
      
      * future_time_feat is required
      
      * return SampleTSPredictionOutput
      
      * removed unneeded classes
      
      * fix when params is none
      
      * fix return dict
      
      * fix num_attention_heads
      
      * fix arguments
      
      * remove unused shift_tokens_right
      
      * add different dropout configs
      
      * implement FeatureEmbedder, Scaler and weighted_average
      
      * remove gluonts dependency
      
      * fix class names
      
      * avoid _variable names
      
      * remove gluonts dependency
      
      * fix imports
      
      * remove gluonts from configuration
      
      * fix docs
      
      * fixed typo
      
      * move utils to examples
      
      * add example requirements
      
      * config has no freq
      
      * initial run_ts_no_trainer
      
      * remove from ignore
      
      * fix output_attentions and removed unsued getters/setters
      
      * removed unsed tests
      
      * add dec seq len
      
      * add test_attention_outputs
      
      * set has_text_modality=False
      
      * add config attribute_map
      
      * make style
      
      * make fix-copies
      
      * add encoder_outputs to TimeSeriesTransformerForPrediction forward
      
      * Improve docs, add model to README
      
      * added test_forward_signature
      
      * More improvements
      
      * Add more copied from
      
      * Fix README
      
      * Fix remaining quality issues
      
      * updated encoder and decoder
      
      * fix generate
      
      * output_hidden_states and use_cache are optional
      
      * past key_values returned too
      
      * initialize weights of distribution_output module
      
      * fixed more tests
      
      * update test_forward_signature
      
      * fix return_dict outputs
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * removed commented out tests
      
      * added neg. bin and normal output
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * move to one line
      
      * Add docstrings
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * add try except for assert and raise
      
      * try and raise exception
      
      * fix the documentation formatting
      
      * fix assert call
      
      * fix docstring formatting
      
      * removed input_ids from DOCSTRING
      
      * Update input docstring
      
      * Improve variable names
      
      * Update order of inputs
      
      * Improve configuration
      
      * Improve variable names
      
      * Improve docs
      
      * Remove key_length from tests
      
      * Add extra docs
      
      * initial unittests
      
      * added test_inference_no_head test
      
      * added test_inference_head
      
      * add test_seq_to_seq_generation
      
      * make style
      
      * one line
      
      * assert mean prediction
      
      * removed comments
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * fix order of args
      
      * make past_observed_mask optional as well
      
      * added Amazon license header
      
      * updated utils with new fieldnames
      
      * make style
      
      * cleanup
      
      * undo position of past_observed_mask
      
      * fix import
      
      * typo
      
      * more typo
      
      * rename example files
      
      * remove example for now
      
      * Update docs/source/en/_toctree.yml
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update modeling_time_series_transformer.py
      
      fix style
      
      * fixed typo
      
      * fix typo and grammer
      
      * fix style
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarNielsRogge <niels.rogge1@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      5cd16f01
    • Yih-Dar's avatar
      Add `beautifulsoup4` to the dependency list (#19253) · 2fba98e5
      Yih-Dar authored
      
      
      * Add `beautifulsoup4` to extras["testing"]
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      2fba98e5
    • Sylvain Gugger's avatar
      Poc to use safetensors (#19175) · 3e2dd7f9
      Sylvain Gugger authored
      
      
      * Poc to use safetensors
      
      * Typo
      
      * Final version
      
      * Add tests
      
      * Save with the right name!
      
      * Update tests/test_modeling_common.py
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      
      * Support for sharded checkpoints
      
      * Test from Hub part 1
      
      * Test from hub part 2
      
      * Fix regular checkpoint sharding
      
      * Bump for fixes
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      3e2dd7f9
  2. 29 Sep, 2022 1 commit
  3. 21 Sep, 2022 3 commits
  4. 16 Sep, 2022 1 commit
    • Sylvain Gugger's avatar
      Organize test jobs (#19058) · 820cb97a
      Sylvain Gugger authored
      * Tests conditional run
      
      * Syntax
      
      * Deps
      
      * Try early exit
      
      * Another way
      
      * Test with no tests to run
      
      * Test all
      
      * Typo
      
      * Try this way
      
      * With tests to run
      
      * Mostly finished
      
      * Typo
      
      * With a modification in one file only
      
      * No change, no tests
      
      * Final cleanup
      
      * Address review comments
      820cb97a
  5. 15 Sep, 2022 1 commit
  6. 14 Sep, 2022 4 commits
    • Lysandre's avatar
      Dev version · 16913b3c
      Lysandre authored
      16913b3c
    • Sylvain Gugger's avatar
      Automate check for new pipelines and metadata update (#19029) · 37740101
      Sylvain Gugger authored
      * Automate check for new pipelines and metadata update
      
      * Add Datasets to quality extra
      37740101
    • Sylvain Gugger's avatar
      a2a3afbc
    • NielsRogge's avatar
      Add Deformable DETR (#17281) · 59407bbe
      NielsRogge authored
      
      
      * First draft
      
      * More improvements
      
      * Improve model, add custom CUDA code
      
      * Import torch before
      
      * Add script that imports custom layer
      
      * Add everything in new ops directory
      
      * Import custom layer in modeling file
      
      * Fix ARCHIVE_MAP typo
      
      * Creating the custom kernel on the fly.
      
      * Import custom layer in modeling file
      
      * More improvements
      
      * Fix CUDA loading
      
      * More improvements
      
      * Improve conversion script
      
      * Improve conversion script
      
      * Make it work until encoder_outputs
      
      * Make forward pass work
      
      * More improvements
      
      * Make logits match original implementation
      
      * Make implementation also support single_scale model
      
      * Add support for single_scale and dilation checkpoint
      
      * Add support for with_box_refine model
      
      * Support also two stage model
      
      * Improve tests
      
      * Fix more tests
      
      * Make more tests pass
      
      * Upload all models to the hub
      
      * Clean up some code
      
      * Improve decoder outputs
      
      * Rename intermediate hidden states and reference points
      
      * Improve model outputs
      
      * Move tests to dedicated folder
      
      * Improve model outputs
      
      * Fix retain_grad test
      
      * Improve docs
      
      * Clean up and make test_initialization pass
      
      * Improve variable names
      
      * Add copied from statements
      
      * Improve docs
      
      * Fix style
      
      * Improve docs
      
      * Improve docs, move tests to model folder
      
      * Fix rebase
      
      * Remove DetrForSegmentation from auto mapping
      
      * Apply suggestions from code review
      
      * Improve variable names and docstrings
      
      * Apply some more suggestions from code review
      
      * Apply suggestion from code review
      
      * better docs and variables names
      
      * hint to num_queries and two_stage confusion
      
      * remove asserts and code refactor
      
      * add exception if two_stage is True and with_box_refine is False
      
      * use f-strings
      
      * Improve docs and variable names
      
      * Fix code quality
      
      * Fix rebase
      
      * Add require_torch_gpu decorator
      
      * Add pip install ninja to CI jobs
      
      * Apply suggestion of @sgugger
      
      * Remove DeformableDetrForObjectDetection from auto mapping
      
      * Remove DeformableDetrModel from auto mapping
      
      * Add model to toctree
      
      * Add model back to mappings, skip model in pipeline tests
      
      * Apply @sgugger's suggestion
      
      * Fix imports in the init
      
      * Fix copies
      
      * Add CPU implementation
      
      * Comment out GPU function
      
      * Undo previous change
      
      * Apply more suggestions
      
      * Remove require_torch_gpu annotator
      
      * Fix quality
      
      * Add logger.info
      
      * Fix logger
      
      * Fix variable names
      
      * Fix initializaztion
      
      * Add missing initialization
      
      * Update checkpoint name
      
      * Add model to doc tests
      
      * Add CPU/GPU equivalence test
      
      * Add Deformable DETR to pipeline tests
      
      * Skip model for object detection pipeline
      Co-authored-by: default avatarNicolas Patry <patry.nicolas@protonmail.com>
      Co-authored-by: default avatarNouamane Tazi <nouamane98@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <Sylvain.gugger@gmail.com>
      59407bbe
  7. 12 Sep, 2022 1 commit
  8. 10 Sep, 2022 2 commits
  9. 09 Sep, 2022 1 commit
  10. 02 Sep, 2022 1 commit
  11. 01 Sep, 2022 2 commits
  12. 31 Aug, 2022 2 commits
  13. 08 Aug, 2022 2 commits
  14. 05 Aug, 2022 1 commit
  15. 03 Aug, 2022 1 commit
  16. 01 Aug, 2022 2 commits
  17. 27 Jul, 2022 1 commit
  18. 08 Jul, 2022 1 commit
  19. 05 Jul, 2022 1 commit
  20. 28 Jun, 2022 2 commits
  21. 27 Jun, 2022 1 commit
    • Matt's avatar
      Add a TF in-graph tokenizer for BERT (#17701) · ee0d001d
      Matt authored
      * Add a TF in-graph tokenizer for BERT
      
      * Add from_pretrained
      
      * Add proper truncation, option handling to match other tokenizers
      
      * Add proper imports and guards
      
      * Add test, fix all the bugs exposed by said test
      
      * Fix truncation of paired texts in graph mode, more test updates
      
      * Small fixes, add a (very careful) test for savedmodel
      
      * Add tensorflow-text dependency, make fixup
      
      * Update documentation
      
      * Update documentation
      
      * make fixup
      
      * Slight changes to tests
      
      * Add some docstring examples
      
      * Update tests
      
      * Update tests and add proper lowercasing/normalization
      
      * make fixup
      
      * Add docstring for padding!
      
      * Mark slow tests
      
      * make fixup
      
      * Fall back to BertTokenizerFast if BertTokenizer is unavailable
      
      * Fall back to BertTokenizerFast if BertTokenizer is unavailable
      
      * make fixup
      
      * Properly handle tensorflow-text dummies
      ee0d001d
  22. 17 Jun, 2022 1 commit
    • Sourab Mangrulkar's avatar
      Migrate HFDeepSpeedConfig from trfrs to accelerate (#17623) · 21a77242
      Sourab Mangrulkar authored
      
      
      * Migrate HFDeepSpeedConfig from trfrs to accelerate
      
      * add `accelerate` to testing dep
      
      * addressing comments
      
      * addressing comments
      
      Using `_shared_state` and avoiding object creation. This is necessary as `notebook_launcher` in `launcers.py` checks `len(AcceleratorState._shared_state)>0` to throw an error.
      
      * resolving comments
      
      1. Use simple API from accelerate to manage the deepspeed config integration
      2. Update the related documentation
      
      * reverting changes and addressing comments
      
      * docstring correction
      
      * addressing nits
      
      * addressing nits
      
      * addressing nits 3
      
      * bumping up the accelerate version to 0.10.0
      
      * resolving import
      
      * update setup.py to include deepspeed dependencies
      
      * Update dependency_versions_table.py
      
      * fixing imports
      
      * reverting changes to CI dependencies for "run_tests_pipelines_tf*" tests
      
      These changes didn't help with resolving the failures and I believe this needs to be addressed in another PR.
      
      * removing `accelerate` as hard dependency
      
      Resolves issues related to CI Tests
      
      * adding `accelerate` as dependency for building docs
      
      resolves failure in Build PR Documentation test
      
      * adding `accelerate` as dependency in "dev" to resolve doc build issue
      
      * resolving comments
      
      1. adding `accelerate` to extras["all"]
      2. Including check for accelerate too before import HFDeepSpeedConfig from there
      Co-Authored-By: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * resolving comments
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      21a77242
  23. 16 Jun, 2022 1 commit
  24. 02 Jun, 2022 2 commits
  25. 26 May, 2022 1 commit
  26. 23 May, 2022 1 commit