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

Pom profile changes #525

Merged
merged 6 commits into from
Mar 29, 2024
Merged

Pom profile changes #525

merged 6 commits into from
Mar 29, 2024

Conversation

Craigacp
Copy link
Collaborator

@Craigacp Craigacp commented Mar 1, 2024

Switch tensorflow-core-platform so it's only generated when the deploying profile is set. Lets the profiles default through so the platform has the correct values when pulled in without any profiles activated.

@saudet
Copy link
Contributor

saudet commented Mar 1, 2024

As I pointed out before, this isn't going to work with other tools than Maven...

@Craigacp
Copy link
Collaborator Author

Craigacp commented Mar 2, 2024

It worked when we tested it with gradle earlier today as it defaults in the pom and platform pulls in all the dependencies.

<property>
<name>javacpp.platform.host</name>
<name>!javacpp.platform</name>
Copy link
Collaborator

@karllessard karllessard Mar 2, 2024

Choose a reason for hiding this comment

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

There is no need of having this profile if we set the default value of javacpp.platform to ${os.name}-${os.arch} by default in the pom properties, and simply let user override it in the command line if needed

@karllessard
Copy link
Collaborator

As I pointed out before, this isn't going to work with other tools than Maven...

The new strategy here @saudet is that we'll build tensorflow-core-platform only when releasing TFJava as part of the CI/CD. The local build will skip it, hence removing the need of playing with platform properties like we were doing originally.

@saudet
Copy link
Contributor

saudet commented Mar 2, 2024

Yeah, sure, feel free to experiment, but do test with other tools is all I can recommend. In the end, I think you'll find the the way I'm doing it in the presets is the least worst

@@ -74,6 +72,9 @@
<properties>
<javacpp.platform>${os.name}-${os.arch}</javacpp.platform>
</properties>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be removed as well, as it will be set in the top properties on this file

@@ -41,25 +41,25 @@
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-native</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.linux-x86_64.extension}</classifier>
<classifier>linux-x86_64</classifier>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should keep using properties but the with an extension here (e.g. ${javacpp.platform.linux-x86_64), just so we know the values are consistent. Not strong opinion either way.

@karllessard karllessard merged commit 5c93ae1 into tensorflow:master Mar 29, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants