1. 12 8月, 2020 1 次提交
  2. 07 8月, 2020 2 次提交
    • L
      [Dy2Stat-ErrorMessage]Optimize error value to improve readability when error... · 168ea223
      liym27 提交于
      [Dy2Stat-ErrorMessage]Optimize error value to improve readability when error raised in runtime.  (#25970)
      
      * don't remove op_callstack
      
      * [Dy2Stat-ErrorMessage] Optimize error value to improve readability if error raised in run-time. 
        1. update op_callstack with original information;
        2. simplify error value to improve readability if error raised in run-time.
      
      * Fix error in Python3. 
      168ea223
    • L
      [Dy2Stat-ErrorMessage]Enhance original error and create new exception (#25798) · 12bf9d71
      liym27 提交于
      * [Dy2Stat-ErrorMessage]Enhance original error and create new exception. test=develop
      
      * Delete redundant code and change func name to create_and_update_origin_info_map. 
      
      * optimize loop_transformer. 
      
      * fix bug in print_transformer.
      
      * Modify code according to the comments.
      12bf9d71
  3. 06 8月, 2020 1 次提交
    • S
      add paddle.utils.deprecated. (#25912) · c8d0d141
      Shibo Tao 提交于
      * add paddle.utils.deprecated.
      
      * add docstring. test=develop
      
      * add alias paddle.utils.deprecated. test=develop
      
      * rm deprecated in python/paddle/fluid/annotations.py. test=develop
      
      * 1. check version before warning. 2. bug fix. test=develop
      
      * bug fix. test=develop
      
      * use paddle.fluid.require_version. test=develop
      
      * fix doc
      
      * fix doc. test=develop
      
      * fix doc. test=develop
      
      * bug fix. test=develop
      
      * use packaging.version. test=develop.
      
      * enhance doc. test=develop
      
      * add compare_version function. test=develop
      
      * add version.py. test=develop
      
      * remove packaging. test=develop
      
      * move compare_version to deprecated.py. test=develop
      
      * remove print. test=develop
      
      * fix. test=develop
      
      * fix. test=develop
      
      * fix. test=develop
      
      * fix. test=develop
      
      * inline. test=develop
      
      * fix. test=develop
      c8d0d141
  4. 04 8月, 2020 1 次提交
  5. 30 7月, 2020 1 次提交
    • L
      [Dy2Stat-ErrorMessage] Add interface:create_origin_info_map and... · 452be895
      liym27 提交于
      [Dy2Stat-ErrorMessage]  Add interface:create_origin_info_map and attach_origin_info for AST node (#25627)
      
      * Add interface:create_origin_info_map and attach_origin_info for AST node. test=develop
      
      * Fix code according to comments from reviewers. test=develop
      452be895
  6. 29 7月, 2020 1 次提交
  7. 21 7月, 2020 1 次提交
  8. 16 7月, 2020 2 次提交
  9. 14 7月, 2020 1 次提交
    • C
      [Dy2static] Refactor ProgramTranslator save_inference_model API (#24989) · 41d22472
      Chen Weihang 提交于
      * experimental refactoring, test=develop
      
      * add TranslatedLayer & remove StaticModelRunner, test=develop
      
      * revert tracedlayer change, test=develop
      
      * fix test_mnist unittest error, test=develop
      
      * add doc & examples, test=develop
      
      * polish doc details, test=develop
      
      * add imperative.jit module, test=develop
      
      * change TranslatedLayer pos, test=develop
      
      * adjust jit module import path, test=develop
      
      * polish doc based review result
      
      * add SaveLoadConfig.separate_params to save paraams separately
      
      * add Layer.buffer support, test=develop
      
      * polish doc details based review result, test=develop
      
      * polish details baesd review comments, test=develop
      
      * add empty str check for param, test=develop
      
      * add unittests, test=develop
      
      * polish details based review comment, test=develop
      
      * remove blanks in comment, test=develop
      
      * polish doc details, test=develop
      
      * update imperative doc link, test=develop
      
      * add api attr for load, test=develop
      41d22472
  10. 05 7月, 2020 1 次提交
  11. 02 7月, 2020 1 次提交
  12. 30 6月, 2020 1 次提交
    • H
      [Dy2stat] Support Various-Length Return Grammar in Dy2stat (#25249) · 5e8e6dad
      Huihuang Zheng 提交于
      Support Various-Length Return Grammar in Dy2stat. This PR is a follow-up of https://github.com/PaddlePaddle/Paddle/pull/25176 .
      
      The basic idea is putting no-value placeholder variables at `return` statement to make all `return` statement have same length, after that the static graph can have fixed fetch output (code at return_transformer.py). Then remove those no-value placeholder when we finally return dygraph result (code at partial_program.py).
      
      However, various length return in Bert model is still not supported. The dy2stat can change the code as I wish but some ops which check shape at compile time (e.g. Reshape, MatMul) will throw error because of the no-value-placeholder may not have the required shape. Is this a matter? To me, those no-value placeholder will be replaced as really values meeting shape requirements at run time, so I think the solution should be some way to do the compile-time checking. By the way, every time when we have dynamic shape, it often causes problem in dy2stat. We should find a way to handle it in the future.
      
      Fixing various return in Bert is my TODO thing and I will also find some other existing models for verification.
      5e8e6dad
  13. 29 6月, 2020 2 次提交
    • A
      [Dy2stat]Support buffers and register_buffer in Layer (#24888) · 02adf68d
      Aurelius84 提交于
      * support to save varBase created in __init__ test=develop
      
      * polish code test=develop
      
      * refine to_static_var test=develop
      
      * refine warning test=develop
      
      * add unitteset for to_static_var test=develop
      
      * fix logger test=develop
      
      * polish buffers en doc test=develop
      
      * fix param_guard test=develop
      
      * refine en doc test=develop
      02adf68d
    • H
      [Dy2stat] Add Basic Support for Grammar 'return' (#25176) · 6f631a27
      Huihuang Zheng 提交于
      This PR added basic support for 'return' grammar in dy2stat. It supports the control flow of 'return'.
      
      The basics idea is using a return value variable to store the early return statements and boolean state variables with if-else to skip the statements after the return statements.
      
      **This PR is very basic support. There are some corner cases I didn't develop/test**. For example, 'return None', 'return different length of variables', 'return non-tensor and tensor together', 'no return statement'. **These corner cases will be done in my next PRs**. Target date is this week.
      
      **Note**: 
      1. for the unit test, I changed test_program_translator.py because the StaticCode of `dyfunc_with_if_else` will change. To guarantee the correctness of `dyfunc_with_if_else`, I also run it in `TestRecursiveReturn` in test_return.py.
      
      2. I commented the early return code in bert_dygraph_model.py because 'return different length of variables' is unsupported now. I also know that there are some other models used early return and we didn't enable it in the unit test. I will add support for it in next PRs and then re-enable those tests.
      6f631a27
  14. 24 6月, 2020 1 次提交
  15. 19 6月, 2020 2 次提交
  16. 18 6月, 2020 1 次提交
  17. 17 6月, 2020 1 次提交
  18. 11 6月, 2020 1 次提交
    • L
      [Dy2Static]Convert var.shape stmt and Convert the return variables of... · f16e2778
      liym27 提交于
      [Dy2Static]Convert var.shape stmt and Convert the return variables of Tensor-dependent 'if' staments to Tensor if it not  (#24911)
      
      * Support int and long: int or long -> six.integer_types. 
      
      * Modify test_tensor_shape: fix bug and modify comment. 
      
      * Support convert_var_shape to convert var.shape stmt
      
      * Modify code in ifelse_simple_func.py because don't support return non-Tensor in Tensor-dependent 'if' stament currently. 
      
      * Convert the return variables of Tensor-dependent 'if' staments to Tensor if it not. test=develop
      f16e2778
  19. 09 6月, 2020 1 次提交
  20. 05 6月, 2020 1 次提交
    • L
      [Dy2Static] Add convert_ifelse to run the transformed code dynamically (#24866) · a9dca580
      liym27 提交于
      * cast var in convert_logical_XX. 
      
      * Add convert_ifelse function in convert_operators.py  
      
      * Add logical_transformer. Remove LogicalTransformer from loop_transformer.py 
      
      * Revert modified tests in PR24799(convert_while_stmt). 
      
      * Comment and modify code that doesn't support `return` statement. 
      
      * Remove unnecessary class: MergeAssignTransformer, NodeTestTransformer and IfConditionVisitor in ifelse_transformer. 
      a9dca580
  21. 03 6月, 2020 3 次提交
  22. 02 6月, 2020 1 次提交
  23. 28 5月, 2020 2 次提交
  24. 27 5月, 2020 1 次提交
  25. 26 5月, 2020 2 次提交
  26. 21 5月, 2020 1 次提交
  27. 19 5月, 2020 3 次提交
  28. 18 5月, 2020 1 次提交
    • C
      [Dy2static] Add for enumerate Variable support (#24398) · 03ba5b74
      Chen Weihang 提交于
      * initial test
      
      * for enumerate basic implement, test=develop
      
      * update unittests, test=develop
      
      * refine unittests to adapt new training mode, test=develop
      
      * refactor for node stmts parsing code, test=develop
      
      * self-review & polish details, test=develop
      03ba5b74
  29. 15 5月, 2020 2 次提交