Skip to content

Conversation

@haoyang77
Copy link

Hi. This is what I have for C++ parameterlist.

Although I have tested it by creating a pytorch C++ project, I would like to test it properly by using the GoodleTest framework. However I have problem to build the cpp tests. Do I just run python test/run_test.py to build the tests? Is there a way for me just to build the tests in test/cpp?

This is my first time contributing to open source project so many of my codes might need to be improved or not meet the requirement. Let me know if there is anything need to be changed.

Related issue: #25883

@haoyang77
Copy link
Author

haoyang77 commented Apr 19, 2020

cc. @yf225 @d-ferrara

@dr-ci
Copy link

dr-ci bot commented Apr 19, 2020

💊 Build failures summary and remediations

As of commit 70c5a82 (more details on the Dr. CI page):


  • 3/3 failures possibly* introduced in this PR
    • 1/3 non-CircleCI failure(s)

🕵️ 2 new failures recognized by patterns

The following build failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (1/2)

Step: "Build" (full log | pattern match details | 🔁 rerun) <confirmed not flaky by 2 failures>

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_data.py 
Auto-merging .circleci/cimodel/data/pytorch_build_data.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/dimensions.py 
Auto-merging .circleci/cimodel/data/dimensions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_definitions.py 
Auto-merging .circleci/cimodel/data/binary_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_data.py 
Auto-merging .circleci/cimodel/data/binary_build_data.py 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_xla_linux_xenial_py3_6_clang7_build (2/2)

Step: "Build" (full log | pattern match details | 🔁 rerun) <confirmed not flaky by 2 failures>

Apr 19 18:48:37 caused by: Connection refused (os error 111)
Apr 19 18:48:37 +++ eval 'extract_trap_cmd ' 
Apr 19 18:48:37 ++++ extract_trap_cmd 
Apr 19 18:48:37 ++++ printf '%s\n' '' 
Apr 19 18:48:37 +++ printf '%s\n' cleanup 
Apr 19 18:48:37 ++ trap -- ' 
Apr 19 18:48:37 cleanup' EXIT 
Apr 19 18:48:37 ++ which sccache 
Apr 19 18:48:37 ++ sccache --stop-server 
Apr 19 18:48:37 Stopping sccache server... 
Apr 19 18:48:37 error: couldn't connect to server 
Apr 19 18:48:37 caused by: Connection refused (os error 111) 
Apr 19 18:48:37 ++ true 
Apr 19 18:48:37 ++ rm /var/lib/jenkins/sccache_error.log 
Apr 19 18:48:37 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory 
Apr 19 18:48:37 ++ true 
Apr 19 18:48:37 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log 
Apr 19 18:48:37 ++ SCCACHE_IDLE_TIMEOUT=1200 
Apr 19 18:48:37 ++ RUST_LOG=sccache::server=error 
Apr 19 18:48:37 ++ sccache --start-server 
Apr 19 18:48:37 Starting sccache server... 
Apr 19 18:48:37 ++ sccache --zero-stats 

Extra GitHub checks: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 2 times.

@albanD albanD requested a review from glaringlee April 20, 2020 17:32
@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 20, 2020
@glaringlee
Copy link
Contributor

@haoyang77 please fix lint error first, replace tab with space.
To add cpp test, you can add your gtest in /pytorch/test/cpp/api/, and if it is a new file, don't forget to add that file into CMakeLists.txt.

To run c++ api test. You can build the entire pytorch, then the test executable will be build/bin/test_api, executing this will run all the test drivers in /pytorch/test/cpp/api/. To run a specific one, you can do something like:
./build/bin/test_api --gtest_filter=ModulesTest.AdaptiveLogSoftmaxWithLoss --gtest_stack_trace_depth=10 --gmock_verbose=info

Copy link
Contributor

@glaringlee glaringlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haoyang77 I commented above, please let me know if you need anything.

facebook-github-bot pushed a commit that referenced this pull request Jun 29, 2020
Summary:
This diff contains the implementation of C++ api for ParameterDict from #25883, refer to  #36904 and #28652
Pull Request resolved: #40654

Test Plan: Add unit test in this diff

Differential Revision: D22273265

Pulled By: glaringlee

fbshipit-source-id: 9134a92c95eacdd53d5b24470d5f7edbeb40a488
@facebook-github-bot
Copy link
Contributor

Hi @haoyang77!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 28, 2022
@github-actions github-actions bot closed this Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open source Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants