Yih-Dar
871c31a6f1
🔥 Rework pipeline testing by removing PipelineTestCaseMeta
🚀 ( #21516 )
...
* Add PipelineTesterMixin
* remove class PipelineTestCaseMeta
* move validate_test_components
* Add for ViT
* Add to SPECIAL_MODULE_TO_TEST_MAP
* style and quality
* Add feature-extraction
* update
* raise instead of skip
* add tiny_model_summary.json
* more explicit
* skip tasks not in mapping
* add availability check
* Add Copyright
* A way to diable irrelevant tests
* update with main
* remove disable_irrelevant_tests
* skip tests
* better skip message
* better skip message
* Add all pipeline task tests
* revert
* Import PipelineTesterMixin
* subclass test classes with PipelineTesterMixin
* Add pipieline_model_mapping
* Fix import after adding pipieline_model_mapping
* Fix style and quality after adding pipieline_model_mapping
* Fix one more import after adding pipieline_model_mapping
* Fix style and quality after adding pipieline_model_mapping
* Fix test issues
* Fix import requirements
* Fix mapping for MobileViTModelTest
* Update
* Better skip message
* pipieline_model_mapping could not be None
* Remove some PipelineTesterMixin
* Fix typo
* revert tests_fetcher.py
* update
* rename
* revert
* Remove PipelineTestCaseMeta from ZeroShotAudioClassificationPipelineTests
* style and quality
* test fetcher for all pipeline/model tests
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-02-28 19:40:57 +01:00
Kashif Rasul
ba0e370dc1
[time series] updated expected values for integration test. ( #21762 )
...
* updated expected
* prediction_length fix
* prediction_length default value
* default prediction_length 24
* revert back prediction_length default
* move prediction_length test
2023-02-24 12:36:54 +01:00
Kashif Rasul
df06fb1f0b
Time series transformer: input projection and Std scaler ( #21020 )
...
* added loc and scale outputs from scalers
* fix typo
* fix tests
* fixed formatting
* initial StdScaler
* move scaling to optional str
* calculate std feature for scalers
* undid change as it does not help
* added StdScaler with weights
* added input projection layer and d_model hyperparam
* use linear proj
* add back layernorm_embedding
* add sin-cos pos embeddings
* updated scalers
* formatting
* fix type
* fixed test
* fix repeated_past_values cal.
* fix when keepdim=false
* fix default_scale
* backward compatibility of scaling config
* update integration test expected output
* fix style
* fix docs
* use the actual num_static_real_features in feature_dim cal
* clarified docs
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* prediction_length is not optional
* fix for reviewer
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* get rid of un-needed new lines
* fix doc
* remove unneeded new lines
* fix style
* static_categorical_features and static_real_features are optional
* fix integration test
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fixing docs for multivariate setting
* documentation for generate
---------
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-02-22 07:50:13 +01:00
Sylvain Gugger
6f79d26442
Update quality tooling for formatting ( #21480 )
...
* Result of black 23.1
* Update target to Python 3.7
* Switch flake8 to ruff
* Configure isort
* Configure isort
* Apply isort with line limit
* Put the right black version
* adapt black in check copies
* Fix copies
2023-02-06 18:10:56 -05:00
Sylvain Gugger
209bec4636
Add a decorator for flaky tests ( #19498 )
...
* Add a decorator for flaky tests
* Quality
* Don't break the rest
* Address review comments
* Fix test name
* Fix typo and print to stderr
2022-10-12 14:00:17 -04:00
Kashif Rasul
5cd16f01db
time series forecasting model ( #17965 )
...
* 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: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/__init__.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/__init__.py
Co-authored-by: NielsRogge <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: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain 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: NielsRogge <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: NielsRogge <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: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: NielsRogge <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: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
Co-authored-by: Sylvain 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: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: NielsRogge <niels.rogge1@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-09-30 15:32:59 -04:00