Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dotnet kit #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add dotnet kit #154

wants to merge 1 commit into from

Conversation

ntovas
Copy link

@ntovas ntovas commented Oct 8, 2021

I haven't implement yet the packing for the submission and the scripts provided are currently only for windows.
If you want to include c# as a language let me know so I can finalize it.

@StoneT2000
Copy link
Member

StoneT2000 commented Oct 9, 2021

Thanks! We'd greatly appreciate this package!

Could you clarify that this is for windows only at the moment? And additionally update the readme and add a line e.g.

- C# (maintained by @ntovas)

at the bottom of getting started

Let me know when this PR is more or less ready and we can merge this in.

@ntovas
Copy link
Author

ntovas commented Oct 9, 2021

I will add tomorrow the scripts required by Linux, actually they are exactly the same but with .sh extension and #!/bin/bash at the start of the file, and also I will add my handle so if anyone has issues to contact me.
If you need anything else in order to run the submissions in the evaluation environment let me know.

@StoneT2000
Copy link
Member

Only thing we need to do as well before merging is do a test submission using the script you provide.

@ntovas
Copy link
Author

ntovas commented Oct 10, 2021

@StoneT2000 one last question, there is an option to include the dotnet core framework in the application and produce a single executable, with this option the submission file will be significantly bigger (~10-20MB vs ~100KB) but there will be no need to install the dotnet core framework in the evaluation vms/docker images.
What direction should I follow?

@StoneT2000
Copy link
Member

I'm quite sure the competition servers have nothing related to dot net, so this may be required.

You can test it by downloading your new kit into a kaggle notebook and trying to run it with kaggle envs

@StoneT2000
Copy link
Member

Ok given the number of new kits coming out suddenly (3 in a week!), i'll provide a test kaggle notebook where you can test your starter kit as ultimately the kit has to work on kaggle server vms (which are the same vms kaggle notebooks run on)

@StoneT2000
Copy link
Member

@ntovas https://www.kaggle.com/stonet2000/lux-ai-2021-testing-new-non-python-starter-kits?scriptVersionId=76868015

Copy that and try running your dot net agent using the notebook. If it works, then your code is submittable to kaggle servers and we'll be happy to merge this in!

@ntovas
Copy link
Author

ntovas commented Oct 11, 2021

@StoneT2000 Will do thanks, kind busy day at work today, so maybe tomorrow.

@jorelius
Copy link

I look forward to the official kit but while we wait I put together a self contained kit for dotnet.

Kit: Github
Here is the Simple Kit running on Kaggle.

@StoneT2000
Copy link
Member

Just bumping this thread back to check on progress @ntovas (no rush!)

Otherwise, curious @jorelius could you potentially review what was written here / give feedback?

It seems like this is mostly in some working state

@StoneT2000 StoneT2000 added enhancement New feature or request starter-kit anything related to kit updates labels Oct 22, 2021
@@ -0,0 +1 @@
dotnet build ./Bot/ --configuration Release

Choose a reason for hiding this comment

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

This assumes that the Kaggle servers have dotnet installed. I do not believe that is the case. You will likely need to create a self contained executable that include the runtime and targets linux (i.e. dotnet publish -c Release -r linux-x64). There is a dockerfile at the base of the repo that might also be changed to install dotnet. I am not sure if that is the actual container that is run on Kaggle but if it is then you may forgo the self contained executable.

Copy link
Member

Choose a reason for hiding this comment

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

This should be code you run locally and then you submit the folder with the binary to Kaggle. This should be fine then.

Kaggle doesn't compile for you

Choose a reason for hiding this comment

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

dotnet gives you the option of creating a self contained executable or a runtime dependent executable. In the runtime dependent form you must have it (dotnet runtime) installed locally kind of like python, java, or node. (dotnet build ./Bot/ --c Release) will create a platform independent executable but it is dependent on the dotnet runtime. For it to run without dependances you have to build it for the platform [ dotnet publish -c Release -r linux-x64 ].

cwd = os.path.dirname(configuration["__raw_path__"])
else:
cwd = os.path.dirname(__file__)
agent_process = Popen(["dotnet", "./bin/Release/*/Bot.dll"], stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=cwd)

Choose a reason for hiding this comment

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

This is dependent on having the dotnet runtime installed on the running instance. You may need to use the targeted executable (./bin/Release/netcoreapp3.1/linux-x64/Bot)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request starter-kit anything related to kit updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants