-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add demo: fit a line #130
Conversation
@@ -0,0 +1,10 @@ | |||
Metadata-Version: 1.0 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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")), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docker/python/setup.py
Outdated
'paddle.cloud', | ||
'paddle.cloud.dataset'] | ||
|
||
setup(name='pcloud', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
demo/fit_a_line/train.py
Outdated
@@ -0,0 +1,49 @@ | |||
import paddle.v2 as paddle | |||
import paddle.cloud.dataset.uci_housing as uci_housing |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixed #110