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 demo: fit a line #130

Merged
merged 5 commits into from
Jun 8, 2017
Merged

Conversation

Yancey1989
Copy link
Collaborator

Fixed #110

  1. Add cloud dataset
  2. Add demo: fit a line from book repo

@@ -0,0 +1,10 @@
Metadata-Version: 1.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

These files are not needed?

  • PKG-INFO
  • SOURCES.txt
  • dependency_links.txt
  • top_level.txt

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.


__all__=["train", "test", "fetch"]

CURRENT_DATACENTER = os.getenv("CURRENT_DATACENTER")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Environment variables should be named like "[APPLICATION]_[VARIABLE]" to avoid name conflicts. Like: PADDLE_CLOUD_CURRENT_DATACENTER

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.


CURRENT_DATACENTER = os.getenv("CURRENT_DATACENTER")

common.DATA_HOME = "/pfs/%s/public/dataset" % CURRENT_DATACENTER
Copy link
Collaborator

Choose a reason for hiding this comment

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

Data dir should look like /pfs/%s/public/uci_housing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

public is the public folder mount in Pod with readOnly access, and add a sub-folder dataset to storage all the datasets is help for adding others in the public folder. And also in PaddlePaddle dataset, the directory is ~/.cache/paddle/dataset/...

def train():
return common.cluster_files_reader(
TRAIN_FILES_PATTERN,
trainer_count = int(os.getenv("TRAINERS", "1")),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Read trainer_count from PADDLE_INIT_NUM_GRADIENT_SERVERS

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

'paddle.cloud',
'paddle.cloud.dataset']

setup(name='pcloud',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Package name and import name should be the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.
Change the package name paddle.cloud=> pcloud

@@ -0,0 +1,49 @@
import paddle.v2 as paddle
import paddle.cloud.dataset.uci_housing as uci_housing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not use the name paddle, may conflict with original paddle project

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM

@Yancey1989 Yancey1989 merged commit cb92ec3 into PaddlePaddle:develop Jun 8, 2017
@Yancey1989 Yancey1989 deleted the demo_fit_a_line branch June 8, 2017 02:01
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.

None yet

2 participants