mirror of
https://github.com/facebookresearch/ReAgent.git
synced 2026-05-17 12:40:39 +00:00
4c15e9d540
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/331 Main changes: - Warmstart and serving_modules are published to Manifold instead of Gluster. This is done mostly by using PathManager (part of fvcore, and will be soon OSSed as IOPath), and types.ManifoldPath instead of types.GlusterPath. All models are stored in reagent_models bucket, as those are accessible by Fast Transform and Hedwig enabled. - ReAgent will be able to publish multiple serving_modules (via `build_serving_modules`). - The entity IDs will be now generated on the flow by spawning child workflows (that don't do anything). Note, even when there's one serving module, it will have a different entity id than the workflow_id. - Remove some dead code. added capacity and publishing-key T77569440 UBN task: T70704619 Reviewed By: kittipatv Differential Revision: D24211962 fbshipit-source-id: a475b3a08a4e941ac4f850d5b994d48ee9335899
26 lines
631 B
Python
26 lines
631 B
Python
#!/usr/bin/env python3
|
|
|
|
from typing import Dict, List
|
|
|
|
from reagent.workflow.types import ModuleNameToEntityId
|
|
|
|
|
|
def get_workflow_id() -> int:
|
|
# This is just stub. You will want to replace this file.
|
|
return 987654321
|
|
|
|
|
|
def get_new_named_entity_ids(module_names: List[str]) -> ModuleNameToEntityId:
|
|
result = {}
|
|
i = 1
|
|
done_one = False
|
|
for name in module_names:
|
|
if not done_one:
|
|
result[name] = get_workflow_id()
|
|
done_one = True
|
|
else:
|
|
# this is just random, you'll want to replace
|
|
result[name] = 987654321 - i
|
|
i += 1
|
|
return result
|