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

can it run use ParameterServerStrategy #587

Open
Coder-Yifan opened this issue Jun 22, 2022 · 3 comments
Open

can it run use ParameterServerStrategy #587

Coder-Yifan opened this issue Jun 22, 2022 · 3 comments

Comments

@Coder-Yifan
Copy link

I found all examples use MultiWorkerMirroredStrategy

@leewyang
Copy link
Contributor

Yes, in theory, it should be supported, especially when using InputMode.TENSORFLOW (where Spark is really just being used as a cluster/resource manager to start up the nodes of your TF cluster).

That said, the ParameterServerStrategy has been marked experimental since the DistributionStrategies were initially introduced several years ago, so there hasn't been a lot of emphasis on it, and I would proceed with caution when using it.

@Coder-Yifan
Copy link
Author

Coder-Yifan commented Jun 23, 2022

But tf.distribute.experimental.ParameterServerStrategy needs parameter “cluster_resolver”,how can i pass the parameter in main_fuc

cluster = TFCluster.run(sc, main_fun, args, args.cluster_size, num_ps=2, tensorboard=args.tensorboard,input_mode=TFCluster.InputMode.TENSORFLOW, master_node='chief')

def main_fun(args, ctx):
    """Example demonstrating loading TFRecords directly from disk (e.g. `HDFS)` without tensorflow_datasets."""
    strategy = tf.distribute.experimental.ParameterServerStrategy()#cluster_resolver```

@leewyang
Copy link
Contributor

Pretty sure this should work, since we use TF_CONFIG to set up the cluster.

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

No branches or pull requests

2 participants